2007 Oct 05 1:58 PM
If we have "2" internal tables , with the fields of the "2" internal tables --which have equal structure --is it possible to form an extract?
2007 Oct 10 5:44 AM
Hi ,
In case if u want to combine both the internal tables , itab1 & itab2, you can append itab2 to itab1 or the vice versa.
If you want to combine both the tables into a new table ,
itab3[] = itab1[].
APPEND LINES OF i_tab2 TO i_itab3.
Reward if Useful.
Regards,
Chitra
Hi ,
In case if u want to combine both the internal tables , itab1 & itab2, you can append itab2 to itab1 or the vice versa.
If you want to combine both the tables into a new table ,
itab3[] = itab1[].
APPEND LINES OF i_tab2 TO i_itab3.
Reward if Useful.
Regards,
Chitra
2007 Oct 05 8:39 PM
Hi
You are wrong.
EXTRACT is the key word like SELECT or GET to fetch the data with respect to Field groups
it is not used to combine the 2 internal tables
Field groups are used when the data is too high, in which case Internal tables are not used due to memory problems
see this links and example
fieldgroups
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_gr.htm
http://www.geocities.com/SiliconValley/Grid/4858/sap/ABAPCode/Fieldgroups.htm
Sample Report Code
REPORT demo_extract.
NODES: spfli, sflight.
FIELD-GROUPS: header, flight_info, flight_date.
START-OF-SELECTION.
INSERT: spfli-carrid spfli-connid sflight-fldate
INTO header,
spfli-cityfrom spfli-cityto
INTO flight_info.
GET spfli.
EXTRACT flight_info.
GET sflight.
EXTRACT flight_date.
END-OF-SELECTION.
SORT STABLE.
LOOP.
AT FIRST.
WRITE / 'Flight list'.
ULINE.
ENDAT.
AT flight_info WITH flight_date.
WRITE: / spfli-carrid , spfli-connid, sflight-fldate,
spfli-cityfrom, spfli-cityto.
ENDAT.
AT flight_date.
WRITE: / spfli-carrid , spfli-connid, sflight-fldate.
ENDAT.
AT LAST.
ULINE.
WRITE: cnt(spfli-carrid), 'Airlines'.
ULINE.
ENDAT.
ENDLOOP.
Regards
Anji
2007 Oct 10 5:44 AM
Hi ,
In case if u want to combine both the internal tables , itab1 & itab2, you can append itab2 to itab1 or the vice versa.
If you want to combine both the tables into a new table ,
itab3[] = itab1[].
APPEND LINES OF i_tab2 TO i_itab3.
Reward if Useful.
Regards,
Chitra
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |