I am facing a problem in processing Internal Tables.
Suppose I have a list of PL IDs in a table ZPL. I have a list of employees in another table ZEMP.
Name details in NAME Table.
Now if user gives 4* as input parameter.
Then I need to retrieve all PL IDs starting with 4 and for each pl id I need to show them the employees under him and also emp name.
First I have retrieved data from ZPL & ZEMP by joining these two tables using PLEMPKEY and stored the data in ITAB1.
Now to get the name I am reading Name table. By doubt is
ITAB1 Structure is similar to ouput structure and is PLID, EMP details are filled. EMP NAME is vacant after the query.
Can we write a select query against the table NAME
SELECT NAME INTO CORRESPONDING FIELDS OF ITAB1 FROM NAME
WHERE ID = ITAB1-PLID.
I tried it is not working. Is this not possible.
Merging internal tables.
One more thing, if I have an internal table ITAB1 with 4 fields f1,f2,f3,f4 and
ITAB2 with F3 F5 F6 F7
Now I need to move F2 value to f7 for all MATCHING F3 entries.
I tried this using Loop at ITAB1 and Read at ITAB2 and moved the needed fields to a new internal table.
My doubt is can we directly update itab2 f7 field.
Please pass on your suggestions.