07-24-2008 6:37 AM
experts,
if a structure( ex : zst1) contains a table type (ex : ztt1) ,
how to loop the table type into workarea.
thanks and regards.
07-24-2008 6:40 AM
Hi,
use nested Structure LOOPING for this.
check the link http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3364358411d1829f0000e829fbfe/content.htm
Regards,
Anirban
07-24-2008 6:40 AM
Hi,
use nested Structure LOOPING for this.
check the link http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3364358411d1829f0000e829fbfe/content.htm
Regards,
Anirban
07-24-2008 6:41 AM
Hi
Firstly create the table of same type as your table type .
Now pass your Workarea(Structure)-->table type to table created by u .
Now your table contains the data which you have in your table type .
Regards
Hitesh
07-24-2008 6:42 AM
declare another table itab of the same type as the included table in the structure..
now ...after data comes in to the structure zstr, write the following
itab [ ] = zstr-itabs [ ].
loop at itab into wa_itab.
:
:
:
endloop.
wa_itab is the work area of the type itab.
Edited by: Rudra Prasanna Mohapatra on Jul 24, 2008 7:43 AM
07-24-2008 7:54 AM
girija,
loop at itab into wa_itab."wa_itab is work area
endloop.
Amit.
07-24-2008 7:56 AM
Hi,
check this thread for looping Nested Internal Tables:
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9eaa35c111d1829f0000e829fbfe/content.htm
Regards
Adil
07-24-2008 8:02 AM
two tables SPFLI and SFLIGHT.
retrieve the fields CARRID, CONNID, CITYFROM & CITYTO from Table SPFLI.
And the fields FLDATE PRICE SEATSMAX & SEATSOCC from SFLIGHT on the condition that SPFLI-CARRID = SFLIGHT-CARRID & SPFLI-CONNID = SFLIGHT-CONNID.
Now the LOOP.....ENDLOOP will be like this :
Loop at t_spfli into fs_spfli.
write 😕 fs_spfli-carrid,
fs_spfli-connid.
Loop at t_sflight into fs_sflight where carrid = fs_spfli-carrid
and connid = fs_spfli-connid.
write 😕 fs_sflight-fldate,
fs_sflight-price,
fs_sflight-seatsocc,
fs_sflight-seatsmax.
Endloop.
Endloop.
Regards,
Nikunj shah