Problem in functional extension of standard datasource 0CO_OM_CCA_9

Hello SAP BI Gurus,

I would like to submit a question here regarding an annoying problem I'm facing with the functional extension of the datasource 0CO_OM_CCA_9 on our SAP/R3 system.

The extension was required to fill the Vendor column (LIFNR) in some cases where the standard extractor was leaving the field empty.

To fulfil such a requirement I put some custom code in the customer exit modules relating to the transactional datasources (function module EXIT_SAPLRSAP_001, include module ZXRSAU01), as shown below:

In include module ZXRSAU01:

CASE i_datasource.

when ...


when '0CO_OM_CCA_9'.



c_t_data = c_t_data.


The function module ZZ0CO_OM_CCA_9 finally contains the actual logic that fills the LIFNR field when it is empty and the other fields in the extracted structure enable the search of LIFNR in table MSEG:

data: begin of mov_cdc.

include structure ICCTRCSTA1.

data: end of mov_cdc.

  • If field LIFNR is empty its value is searched for in

  • table MSEG:

loop at c_t_data into mov_cdc.

if ( mov_cdc-lifnr is initial ).

select single lifnr into mov_cdc-lifnr from mseg

where MBLNR = mov_cdc-REFBN

and MJAHR = mov_cdc-REFGJ

and ZEILE = mov_cdc-REFBZ

and MATNR = mov_cdc-MATNR

and WERKS = mov_cdc-werks.

if ( sy-subrc = 0 ).

modify c_t_data from mov_cdc INDEX sy-tabix.





With this customer exit saved and activated, the datasource extractor works fine when launched locally on the R/3 system with the execution test utility for datasources (transaction RSA6).

The weird behaviour that I really can't explain arises when the extractor is activated remotely by our BW system.

In this case, differently from the local execution case, when the custom code is executed we see that the fields REFBN, REFGJ and REFBZ of the extracted structure are always empty and therefore the query select always fails.

Of course, we have replicated the datasource in the BW system more than once to be sure to make the datasource changes visible.

Since the R/3 user launching the extractor remotely (BWREMOTE) was different from the user that launched it successfully in local tests, as a first trial we tried to assign the SAP_ALL profile to BWREMOTE, but nothing has changed.

To summarize, the datasource extractor 0CO_OM_CCA_9 seems not to be extracting the fields




when started remotely, whereas it fills those fields when it is run locally.

Could anyone please give me an explanation of that?

Thank you in advance for your support.

Virginio D'Amico


Helpful Answer