on 11-05-2018 3:34 PM
Hi Experts,
Iam trying to append lines to my extractor as per the target table.
example my extract ZDS_STAR has 1 line for the key , where as the target table PLAS has multiple lines and I need a field to be read from PLAS and add as many lines as it has for same key combination from my Extractor. Can some one send me example code for this scenerio.
Z_STAR structure:
Key1 Key2 Key3 PLAS-FIELD keyfig1 keyfig2
PLAS Structure:
Key1 Key2 Key3 PLAS-FIELD1
Key1 Key2 Key3 PLAS-FIELD2
Key1 Key2 Key3 PLAS-FIELD3
expected result of Z_STAR structure:
Key1 Key2 Key3 PLAS-FIELD1 keyfig1 keyfig2
Key1 Key2 Key3 PLAS-FIELD2 keyfig1 keyfig2
Key1 Key2 Key3 PLAS-FIELD3 keyfig1 keyfig2
Thanks
Sam
Hi Sam Kumar ,
See the exmaple below and hope it's helpful:
DATA: BEGIN OF ls_PLAS,
PLAS-FIELD TYPE ...,
keyfig1 TYPE ...,
keyfig2 TYPE ...,
END OF ls_PLAS,
lt_PLAS LIKE SORTED TABLE OF ls_PLAS.
lt_STAR[] = c_t_data[].
SELECT PLAS-FIELD, keyfig1, keyfig2 FROM PLAS
INTO CORRESPONDING FIELDS OF TABLE lt_PLAS
FOR ALL ENTRIES IN lt_STAR
WHERE key1 = lt_STAR-key1
AND key2 = lt_STAR-key2
AND key3 = lt_STAR-key3.
Best regards,
Maggie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.