cancel
Showing results for 
Search instead for 
Did you mean: 

Block For billing when sales order is created

Former Member
0 Kudos

Hi experts,

I have a requirement in which i want to block the sales documrnt for billing when the sales order is created with particular discount value.

for this i have checked the condition of discount first it works fine no i want to block it for billing.

My SD consultant told open the sales doc in change mode(VA02) and then go to Billing Block field (FAKSK) and then give 02 Compl confirm missing and save the doc

So for this i have writen a method.

SET Parameter ID 'VBELN' Field OBJECT-KEY.

Call Transaction 'VA02' and SKIP FIRST SCREEN.

SET Parameter ID 'FAKSK' Field '02'.

in this it is calling the VA02 screen but i am not able to pass the billing block value and save.

Please give me a solution how to do this.

for blocking i have also used the standard method in BUS2032 SetDefaultBillingBlock

it is not blocking the billing.

Or should i use some bapi for this.

Regards,

Hari

Accepted Solutions (1)

Accepted Solutions (1)

vinod_vemuru2
Active Contributor
0 Kudos

Hi Hari,

SET parameter ID only sets the value to an input field. It wont saves to the database. More over i don't find any parameter ID for billing block in VA02.(May be because it is a drop down).

Use BAPI BAPI_SALESORDER_CHANGE Pass the sales order number, ORDER_HEADER_IN-BILL_BLOCK = ur blocking code, ORDER_HEADER_INX-BILL_BLOCK = X.

After calling the BAPI call BAPI_TRANSACTION_COMMIT.

Above procedure is to programativally.

If u want to do it manually then directly open VA02 and change the billing block and save.

I dont think we can set parameter ID for billing block

Thanks,

Vinod.

Former Member
0 Kudos

Hi Vinodh,

Thanks for ur relpy. For sales order change this BAPI really works well.I have one more doubt can i use the same bapi for Contract BUS2034 and Scheduling Aggrement BUS2035.

Or Plz suggest me how to do for Contract and scheduling aggrement for the same Discount scenario as for sales Order.

Regards,

Hari

vinod_vemuru2
Active Contributor
0 Kudos

Hi Hari,

For contract u can use BAPI

BAPI_CUSTOMERCONTRACT_CHANGE. U can pass the parameters in the same way as u did for sales order.

U can try BAPI_AGREEMENT_MAINTAIN as well. Check the documentation of this FM. Not sure to what extent this BAPI helps for ur requirement.

Thanks,

Vinod.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use the exit USEREXIT_FIELD_MODIFICATION (include MV45AFZZ). Check for the screen number and the screen-field name and then try changing the value. The screen-field name is VBAK-FAKSK.

Thanks.