Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

One-time customer update in BAPI_SALESORDER_CHANGE

Former Member
0 Kudos
483

Hello everybody,

I am trying to change pay-to party from normal customer to one-time customer in BAPI_SALESORDER_CHANGE. When I do change with normal customers, everything works good. I have searched through the SCN and SNOTES but could not find anything that would lead to correct result.

I had read through these notes but still did not find what I need:

366265 - How should I fill the BAPI parameters?

1472089 - Cannot change partner address with BAPI_SALESORDER_CHANGE - SAPSQL_ARRAY_INSERT_DUPREC in LV05IU15

I am getting the following error: Eventhough I pass  PARTNERADDRESSES and  PARTNERCHANGES system wants me to fill in the address again.

It happens in function 'SD_SALES_PARTNER_MAINTAIN'. I know I am missing some parameter, but I dont know which is it.


APPEND INITIAL LINE TO LT_BAPIPARNRC

ASSIGNING <LS_BAPIPARNRC>.

<LS_BAPIPARNRC>-DOCUMENT = '12345' .

<LS_BAPIPARNRC>-ITM_NUMBER = '000' .

<LS_BAPIPARNRC>-UPDATEFLAG = 'U' .

<LS_BAPIPARNRC>-PARTN_ROLE = 'RG' . "pay-to party

<LS_BAPIPARNRC>-P_NUMB_OLD = '555444' .

<LS_BAPIPARNRC>-P_NUMB_NEW = 'CPDCUST' .

*<LS_BAPIPARNRC>-ADDRESS = .

<LS_BAPIPARNRC>-ADDR_LINK = ' 1' .

*<LS_BAPIPARNRC>-REFOBJTYPE = .

*<LS_BAPIPARNRC>-REFOBJKEY = .

*<LS_BAPIPARNRC>-REFLOGSYS = .

APPEND INITIAL LINE TO LT_BAPIADDR1

ASSIGNING <LS_BAPIADDR1>.

<LS_BAPIPARNRC>-ADDR_NO = '1' .

<LS_BAPIPARNRC>-NAME = 'Test Name' .

<LS_BAPIPARNRC>-CITY = 'Prague' .

<LS_BAPIPARNRC>-COUNTRY = 'CZ' .

<LS_BAPIPARNRC>-LANGU = 'CS' .

1 REPLY 1

Lakshmipathi
SAP Champion
SAP Champion
0 Kudos
242

Moved from SAP ERP Sales and Distribution (SAP SD) to ABAP Development