Skip to Content

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

Need some help with ABAP code ...

I am trying to do a lookup in a BI transformation routine to get a value for PROFIT_CTR via the MATERIAL data that I have coming from my DataSource. The field association I need doesn't exist except as an attribute on the MAT_PLANT InfoObject.

Here is my non-working code ... could somebody tell me what I am missing or doing wrong? Any insights are really appreciated.

CLASS lcl_transform IMPLEMENTATION.

METHOD compute_0PROFIT_CTR.

  • IMPORTING

  • request type rsrequest

  • datapackid type rsdatapid

  • SOURCE_FIELDS-MAT_PLANT TYPE /BI0/OIMAT_PLANT

  • EXPORTING

  • RESULT type tys_TG_1-PROFIT_CTR

DATA:

MONITOR_REC TYPE rsmonitor.

$$ begin of routine - insert your code only below this line -

... "insert your code here

*-- fill table "MONITOR" with values of structure "MONITOR_REC"

*- to make monitor entries

... "to cancel the update process

  • raise exception type CX_RSROUT_ABORT.

... "to skip a record

  • raise exception type CX_RSROUT_SKIP_RECORD.

... "to clear target fields

  • raise exception type CX_RSROUT_SKIP_VAL.

DATA PRFTCTR(6) TYPE C.

SELECT PROFIT_CTR

INTO PRFTCTR

FROM /BI0/PMAT_PLANT

WHERE MAT_PLANT = SOURCE_FIELDS-MAT_PLANT.

ENDSELECT.

RESULT = PRFTCTR.

$$ end of routine - insert your code only before this line -

ENDMETHOD. "compute_0PROFIT_CTR

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