Skip to Content
0
Former Member
Oct 26, 2006 at 07:39 AM

BAPI_BILLINGDOC_CREATEMULTIPLE Billing Doc not created

2721 Views

Hi All,

I am trying to create billing document using “<b>BAPI_BILLINGDOC_CREATEMULTIPLE</b>”. Please check code below for my BAPI preparation. Problem is billing document not getting created, in return table message type ‘I’ Message ID ‘VF’ Number ‘044’ Message ‘<b>The item is not relevant for billin</b>g’ and “SUCCESS” table is blank. If I use same sales order via VF01, billing document does get created.

I will commit once I get return ‘S’. But have you people come across such kind of message. Any ideas or sample code will be of much help. Thanks in advance.

Regards,

Tim

GT_BILLINGDATAIN-SALESORG = gs_vbak-vkorg.

GT_BILLINGDATAIN-DISTR_CHAN = gs_vbak-vtweg.

GT_BILLINGDATAIN-DIVISION = gs_vbak-spart.

GT_BILLINGDATAIN-DOC_TYPE = GS_INIT_ITAB2-auart.

GT_BILLINGDATAIN-ORDBILLTYP = p_fkart.

GT_BILLINGDATAIN-SOLD_TO = GS_INIT_ITAB2-kunnr.

GT_BILLINGDATAIN-ITEM_CATEG = GS_INIT_ITAB2-pstyv.

GT_BILLINGDATAIN-REQ_QTY = GS_INIT_ITAB2-kwmeng.

GT_BILLINGDATAIN-SALES_UNIT = gs_vbap-vrkme.

GT_BILLINGDATAIN-CURRENCY = gs_vbak-waerk.

GT_BILLINGDATAIN-SHORT_TEXT = 'Test'.

GT_BILLINGDATAIN-BILL_DATE = GS_INIT_ITAB2-afdat.

GT_BILLINGDATAIN-REF_DOC = GS_INIT_ITAB2-VBELN.

GT_BILLINGDATAIN-DOC_NUMBER = GS_INIT_ITAB2-VBELN.

GT_BILLINGDATAIN-ITM_NUMBER = GS_INIT_ITAB2-POSNR.

GT_BILLINGDATAIN-ITEM = GS_INIT_ITAB2-POSNR.

GT_BILLINGDATAIN-NO_MATMAST = co_x.

GT_BILLINGDATAIN-COUNTRY = 'AUS'.

GT_BILLINGDATAIN-MATERIAL = gl_matnr.

GT_BILLINGDATAIN-TAXCL_1MAT = '1'.

append GT_BILLINGDATAIN.

  • Prepare for BAPI call

CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'

EXPORTING

CREATORDATAIN = GS_CREATORDATAIN

  • TESTRUN = co_x

  • POSTING = co_x

TABLES

BILLINGDATAIN = GT_BILLINGDATAIN

  • CONDITIONDATAIN = GT_CONDITIONDATAIN

  • CCARDDATAIN =

  • TEXTDATAIN =

  • ERRORS =

RETURN = GT_RETURN

SUCCESS = GT_SUCCESS.