Problem in creating Purchase order through Idoc

Hi ABAPers,
I am trying to post PO document through WE19 t-code using inbound function module BAPI_IDOC_INPUT1 which is calling BAPI_PO_CREATE1 internally.And i am getting below error messages.
1. Characteristic  does not exist in operating concern AC01
2. This function only possible for subcontracting items
3. No instance of object type PurchaseOrder has been created. External reference
passing data to IDOC:PORDCR102
Header Segment : E1BPMEPOHEADER and E1BPMEPOHEADERX
company code    0814
doc_type            NB
vendor                0000400001
poprg-                EPRO
pgroup               U01
Item Segment : E1BPMEPOITEM and E1BPMEPOITEMX
Item                  00010
material             000000000000000263
plant                 0374
Qty                   22.000
Delivery Segment E1BPMEPOSCHEDULE and E1BPMEPOSCHEDULEX
Item                  00010
Schedule line     0001
delivery date      01.12.2008
Qty                   22.000
Note: i am able to create PO successfully, through SE37 by using FM BAPI_PO_CREATE1  with given above data.
Please confirm me, what else i need to pass to post PO through WE19 t-code using inbound function module BAPI_IDOC_INPUT1.
Please reply me ASAP.
Thanks and Regards,
Sekhar Raju.

must be data format issue. when you use Function_module/BAPI from SAP GUI, convertion exit is applied automatically. hence data is converted to proper format & submited.

Similar Messages

  • Create Purchase Order through EDI

    Hello Everybody,
    I want to know how to create Purchase order through EDI. I will receive text file from third party system. I have made most of the configuration related to EDI like Port -File, Partner Function etc. I am using message type PORDCR and Idoc type PORDCR05.
    But i do not know how the SAP first will convert the text file into IDoc and then create Purchase order. Can any body help me how to go about it? What steps i have to follow. I will have text file from that i have to create Purchase order through EDI.
    Thanks in advance.
    Regards,
    Manish

    Hi,
    Create Purchase Order through EDI
    Regarding on your query,
    You can use the standard ORDERS05 idoc type itself to send outbound idocs.
    It will be the middleware or the integration team that will send this IDOC to the receiving system.
    or
    Maintain Partner Profile in WE20, RFC Connection to the Middleware in SM59 and Port in WE21.
    Maintain Output Procedure/Output Type/Access Sequences/Condition Records from NACE
    Generate the Outbound 850 (PO) from ME21N
    Regards,
    Sekhar

  • Can we create purchase order through report programming?

    hi experts.....
    can we create purchase order through report programming?If yes plz give me the thread details?

    Hi,
    Use this code in a program by using a BAPI function module
    Anothe rway is using classical/ALV report using call transaction from a report for changing the PO
    loop at i_header.
        header-ref_1         = i_header-legacy.
        headerx-ref_1        = c_x.
        header-doc_type      = i_header-bsart.
        headerx-doc_type     = c_x.
        header-comp_code     = i_header-bukrs.
        headerx-comp_code    = c_x.
        header-purch_org     = i_header-ekorg.
        headerx-purch_org    = c_x.
        header-pur_group     = i_header-ekgrp.
        headerx-pur_group    = c_x.
        header-vendor        = i_header-lifnr.
        headerx-vendor       = c_x.
        concatenate i_header-bedat+4(4)
                    i_header-bedat+0(2)
                    i_header-bedat+2(2)
                    into header-doc_date.
        headerx-doc_date     = c_x.
        header-created_by    = i_header-ernam.
        headerx-created_by   = c_x.
        header-currency      = i_header-waers.
        headerx-currency     = c_x.
        concatenate i_header-kdatb+4(4)
                    i_header-kdatb+0(2)
                    i_header-kdatb+2(2)
                    into header-vper_start.
        headerx-vper_start   = c_x.
        loop at i_items where legacy = i_header-legacy.
          item-po_item            =  i_items-ebelp.
          itemx-po_item           =  i_items-ebelp.
          itemx-po_itemx          =  c_x.
          if i_header-bsart = 'NB'.
            item-material            =  i_items-ematn.
            itemx-material           =  c_x.
            schedule-quantity        =  i_items-menge * 1000.
            schedulex-quantity       =  c_x.
          else.
            item-short_text          = i_items-ematn.
            itemx-short_text         = c_x.
            item-matl_group          = '1000'.
            itemx-matl_group         = c_x.
            schedule-quantity        =  '1'.
            schedulex-quantity       =  c_x.
          endif.
          item-plant               =  i_items-werks.
          itemx-plant              =  c_x.
          schedule-po_item         = i_items-ebelp.
          schedule-sched_line      = '1'.
          schedulex-po_item        = i_items-ebelp.
          schedulex-sched_line     = '1'.
          schedulex-po_itemx       = c_x.
          schedulex-sched_linex    = c_x.
          concatenate  i_items-eildt+0(2)
                       i_items-eildt+2(2)
                       i_items-eildt+4(4)
                       into schedule-delivery_date.
          schedulex-delivery_date  =  c_x.
          item-price_unit          =  i_items-peinh * 100.
          itemx-price_unit         =  c_x.
          item-tax_code            =  i_items-mwskz.
          itemx-tax_code           =  c_x.
          item-shipping            =  i_items-evers.
          itemx-shipping           =  c_x.
          account-po_item          = i_items-ebelp.
          accountx-po_item         = i_items-ebelp.
          accountx-po_itemx        = c_x.
          if i_header-bsart = 'FO'.
            item-pckg_no  = sy-tabix.
            itemx-pckg_no = 'X'.
            limits-pckg_no        = sy-tabix.
            limits-limit          = i_items-overalllimit.
            limits-exp_value      = i_items-expectedoverall.
            posrvaccessvalues-pckg_no    = sy-tabix.
            posrvaccessvalues-line_no    = '0'.
            posrvaccessvalues-serno_line = '00'.
            posrvaccessvalues-percentage = '100.0'.
            posrvaccessvalues-serial_no  = '01'.
            account-serial_no     = '1'.
            accountx-serial_no    = '1'.
            accountx-serial_nox   = c_x.
            account-quantity  = '1'.
            accountx-quantity = c_x.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input  = i_items-kostl
              importing
                output = account-costcenter.
            accountx-costcenter   = c_x.
            call function 'CONVERSION_EXIT_ALPHA_INPUT'
              exporting
                input  = i_items-sakto
              importing
                output = account-gl_account.
            accountx-gl_account   = c_x.
            item-acctasscat       = i_items-knttp.
            itemx-acctasscat      = c_x.
            item-item_cat         = i_items-epstp.
            itemx-item_cat        = c_x.
          endif.
          append:item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
          clear :item,itemx,schedule,schedulex,account,accountx,limits,posrvaccessvalues.
        endloop.
        call function 'BAPI_PO_CREATE1'
          exporting
            poheader                     = header
            poheaderx                    = headerx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
            importing
            exppurchaseorder             = ponumber
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
            tables
            return                       = return
            poitem                       = item
            poitemx                      = itemx
    *   POADDRDELIVERY               =
            poschedule                   = schedule
            poschedulex                  = schedulex
            poaccount                    = account
    *   POACCOUNTPROFITSEGMENT       =
            poaccountx                   = accountx
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
            polimits                     = limits
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
       posrvaccessvalues            = posrvaccessvalues.
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
        if ponumber eq space.
          loop at return where type = 'E'.
            clear buffer.
            move-corresponding return to e_return.
            concatenate i_header-legacy e_return into buffer.
            transfer buffer to p2_file.
          endloop.
          move-corresponding i_header to i_eheader.
          transfer i_eheader to p3_file.
          loop at i_items where legacy = i_header-legacy.
            move-corresponding i_items to i_eitems.
            transfer i_eitems to p4_file.
          endloop.
        else.
          commit work and wait.
        endif.
        clear:ponumber,header,headerx,item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
        refresh:item,itemx,account,accountx,limits,return,schedule,schedulex,posrvaccessvalues.
      endloop.
      close dataset p2_file.
      close dataset p3_file.
      close dataset p4_file.
    Regards
    Krishna

  • Creating purchase order through coding

    I am trying to create purchase order through Code, for a table field i can insert as :
    odocs = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
    odocs.CardCode = "200173"
    But if the field is not a table field then , how can i insert it in PO?????

    Hi Ashish Patil 
    Not sure what you mean, not sure what table you are talking about. But here is some sample code on how to add a purchase order.
    Dim PO As SAPbobsCOM.Documents
            PO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
            PO.CardCode = "VUL001"
            PO.Lines.ItemCode = "02SILVTS"
            PO.Lines.Quantity = 1
            PO.Lines.Price = 120
            If PO.Add() <> 0 Then
                Dim str As String
                str = oCompany.GetLastErrorDescription()
                MsgBox(str)
            End If
    hope it helps

  • Problem while Creating Service order through Work Order

    Hi Gurus,
    I have a problem While creating Service order (me21n) through - Work order it contains service requisitions.
    So that means they carry information such as G/L and work order number while entering the requistion no in PO Creation Screen (me21n)  which automatically should be picked from the work order refference.
    But problem here is the service items and all other are assigned to PO except the Account Assingnment tab which is GL Account and Work Order No and Cost center..
    Can anyone explain me this?
    Is this something that one can explain?
    Regards,
    Murugesh R
    Rewards for value replies.

    Closed..

  • Create Sales order from a Purchase order through IDOCs in the same system

    Hi,
    I have been trying to create Sales ordes in the same SAP system, through the Purchase order generated.
    The Purchase order generated, passes the information through an outbound I DOC to a SO inbound I doc, I am getting the following error
    Partner number A2815 for customer 2815 , partner function WE does not exist.
    Message no. VG140
    but in my case the ship to party (partner function WE) is the same as Sold to party (partner function AG)
    can any body please help how to map it
    Sreeram P

    Hello Sreeram ,
    See note 1339290, which corrects the parameters of error message VG140.
    Also, the sold to party (SP) is determined in several ways:
    1. If the sender partner in the control record is a logical system (LS), an E1EDKA1 segment with the SP must be sent.
               E1EDKA1-PARVW = AG
               E1EDKA1-PARTN = valid partner in the receiving system
    Otherwise the system takes the partner number from the control record into the field E1EDKA1-PARTN and this is not a valid partner.
    2. If the sender partner in the control record is a SP, we take this SP from the sender partner into the sold-to party number. Excepted another SP was sent in the segment E1EDKA1-PARNR, then the SP from the control record has no effect.
    The E1EDKA1 segment for the SP should be sent always before the E1EDKA1 segment of the ship-to party (SH).
    Regards,

  • Creating Sales order then purchase order through IDocs using XI

    I have a scenario where I have to create the Sales Order and purchase order. Important thing is after successful creation of Sales Order then only purchase order needs to be created.
    Is it possible to achieve the above thing in XI using Idocs..Should I need to go for BAPI's.
    Waiting for the solution

    > I have a scenario where I have to create the Sales Order and purchase order. Important thing is after successful creation of Sales Order then only purchase order needs to be created.
    You have to use BPM for this.
    > Is it possible to achieve the above thing in XI using Idocs..Should I need to go for BAPI's.
    If you know the BAPI's then you can avoide BPM because in that case you can go for inbound proxy and inside the proxy code you can make sure the creation of SO & PO in desired order. You can also do the error handling very efficiently in R3 in comparison to XI.
    Regards,
    Sarvesh

  • Problem in creating Purchase order Using BAPI

    Dear ABAPers,
             I am creating the Purchase order Using BAPI_PO_CREATE1. In that the Purchase order Line item i am giving the Net Price for the Material.But While creating the purchase order the system creates the puchase order with the net price which is already available in the memory.So how to solve this problem.
    Thanks & Regards,
    Ashok.

    Hi,
        Try to pass the value NO_PRICE_FROM_PO in the BAPI and see
    NO_PRICE_FROM_PO = 'X'
    Regards
    Bala Krishna

  • Create purchase order form idoc

    Hi everyone,
    I would be very grateful if someone could explain me whether it is possible to generate a purchase order directly from an incoming ORDERS05 IDOC and specially how to do it.
    I am receiving an ORDERS05 IDOC from an external system but I do not know how to generate the purchase order I need using the information in the IDOC.
    Thanks in advance and best regards.
    Ben.

    Hi,
    Here is very basic overview on your requirement.
    1) you need Logical System and Partner Profile.
    2) Need to find Message type for Idoc Type ORDERS05 (Tranx: WE82)
    3) With Message Type A function module is attached. This will create PO.
    Regards

  • Problem in creating purchase order document

    Hi,
    I created a new business document : Purchase request that once it is validated we can copy it to Puchase order.
    when i save the purchase order doc and then launch the creation of the purchase order the operation succed.
    But when i try to copy an already created purchase request i get the error :
    Object reference not set to an instance of an object
    Does any have a clue?
    Thanks a lot.

    This is my code
    Form = _SboApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);
                                                            Documents _Documents =
                                                                (Documents)
                                                            _SboCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders);
                                                            // Add PO Header
                                                            _Documents.CardCode =
                                                                ((EditText) _Form.Items.Item("3").Specific).Value.ToString();
                                                            _Documents.CardName =
                                                                ((EditText)_Form.Items.Item("4").Specific).Value.ToString();
                                                            // Add PO Lines
                                                            Matrix matrix = (Matrix)Form.Items.Item("37").Specific;
                                                            if (_matrix.RowCount > 0)
                                                                _Documents.Lines.ItemCode =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("35").Cells.Item(1).Specific).
                                                                        Value;
                                                                string value =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                        Value.Replace(".", ",");
                                                                double val = Convert.ToDouble(value);
                                                                _Documents.Lines.Quantity =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                                    _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                                    for (int i = 2; i < _matrix.RowCount + 1; i++)
                                                                    _Documents.Lines.Add();
                                                                    _Documents.Lines.ItemCode =
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("35").Cells.Item(i).
                                                                             Specific).
                                                                            Value;
                                                                    _Documents.Lines.Quantity =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("38").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.Price =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("39").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.DiscountPercent =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("40").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    string val1 = ((ComboBox)
                                                                                    _matrix.Columns.Item("41").Cells.Item
                                                                                    i).Specific).
                                                                        Selected.Value;
                                                                    _Documents.Lines.VatGroup =
                                                                        ((ComboBox)
                                                                         _matrix.Columns.Item("41").Cells.Item(i).
                                                                             Specific).
                                                                            Selected.Value;
                                                                int err = _Documents.Add();
                                                                GC.Collect();
    thanks for your attention

  • Problem In Creating Sales Order Through DI API

    Hi
    I am Creating The Sales Order Through DI API.
    the Error Is Coming - " [OACT] , 'No matching records found (ODBC -2028)'"
    anyone  can help me solving it.

    Hi vivek,
    Have you tried adding the same document with the client ?
    OACT is the accounts table and this error message typically indicates that there is an account parameter missing somewhere in the system.
    Possible causes include:
    - you are using a tax group or warehouse which does not have all the required accounts set
    - There is a price rounding and the rounding price account has not been set in the account settings
    - etc.
    The first things I would check include the tax group settings and the G/L Account determination settings.
    Henry

  • Create Purchase Requisition through IDOC PREQCR1

    Hi experts,
    I use idoc PREQCR1  to crate PR successfully, but I need to add "cost center" and  "G/L account" infomation to PR, but I don't know how to have "cost center" and "G/L account" information in PR through IDOC PREQCR1
    Thanks.

    Hi Michael
    As I don't have access to SAP system yet, giving functional information.
    In ME51N, for line item, enter acct assgt category for "Cost Center" .Then in account assignment tab , "Cost Center" & "G/L Account" has to be entered. Add these fields.
    Regds
    Chandan

  • Problem in creating Purchase Order

    when i am going to create PO error is coming that Plant closed on delivery date.
    can any one help me .
    thanks in advanced.
    Laxman sankhla

    Hi,
    Please check the calandar assignment at table T001K for that plant.Please go to that date calandar at SCAL and check the related holiday calandar for that factory calandar.If the delivery date you gave is a holiday or not.
    Please change the delivery date  in the PO.it should have been a warning during po ctreation--is it not?
    If not make it a work day at SCAL by a special rule.
    Regards,

  • During  creating Purchase  order

    Hi alll ,
    My Problem is while creating purchase order through purchase requisition
    How to remove the tick mark against invoice reciept i.e (repos) and gr based i.e ( weber )
    programatically .
    Regards
    Deepak

    hi,
    if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
    the above specifed user exit is not called exactely.
    implement two implecit enhancement in the following include program for resolving your problem
    1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
    METHOD transport_to_dynp.
    ENHANCEMENT 50  ZREMOVE_FLAG.    "active version
    clear: mepo1317_pbo-repos,
          mepo1317_pbo-webre,
          mepo1317_pbo-erekz.
    ENDENHANCEMENT.
        mepo1317 = mepo1317_pbo.
      ENDMETHOD. 
    2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
    FORM pot_etdrk.
    ENHANCEMENT 100  ZREMOVE_POT.    "active version
    loop at pot.
          CLEAR: pot-repos,
          pot-webre,
          pot-erekz.
          MODIFY pot.
    ENDLOOP.
    ENDENHANCEMENT.
    endform.
    If you need any information please let me know.
    Regards,
    Peranandam

  • Workflow issue when create Purchase Order automaticlly based on Sales Order

    dear experts,
    I got a problem when create purchase order automatically once the Sales Order created, the field ERNAE of the Purchase Order creatd is WF-BATCH, but we want this field to be the user log in the system, like John. Smith
    it seems this is a configuration issue, but i am not familar with workflow, do you experts have any solutions?
    thank you in advance.
    Hongtao

    thank you for you reply my friend.
    yes, i mean the PO creator.
    I just create a SO in VA01, then change the Schedule line category from CN to CP, then SAVE, then Confirm the Delivery Proposal. after all this, the PO will be created automatically by Workflow. Because when I display the PO via ME23N, it displays [Standard PO XXXXX  created by Workflow-System] on the top of the screen.
    But i do not know which workflow is trigered to create the PO. and i tried SWEL like you said, there is no record listed.
    do you have any other suggestions? thank you so much, friend.

Maybe you are looking for