Scenario: cube needs a customer number and the datasource does not provide the customer number. The datasource however contains the country code such as DE,FR etc. based on the country code a particular customer number is assigned for eg: for DE it is DE01J45 and for FR it is FR023J4. This customer number needs to be populated in the cube.
SOLUTION:
In this scenario the transformation from the DSO to the cube is worked on where the start routine is coded to load a data element from a standard table with a field in the standard table as a reference. This is then used in the END routine with a CASE statement and the RESULT_FIELDS are loaded accordingly.
In this scenario the transformation from the DSO to the cube is worked on where the start routine is coded to load a data element from a standard table with a field in the standard table as a reference. This is then used in the END routine with a CASE statement and the RESULT_FIELDS are loaded accordingly.
START ROUTINE:
Code snippet:
select single low from ZBW_CONSTANT_TAB
into g_de_billto
where vnam = ‘JV_DE_BILLTO’.
select single low from ZBW_CONSTANT_TAB
into g_de_billto
where vnam = ‘JV_DE_BILLTO’.
END ROUTINE:
Code snippet:
case -/bic/zjvsource.
when ‘DE’.
-Ship_to = g_de_billto.
-Sold_to = g_de_billto.
-billtoprty = g_de_billto.
-payer = g_de_billto
end case.
-Ship_to = g_de_billto.
-Sold_to = g_de_billto.
-billtoprty = g_de_billto.
-payer = g_de_billto
end case.
<RESULT_FIELDS>-/bic/zjvsource.
case <RESULT_FIELDS>-/bic/zjvsource.
when ‘DE’.
<RESULT_FIELDS>-Ship_to = g_de_billto.
<RESULT_FIELDS>-Sold_to = g_de_billto.
<RESULT_FIELDS>-billtoprty = g_de_billto.
<RESULT_FIELDS>-payer = g_de_billto
end case.
very useful blog. keep it up.
ReplyDeletesap bi training in hyderabad