Monday, May 9, 2016

Q&A (SAP Query)


Q: How to create a check box in SAP Query SQ01/SQ02 ?

A: This can be done in Infoset itself (SQ02).

Select the pushbutton labeled Extras.
Select the tab labeled Selections, then click on Create icon.
On Create Selection popup, enter the name of the field say 'test' and select radiobutton Parameter.
On next popup, enter description and selection text.  For the format option, enter type C and length 1For Extras enter "AS CHECKBOX"

See this image:
Capture.JPG
Now the code you need to write inthe 'Record Processing' section of the Code tab.
1.JPG






Save the code.
Generate Infoset.

Run transacction SQ01.
Execute with the query made on this infoset.

You will find the checkbox in the selection-screen.
Check this and execute for desired result.




Q: I want to display my Sap Query report with the filter of the maximum number of one field (zversion) in table ztb_fpt_wf_usfbk. How can I do it with coding in sq02 --> Extra Tab?

A:
Choose Record Processing in Extra, access infoset parameters by its technical name (ztb_fpt_wf_usfbk-busnum). Write code as below:

DATAl_wk_version TYPE ztb_fpt_wf_usfbk-zversion.
PERFORM get_max_version_wf_usfbk USING    ztb_fpt_wf_usfbk-busnum
                                 CHANGING l_wk_version.
CHECK ztb_fpt_wf_usfbk-zversion l_wk_version.


Then update the change via TCode SQ01.

1 comment:

  1. Thanks for sharing the valuable information here. So i think i got some useful information with this content. Thank you and please keep update like this informative details.

    SAP ABAP Training in Chennai

    SAP FICO Training in Chennai

    ReplyDelete

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...