cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code for a custom field added to LIS Communication structure for Del

Former Member
0 Kudos

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. I know we can run SMOD on the enhancement LEINS001 to write the code for LIS Communication structure customer exit. But we have never writen such a code for LIS Communication Structure enhancement and also don't know on how to make the Delta mechanism works in the code. We would be very appreciated if some expert here can provide the sample code!

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

edwin_harpino
Active Contributor
0 Kudos

hi Kevin,

take a look Sanyam's weblog

/people/sanyam.kapur/blog/2005/04/30/custom-fields-and-bw-extractors-making-a-mixed-marriage-work-part-ii

hope this helps.

Former Member
0 Kudos

hi AHP,

Have you tried Sanyam's code listed in this article you recommended?

Now our R3 team has added a custom field called ZZZ to EKKO table and I modify the code to suit our need and the code would be as following:

&----


*& Include ZXM06U16 *

&----


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.

The compile of the above code works fine and we activated everywhere including project level. Then we set debug points in this code, and run RSA3 on 2LIS_02_ITM, but find the extraction program never reaches this code or call this user exit function EXIT_SAPLEINS_001 of this enhancement LEINS001. Any reason?

Thanks

Kevin

Message was edited by: Kevin Smith

0 Kudos

Hi Kevin,

The exit 'EXIT_SAPLEINS_001' is not executed at the time of extraction as the CMOD-enhancement.

Logistic Cockpit datasources reads from Setup-tables (like MC02M_0ITMSETUP for 2LIS_02_ITM) when you execute Full or Delta-init. request - The Setup-tables are populated in a separate IMG-process (tcode: SBIW): "Data Transfer to the SAP Business Information Warehouse -> Settings for Application-Specific DataSources (PI) -> Logistics -> Managing Extract Structures -> Initialization"

The program for population of Setup-tables calls the exit 'EXIT_SAPLEINS_001' which will activate your breakpoint.

Remember to delete the content of a Setup-table before performing a new Setup-run which the same selections or you will get overlapping/doubled results.

The exit is of course also executed during the LO delta-process, either in Direct, Queued or V3 update mode. This part of the update is happening before data is written to the BW delta-queue (tcode: RSA7)

Best regards,

Morten