Reg. Bapi FM for creating invoice

Hi Friends
If any body tell me how to create an invoice with reference number and maintain our external invoice number.
Advance Thanks
Krishna

Hi,
use this BAPI
BAPI_INCOMINGINVOICE_CREATE
or
BAPI_ACC_INVOICE_RECEIPT_POST
hope helpful
Raghunath.S

Similar Messages

  • BAPI needed to create invoice and creditmemo

    Hi all,
          Is there any BAPI available to create invoice and creditmemo when material no is not given.
          My requirement is to create credit memo and  invoice through FB75 or FB70 transaction. I am able to achieve the same through BDC. Is there any BAPI availabe for the same to create credit memo or invoice to avoid BDC.
          Input given to the program is a excel file in which i have the following fields
          Transaction -- which separates credit memo or
                         invoice
          Company code, purchase order number, GL account
          number, cost center, profit center, amount etc...
    Please let me know some pointers.
    Regards,
    Karthik.

    GN_INVOICE_CREATE or BAPI_BILLINGDOC_CREATEMULTIPLE
    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

  • Bapi's for creating Maintenance order in IW31 with notification

    Hi All,
       Is there any bapi's for creating Maintenance order with Notification number in the transaction iw31.
      Also is there any bapi's for creating measurement document.
    Points will be awarded.
    Regards,
    vinoth

    RFC MeasDocument: Individual Processing, Create
    MEASUREM_DOCUM_RFC_SINGLE_001
    RFC MeasDocument: Individual Processing, Change/Display or Read
    MEASUREM_DOCUM_RFC_SINGLE_002

  • Finding FM/BAPI/RFC for Create Inbound Delivery(vl31n).

    Hi all,
    i need for a FM/BAPI/RFC for Create Inbound Delivery(vl31n) or ASN
    where in import Parameter i have to pass -
    *vendor no*
    *PO no*
    *External ID no*
    *Delivery date*
    *TransPlanngDate*
    *BillOfLad*
    *GR/GI Slip*
    in Export i need ASN no and in tables we can use ITEM details.
    Regards,
    Sunil sahoo.

    Hi,
    Check the below link
    [https://forums.sdn.sap.com/click.jspa?searchID=16938983&messageID=5780492]
    Regards,
    Surinder

  • Remote-Enabled BAPI/RFC for creating "Request Special Payment (SPSP)"

    Is there any Remote-Enabled BAPI/RFC for creating "Request Special Payment (SPSP)" which is one of the Personnel Change Requests under MSS ?
    Thanks.

    closing to post another question.

  • Sample Bapi code for creating orders

    HI all,
    ive been working on creating an order using idoc_input_orders and couldnt do it because of 2 fields. now changed my decission and thinking of writing a bapi to do the same. has anybody got the sample code for mapping and filling in the bapis before calling bapi for creating an order. Could somebody help me with a sample code and i could use it as a reference before starting coding.
    thanks,
    Kiran

    See if this helps.
            one order with total sum of effort
              clear:   l_order_header,
                       l_salesdocument,
                       l_order_partners,
                       l_order_items,
                       l_order_schdl.
              refresh: it_order_items,
                       it_order_partners,
                       it_order_schdl,
                       it_return.
    ???????? get from material ...
            Order header
              l_order_header-doc_type          = 'ZQBV'.
              l_order_header-distr_chan        = '10'.
              l_order_header-division          = '00'.
              if g_qals-werk eq '1100'.
                l_order_header-sales_org         = '1000'.
              else.
                if g_qals-werk eq '3100'.
                  l_order_header-sales_org         = '3000'.
                else.
                  message i001(00) with text-005.
                endif.
              endif.
              l_order_header-purch_no_c        = g_qals-prueflos.  " <= lot
            Partner data
              l_order_partners-partn_role      = 'AG'.
              l_order_partners-partn_numb      = g_qals-kunnr.
              append l_order_partners to it_order_partners.
            Order items => only one
              l_order_items-itm_number         = 10.
              l_order_items-material           = g_qals-matnr.
              l_order_items-target_qty         = 1.
              append l_order_items to it_order_items.
            Schedules for quantity
              l_order_schdl-itm_number         = 10.
              l_order_schdl-req_qty            = 1.        " <=  only 1 !
              append l_order_schdl to it_order_schdl.
            Conditions for value
              l_order_conditions-itm_number    = 10.
              l_order_conditions-cond_type     = 'PR00'.
              l_order_conditions-cond_value    = g_effort_sum.
              l_order_conditions-currency      = g_effort_unit.
              append l_order_conditions to it_order_conditions.
            BAPI to create sales order
              CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
                EXPORTING
               SALESDOCUMENTIN               =
                  ORDER_HEADER_IN               = l_order_header
               ORDER_HEADER_INX              =
               SENDER                        =
               BINARY_RELATIONSHIPTYPE       =
               INT_NUMBER_ASSIGNMENT         =
               BEHAVE_WHEN_ERROR             =
               LOGIC_SWITCH                  =
               TESTRUN                       =
               CONVERT                       = ' '
                IMPORTING
                  SALESDOCUMENT                 = l_salesdocument
                TABLES
                  RETURN                        = it_return
                  ORDER_ITEMS_IN                = it_order_items
               ORDER_ITEMS_INX               =
                  ORDER_PARTNERS                = it_order_partners
                  ORDER_SCHEDULES_IN            = it_order_schdl
               ORDER_SCHEDULES_INX           =
                  ORDER_CONDITIONS_IN           = it_order_conditions
               ORDER_CONDITIONS_INX          =
               ORDER_CFGS_REF                =
               ORDER_CFGS_INST               =
               ORDER_CFGS_PART_OF            =
               ORDER_CFGS_VALUE              =
               ORDER_CFGS_BLOB               =
               ORDER_CFGS_VK                 =
               ORDER_CFGS_REFINST            =
               ORDER_CCARD                   =
               ORDER_TEXT                    =
               ORDER_KEYS                    =
               EXTENSIONIN                   =
               PARTNERADDRESSES              =
              if not l_salesdocument is initial.
              order successfully created
                message i001(00) with text-001 l_salesdocument.
              endif.
            endif.

  • BAPI's for creating of Project and WBS elements in SAP system.

    Hi Guys,
                 I was able to use a Wrapper FM for creating the
    We have a FM which combines 5 different BAPIs
    FM/Wrapper: "Z_LEED_PROJ_WBSELEMT_CREATE"
    1)      BAPI_PS_INITIALIZATION
    2)      BAPI_BUS2001_CREATE
    3)      BAPI_BUS2054_CREATE_MULTI
    4)      BAPI_PS_PRECOMMIT
    5)      BAPI_TRANSACTION_COMMIT
    Requirement: To automate the process of creation of Project and WBSE(Tasks) and create an entries in the PS tables based on the user inputs from the user interface in Visual Composer.
    Basically user should be able to create the Projects and WBSE.
    Issue: We were able to create the Project with the FM (BAPI_BUS2001_CREATE) but having the issue with the creation of WBSE(Tasks), the user will be entering the inputs for Project Definition, Project Profile and WBSE which are to be created in the UI.
    The problem is we are not able to create the WBS elements using  BAPI     BAPI_BUS2054_CREATE_MULTI .i will send u the code below .Can anybody correct
       CLEAR it_return.
      CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
        EXPORTING
          I_PROJECT_DEFINITION = i_project_definition-project_definition
        TABLES
          IT_WBS_ELEMENT = it_wbs_element
          ET_RETURN = it_return.
      APPEND LINES OF it_return[] TO et_return[].
    Thanks,
    Gopi.

    Hi Ramiro,
                   This is the entire FM code which is below.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_PROJECT_DEFINITION) LIKE  BAPI_BUS2001_NEW STRUCTURE
    *"        BAPI_BUS2001_NEW
    *"  TABLES
    *"      IT_WBS_ELEMENT STRUCTURE  BAPI_BUS2054_NEW
    *"      ET_RETURN STRUCTURE  BAPIRET2 OPTIONAL
    *"      EXTENSIONIN STRUCTURE  BAPIPAREX OPTIONAL
    *"      EXTENSIONOUT STRUCTURE  BAPIPAREX OPTIONAL
      DATA: it_return LIKE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE,
            v_error TYPE boolean VALUE IS INITIAL.
      CLEAR: et_return, it_return.
      CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
    Do checks for creating project definition
      CALL FUNCTION 'BAPI_BUS2001_CREATE'
        EXPORTING
          I_PROJECT_DEFINITION = i_project_definition
        TABLES
          ET_RETURN = it_return.
      APPEND LINES OF it_return[] TO et_return[].
      LOOP AT it_return.
        IF it_return-type CA 'EAX'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          v_error = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF v_error = 'X'.
        EXIT.
      ENDIF.
    Do checks for creating WBS elements
      CLEAR it_return.
      CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
        EXPORTING
          I_PROJECT_DEFINITION = i_project_definition-project_definition
        TABLES
          IT_WBS_ELEMENT = it_wbs_element
          ET_RETURN = it_return.
       APPEND LINES OF it_return[] TO et_return[].
      LOOP AT it_return.
        IF it_return-type CA 'EAX'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          v_error = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF v_error = 'X'.
        EXIT.
      ENDIF.
      CALL FUNCTION 'BAPI_PS_PRECOMMIT'
        TABLES
          ET_RETURN = it_return.
       APPEND LINES OF it_return[] TO et_return[].
      LOOP AT it_return.
        IF it_return-type CA 'EAX'.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          v_error = 'X'.
          EXIT.
        ENDIF.
      ENDLOOP.
      IF v_error = 'X'.
        EXIT.
      ENDIF.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT = 'X'.
    ENDFUNCTION.
      can u please look at the code and let me know the changes?
    Thanks,
    Gopi.

  • Sales invoice seting for create invoice in new finacial year

    Wat are the sales invoice seting for open in new finacial year , that mean before createing invoice in new FY
    Edited by: Gopi Krishna Gutti on Apr 9, 2009 2:48 PM
    Edited by: Gopi Krishna Gutti on Apr 9, 2009 2:55 PM

    From the SD side no change wrt fiscal year..... u just need to maintain the RV number range for the new FY......

  • Required BAPI's for creating travel request

    Hi ,
    Can you please help on below issue.
    I need to know what are the BAPI'S are supporting for creating travel request.
    Thanks,
    Kumar.V

    http://scn.sap.com/thread/1738366

  • BAPI (S) for Create HU & Perform Packing

    Hi All,
    Can anyone please let me know what is the BAPI for creating HU. I need to create Handling unit in Warehouse Management also immediately as soon as HU is created I need to perform packing.
    Are there different BAPI for both the functions or any Function Module that can help it.
    Thanks in Advance
    Hiren

    Hi,
    please check below
    BAPI_HU_CREATE for creation and  BAPI_HU_PACK  to pack it
    Hope it helps you.
    Rgds,
    Kris.

  • Any bapi available for Create Employee Trip

    hi ,
    please tell me for Create Employee Trip any bapi is available.
    if it is there means please tell me.

    Check this one -
    BAPI_TRIP_CREATE_FROM_DATA
    Regards,
    Amit

  • Reg;error message while creating invoice

    Hi Gurus,
    When i am trying to create invoice with reference to sales order (order related billing ) its giving error massege when trying to save the invoice.Its giving the message as:FOR OBJECT RV_BELEG NUMBER RANGE 41 DOES NOT EXIST.
    How to correct this.Pls help me out on this.
    Thanks & Regards,
    Sash.

    Hi Kiran,i assigned number range as u said.But still its giving the same error mesage .See the error in below.
    For object RV_BELEG , number range interval 41 does not exist
    Message no. NR751
    Diagnosis
    The database table NRIV has the delivery class 'C', i.e. the SAP default settings are only in client 000.
    Procedure
    Create the missing number range interval in customizing.
    Transaction code:

  • BAPI for Create Invoice

    Hi everyone
    I need to create an invoice document using some bapi, i found this two bapi BAPI_BILLINGDOC_CREATEMULTIPLE and BAPI_INCOMINGINVOICE_CREATE; but i don't know how can i use. Can anyone help me please?
    Thanks & Regards
          David N

    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 = '<b>Billing document type</b>'.
    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.
    Thanks,
    Naren

  • BAPI Error for Vendor Invoice

    Hi Experts
             I am developing a BAPI to post the Vendor Invoice, I am not clear the parameters to be passed. Anyhow i have filled some parameters and am getting the following error, Can anyone suggest me about the error.
    Error :
    Enter a reference to a valid goods receipt (line 000010)
    Coding :
    data:it_head like bapi_incinv_create_header,
    it_item like bapi_incinv_create_item occurs 0 with header line,
    it_acct like bapi_incinv_create_account occurs 0 with header line,
    it_gl like bapi_incinv_create_gl_account occurs 0 with header line,
    it_mat like bapi_incinv_create_material occurs 0 with header line,
    it_ven like bapi_incinv_create_vendorsplit occurs 0 with header line,
    it_ret like bapiret2 occurs 0 with header line.
    data: inv_doc like bapi_incinv_fld-inv_doc_no,
    fisc_yr like bapi_incinv_fld-fisc_year.
    data: zinvdoc(50) type c, zfiscyr(30) type c.
    clear it_head.
    move 'x' to it_head-invoice_ind.
    move '1000' to it_head-comp_code.
    move sy-datum to it_head-doc_date .
    move sy-datum to it_head-pstng_date .
    move '27-61725' to it_head-ref_doc_no .
    move '200' to it_head-gross_amount .
    move 'inr' to it_head-currency .
    move '27-61725' to it_head-item_text .
    move '1WEAVIN20' to it_head-diff_inv .
    move 're' to it_head-doc_type .
    move sy-datum to it_head-bline_date.
    move '2' to it_head-pmtmthsupl.
    move 'a' to it_head-pmnt_block.
    move 'z' to it_head-pymt_meth.
    move '0001' to it_head-pmnttrms.
    clear it_item.
    it_item-ref_doc = '123'.
    it_item-REF_DOC_YEAR = '2008'.
    it_item-REF_DOC_IT = '10'.
    it_item-po_number = '4511007408'.
    it_item-po_item = '10'.
    it_item-invoice_doc_item = '00010'. " ( i don't know what this is for so i gave this no.)
    it_item-item_amount
    it_item-po_unit
    it_item-freight_ve
    append it_item.
    break pp01.
    call function 'BAPI_INCOMINGINVOICE_CREATE'
    exporting
    headerdata = it_head
    addressdata
    importing
    invoicedocnumber = inv_doc
    fiscalyear = fisc_yr
    tables
    itemdata = it_item
    accountingdata
    glaccountdata
    materialdata
    taxdata
    withtaxdata
    vendoritemsplitdata
    return = it_ret.
    Thanks in advance.
    Regards
    Rajaram

    Hi,
    You have to fill the header and item check out 1,2 point in your code...
    Fill in the item details
          CNT = CNT + 1.
    1.      ITEMDATA-INVOICE_DOC_ITEM = CNT.
          ITEMDATA-PO_NUMBER = WA_EKPO-EBELN.
          ITEMDATA-PO_ITEM = WA_EKPO-EBELP.
          ITEMDATA-TAX_CODE = <XX>.
          ITEMDATA-ITEM_AMOUNT = WA_EKPO-NETWR.
          ITEMDATA-QUANTITY = WA_EKPO-MENGE.
          ITEMDATA-PO_UNIT = WA_EKPO-MEINS.
          APPEND ITEMDATA.
          CLEAR ITEMDATA.
    Header Info
    2.    HEADERDATA-INVOICE_IND = 'X'.
        HEADERDATA-DOC_DATE = EKKO-BEDAT.
        HEADERDATA-BLINE_DATE = EKKO-BEDAT.
        HEADERDATA-PSTNG_DATE = SY-DATUM.
        HEADERDATA-COMP_CODE = EKKO-BUKRS.
        HEADERDATA-CURRENCY = EKKO-WAERS.
       HEADERDATA-GROSS_AMOUNT
        HEADERDATA-CALC_TAX_IND = ' '.
        HEADERDATA-PMNTTRMS = EKKO-ZTERM.
    Regadrs,
    Prabhu Rajesh

  • Standard BAPI/RFC for create and create material

    Hi All,
    Can you please let me know what standard RFC/BAPIs can be used to create and change Material Master from Portal/ WebDynrpo for Java.
    Thanks,
    Vamshi

    BAPI_MATERIAL_SAVEDATA

Maybe you are looking for