on 2023 Feb 24 10:05 PM
Hi,
I need help.
I have a flat file that has a data in the below format.I would like to split this record into 3 records in the target DSO.
Required data in the target.
The code I have wrote in the start routine but this code is not giving me the required format.
The format I am getting with this logic is below.Can you please correct me where i am doing wrong here,
METHOD GLOBAL_START.
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_1.
DATA: MONITOR_REC TYPE rstmonitor.
DATA: ls_source_package type _ty_s_SC_1,
lt_source_package like table of ls_source_package.
loop at SOURCE_PACKAGE into ls_source_package
where
TCTIOBJNM eq '0COSTCENTER' or
TCTIOBJNM eq '0CO_AREA'.
lt_SOURCE_package = SOURCE_PACKAGE[].
case <SOURCE_FIELDS>-tctiobjnm.
when '0COSTCENTER'.
<SOURCE_FIELDS>-TCTIOBJNM = '0RESP_CCTR'.
append ls_source_package to lt_SOURCE_PACKAGE .
<SOURCE_FIELDS>-TCTIOBJNM = '0MAST_CCTR'.
append ls_SOURCE_PACKAGE TO lt_SOURCE_PACKAGE.
when '0CO_AREA'.
<SOURCE_FIELDS>-TCTIOBJNM = '0CO_MST_AR'.
append ls_SOURCE_PACKAGE TO lt_SOURCE_PACKAGE.
endcase.
endloop.
move lt_SOURCE_PACKAGE[] to SOURCE_PACKAGE[].
you need to use a record key to keep track of the record number being updated.
Regards,
Rathy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.