Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Fill Transformation from field not in transformation

Hi SAP Guru's

Please assist or advise me on the following issue.

I have a Cube that has to be filled using a DSO which is filled from the 0EC_PCA_1 extractor. Not all of the fields between the DSO and the Cube align but after investigating I have found that the there are fields which can be used to derive the values of other fields by means of a Master Data Read in my Transformation. However I am having trouble to do the following:

For example

In the DSO I have 0ACCOUNT which is mapped to 0ACCOUNT in the Cube. I have 0GL_ACCOUNT in the cube but NOT in the DSO.

I have another field in the Cube that is characteristic of 0GL_ACCOUNT which I want to populate for each 0ACCOUNT.

Thus what I want to do is read from 0GL_ACCOUNT via 0ACCOUNT to get the field in the cube.

Please advise if this is possible and how this can be done? I have a couple of fields that I want to map in this way.

Restraints:

I may not change the existing Cube or DSO.

Thanks in advance!

Former Member
replied

Hello ,

you can write code at end routine.

Select GL_ACCOUNT from ACCOUNT_MD_TAB into table IT_ACC_MD_TAB

FOR ALL ENTRIES IN RESULT_PACKAGE

where ACCOUNT=RESULT_PACKAGE-ACCOUNT.

SORT IT_ACC_MD_TAB BY GL_ACCOUNT.

DELETE ADJUCENT DUPLICATES FROM IT_ACC_MD_TAB BY GL_ACCOUNT.


LOOP AT RESULT_PACKAGE assigning <result_fields>.

Read table IT_ACC_MD_TAB INTO WA_ACC

                 WITH KEY Account = <result_fields>-account.

IF sy-subrc = 0.

RESULT = wa_acc-gl_account.

Endif.

ENDLOOP.

** for performance perspective,  instead of field routine go for end routine.

Regards,

Hitesh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question