cancel
Showing results for 
Search instead for 
Did you mean: 

Changing line item delivery address in shopping cart need to reflect same in all line items

Former Member
0 Kudos

Hi All,

Need help on below,

I have a requirement that when we change the shopping cart line item delivery address same needs to reflect all line items.

Suppose a shopping cart having 3 line items 1, 2 and 3. if i change the delivery address of line item 1, the same needs to reflect the line item 2 and 3 as well.

In my case  if we change the 1's delivery address, after processing its genrating the IDOC on line item wise not in the header wise. And same having the different delivery address.

Thanks in advance.

regards:

Ramesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Ramesh,

for this you need to implement BADI BBP_DOC_CHANGE_BADI in order to copy the same delivery address business partner in all SC line items.

In the BADI implementation you should get the SC item that is being changed. Then you need to get all the SC items through BBP_SC_GET_DETAILS and modify the rest of the items.

In order to change the SC item delivery address you need to change the PARTNER table of the shopping cart, just the line that corresponds to the delivery address.

Regards,

Martin

Answers (2)

Answers (2)

Former Member
0 Kudos


Hi All,

Thanks for helping this. the issue has been resolved.

Need one more help, how can we do the same in backend(ECC) PO level. Is any BADI for this.

Thanks & Regards:

Ramesh Reddy.

Former Member
0 Kudos

Hello Ramesh,

we can do this changes in BBP_DOC_CHANGE_BADI . Create a Implementation for the above BADI and Inside that Implementation BADI method just call the function module BBP_PD_SC_GETDETAIL for SC item details by passing the Header GUID.

Once you get the Partner table(E_PARTNER) details.. Keeping a loop on SC item(E_ITEM) and change address number(ADDR_NO) in Partner table when Partner function eq X( X is an partner function values which you define in SPRO.).

pseudo logic:



 
CALL FUNCTION 'BBP_PD_SC_GETDETAIL'

   
EXPORTING

      i_guid   
= l_guid

   
TABLES

      e_item   
= lt_item

      e_partner
= lt_partner.



* Check for all the line items if vendor is assigned

 
LOOP AT lt_item INTO lwa_item.

   
READ TABLE lt_partner INTO lwa_partner

                     
WITH KEY partner_fct = '00000019'

                               del_ind    
= space

                               p_guid     
= lwa_item-guid.

   
IF sy-subrc eq 0 .

   * modification of address number logic here in partner table


   
ENDIF.

 
ENDLOOP.

All the best.

Regards,

Sankarbabu

konstantin_anikeev
Active Contributor
0 Kudos

Delivery address if not '00000019', but '00000027'. '00000019' is for vendor.