Hi Experts,
I created the Flat file data source for 0Material Master data object Data source has 30 fields, all 30 fields are mapped in the transformations.
now question is : when loading data from data source to 0material master data I want update only the fields which are having values(source), don't want to update the blank field.
say BI Master data looks like before loading data
0material colour Grade
M1 RED 30
say my Data source has values
0material color Grade
M1 YELLOW
in this case GRADE field has balnk value in the data source this time i don't want to update GRADE value to the master data.
after loading it should look as below(My requirement)
material color GRADE
M1 YELLOW 30
but we alreday mapped GRADE in the transformations so blank value overwrites the value 30 and looks like
material color Grade
M1 YELLOW
to achive this i wrote a following field level Routine ( but i didn't get desire result, still it is overwritting)
IF SOURCE_FIELDS-GRADE IS INITIAL
SKIP.
ELSE.
RESULT = SOURCE_FIELDS-GRADE.
ENDIF.
Instead of SKIP i used other key words EXIT, RETURNCODE and also used following exceptions
raise exception type CX_RSROUT_ABORT.
raise exception type CX_RSROUT_SKIP_RECORD.
raise exception type CX_RSROUT_SKIP_VAL.
But i can achive this requirement by writing following code(if field is balnk - read value from master data table)
IF SOURCE_FIELDS-GRADE IS INITIAL
SELECT SINGLE GRADE FROM /BI0/PMATERIAL INTO RESULT WHERE MATERIAL = SOURCE_FIELDS-MATERIAL
ELSE.
RESULT = SOURCE_FIELDS-GRADE.
ENDIF.
above mentioned code increases the loading time.
Please let me know how can we achive this requirement
Regards,
Chandra