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: 

Problem with BAPI_SALESORDER_CHANGE changing VBAK-LIFSK

maria_merino
Active Participant
0 Kudos
1,222

Hi experts,

I need to update sales order delifery block (VBAK-LIFSK) within a report. I am using bapi BAPI_SALESORDER_CHANGE like this:

data: gv_header_in TYPE bapisdh1,

gv_header_inx TYPE bapisdh1,

i_return TYPE bapiret2_t.

gv_header_in-dlv_block = p_lifsk.

gv_header_inx-dlv_block = 'X'.
gv_header_inx-updateflag = 'U'.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_datos-vbeln
order_header_in = gv_header_in
order_header_inx = gv_header_inx
* logic_switch = gv_logic_switch
TABLES
return = i_return.

But I always get an error even when I do the same in VA02 (and in VA02 works fine).

One of these errors is V1 739 (Field '&1' cannot be changed, &2 &3 &4 ready for input), although in VA02 this field is editable.

Another one is CZ 280 (Sales office &1 is not assigned to sales organization &2).

Do I have to pass to the bapi any other data?

Thanks!

Maria

1 REPLY 1

RaymondGiuseppi
Active Contributor
0 Kudos
796

Did you

  • Work with a very old version of SAP
  • Implement exit USEREXIT_FIELD_MODIFICATION (MV45AFZZ)