SAP for Oil, Gas, and Energy Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and navigate the evolving energy landscape. Join the conversation today!
cancel
Showing results for 
Search instead for 
Did you mean: 

SOS "Extend IDOC OILDRV01"

Former Member
0 Kudos

I am using BD10, Change pointers to outbound material master from ECC to legacy system. I have created an IDOC extension for custom firlds and attached to the OILDRV01. IDOC is getting created successfully and able to see the extension in IDOC header.

ifind the USER EXIT : EXIT_SAPLOIK4_430 and EXIt_SAPLOIGT_260 wich one is the right one ?

The functionname to create idoc MASTERIDOC_CREATE_SMD_OILDRV01.

OILDRV01

I

I

I____ELOILDH

I

I___E1OILDS

I___E1OILDL

I

I__ZSEGMENT

Question is how do I poulate the custom fields which are declared in extended IDOC? Is there a BADI or user exit for populate the custom fields when the material is sent through BD10 and change pointer?

Thanks all.

1 ACCEPTED SOLUTION

kaushalya
Active Participant
0 Kudos

Correct function exit is EXIT_SAPLOIGT_260.

Use the enhancement OIGDRID1 to implement this.

You can write the code inside INCLUDE ZXOIGU20 to populate the custom fields.

View solution in original post

4 REPLIES 4

kaushalya
Active Participant
0 Kudos

Correct function exit is EXIT_SAPLOIGT_260.

Use the enhancement OIGDRID1 to implement this.

You can write the code inside INCLUDE ZXOIGU20 to populate the custom fields.

Former Member
0 Kudos

do you have any exemple for this please

kaushalya
Active Participant
0 Kudos

- Go to transaction SMOD

- Enter the Enhancement OIGDRID1

- Press Components and click change.

You can now see that enhancement uses function exit EXIT_SAPLOIGT_260 - Customer exit in the end of driver idoc fill.

This will be called from the ALE function modules in the form Call Customer Function '260'

- Double Click on the exit.

- Now the function module is displayed. Double click on include ZXOIGU20 in the function module.

- Insert your code into the include:

DATA W_SEGDATA LIKE zsegment "custom segment

   PI_IDOC_DATA-SEGNAM = 'ZSEGMENT'
      W_SEGDATA-field1 = value    "custom field taken from some table 
      W_SEGDATA-field2 = value    "custom field taken from some table
   PI_IDOC_DATA-SEGDATA = W_SEGDATA.
APPEND PI_IDOC_DATA.

Hope this helps.

Former Member
0 Kudos

thank you very much

but the relation between father and child Segment is N : M

muss

loop at it_eddid

insert not append ? and must be carrefull with the index

endloop