2013 Jan 23 4:14 PM
Hello Experts,
I want to join database table like below
MKAL-PLNNR, MKAL-ALNAL, MKAL-PLNTY = 2 to PLAS table to get PLAS-PLNKN &
PLAS- ZAEHL. Now Passing MKAL-PLNNR, MKAL-PLNTY = 2, PLAS-PLNKN & PLAS-
ZAEHL to PLPO table to get PLPO-ARBID where PLPO-ARBID ≠ 00000000. Now again Passing the PLPO-ARBID ≠ 00000000 to CRHD table for obtaining CRHD-ARBPL. Passing CRHD-OBJID to CRCA table to get CRCA-KAPID. Again Passing CRCA-KAPID to KAKO to get KAKO-BEGZT, KAKO-ENDZT, KAKO-MEINS, KAKO-NGRAD, KAKO-PAUSE, KAKO-AZNOR .
How this can be done?
Regards,
Lora
Moderator message : Not enough re-search before posting, discussion unmarked and question.
Message was edited by: Vinod Kumar
2013 Jan 23 6:02 PM
hello,
Here is a suggestion -
step 1. MKAL-PLNNR, MKAL-ALNAL, MKAL-PLNTY = 2 to PLAS table to get PLAS-PLNKN &
PLAS- ZAEHL.
Join these tables based on makl-plnnr = plas-plnnr and mkal-alnal = plas-plnal. Get required data in itab1
step 2. Now Passing MKAL-PLNNR, MKAL-PLNTY = 2, PLAS-PLNKN & PLAS-
ZAEHL to PLPO table to get PLPO-ARBID where PLPO-ARBID ≠ 00000000.
For all entries in itab1 of step get data from PLPO in itab2
step 3. Now again Passing the PLPO-ARBID ≠ 00000000 to CRHD table for obtaining CRHD-ARBPL. Passing CRHD-OBJID to CRCA table to get CRCA-KAPID.
For all entries in step 2 get data from CRCA in itab3
step 4. Again Passing CRCA-KAPID to KAKO to get KAKO-BEGZT, KAKO-ENDZT, KAKO-MEINS, KAKO-NGRAD, KAKO-PAUSE, KAKO-AZNOR .
For all entries in step 3 get data from KAKO in itab4
Then you can use the itab's as required.
best regards
swanand