cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in custom Supplier field in SC header

0 Kudos

Hi All,

I have a requirement where I have a custom Supplier field in SC header. If I am passing any value in the header it has to update the preferred supplier in the sc line item. I have written the code in the doc change BADI and it is working fine when I am populating the line item and passing the supplier in the header and saving or ordering the sc for first time. The issue happens when I am populating the line item and saving the sc and then updating the supplier in the sc header.  For example I am creating a sc  with 3 line item and saving it. After that updating the supplier at the header level, then the preferred vendor is changed in the 3rd line item but the first 2 line item remain unchanged. Please help me to resolve the issue.

Thanks in advance.

Sruti Nanda

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Please go through the information which are there in below link.

http://scn.sap.com/docs/DOC-25692

Hope this information can help you solve this problem.

Regards,

Naga.

Answers (2)

Answers (2)

robin_janke
Contributor
0 Kudos

Hi,

this seems to be an error in the BADI.

Logic should be something like:

1. Get header supplier

2. loop at item

     a. loop at partner table using item-guid and partner function

          i. set DEL_IND for this line

          ii. update et_partner or add this partner line to et_partner (sometimes not all data is coming to the doc_change_badi

     b. endloop.

     c. add a new line with the header supplier partner to the et_partner table

3. endloop

Regards,

Robin

Former Member
0 Kudos

So.. for example... if a Supplier : SUP1 is chosen by the requester in the header .. it has to be carried forward to the three line items .

First approach could be , in the change BADI choose whether the Supplier field is filled in header and modify the same supplier SUP1 in all the three line items in the item tables

Second approach.. enh in the webdynpro  of the item details of SC.

Code a post-exit in the modifyview of the SC Item webdynpro...

1.check whether the Supplier on SC hdr is filled(lets say SUP1

if yes then get the context element supplier of the current line item and update this with SUP1

Hope it helps.

0 Kudos

Thanks Vinay. I will definately try for this . But Meanwhile Instead of Changing in WD is there any BADI where can we write the code.