2008 Jun 17 8:06 AM
can any one please give me the sample code for
BAPI_BILLINGDOC_CREATEMULTIPLE
both header and item data
regards,
v@sap
2008 Jun 17 8:48 AM
Hi,
Direct extract from SE37 documentation.
FU BAPI_BILLINGDOC_CREATEMULTIPLE
____________________________________________________
Short Text
Create Individual Customer Billing Document
Functionality
This method can be used to create billing documents.
As input parameters, you are expected to enter information on the items to be processed in the table BILLING_DATA_IN. This data is processed and produces a batch of billing documents. You also have the option of transferring information for entry in the input structure CREATOR_DATA_IN. If this information is already determined, this is transferred into each billing document header. You can also enter optional conditions for the individual items to be processed in the input table CONDITION_DATA_IN, as well as means of payment information in the table CCARD_DATA_IN.
This method can be used in the simulation run (TESTRUN = 'X') and also in the update run including the update (TESTRUN = ' '). Both execution variants deliver errors that may have occurred back to the output table RETURN. Information on successful processing is sent back in the output table SUCCESS. This output table delivers the document numbers of the billing documents created in particular.
Notes
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.
Parameters
CREATORDATAIN
TESTRUN
POSTING
BILLINGDATAIN
CONDITIONDATAIN
CCARDDATAIN
TEXTDATAIN
ERRORS
RETURN
SUCCESS
Thanks,
Sriram Ponna.
2008 Jun 17 8:24 AM
GT_BILLINGDATAIN-REF_DOC = G_VBELN.
GT_BILLINGDATAIN-REF_DOC_CA = 'J'.
APPEND GT_BILLINGDATAIN.
*header condition type
GT_CONDITIONDATAIN-DATA_INDEX = '0'.
GT_CONDITIONDATAIN-COND_TYPE = 'ZB01'.
GT_CONDITIONDATAIN-COND_VALUE = 10.
GT_CONDITIONDATAIN-COND_CURR = G_CURRENCY.
APPEND GT_CONDITIONDATAIN.
*item condition type
GT_CONDITIONDATAIN-DATA_INDEX = '1'.
GT_CONDITIONDATAIN-COND_TYPE = 'ZD01'.
GT_CONDITIONDATAIN-COND_VALUE = 15.
GT_CONDITIONDATAIN-COND_CURR = G_CURRENCY.
APPEND GT_CONDITIONDATAIN.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
BILLINGDATAIN = GT_BILLINGDATAIN
CONDITIONDATAIN = GT_CONDITIONDATAIN
RETURN = GT_RETURN
SUCCESS = GT_SUCCESS
2008 Jun 17 8:45 AM
thank you jay
is it necessary two or three excel files
Edited by: v@sap on Jun 17, 2008 9:45 AM
2008 Jun 17 8:48 AM
Hi,
Direct extract from SE37 documentation.
FU BAPI_BILLINGDOC_CREATEMULTIPLE
____________________________________________________
Short Text
Create Individual Customer Billing Document
Functionality
This method can be used to create billing documents.
As input parameters, you are expected to enter information on the items to be processed in the table BILLING_DATA_IN. This data is processed and produces a batch of billing documents. You also have the option of transferring information for entry in the input structure CREATOR_DATA_IN. If this information is already determined, this is transferred into each billing document header. You can also enter optional conditions for the individual items to be processed in the input table CONDITION_DATA_IN, as well as means of payment information in the table CCARD_DATA_IN.
This method can be used in the simulation run (TESTRUN = 'X') and also in the update run including the update (TESTRUN = ' '). Both execution variants deliver errors that may have occurred back to the output table RETURN. Information on successful processing is sent back in the output table SUCCESS. This output table delivers the document numbers of the billing documents created in particular.
Notes
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.
Parameters
CREATORDATAIN
TESTRUN
POSTING
BILLINGDATAIN
CONDITIONDATAIN
CCARDDATAIN
TEXTDATAIN
ERRORS
RETURN
SUCCESS
Thanks,
Sriram Ponna.
2008 Jun 17 9:01 AM
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
EXPORTING
CREATORDATAIN =
TESTRUN =
POSTING =
TABLES
BILLINGDATAIN = billingdata
CONDITIONDATAIN =
CCARDDATAIN =
TEXTDATAIN =
ERRORS =
RETURN = bapiret
SUCCESS = succ
except BILLINGDATAIN
CONDITIONDATAIN
CCARDDATAIN
what are the exporting parameters we have to pass??
2008 Jun 17 9:05 AM