07-21-2016 9:04 AM
Hi,
I have an automatically generated table maintenance generator.
Fields are automatically sorted by key fields. I would like to sort it by a non-key field.
I have tried to modify it through the following options:
GT_TAB[] = EXTRACT[].
SORT GT_TAB BY ORDER.
EXTRACT[] = GT_TAB[].
Please advise me how to proceed.
BR,
Matei
07-21-2016 2:00 PM
07-21-2016 2:00 PM
07-21-2016 2:26 PM
Oh, I did search before posting. And not only searched, but tried for two days different solutions!
One of them is:
PROCESS BEFORE OUTPUT.
MODULE LISTE_INITIALISIEREN.
MODULE SORT_EXTRACT.
LOOP AT EXTRACT WITH CONTROL
TCTRL_/SAPLOM/XMM_CNDV CURSOR NEXTLINE.
MODULE LISTE_SHOW_LISTE.
ENDLOOP.
MODULE SORT_EXTRACT OUTPUT.
DATA gt_itab TYPE TABLE OF /SAPLOM/XMM_COND.
BREAK i321596.
gt_itab[] = extract[].
SORT gt_itab BY ORDR ASCENDING.
extract[] = gt_itab[] .
ENDMODULE.
Result of this solution in syntax check: "EXACT" expected, not "EXTRACT[]". I cannot access the EXTRACT table... I tried with and without the brackets!
Although, if I comment the rest of the code from the breakpoint onwards, I can access the global variable EXTRACT[] in the debugger, but I cannot pass the syntax check if I uncomment the rest of my lines.
I tried also the option Environment -> Modification -> Events: Event 17, 26, AA... But these events only create a blank include, which is not inserted in the TOP include of the function group of the maintenance view. I added it manually, edited it with the code above, but no luck solving the access to the EXTRACT[] variable 😐
Please help!
07-21-2016 2:55 PM
Good. A suggestion: You should have posted this information with your earlier question itself.
I will read through your reply and check if I can help you better.
Thanks,
Juwin
07-21-2016 3:13 PM
Hi,
You should create your sort PBO MODULE after the includes below in your maintenance function group master program (not in top inlude).
INCLUDE LxxxxTOP. " Global Data
INCLUDE LxxxxUXX. " Function Modules
eg. INCLUDE LxxxxO01. (as suggested in popup)
Thanks,
Zafer
07-21-2016 3:37 PM
Thank you so much! You are a life saver!
That did the trick!
I would reward 100 points if I could!!!