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

Help with bapi / Function module

Former Member
0 Likes
407

Can anybody please provide me a sample source code or example on how to use the function module BAPI_BILLINGDOC_CREATEMULTIPLE for creating billing document?

Thanks in advance,

Krishen

2 REPLIES 2
Read only

Former Member
0 Likes
354

hi

hope the following helps u to know what is to be passsed.

1. Required entries :

BILLING_DATA_IN-SALESORG

BILLING_DATA_IN-DISTR_CHAN

BILLING_DATA_IN-DIVISION

BILLING_DATA_IN-DOC_TYPE

BILLING_DATA_IN-ORDBILLTYP

BILLING_DATA_IN-SOLD_TO

BILLING_DATA_IN-ITEM_CATEG

BILLING_DATA_IN-REQ_QTY

BILLING_DATA_IN-SALES_UNIT

BILLING_DATA_IN-CURRENCY

If a material is billed for which a material master needs to be

determined (BILLING_DATA_IN-NO_MATMAST = ' '), you must make the

following entries :

BILLING_DATA_IN-PLANT

BILLING_DATA_IN-MATERIAL

If, on the other hand, a material is billed for which no material

master is to be determined (BILLING_DATA_IN_NO_MATMAST = 'X'), you

must make the following entries :

BILLING_DATA_IN-COUNTRY

BILLING_DATA_IN-MATERIAL

BILLING_DATA_IN-TAXCL_1MAT

2. COMMIT control :

In the update run (TESTRUN = ' ') the update is carried out by

COMMIT

WORK as part of the method available.

Read only

Former Member
0 Likes
354

check this it may help u.

Please find the sample code for Billing document BAPI.

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.

Regards