2007 Nov 02 9:07 AM
There are two fields in one table and 2 fields from another.
For e.g 2 fields from EKKO and 2 fields from EKPO.
U need retrieve them as 4 fields in another table.(meaning the should display in the same row)
EKKO -FIELD1 EKKO-FIELD2 EKPO-FIELD3 EKPO-FIELD4
CONDITION : Should not use JOIN.How can we acheive it
I used internal table.
But it is printing like follows
EKKO -FIELD1 EKKO-FIELD2
EKPO-FIELD3 EKPO-FIELD4
How to achieve this in the same line using IT?
2007 Nov 02 9:13 AM
Hi
Try this.Use all entries and retrieve the values.
Thanks
Vasudha
There are two fields in one table and 2 fields from another.
For e.g 2 fields from EKKO and 2 fields from EKPO.
U need retrieve them as 4 fields in another table.(meaning the should display in the same row)
EKKO -FIELD1 EKKO-FIELD2 EKPO-FIELD3 EKPO-FIELD4
CONDITION : Should not use JOIN.How can we acheive it
I used internal table.
But it is printing like follows
EKKO -FIELD1 EKKO-FIELD2
EKPO-FIELD3 EKPO-FIELD4
How to achieve this in the same line using IT?
2007 Nov 02 9:13 AM
Hi,
Select data from EKKO then using for all entries select data from EKPO.
Loop on EKKO pass data to final internal table, read EKPO using read statement
if sy-sub rc eq 0 then pass data from EKPO to final internal table.
Regards,
Prashant
2007 Nov 02 9:17 AM
A small correction for prashant reply
Get data from EKKO into IT_EKKO
Get data from EKPO into IT_EKPO using for all entries of IT_EKKO
loop at IT_EKPO. " Its IT_EKPO instead of IT_EKKO
read table IT_EKKO with key EBELN = IT_EKPO-EBELN.
if sy-subrc = 0.
move required fields to IT_FINAL.
endif.
Required data is available in IT_FINAL.Regards
Gopi
2007 Nov 02 9:13 AM
Hi
Try this.Use all entries and retrieve the values.
Thanks
Vasudha
2007 Nov 02 9:18 AM
Hi,
Try this,
Read data into itab_ekko and itab_ekpo tables.
Loop at itab_ekko.
Read table itab_ekpo with key field1 = itab_ekpo-field1.
If sy-subrc = 0.
Move itab_ekko-field1 = itab_final-field1.
Move itab_ekko-field2 = itab_final-field2.
Move itab_ekpo-field3 = itab_final-field3.
Move itab_ekpo-field4 = itab_final-field4.
Append itab_final.
Endloop.
Regards,
Ruthra
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |