Application Development 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: 

How to Restrict proformas using BAPI_BILLINGDOC_CREATEMULTIPLE in back ground

0 Kudos

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


2 REPLIES 2

former_member717457
Participant
0 Kudos

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

VeselinaPeykova
Active Contributor
0 Kudos

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.