Skip to Content

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

How to make added custom field Delta mechanism work for LO Cookpit?

We appended a new custome field into extraction structure of the LO Cookpit datasource 2LIS_02_ITM through RSA6. And then run CMOD to write the exit code to populate the value and it works fine. But after we read Roberto's Weblog:

/people/sap.user72/blog/2005/02/14/logistic-cockpit--when-you-need-more--first-option-enhance-it , find the enhancement we did can't make the Delta mechanism works if only this new field gets changed in a record, and the change cannot be reflected on BW.

In order to make the Delta mechansim works, one option is to append the custom field into one of the LIS Communication Structure MCEKKO of 2LIS_02_ITM extraction structure and then write the enhancement code to this LIS Communication Structure. In this way, the custom field can be treated like standard field that whenever it gets changed, the Delta mechanism or the user exit will be triggered. The enhancement for this LIS Communication Struture is LEINS001.

Now we've got two problems when doing the above enhancements of the LIS Communication structure:

1. Maintain extraction structure problem in LBWE:

We added a custom field, e.g., called ZZZ in LIS Communication structure MCEKKO (Purchasing Document Header) by creating a new custom append structure and add the field ZZZ into it, then activate the new append structure, but get warning msg like "Field name DUMMY is reserved (Do not use structure as include in DB table)".

We do find a field called DUMMY in the structure MCEKKO. How to get rid of the warning msg and successfully activate the new custom append structure with the new field ZZZ?

You could say that we can ignore the warning msg, but why the new custom field appended can not be seen from the right side pool of the Maintain Extract Structure in LBWE? We need to make the new custom field shows up in the right side pool and then drag it over to the left side frame and to activate the extraction structure to change it. But now it doesn't show up in the right frame pool!

2. Refer to Sanyam's weblog

/people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii, there is a sample code inside this article which tells us how the sample code looks like to write this LIS Communicaton structure enhancement to make the Delta mechanism works, below is the code we modified to suit our needs, but don't know if it would work?

DATA: i_t_ekko LIKE ekko OCCURS 1 WITH HEADER LINE.

DATA: ebeln LIKE ekpo-ebeln,

it_ekko TYPE TABLE OF ekko WITH HEADER LINE,

old_val(50) TYPE c. "For storing the value from the Field Symbol

FIELD-SYMBOLS <fs> TYPE ANY TABLE.

CASE zeitp.

WHEN 'MA'. "When creating a purchase order

MOVE '(SAPLEINS)T_EKKO[]' TO old_val.

ASSIGN (old_val) TO <fs>.

i_t_ekko[] = <fs>.

LOOP AT xmcekko.

ebeln = xmcekko-ebeln.

IF xmcekko-supkz = '1'. "Old Value ?

SELECT SINGLE * FROM ekko INTO it_ekko WHERE ebeln = ebeln.

xmcekko-ZZZ = it_ekko-ZZZ.

ELSE. "New Value ?

READ TABLE i_t_ekko WITH KEY ebeln = ebeln.

xmcekko-ZZZ = i_t_ekko-ZZZ.

ENDIF.

MODIFY xmcekko.

ENDLOOP.

EndCase.

Share your ideas and we will give you reward points!

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