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

Problem when updating Billing Block

Former Member
0 Likes
1,725

Hi All,

Scenario : I have created a debit memo request without a billing block.

In a Separate Program we need to update the Billing block.

I am using BAPI_SALESDOCUMENT_CHANGE in the following

manner :

wa_order_header-bill_block = 'Z5'.

wa_order_header_inx-updateflag = 'U'.

wa_order_header_inx-bill_block = 'X'.

call function 'BAPI_SALESDOCUMENT_CHANGE'

exporting

salesdocument = wf_vbeln

order_header_in = wa_order_header

order_header_inx = wa_order_header_inx

tables

return = tb_return.

The update is failing with the return message as

<b>Field 'FAKSK' cannot be copied, because it is not ready for input.</b>

Any Input as to why its failing ?

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,301

You can not change the fields which are not ready for the input, even with the BAPI.

Internally, BAPI assigns bill_block to FAKSK. And VABK-FAKSK is not ready for input. So, you get this error.

You can use the user exit form USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ to set your VBAK-FAKSK when you try to change the sales order from BAPI.

Regards,

Naimesh Patel

You can not change the fields which are not ready for the input, even with the BAPI.

Internally, BAPI assigns bill_block to FAKSK. And VABK-FAKSK is not ready for input. So, you get this error.

You can use the user exit form USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ to set your VBAK-FAKSK when you try to change the sales order from BAPI.

Regards,

Naimesh Patel

5 REPLIES 5
Read only

naimesh_patel
Active Contributor
0 Likes
1,302

You can not change the fields which are not ready for the input, even with the BAPI.

Internally, BAPI assigns bill_block to FAKSK. And VABK-FAKSK is not ready for input. So, you get this error.

You can use the user exit form USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ to set your VBAK-FAKSK when you try to change the sales order from BAPI.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
1,301

Hi,

Please try these FM perhaps they may help.

SD_WF_ORDER_SET_BILLING_BLOCK

SD_WF_ORDER_DEL_BILLING_BLOCK

Regards,

Ferry Lianto

Read only

0 Likes
1,301

Hi everybody...

I got the same problem but I do not think the mentioned FM´s will do the job.

At least I do not see how you should specify the desired billing block.

The only import value is the sales order number.

What I really would like to know is WHY this field is locked for the BAPI.

It´s only locked as long it is initial, as soon as there is a value you can change it by using BAPI_SALESDOCUMENT_CHANGE.

That really doesn´t make any sense to me....

Read only

Former Member
0 Likes
1,301

OK, no wonder it doesn´t make any sense.... it´s a bug.

See message 512307 for details and workaround.

Read only

0 Likes
1,301

hi everybody,

Even iam getting the same problem, can any one explain me how to solve this issue. please do replay me the alternative method.

With Regards,

Ashwin