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: 
Read only

BAPI_SALESORDER_CHANGE cannot remove item billing block

Former Member
0 Likes
1,290

I have been able to use function BAPI_SALESORDER_CHANGE to change the billing block of an item to a new value, but it won't allow me to clear that value.

I have these variables set:

   CLEAR ORDER_ITEM_IN-BILL_BLOCK.        "Update works fine if BILL_BLOCK contains a value

   ORDER_ITEM_INX-BILL_BLOCK = 'X'.

   ORDER_ITEM_INX-UPDATEFLAG = 'U'.

    ORDER_ITEM_IN-ITM_NUMBER = <value from vbap-posnr>.

   ORDER_ITEM_IN-MATERIAL = <value from vbap-matnr>.

   ORDER_HEADER_INX-UPDATEFLAG = 'X'.

   SALESDOCUMENT = <value from vbak-vbeln>.

Any ideas on how to remove the item billing block?  Is this function unable to do it?

Thanks,

Mark

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
718

I just figured it out.  ORDER_ITEM_INX-ITM_NUMBER also needs to have the value of VBAP-POSNR.  I got it working and the billing block at the item level in the sales order was removed.

-Mark

I have been able to use function BAPI_SALESORDER_CHANGE to change the billing block of an item to a new value, but it won't allow me to clear that value.

I have these variables set:

   CLEAR ORDER_ITEM_IN-BILL_BLOCK.        "Update works fine if BILL_BLOCK contains a value

   ORDER_ITEM_INX-BILL_BLOCK = 'X'.

   ORDER_ITEM_INX-UPDATEFLAG = 'U'.

    ORDER_ITEM_IN-ITM_NUMBER = <value from vbap-posnr>.

   ORDER_ITEM_IN-MATERIAL = <value from vbap-matnr>.

   ORDER_HEADER_INX-UPDATEFLAG = 'X'.

   SALESDOCUMENT = <value from vbak-vbeln>.

Any ideas on how to remove the item billing block?  Is this function unable to do it?

Thanks,

Mark

2 REPLIES 2
Read only

Former Member
0 Likes
719

I just figured it out.  ORDER_ITEM_INX-ITM_NUMBER also needs to have the value of VBAP-POSNR.  I got it working and the billing block at the item level in the sales order was removed.

-Mark

Read only

Former Member
0 Likes
718

I have it working fine moving space to ORDER_ITEM_IN-BILL_BLOCK and don't forget to pass item number to 'X' structure ORDER_ITEM_INX-ITM_NUMBER = <value from vbap-posnr>.

Regards,

Felipe