01-09-2021 10:09 AM
We have created done output type ZPRO and configured custom program which will be triggering from VT70 .
In Z program we are calling BAPI_BILLINGDOC_CREATEMULTIPLE in background task. below values are getting passed to parameter (billingdatain) of BAPI.
ORD_BILLtyp , = ZIVP
Ref doc no = two deliveries (2 deliveries against one shipment)
Rfc_doc_CA = J
This logic works fine, but it creates two proformas against one shipment from VT70.
"Is there any parameter in above BAPI that restricts Multiple proforms against single shipment" ?
What more fields I need to pass to BAPI to create single proforma against single shipment?
How to Restrict proformas using BAPI_BILLINGDOC_CREATEMULTIPLE in back ground
Please suggest thank you
01-09-2021 11:06 AM
Hello Anand Dubakka,
FM: "BAPI_BILLINGDOC_CREATEMULTIPLE" Proforma will create for each deliveries, need to apply a logic before this FM( Check weather proforma created against this billing if not only you should proceed to create ).
Share the code snipped will let you know to apply the logic.
Thanks
Sathish Kumar Sidhaiyan
01-10-2021 5:39 AM
Normally, a standard BAPI will not prevent you from doing something that you can do in a backend transaction.
As you probably know, proformas are billing documents. To be able to create a single billing document while referencing multiple deliveries, you need to make sure that there are no reasons for billing split. The topic of billing split has been discussed ad nauseam, but if for some reason you or your functional consultant are not familiar with the concept - read note 1561427 - Billing document split.
You (or your functional consultant) need to investigate why billing split occurs in your case and based on this decide how to handle it and whether it is possible to handle it at all. In some cases a change in the copy control settings, e.g. using a custom VOFM routine to clear or update specific fields may suffice. In other cases, like trying to create a single proforma when you have different partners - probably you end up revising your whole concept.
In short:
If you are a developer - speak with your functional consultant about the billing split.
If you are a functional consultant - read the note, investigate the reason for billing split and based on your findings update the specification document for the developer.