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 billing document

Former Member
0 Likes
668

Hi,

I have to know the BAPI for creating billing document from the the credit memo request or debit memo requset.

thanks in advance,

A.Karthikeyan.

2 REPLIES 2
Read only

Former Member
0 Likes
469

Hi,

Please find the sample code for Billing document BAPI. Please award the points if it is working for you.

t_billing-salesorg = vbak-vkorg.

t_billing-DISTR_CHAN = vbak-vtweg.

t_billing-DIVISION = vbak-spart.

t_billing-DOC_TYPE = vbak-auart.

t_billing-ref_doc = vbak-vbeln.

t_billing-ref_item = vbap-posnr.

t_billing-doc_number = vbak-vbeln.

t_billing-ITM_NUMBER = vbap-posnr.

t_billing-ordbilltyp = 'BILLING TYPE'.

t_billing-price_date = sy-datum.

t_billing-ref_doc_ca = vbak-vbtyp.

t_billing-sold_to = vbak-kunnr.

t_billing-material = vbap-matnr.

t_billing-plant = vbap-werks.

APPEND t_billing.

CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'

TABLES

billingdatain = t_billing

return = t_return

success = t_success.

commit work.

Thanks,

Naren

Read only

abdul_hakim
Active Contributor
0 Likes
469

You can use the below BAPIs.

BAPI_BILLINGDOC_CREATE

BAPI_BILLINGDOC_CREATEMULTIPLE

Cheers,

Abdul Hakim