How set data in table in one row ?
I have table here i have three same data in Country and company. I need set data in columns in one row. Like DE 10051 15.04.2016 14:13:02 15:04.2016 14:22:13.
How can i do this?
It was very simple:
First SORT the table by keys of internal table for what deleting duplicates would be going.
SORT lt_tables BY country company.
Then Loop on this table with assigning for checking initial field(and not initial). And loop in the loop with WHERE , here we filter by country and company.
LOOP AT lt_tables ASSIGNING <ls_tables>.
IF <ls_tables>-table04 IS INITIAL.
LOOP AT lt_tables INTO ls_tables WHERE country = <ls_tables>-country AND
company = <ls_tables>-company AND
table04 IS NOT INITIAL.
and after that simple data copy (assign) for field from filtered by company and country.
<ls_tables>-table04 = ls_tables-table04.
and delete duplicates in table by my sorted keys.
DELETE ADJACENT DUPLICATES FROM lt_tables COMPARING country company.