Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

ABAP QUERY - SQ02 addition of logic in infoset (END-OF-SELECTION)

Former Member
0 Kudos

I guys I have read this discussion:

but solve partially my problem.

In particular I need special logic to interpret the single field from field symbol, for example:            


     loop at <goo> assigne <goo_wa>.                  

           tot_qty = tot_qty + <goo_wa>vbap-zmeng.


I would like to add new row, with my logic into stracture of query %G00.

thanks for any idea Omar


Former Member
0 Kudos

resolved, it is must to use for all filed-symbols


types: beging of l_summary,

     matnr type matnr,

end of l_summary.

data: lt_summary type standard table of l_summary,

         ls_summary type line of lt_summary,

         lf_string type string.

fiel-symbols: <gt> type standard table,

<ls> type any,

<lf> type any.

lf_string = '%G00[]'.

unassign <gt>

assign (lf_string) to <gt>.

if <gt> is assigned.

loop at <gt> assigning <ls>.

lf_string = '<ls>-vbap-matnr'.

unassign <lf>.

assign (lf_string) to <lf>.

if <lf> is assigned.

ls_summary-matnr = <lf>.