SQ01 Queries; Any rules / Coding posssible?
I must make a query and want to use TX SQ01.
When I join the 2 tables I have the issue that the link field has a leading zero in one table and without leading zero in the other table.
So the join will not work.
I am wondering if there is any option to implement a short coding (contatenate '0' with number on one table in the query, I did not find any option in SQ01 however perhaps someone knows....
Thanks in advance,
Dhinathayalan N replied
1) I suggest better dont select Table join better select direct read from table. Give the Standard Table here.
because if you select the table join the join condition is automatically assigned.
2) The pop up appears "Field Groups" I would suggest using the third option (create empty field groups)
because you donu2019t need all the fields (nobody does), so itu2019s better to choose whatever you really need
from scratch (empty) to improve the query performance. In next screen, choose which fields you want to include
into the infoset, itu2019s fairly simple actually because all you need to do is click and drag the fields
from the left pane into the right pane.
3) Click u2018Codeu2019. in that code selection having so many event and data declaration also. Please write the code over here.
4) In the declaration better declare one internal table.
5) in the start-of-selection write the code as below:
loop at standard table to wa. "call CONVERSION_EXIT_ALPHA_OUTPUT get the field values as leading zero's "pass into the newly created itab append wa to it. endloop. "and write the select query with for all entries.
Please see the below link its sample of SQ02.
www dot saptechnical dot com/Tutorials/SAPQuery/ABAPCode/Page1 dot htm
Edited by: Dhina DMD on Jun 3, 2011 11:03 AM