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 for Creating Order Related Billing Document

Former Member
0 Likes
3,026

Hi ABAPers!

I have a requirement in ECC SD where in invoices will be created from the orders automatically once a particular status is set.

I have created an item category where Billing relevance is set to 'B' and have assigned this to an order type.

For creating invoices from orders I was trying to use this bapi 'BAPI_BILLINGDOC_CREATEFROMDATA', but had few doubts on its usage.

I can see that in this table parameter: BILLING_DATA_IN we have ORDBILLTYP field where we can specify the 'Proposed billing type for an order-related billing document'.

So Can anyone help in populating these tables BILLING_DATA_IN, CONDITION_DATA_IN, CCARD_DATA_IN?

Also how come this invoice creation bapi is not returning the invoice number?

Or do I have to go for a different bapi to have order related billing?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,108

Check the BAPI 'BAPI_BILLINGDOC_CREATEMULTIPLE". See the documentation regarding the important parameters to be passed while calling the BAPI. Output of BAPI processing will be available in structures ERRORS, RETURN & SUCCESS.

Hi ABAPers!

I have a requirement in ECC SD where in invoices will be created from the orders automatically once a particular status is set.

I have created an item category where Billing relevance is set to 'B' and have assigned this to an order type.

For creating invoices from orders I was trying to use this bapi 'BAPI_BILLINGDOC_CREATEFROMDATA', but had few doubts on its usage.

I can see that in this table parameter: BILLING_DATA_IN we have ORDBILLTYP field where we can specify the 'Proposed billing type for an order-related billing document'.

So Can anyone help in populating these tables BILLING_DATA_IN, CONDITION_DATA_IN, CCARD_DATA_IN?

Also how come this invoice creation bapi is not returning the invoice number?

Or do I have to go for a different bapi to have order related billing?

3 REPLIES 3
Read only

Former Member
0 Likes
2,109

Check the BAPI 'BAPI_BILLINGDOC_CREATEMULTIPLE". See the documentation regarding the important parameters to be passed while calling the BAPI. Output of BAPI processing will be available in structures ERRORS, RETURN & SUCCESS.

Read only

0 Likes
2,108

Hi Vinod,

Thanks for your help. I have coded your mentioned bapi, but getting few errors in RETURN table.

I have 9 rows in this table which is same as the number of items in the order with the Information message 'The item is not relevant for billing'.

I can assure you that the billing relevance for the item categories is set to 'C', vov7 transaction.

Can you help further?

For the same order, I was able to create an invoice from VF01 directly.

Edited by: amoljoshi on Dec 2, 2010 5:54 PM

Read only

Former Member
0 Likes
2,108

Hi,

BAPI_BILLINGDOC_CREATEMULTIPLE

BILLINGDATAIN

SALESORG          1200 (Sales organization)

DISTR_CHAN       20     (Distribution channel)

DIVISION              00    (Division)

DOC_TYPE           F2    (Sales order Type)

ORDBILLTYP        F5     (Invoice Type)

REF_DOC XXXXXXXXXX (Sales order no)

REF_DOC_CA       C      (Reference document category)