Creating invoice through bapi

Hi experts,
I am creating invoice by using BAPI_INCOMINGINVOICE_CREATE.
this is for Invoice with Planned Delivery Costs.
Here i am giving the following data.
header data
INVOICE_IND = x
DOC_TYPE = kr
doc_date
post-date
reff-doc-no = 3006828
comp-code =
diff-inv = 1110025
curr = inr
gr-amount = 50
bline-date
headertext
del-costs
del-costs-tax = v0
po-ref-no = 3006828
item data:
invoice = 000001
po-number =3006828
po-it
ref-doc
ref-year
ref-doc-it
tax
item-amount
quantity
po-unit
po-pr-uom
cond-type
item-text
Accounting data:
invoice doc item = 000001
serial no = 01
tax = v0
item amount = 50
quantity = 5
po unit =
cmmt- item
fund-cntr
bus-area
these are data I have given but it is not posted the invoice
the following message is coming
<b>account assignment 01 for purchasing document does not exist</b>
Plz tell me what i have to do for this

Hi nagaraj,
              Can u tell me where can i find the purchase order is existed with
   Account group or not?
        thanks in advance
regards,
srinivas

Similar Messages

  • Unable to create Invoice through BAPI

    HI Experts!
    We are trying to create PO based (no GR and SES) invoice through "BAPI_INVOICECREATE". It is working perfectly for Material PO, but not for service PO. We are putting PO Quantity as '1' and UOM is "AU" for service. Getting error that "PO Quantity and UOM for iten 00001 is not in limit"
    Help!!!!

    I believe you can use UOM = EA as long as the rest of the P.O. is set correctly for the service and not GR of items.
    Please test in QA invirornment (if you have one) first. (not 100% sure it will work for your system but it does work for mine)

  • How to create invoice using bapi  base on delivery number with example

    hi,
    Pl give me one example to create invoice using bapi base on delivery number (PGI).

    Use this code
    * Pass the delivery no to the FM to create the invoice
          wa_vbsk-smart = u2018Fu2019.
            wa_komfk-vbeln = nast-objky. u201CuF0DF-----delivery number
            APPEND wa_komfk TO it_komfk.
            CLEAR wa_komfk.
    *    To fill the message structure
    *        l_wa_error-vbeln_vl = nast-objky. " Delivery No.
    *        l_wa_error-fkart = wa_ztab-bil_doc_type." Billing Doc type
            CALL FUNCTION 'RV_INVOICE_CREATE'
                    EXPORTING
    *                 delivery_date             = 0
                     invoice_date              = v_date  u201C<- date
    *                 invoice_type              = '    '
    *                 pricing_date              = 0
                     vbsk_i                    = wa_vbsk
                     with_posting              = u2018Du2019
    *                 select_date               = 0
                     i_no_vblog                = ' '
                     i_analyze_mode            = ' '
                     id_utasy                  = ' '
                     id_utswl                  = ' '
                     id_utsnl                  = ' '
                     id_no_enqueue             = ' '
                     id_new_cancellation       = ' '
    **             IMPORTING
    *               VBSK_E                    =
    *               OD_BAD_DATA               =
    *               DET_REBATE                =
                    TABLES
                      xkomfk                    = it_komfk
                      xkomv                     = it_komv
                      xthead                    = it_thead
                      xvbfs                     = it_vbfs
                      xvbpa                     = it_vbpa
                      xvbrk                     = it_xvbrk
                      xvbrp                     = it_vbrp
                      xvbss                     = it_vbss
    *               XKOMFKGN                  =
    *               XKOMFKKO                  =

  • Payment release function inactive while creating invoice through FB60

    Hi,
    I am getting message while creating invoice through FB60 as "Payment release function inactive".
    When I select "Free for payment" after going in payment tab, that time only system is allowing me to go further.
    Is there any  mistake I am doing?
    Pls suggest.
    Thanks,
    Taral Patel

    Hi,
    Check in vendor master in FD02 > Company Code Data > Payment Transactions, whether the payment block is active there or not?
    Also check in OBB8 transaction whether any payment block key is linked to the payment term which is being used in the vendor master.
    Regards,
    Gaurav

  • Problems in creating Invoice using BAPI

    Hello Friends,
    I am using a BAPI BAPI_BILLINGDOC_CREATEMULTIPLE to create invoice from a sales order, but i am not able to change the payer value.
    The payer is by default taken from Sales-Order, even if i change it in Payer value passed to BAPI.
    Please suggest me a solution.
    Sandeep.

    To answer your question I would need to know what stack trace comes back with.
    I also need to know the set up.. Is the applet running on you personal machine and what operating system are you using.
    Lee

  • IN Po quantity is getting round off - when we create PO through BAPI?

    Hi all,
    In PO quantity is getting round off instead of 5711.210 it is taking 5711 only. Here we are creating the PO's through BAPI automatically.
    and in excel sheet we have maintained 5711.210, Kindly let me know what may be the possible causes for this..
    regards,
    archana

    fyi
    change decimal places in PO quantity

  • How to create PO through BAPI from custom screen

    Hi SAP Technical Guru,
    i am new to module pool programming.
    i designed custom screen which is like TA me21n means it has one tabstrip and tablecontrol.
    for header details(fields) at tab strip, and item detials(fields) at table control i used.
    now i have to capture screen fields into FM bapi_po_create1 and update the database tables.
    please suggest me how to create Purchase Order through BAPI FM.
    regards,

    here is the sample code
    *tables for passing podata to bapi
    DATA : gt_header   TYPE STANDARD TABLE OF bapimepoheader,
           gt_headerx  TYPE STANDARD TABLE OF bapimepoheaderx,
           gt_item     TYPE STANDARD TABLE OF bapimepoitem,
           gt_itemx    TYPE STANDARD TABLE OF bapimepoitemx,
           gt_account  TYPE STANDARD TABLE OF bapimepoaccount,
           gt_accountx TYPE STANDARD TABLE OF bapimepoaccountx,
    *tables used for passing custom field data to bapi
           gt_custom   TYPE STANDARD TABLE OF bapiparex,
           gt_custdata_in TYPE STANDARD TABLE OF bapi_te_mepoaccounting,
           gt_custdata_ix TYPE STANDARD TABLE OF bapi_te_mepoaccountingx,
    *tables used for cathing messages returned by bapi
           gt_return   TYPE STANDARD TABLE OF bapiret2,
           gt_return1   TYPE STANDARD TABLE OF bapiret2,
    *Work area declaration for passing custom field data to bapi
           w_custom   LIKE LINE OF gt_custom,
           w_custdata_in LIKE LINE OF gt_custdata_in,
           w_custdata_ix LIKE LINE OF gt_custdata_ix,
    *Work area declaration for passing podata to bapi
           w_header   LIKE LINE OF gt_header,
           w_headerx  LIKE LINE OF gt_headerx,
           w_item     LIKE LINE OF gt_item,
           w_itemx    LIKE LINE OF gt_itemx,
           w_account  LIKE LINE OF gt_account,
           w_accountx LIKE LINE OF gt_accountx,
    *work area declaration for cathing messages returned by bapi
           w_return   LIKE LINE OF gt_return,
           w_return1  LIKE LINE OF gt_return1.
    *populating po dat into internal tables
    w_header-comp_code  = 'PH02'.
    w_header-doc_type   = 'TEST'.
    w_header-vendor     = '0000600019'.
    w_header-purch_org  = 'PH02'.
    w_header-pur_group  = '901'.
    w_headerx-comp_code  = 'X'.
    w_headerx-doc_type   = 'X'.
    w_headerx-vendor     = 'X'.
    w_headerx-purch_org  = 'X'.
    w_headerx-pur_group  = 'X'.
    w_item-po_item      = '00001'.
    w_item-short_text   = 'test po'.
    w_item-po_unit      = 'CM'.
    w_item-matl_group   = '01'.
    w_item-po_unit      = 'EA'.
    w_item-plant        = 'PH02'.
    w_item-quantity     = '1.000'.
    w_item-net_price    = '10.00'.
    w_item-item_cat     = '0'.
    w_item-acctasscat   = 'K'.
    APPEND w_item TO gt_item.
    w_itemx-po_item    = '00001'.
    w_itemx-short_text = 'X'.
    w_itemx-matl_group = 'X'.
    w_itemx-po_unit    = 'X'.
    w_itemx-plant      = 'X'.
    w_itemx-stge_loc   = 'X'.
    w_itemx-quantity   = 'X'.
    w_itemx-tax_code   = 'X'.
    w_itemx-net_price  = 'X'.
    w_itemx-item_cat   = 'X'.
    w_itemx-acctasscat = 'X'.
    APPEND w_itemx TO gt_itemx.
    w_account-po_item    = '00001'.
    w_account-serial_no  = '01'.
    w_account-quantity   = '1.000'.
    w_account-gl_account = '0000199999'.
    w_account-costcenter = '0000400011'.
    APPEND w_account TO gt_account.
    w_accountx-po_item    = '00001'.
    w_accountx-serial_no  = '01'.
    w_accountx-quantity   = 'X'.
    w_accountx-gl_account = 'X'.
    w_accountx-costcenter = 'X'.
    APPEND w_accountx TO gt_accountx.
    w_custdata_in-po_item   = '00001'.
    w_custdata_in-serial_no = '01'.
    w_custdata_in-zzttry    = '1000'.
    w_custom-structure = 'BAPI_TE_MEPOACCOUNTING'.
    MOVE w_custdata_in TO w_custom-valuepart1.
    APPEND w_custom TO gt_custom.
    w_custdata_ix-zzttry    = 'X'.
    w_custdata_ix-po_item   = '00001'.
    w_custdata_ix-serial_no = '01'.
    w_custom-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
    MOVE w_custdata_ix TO w_custom-valuepart1.
    APPEND w_custom TO gt_custom.
    *bapi to create po oreders
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        poheader                     = w_header
        poheaderx                    = w_headerx
    TABLES
      return                       = gt_return
      poitem                       = gt_item
      poitemx                      = gt_itemx
      poaccount                    = gt_account
      poaccountx                   = gt_accountx
      extensionin                  = gt_custom.
    *bapi for po data commit
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait   = ' '
      IMPORTING
        return = w_return1.
    *clearing tables & work area
    REFRESH:gt_account,gt_item,gt_itemx,gt_accountx.
    CLEAR:w_header,w_headerx.
    *displaying message returned by bapi
    LOOP AT gt_return INTO w_return.
      WRITE: w_return-type , w_return-id , w_return-number , w_return-message .
    ENDLOOP.

  • Error while creating WBS through BAPI

    I am using BAPI_PROJECT_MAINTAIN to create WBS L2 & L3.
    There is only 1 WBS at both levels.
    For some cases it is running fine, but I am getting the following error in some cases:
    "WBS element 3UTWB_BSRHT_001 can no longer be shifted"
    What could be the reason?

    As you told you are creating WBS vai BAPI. This may not be  exact relevant Normally you cannot  change  hierarchy of WBS Elements after you have done some sort of execution / planning on it. If you are getting error than please share details of error message with no.
    With Regards
    Nitin P.

  • Fail when creating routing through bapi.

    what are the mandatrory steps to create routing using bapi fm ( bapi_routing_create )?
    when i create routing using bapi it is showing the routing is created succesfull  but it is not updating in the standard table plko .

    after bapi use commit
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

  • Getting error message while creating Contract through BAPI

    Hi
    I am getting a 'Specify either address number or address handle' message while creating contract from BAPI BAPI_CONTRACT_CREATEFROMDATA. Can someone please tell me what can be the cause.

    Hello Bharati,
             you need to give the value of the constant by selecting from the source parameter.Hope this answer helps you.
    Assigning Points = Thanks in SDN
    Thanks & Regards
       Jai

  • Creating invoice through VF04

    Hi,
    I have 3 outbound deliveries to the same sold-to-party.  I am doing billing documents to these three deliveries through VF04 T.Code. 
    What I need to do if I need to create one invoice for each outbound delivery.
    Also what I need to do, if I need to create one combined invoice for all the three deliveries.
    Thanks,
    srinivas.

    Hello,
    After executing VF04, you may select each line and click Individual Billing document button on top. So the system will generate one billing document per delivery.
    If you are looking for collective billing, select all the line items and click Collective Billing Document button. the system will create collective billing document for all the deliveries. But there should be some criterias to be met for the same. Like, payer should be the same, billing date should be same ...etc.
    Prase

  • Split the posting amount while creating invoice through EDI.

    Hi All,
    We receive invoice via an IDOC and is processed using function moudle INPUT_IDOC_INVOICE_MRM. When the invoice gets created and the amounts get posted. In the accounting document that got created, I need to split the amount to specific accounts.
    Does anyone have an idea about the solution that could be used?
    Thanks in advance. Points after the replies.
    Regards,
    Ashutosh.

    Hello Ashutosh
    For Logistics Invoice verification the accounts are determined by account determination configuration set in your system...
    Please check with your MM/Fi consultant. Please chk transactions like OBYC .. should give you an idea...
    Regards,
    Arun

  • Creating quotation through bapi

    hi all,
    I have created a Quotation using a bapi using 'BAPI_QUOTATION_CREATEFROMDATA2'.
    It is giving me the quotation number but when i put that number in VA22 a message is displayed stating that there exits no that quotation number.
    I am also getting a warning in the return that the quotation is not complete.
    Please help me in this context.
    Regards,
    nandam

    Hi Kiran,
    There are certain BAPIs where the numbers are alloted even in without_commit mode.
    Chk if the without_commit mode is set to false.
    If yu get a warning that quotation is incomplete it is obvious that your quotation has not been created. a number  allotment isnt a guarantee that the quotation has been created.
    Regards
    MK

  • Hi i want to ceate customer through bapi with external no range not implici

    hi i want to create customer through bapi which facilitates to enter customer code(our own defined not the sequentially next no.)
    i have gone through F.M BAPI_CUSTOMER_CREATEFROMDATA1 BUT NOT ABLE TO UNDERSTAND HOW TO INPUT PARAMETER FOR CUSTOMER_CODE.
    PLEASE GUIDE ME IF ANY ONE AWARE ABOUT THAT.
    THANKS
    Moderator message: please don't use all caps from now on.
    Edited by: Thomas Zloch on Aug 4, 2010 6:12 PM

    If the iTunes database files are on that drive, launch iTunes with the Shift key(Windows) or Option key(Mac OS X) held down, select Choose Library, and navigate to it. The computer may need to be authorized to play protected content, and if the library contains rented movies, those won't play.
    If not, import the content to an iTunes library.
    (100371)

  • How to create customer with bapi

    hi i want to create customer through bapi which facilitates to enter customer code(our own defined not the sequentially next no.)
    i have gone through F.M  BAPI_CUSTOMER_CREATEFROMDATA1 BUT NOT ABLE TO UNDERSTAND HOW TO INPUT PARAMETER FOR CUSTOMER_CODE.
    PLEASE GUIDE ME IF ANY ONE AWARE ABOUT THAT.
    THANKS

    Moderator message - Welcome to SCN.
    But please search the forum before asking a question. This has been discussed many times before. Also read the BAPI documentation - thread locked.
    Also, Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Rob

Maybe you are looking for

  • FaceTime not working properly

    Hi, I just recently upgraded to 13" i5 MBP with Lion OS. I noticed that my FaceTime is not working properly. I have an iPad 2 also and I used it most of the time for my FaceTime which is why I didn't notice that the FaceTime of my new MBP is not work

  • Report to find current settings of system in SOBJ

    Does a report exists with which I can find the current settings which aren´t transportable?

  • Tolerance group setting

    Hello, For the following setting what should be set into tolerance group: The difference is too large for clearing (Round off difference upto INR 2 should be set off while clearing Vendor line items) regards

  • Intuitive Drag and Drop interaction

    Hi, i am working on a drag and drop interaction with a direct feed-back built in. there are 6 dragables and 6 drop sources, which are rectangle smart shapes. depending on the answer which is dragged, i want an x or a check to appear next to the smart

  • Can't save to iphoto from mail

    When I get photos attached in my icloud mail now, it still gives me the option to save image to iphoto. When I click on it, it does nothing at all. The only way I can bypass this now is to drag and drop to desktop and then import that way... help!