5 Replies Latest reply: Sep 10, 2010 6:05 PM by Sri hari Raju RSS

BAPI_BILLINGDOC_CREATE

ekadevi s
Currently Being Moderated

Hai all,

 

1)BAPI_BILLINGDOC_CREATE

2)BAPI_BILLINGDOC_CREATEMULTIPLE

3)RV_INVOICE_CREATE

 

Pls give the sample code for this FM .

 

 

Regards,

Ekadevi.S

  • Re: BAPI_BILLINGDOC_CREATE
    Maddela Srilatha
    Currently Being Moderated

    Hi,

     

    Hi,

     

    Check this example..

     

    DATA: s_vbap TYPE vbap.

    *

    TABLES: vbak,vbap,likp, lips.

     

    DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.

    DATA: t_conditions TYPE STANDARD TABLE OF bapikomv WITH HEADER LINE.

    DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.

    DATA: t_ccard TYPE STANDARD TABLE OF bapiccard_vf WITH HEADER LINE.

    DATA: t_errors TYPE STANDARD TABLE OF bapivbrkerrors WITH HEADER LINE.

    DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE

    .

     

    PARAMETERS: p_vbeln TYPE vbeln.

     

    select single * from likp

    where vbeln = p_vbeln.

     

    SELECT SINGLE * from lips where

    vbeln = likp-vbeln.

     

    t_billing-salesorg = likp-vkorg.

    t_billing-ref_doc = likp-vbeln.

    t_billing-ref_item = lips-posnr.

    t_billing-doc_number = p_vbeln.

    t_billing-itm_number = lips-posnr.

    t_billing-ordbilltyp = 'Billing document type'.

    t_billing-price_date = sy-datum.

    t_billing-ref_doc_ca = likp-vbtyp.

    t_billing-material = lips-matnr.

    t_billing-plant = lips-werks.

     

    APPEND t_billing.

     

     

    CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'

    TABLES

    billingdatain = t_billing

    return = t_return

    success = t_success

    .

     

     

    commit work.

     

     

    Regards.

  • Re: BAPI_BILLINGDOC_CREATE
    Maddela Srilatha
    Currently Being Moderated

    Hi,

     

    DATA: VBSK_I LIKE VBSK.

    data: d_success type c.

     

    DATA: XKOMFK LIKE KOMFK OCCURS 0 WITH HEADER LINE,

    XKOMV LIKE KOMV OCCURS 0 WITH HEADER LINE,

    XTHEAD LIKE THEADVB OCCURS 0 WITH HEADER LINE,

    XVBFS LIKE VBFS OCCURS 0 WITH HEADER LINE,

    XVBPA LIKE VBPAVB OCCURS 0 WITH HEADER LINE,

    XVBRK LIKE VBRKVB OCCURS 0 WITH HEADER LINE,

    XVBRP LIKE VBRPVB OCCURS 0 WITH HEADER LINE,

    XVBSS LIKE VBSS OCCURS 0 WITH HEADER LINE,

    XKOMFKGN LIKE KOMFKGN OCCURS 0 WITH HEADER LINE.

     

    refresh: XKOMFK, XKOMV,

    XTHEAD, XVBFS,

    XVBPA, XVBRK,

    XVBRP, XVBSS.

     

    clear : XKOMFK, XKOMV,

    XTHEAD, XVBFS,

    XVBPA, XVBRK,

    XVBRP, XVBSS,

    VBSK_I.

     

     

    VBSK_I-SMART = 'F'.

    XKOMFK-VBELN = v_deliv.

    XKOMFK-VBTYP = 'J'.

    APPEND XKOMFK.

     

    CALL FUNCTION 'RV_INVOICE_CREATE'

    EXPORTING

    VBSK_I = VBSK_I

    WITH_POSTING = 'C'

    TABLES

    XKOMFK = XKOMFK

    XKOMV = XKOMV

    XTHEAD = XTHEAD

    XVBFS = XVBFS

    XVBPA = XVBPA

    XVBRK = XVBRK

    XVBRP = XVBRP

    XVBSS = XVBSS.

     

    if sy-subrc eq 0.

    COMMIT WORK.

    flag = 'X'.

     

    else.

    message i011 with p_vbeln.

    endif.

     

    Regards.

  • Re: BAPI_BILLINGDOC_CREATE
    ekadevi s
    Currently Being Moderated

    Hi,

    Thanks For Ur kind reply.

    I tried both 

    RV_INVOICE_CREATE

    BAPI_BILLINGDOC_CREATEMULTIPLE

    FM But Its not generating excise invoice no pls help me.

     

    Wat r all the input required for this both FM

     

    Pls help me.

     

    Regards,

    Ekadevi.S

  • Re: BAPI_BILLINGDOC_CREATE
    Sri hari Raju
    Currently Being Moderated

    Thank you all,

     

    I am using 'BAPI_BILLINGDOC_CREATEMULTIPLE' in my development and it is working great.

     

    Thanks again

    SHR.

Actions