Hi All,
I'm working in SAP BW. I have created a query which I am using in Analysis process designer which feeds data to a transactional ODS.
In the APD the condition made on the query cannot be reached. I want to create a transformation between a query and a transactional ODS that should fetch me TOP 10 materials (as per their sales value)
In the APD the condition made on the query cannot be reached (like TOP N Materials).
I got a ABAP routine to sort the result (in a step of APD). It was like this:
DATA: ls_source TYPE y_source_fields,
ls_target TYPE y_target_fields.
data: rank(4) type N.
sort ls_source descending by KYF_0002.
clear rank.
loop at ls_source into ls_source.
add 1 to rank.
MOVE-CORRESPONDING ls_source TO ls_target.
ls_target-key(10) = ls_target-BPARTNER.
ls_target-key+10(4) = ls_target-MDCHBWCCO__FRCHSHOP.
ls_target-RANKING = rank.
APPEND ls_target TO et_target.
ENDLOOP.
I have been trying for quite sometime to understand and customize this code as per my requirement but my lack of knowledge in ABAP has impaired me.
I need help in suggesting what all in this code is generic and what is specific to the sender's system which I should replace, and with what.
Please help !
Thanks,
Sharmishtha