BAPI :  BAPI_PO_CREATE1

Hi everybody
I'm using  a BAPI (BAPI_PO_CREATE1)    I send the table PO_ITEM and the quantity field   has a value but when I check the  generated purchase order I see another value in quantity
What can I solve my problem??????

Is it the same quantity but with the decimal moved?  I have found that you need to multiply by 1000 (I believe it is 1000) to create a sales order using the BAPI.
I am about to use the same BAPI, as you, to create a PO so I will be interested to see what your isssue is.
Aaron

Similar Messages

  • Need Help ! PO using a BAPI -  BAPI_PO_CREATE1

    Hi friends,
    Need some help. I am trying to create a PO using a BAPI - BAPI_PO_CREATE1
    <i><b>I want the new PO to have all the characteristics of an existing PO. which is stored in wa_order_split_create-docnr and for the new PO, i want the quantity from wa_order_split_create-qty_acptd and the delivery data to be wa_order_split_create-dly_date. But this process and code below gives a short dump in  the std FM  - MEPO_DOC_ITEM_GET . It raises an exception of failure.</b></i>
    Am i making any mistake while filling the header or item or schedule lines before BAPI_PO_CREATE1 ?
    MOVE: wa_order_split_create-docnr TO i_ebeln,
    wa_order_split_create-docitm TO i_ebelp .
    CALL FUNCTION 'ME_EKKO_SINGLE_READ'
    EXPORTING
    pi_ebeln = i_ebeln
    IMPORTING
    po_ekko = i_ekko
    EXCEPTIONS
    no_records_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0 .
    ENDIF .
    Fill PO Header
    i_bpoh-comp_code = i_ekko-bukrs .
    i_bpoh-doc_type = i_ekko-bsart .
    i_bpoh-vendor = i_ekko-lifnr .
    i_bpoh-langu = i_ekko-spras .
    i_bpoh-pmnttrms = i_ekko-zterm .
    i_bpoh-purch_org = i_ekko-ekorg .
    i_bpoh-pur_group = i_ekko-ekgrp .
    i_bpoh-currency = i_ekko-waers .
    i_bpoh-agreement = i_ekko-konnr .
    i_bpoh-incoterms1 = i_ekko-inco1 .
    i_bpoh-incoterms2 = i_ekko-inco2 .
    Fill PO update indicator 'X'
    i_bpohx-comp_code = c_char_x .
    i_bpohx-doc_type = c_char_x .
    i_bpohx-vendor = c_char_x .
    i_bpohx-langu = c_char_x .
    i_bpohx-pmnttrms = c_char_x .
    i_bpohx-purch_org = c_char_x .
    i_bpohx-pur_group = c_char_x .
    i_bpohx-currency = c_char_x .
    i_bpohx-agreement = c_char_x .
    i_bpohx-incoterms1 = c_char_x .
    i_bpohx-incoterms2 = c_char_x .
    CALL FUNCTION 'ME_EKPO_SINGLE_READ'
    EXPORTING
    pi_ebeln = i_ebeln
    pi_ebelp = i_ebelp
    IMPORTING
    po_ekpo = i_ekpo
    EXCEPTIONS
    no_records_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0 .
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF .
    Fill PO Item
    i_wa_bpoi-po_item = i_ekpo-ebelp .
    i_wa_bpoi-material = i_ekpo-matnr .
    i_wa_bpoi-plant = i_ekpo-werks .
    i_wa_bpoi-stge_loc = i_ekpo-lgort .
    i_wa_bpoi-quantity = wa_order_split_create-qty_acptd .
    i_wa_bpoi-po_unit = i_ekpo-meins .
    i_wa_bpoi-tax_code = i_ekpo-mwskz .
    i_wa_bpoi-val_type = i_ekpo-bwtar .
    i_wa_bpoi-item_cat = i_ekpo-pstyp .
    i_wa_bpoi-acctasscat = i_ekpo-knttp .
    i_wa_bpoi-agreement = i_ekpo-konnr .
    i_wa_bpoi-agmt_item = i_ekpo-ktpnr .
    APPEND i_wa_bpoi TO i_bpoi .
    Fill PO Item update indicator 'X'
    i_wa_bpoix-po_item = i_ekpo-ebelp .
    i_wa_bpoix-po_itemx = c_char_x .
    i_wa_bpoix-material = c_char_x .
    i_wa_bpoix-plant = c_char_x .
    i_wa_bpoix-stge_loc = c_char_x .
    i_wa_bpoix-quantity = c_char_x .
    i_wa_bpoix-po_unit = c_char_x .
    i_wa_bpoix-tax_code = c_char_x .
    i_wa_bpoix-val_type = c_char_x .
    i_wa_bpoix-item_cat = c_char_x .
    i_wa_bpoix-acctasscat = c_char_x .
    i_wa_bpoix-agreement = c_char_x .
    i_wa_bpoix-agmt_item = c_char_x .
    APPEND i_wa_bpoix TO i_bpoix .
    Fill PO Item Schedule
    i_wa_bpos-po_item = i_ekpo-ebelp .
    i_wa_bpos-sched_line = '0001' .
    i_wa_bpos-delivery_date = wa_order_split_create-dly_date .
    i_wa_bpos-quantity = wa_order_split_create-qty_acptd .
    APPEND i_wa_bpos TO i_bpos .
    Fill PO Item schedule update indicator 'X'
    i_wa_bposx-po_item = i_ekpo-ebelp .
    i_wa_bposx-sched_line = '0001' .
    i_wa_bposx-delivery_date = c_char_x .
    i_wa_bposx-quantity = c_char_x .
    APPEND i_wa_bposx TO i_bposx .
    CLEAR: i_pargr .
    SELECT SINGLE pargr
    INTO i_pargr
    FROM t161
    WHERE bstyp = i_ekko-bstyp
    AND bsart = i_ekko-bsart .
    CLEAR i_ekpa[].
    CALL FUNCTION 'MM_READ_PARTNERS'
    EXPORTING
    application = c_char_p
    ebeln = i_ebeln
    bstyp = i_ekko-bstyp
    pargr = i_pargr
    TABLES
    x_ekpa = i_ekpa[].
    LOOP AT i_ekpa INTO i_wa_ekpa .
    i_wa_bpop-partnerdesc = i_wa_ekpa-parvw .
    i_wa_bpop-langu = sy-langu .
    IF NOT i_wa_ekpa-lifn2 IS INITIAL .
    i_wa_bpop-buspartno = i_wa_ekpa-lifn2 .
    ELSE .
    i_wa_bpop-buspartno = i_wa_ekpa-parnr .
    ENDIF .
    APPEND i_wa_bpop TO i_bpop .
    CLEAR: i_wa_ekpa, i_wa_bpop .
    ENDLOOP .
    CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = i_bpoh
    poheaderx = i_bpohx
    IMPORTING
    exppurchaseorder = i_new_ebeln
    TABLES
    return = i_bapiret2
    poitem = i_bpoi[]
    poitemx = i_bpoix[]
    poschedule = i_bpos[]
    poschedulex = i_bposx[].
    i_order = i_new_ebeln .
    SHIFT i_order LEFT DELETING LEADING '0' .
    i_return-errortype = c_char_i .
    i_return-workarea = c_zsw .
    i_return-message = '064' .
    i_return-variable1 = i_order .
    loop at i_bapiret2 into i_bapiretn where type ca 'EAX' .
    append i_bapiretn to t_bapi_return .
    endloop .
    if t_bapi_return[] is initial .
    i_create_order = c_char_x .
    CALL FUNCTION 'SWD_POPUP_MESSAGE_SEND'
    EXPORTING
    act_return = i_return.

    Hi,
    Make the required settings to trigger an idoc during the creation of a PO in Me21N with multiple line items, check how the idoc is being created, This should be starting point to know how to create idoc with multiple line items.
    Hope this works for you.
    Rajeev

  • Not updating G/L account and cost center with BAPI BAPI_PO_CREATE1

    Hello Friends,
    The two fields G/L ACCOUNT and Cost Center is not updated using BAPI BAPI_PO_CREATE1. I am unable to understand why? This is what i am passing to account assignment structure( POACCOUNT). Filled POACCOUNTX structre as well. I have passed company code at the header level.
    PO_ITEM = 00010
    SERIAL_NO = 01
    CREAT_DATE = sy-datum
    GL_ACCOUNT = 621000
    COSTCENTER = 1000
    CO_AREA = 4000
    Please let me know why it is not updating anything i missed while passing?
    2>I need to update GR quantity but this field is not available in the BAPI ..Please let me know how to update this field.
    Any help is highly appreciated.
    Regards,
    Raj

    Hi, I have a problem I use the bapi BAPI_PO_CREATE1, I pass the table pt_poaccount in the parameter poaccount but the bapi when register my purchase order doesn't register correctly the values KOSTL, AUFNR, PS_PSP_PNR, NPLNR of the tablepoaccount and register the default values of the contract. Please i need help with this.
    CLEAR s_poaccount.
         s_poaccount-po_item     = <fs_datos>-ebelp.
         s_poaccount-serial_no   = w_serial.
         s_poaccount-costcenter  = <fs_datos>-kostl.
         s_poaccount-orderid     = <fs_datos>-aufnr.
         s_poaccount-wbs_element = <fs_datos>-ps_psp_pnr.
         s_poaccount-network     = <fs_datos>-nplnr.
         s_poaccount-activity    = <fs_datos>-vornr.
         s_poaccount-quantity    = <fs_datos>-menge.
         s_poaccount-net_value   = <fs_datos>-brtwr.
         s_poaccount-creat_date  = sy-datum.          
         s_poaccount-itm_number  = <fs_datos>-ebelp.  
         s_poaccount-co_area = '1001'.               
         APPEND s_poaccount TO pt_poaccount.
    CLEAR s_poaccountx.
         s_poaccountx-po_item     = <fs_datos>-ebelp.
         s_poaccountx-serial_no   = w_serial.
         s_poaccountx-po_itemx = 'X'.
         s_poaccountx-serial_nox = 'X'.
         s_poaccountx-creat_date = 'X'.
         s_poaccountx-itm_number = 'X'.
         s_poaccountx-co_area = 'X'.
         s_poaccountx-costcenter = 'X'.
         s_poaccountx-orderid = 'X'.
         s_poaccountx-wbs_element = 'X'.
         s_poaccountx-network = 'X'.
         s_poaccountx-activity = 'X'.
         s_poaccountx-quantity = 'X'.
         s_poaccountx-net_value = 'X'.
         APPEND s_poaccountx TO  pt_poaccountx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
         EXPORTING
           poheader          = pe_poheader
           poheaderx         = pe_poheaderx
         IMPORTING
           exppurchaseorder  = pi_exppurchaseorder
         TABLES
           return             = pt_return
           poitem           = pt_poitem
           poitemx         = pt_poitemx
           poschedule    = pt_poschedule
           poschedulex  = pt_poschedulex
           poaccount      = pt_poaccount
           poaccountx    = pt_poaccountx
           poservices     = pt_poservices
           posrvaccessvalues = pt_posrvaccessvalues.
    The BAPI is register with these values as default however i pass other values in table
    pt_poaccount

  • PO created though BAPI 'BAPI_PO_CREATE1' not visible in WPOHF4D

    Hi Experts,
    As per the client requirement, I am using BAPI 'BAPI_PO_CREATE1' to create PO. My client is using retail transactions majorly and wants to see the created PO in tcode WPOHF4D. The PO created using this BAPI are visbible in Me22n, but not in WPOHF4D.
    Can you please let me know what has to be done to see the generated POs in WPOHF4D?
    Below is the part of code where I am filling the stuctures to be passed to BAPI:
    *Filling header
          lwa_poheader-SALES_PERS = lwa_datatab-ihrez.
          lwa_poheader-doc_type = lwa_datatab-bsart.
          lwa_poheader-doc_date = lwa_datatab-bedat.
          lwa_poheader-comp_code = lwa_datatab-bukrs.
          lwa_poheader-purch_org = lwa_datatab-ekorg.
          lwa_poheader-pur_group = lwa_datatab-ekgrp.
          lwa_poheader-vendor = lwa_datatab-lifnr.
          lwa_poheader-currency = lwa_datatab-waers.
          lwa_poheader-pmnttrms = lwa_datatab-zterm.
          lwa_poheader-exch_rate = lwa_datatab-wkurs.
          lwa_poheader-ex_rate_fx = lwa_datatab-kufix.
          lwa_poheader-incoterms1 = lwa_datatab-inco1.
          lwa_poheader-incoterms2 = lwa_datatab-inco2.
    *Filling Purchase Order Header Data (Change Parameter)
          lwa_poheaderx-SALES_PERS  = v_true.
          lwa_poheaderx-doc_type  = v_true.
          lwa_poheaderx-doc_date  = v_true.
          lwa_poheaderx-comp_code  = v_true.
          lwa_poheaderx-purch_org  = v_true.
          lwa_poheaderx-pur_group  = v_true.
          lwa_poheaderx-vendor  = v_true.
          lwa_poheaderx-currency  = v_true.
          lwa_poheaderx-pmnttrms  = v_true.
          lwa_poheaderx-exch_rate  = v_true.
          lwa_poheaderx-ex_rate_fx  = v_true.
          lwa_poheaderx-incoterms1  = v_true.
          lwa_poheaderx-incoterms2  = v_true.
    *Filling Item
          lwa_poitem-po_item = lv_po_index.
          lwa_poitem-material = lwa_datatab-matnr.
          lwa_poitem-quantity = lwa_datatab-menge.
          lwa_poitem-po_unit = lwa_datatab-meins.
          lwa_poitem-net_price = lwa_datatab-netpr.
          lwa_poitem-trackingno = lwa_datatab-bednr.
          lwa_poitem-preq_name = lwa_datatab-afnam.
          lwa_poitem-plant = lwa_datatab-werks.
          lwa_poitem-tax_code = lwa_datatab-mwskz.
          lwa_poitem-ret_item = lwa_datatab-ret_item.
          lwa_poitem-po_price = '2'.
          APPEND lwa_poitem TO lt_poitem.
    *Filling Item Data (Change Parameter)
          lwa_poitemx-po_item = lv_po_index.
          lwa_poitemx-material  = v_true.
          lwa_poitemx-quantity  = v_true.
          lwa_poitemx-po_unit  = v_true.
          lwa_poitemx-net_price  = v_true.
          lwa_poitemx-trackingno  = v_true.
          lwa_poitemx-preq_name  = v_true.
          lwa_poitemx-plant  = v_true.
          lwa_poitemx-tax_code  = v_true.
          lwa_poitemx-ret_item = v_true.
          lwa_poitemx-po_price = v_true.
          APPEND lwa_poitemx TO lt_poitemx.
    *Filling schedule line
          lwa_poschedule-po_item = lv_po_index.
          lwa_poschedule-delivery_date = lwa_datatab-eindt.
          APPEND lwa_poschedule TO lt_poschedule.
    *Filling Delivery Schedule (Change Parameter)
          lwa_poschedulex-po_item = lv_po_index.
          lwa_poschedulex-delivery_date = v_true.
          APPEND lwa_poschedulex TO lt_poschedulex.
    Filling Partner
          IF lwa_datatab-lifn2 IS NOT INITIAL.
            lwa_popartner-partnerdesc = v_partner_desc.
            lwa_popartner-langu = 'EN'.
            lwa_popartner-buspartno = lwa_datatab-lifn2.
            APPEND lwa_popartner TO lt_popartner.
          ENDIF.
    Filling Conditions in Purchase Order
          IF lwa_datatab-kbetr1 IS NOT INITIAL.
            lwa_pocond-itm_number = lv_po_index.
            lwa_pocond-cond_type = v_cond1_zvol.
            lwa_pocond-cond_value = lwa_datatab-kbetr1.
            lwa_pocond-currency = lwa_datatab-waers.
            lwa_pocond-change_id = c_insert_flg.
            APPEND lwa_pocond TO lt_pocond.
          ENDIF.
          IF lwa_datatab-kbetr2 IS NOT INITIAL.
            lwa_pocond-itm_number = lv_po_index.
            lwa_pocond-cond_type = v_cond2_zcdq.
            lwa_pocond-cond_value = lwa_datatab-kbetr2.
            lwa_pocond-currency = lwa_datatab-waers.
            lwa_pocond-change_id = c_insert_flg.
            APPEND lwa_pocond TO lt_pocond.
          ENDIF.
    Filling Conditions (Items, Change Parameter)
          IF lwa_datatab-kbetr1 IS NOT INITIAL.
            lwa_pocondx-itm_number = lv_po_index.
            lwa_pocondx-cond_type = v_true.
            lwa_pocondx-cond_value  = v_true.
            lwa_pocondx-currency = v_true.
            lwa_pocondx-change_id = v_true.
            APPEND lwa_pocondx TO lt_pocondx.
          ENDIF.
          IF lwa_datatab-kbetr2 IS NOT INITIAL.
            lwa_pocondx-itm_number = lv_po_index.
            lwa_pocondx-cond_type = v_true.
            lwa_pocondx-cond_value  = v_true.
            lwa_pocondx-currency = v_true.
            lwa_pocondx-change_id = v_true.
            APPEND lwa_pocondx TO lt_pocondx.
          ENDIF.
    <removed by moderator>. Would really appreciate if someone helps.
    Thanks,
    Priyanka
    Edited by: Thomas Zloch on Apr 1, 2011 2:16 PM - standard priority

    hi Priyanka,
    In the T-code WPOHF4D
    the select query
    SELECT ekkolifnr ekkoekorg ekgrp ekko~ebeln pohf_type
                  ekko~fixpo waers frgrl frgsx submi
              ekkobsart ekkobstyp ekkobedat ekpowerks ekko~otb_status
                 netwr stapo menge ekpo~loekz                   "959448
          APPENDING CORRESPONDING FIELDS OF TABLE lt_worklist_loop
          FROM ekpo INNER JOIN ekko
            ON ekkoebeln = ekpoebeln
          WHERE ekko~ebeln  IN it_ran_ebeln
            AND ekgrp       IN it_ran_ekgrp
            AND ekko~ekorg  IN it_ran_ekorg
            AND ekko~bukrs  IN it_ran_bukrs
            AND matnr       IN it_ran_matnr
            AND ekpo~werks  IN lt_ran_werks
            AND ekko~lifnr  IN it_ran_lifnr
            AND bedat       IN it_ran_bedat
            AND ekko~fixpo  IN it_ran_fixpo
            AND pohf_type   IN it_ran_pohf_type
            AND bsart       IN it_ran_bsart
            AND submi       IN it_ran_submi
            AND ernam       IN it_ran_uname
            AND source_id   IN it_ran_source_id               
            AND ekko~bstyp  =  c_po
            AND ekko~bsakz  <> c_bsakz_transfer. 
    is responsible for data fetching.
    If u r not getting data and this query failing check it while debugging.
    Thanks,
    Gaurav.

  • Bapi BAPI_PO_CREATE1 . Service po upload with contract reference.

    Hi Experts,
    I created an abap program for uploading service po using BAPI  'BAPI_PO_CREATE1'. Its working fine without Contract reference. But if I include contract reference in the item it will return error
    'Service SERVICE 1234: please enter a price'.
    the fields I use for entering contract reference are
    1) bapimepoitem-ref_doc and
    2) bapimepoitem-ref_item.
    Please help me out in this bcz its critical now.
    Edited by: arun.george on Sep 12, 2011 3:16 PM

    Hi Arun,
    Refer the posts mentioned below:
    Link: [BAPI_PO_CREATE1;
    Link: [BAPI_PO_CREATE1;
    Link: [Contract Number and Item not transferred to limits in SAP PO;
    Try these hints. If still you face any issues, post further.
    Regards,
    Pranav.

  • BAPI BAPI_PO_CREATE1 is not able to hold PO's

    Hi All,
    We have a requirement where-in the PR's for a same vendor needs to be converted to a single PO.
    Say a PR has 10 line items, then a single PO should be created.
    We used BAPI BAPI_PO_CREATE1 to create PO's. But, even if a single line item is faulty, the PR is not at all converted to PO.
    Now the requirement is to omit the faulty line item and thus create a PO for the remaining 9 line items of the PR.
    I used the variable MEMORY_UNCOMPLETE of BAPI_PO_CREATE1 interface to achieve this functionality.
    But I am not able to get this.
    Please suggest if anyone has worked on the similar requirements.
    Thanks,
    Ravi

    Hi all ,
    I have used two parameters  to hole PO :
    check bellow code :
    CALL FUNCTION 'BAPI_PO_CREATE1'
             EXPORTING
               poheader         = ls_po_header
               poheaderx        = ls_po_headerx
               MEMORY_UNCOMPLETE = 'X'   "held if faulty
               MEMORY_COMPLETE   = 'X'   "held even no faulty
             IMPORTING
    Thanks,
    reza rostami / saphiran.com Abap team .

  • How create a purchase order without imputation using bapi: BAPI_PO_CREATE1

    Hello Forum
    I have an request for purchase order with imputation K (cost center, EBAN-KNTTP). During the liberation of the request for purchase order, and using the Bapi: BAPI_PO_CREATE1, I want to create a Purchase Order without imputation (imputation empty or charge empty).
    The system displays the following error: The request for purchase order, item (position) 10, is attributed to another order...
    I imagine that is because the request for purchase order has imputation (charged) K and the purchase order will have no type of imputation (imputation empty).
    However, manually, Yes, I can create the purchase order. That is, I first release, the request for purchase order. Then I create the order of purchase using ME21 and with reference to request for purchase order, and when SAP returns the items of the request for purchase order, I manually remove the imputation K, and these items to become the purchase order.
    Please support me want to know how to resolve this case, why can not I create a purchase order without imputation to from the request for purchase order with imputation K, using Bapi
    Thank you.
    Greetings,

    Hi,
    In the item overview of the purchase order creation screen (ME21N), you have a column Purchasing Doc and next it item no.  You can give the existing purchase order number here with item no which will create a purchase order, and changes can be made wherever you require.
    Hope this helps.
    Thanks
    Krishna.

  • How to pass the condition vallues in bapi BAPI_PO_CREATE1 for items as well

    HI,
    where to pass the condition value table in bapi BAPI_PO_CREATE1 item level as well as header level
    Like Frieght charges,discounts, basic price ,VAT,CST etc.
    Is there any BAPI for GR tcode MIGO.
    Pl send along with simple examples .
    Your answeres will be rewarded.

    Pass the condition value to the following parameters.
      POCONDHEADER                 =
      POCONDHEADERX                =
      POCOND                       =
      POCONDX                      =
    For GR u case use the following BAPI.
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
                         02 - MB31 - Goods Receipts for Prod Order
                         03 - MB1A - Goods Issue
                         04 - MB1B - Transfer Posting
                         05 - MB1C - Enter Other Goods Receipt
                         06 - MB11
    Domain: KZBEW - Movement Indicator
         Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
             call function 'BAPI_GOODSMVT_CREATE'
               exporting
                   goodsmvt_header             = gmhead
                   goodsmvt_code               = gmcode
                 *   TESTRUN                     = ' '
              IMPORTING
                  goodsmvt_headret            = mthead
             *   MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
               tables
                 goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
                return                      = errmsg.

  • How to add net price in BAPI BAPI_PO_CREATE1

    hi all:
    when i use bapi BAPI_PO_CREATE1, i cannot add net price in PO. code is as follow.
    *POPULATE ITEM DATA.
            clear t_po_items.
            t_po_items-po_item      = v_poitem * 10.
            t_po_items-material     = SEQ_FILEH-matnr.
            t_po_items-SHORT_TEXT   = SEQ_FILEH-MAKTX.
            t_po_items-plant        = p_RESWK.
            t_po_items-quantity     = SEQ_FILEH-MENGE.
            t_po_items-PO_UNIT      = SEQ_FILEH-MEINS.
            t_po_items-TRACKINGNO   = SEQ_FILEH-BEDNR.
            t_po_items-ACCTASSCAT   = SEQ_FILEH-KNTTP.
            t_po_items-ADMOI        = SEQ_FILEH-ADMOI.
            t_po_items-NET_PRICE    = SEQ_FILEH-netpr.
            t_po_items-PRICE_UNIT   = SEQ_FILEH-peinh.
            t_po_items-FREE_ITEM    = ' '.
           t_po_items-IR_IND       = c_x.
            APPEND t_po_items.
    *POPULATE ITEM FLAG TABLE
            clear t_po_itemsx.
            t_po_itemsx-po_item     = v_poitem * 10.
            t_po_itemsx-po_itemx    = c_x.
            t_po_itemsx-material    = c_x.
            t_po_itemsx-SHORT_TEXT  = c_x.
            t_po_itemsx-plant       = c_x.
            t_po_itemsx-quantity    = c_x.
            t_po_itemsx-PO_UNIT     = c_x.
            t_po_itemsx-TRACKINGNO  = c_x.
            t_po_itemsX-ACCTASSCAT  = c_x.
            t_po_itemsx-tax_code    = c_x.
            t_po_itemsX-item_cat    = c_x.
            t_po_itemsx-ADMOI       = c_x.
            t_po_itemsX-IR_IND      = c_x.
            t_po_itemsx-NET_PRICE   = c_x.
            t_po_itemsx-PRICE_UNIT  = c_x.
            t_po_itemsX-PO_PRICE    = c_x.
            t_po_itemsx-FREE_ITEM   = c_x.
            APPEND t_po_itemsx.
    any advice?

    Hi Gang LI,
    Try by adding this to
    t_po_items-po_price = '2'. ( 1 = Gross,  2 = Net price )

  • Update delivery address in PO using BAPI BAPI_PO_CREATE1

    Hi,
    I want to update the delivery address of line item using BAPI BAPI_PO_CREATE1. I am creating address using BAPI BAPI_ADDRESSORG_SAVEREPLICA and I am sending the address number in the import parameter POADDRDELIVERY but it is not updating the delivery address.
    Regards,
    Anil N.

    Hi.
    after called the BAPI BAPI_PO_CREATE1 call the FM BAPI_TRANSACTION_COMMIT.
    it will work
    regards
    Marco

  • What values to pass in BAPI BAPI_PO_CREATE1 for conditions

    Hi,
    what necessary values to be passed to conditions tables in bapi BAPI_PO_CREATE1
    tables are :
    POCONDHEADER =
    POCONDHEADERX =
    POCOND =
    POCONDX =
    I am just paassing item number, condition type ,condition value they are reflecting in created PO.
    Helpfull answeres will be rewarded.

    Check this code u will get some idea of how to create a PO
    REPORT  zvk_bapi_po                                                 .
    DATA: s_poheader  LIKE bapimepoheader,
          f_pono      LIKE bapimepoheader-po_number,
          s_poheaderx LIKE bapimepoheaderx,
          s_versions  LIKE bapimedcm,
          t_poitem    LIKE bapimepoitem         OCCURS 0 WITH HEADER LINE,
          t_poitemx   LIKE bapimepoitemx        OCCURS 0 WITH HEADER LINE,
          t_addr      LIKE bapimepoaddrdelivery OCCURS 0 WITH HEADER LINE,
          t_schedule  LIKE bapimeposchedule     OCCURS 0 WITH HEADER LINE,
          t_schedulex LIKE bapimeposchedulx     OCCURS 0 WITH HEADER LINE,
          t_account   LIKE bapimepoaccount      OCCURS 0 WITH HEADER LINE,
          t_accountx  LIKE bapimepoaccountx     OCCURS 0 WITH HEADER LINE,
          t_return    like BAPIRET2             OCCURS 0 WITH HEADER LINE.
    Fill data
    *__ Header
    s_poheader-comp_code   = '1000'.
    s_poheader-doc_type    = 'ZIPS'.
    s_poheader-created_by  = 'XXX'.
    s_poheader-vendor      = '0001000441'.
    s_poheader-purch_org   = 'EC01'.
    s_poheader-pur_group   = '569'.
    s_poheader-currency    = 'USD'.
    s_poheaderx-comp_code   = 'X'.
    s_poheaderx-doc_type    = 'X'.
    s_poheaderx-created_by  = 'X'.
    s_poheaderx-vendor      = 'X'.
    s_poheaderx-purch_org   = 'X'.
    s_poheaderx-pur_group   = 'X'.
    s_poheaderx-currency    = 'X'.
    s_versions-post_date    = '06/05/2006'   .
    s_versions-completed    = 'X'     .
    s_versions-reason       = '0001'     .
    s_versions-description  = 'APPROVED BY KRISH' .
    s_versions-req_by       = 'HBE8328'.
    t_poitem-short_text     =  '0005-000721'.
    t_poitem-plant          =  '5002'.
    t_poitem-trackingno     =  '1000002151'.
    t_poitem-matl_group     =  'MG0001'.
    t_poitem-quantity       =  '8.000'.
    t_poitem-po_unit        =  'EA'.
    t_poitem-orderpr_un     =  'EA'.
    t_poitem-net_price      =  '109.880000000'.
    t_poitem-price_unit     =  '1'.
    t_poitem-acctasscat     =  'K'.
    t_poitem-preq_name      =  'ABC'.
    t_poitemx-po_itemx       =  'X'.
    t_poitemx-short_text     =  'X'.
    t_poitemx-plant          =  'X'.
    t_poitemx-trackingno     =  'X'.
    t_poitemx-matl_group     =  'X'.
    t_poitemx-quantity       =  'X'.
    t_poitemx-po_unit        =  'X'.
    t_poitemx-orderpr_un     =  'X'.
    t_poitemx-net_price      =  'X'.
    t_poitemx-price_unit     =  'X'.
    t_poitemx-acctasscat     =  'X'.
    t_poitemx-preq_name      =  'X'.
    t_addr-name               =  'CoCode 1000'.
    t_addr-name_2             =  'Company Code 1000'.
    t_addr-city               =  'Houston'.
    t_addr-postl_cod1         =  '77020-6237'.
    t_addr-street             =  '4100 Clinton Dr'.
    t_addr-country            =  'US'.
    t_addr-langu              =  'EN'.
    t_addr-region             =  'TX'.
    t_addr-sort1              =  'COCODE 1000'.
    t_addr-sort2              =  'COMPANY CODE 1000'.
    t_addr-time_zone          =  'CST'.
    t_addr-comm_type          =  'INT'.
    t_addr-tel1_numbr         =  '7137534000'.
    t_addr-e_mail             =  '[email protected]'.
    t_addr-countryiso         =  'US'.
    t_addr-langu_iso          =  'EN'.
    t_schedule-sched_line    = '0001'.
    t_schedule-delivery_date = '04/17/2006'.
    t_schedule-quantity      = '8.000'.
    t_schedule-preq_no       = '5000000050'.
    t_schedule-preq_item     = '00010'.
    t_schedulex-sched_line    = '0001'.
    t_schedulex-delivery_date = 'X'.
    t_schedulex-quantity      = 'X'.
    t_schedulex-preq_no       = 'X'.
    t_schedulex-preq_item     = 'X'.
    t_account-serial_no        = '01'.
    t_account-gl_account       = '0000500200'.
    t_account-costcenter       = '1000000297'.
    t_account-gr_rcpt          = '3227'.
    t_account-co_area          = 'CNTC'.
    t_account-profit_ctr       = '1000000297'.
    t_accountx-serial_no        = '01'.
    t_accountx-gl_account       = 'X'.
    t_accountx-costcenter       = 'X'.
    t_accountx-gr_rcpt          = 'X'.
    t_accountx-co_area          = 'X'.
    t_accountx-profit_ctr       = 'X'.
    t_poitem-po_item       = '00000'.
    t_poitemx-po_item      = '00000'.
    t_addr-po_item         = '00000'.
    t_schedule-po_item     = '00000'.
    t_account-po_item      = '00000'.
    t_accountx-po_item     = '00000'.
    DO 50 TIMES.
      t_poitem-po_item       = t_poitem-po_item + 1.
      APPEND t_poitem.
      t_poitemx-po_item      = t_poitemx-po_item + 1.
      APPEND t_poitemx.
    t_addr-po_item         = t_addr-po_item + 1.
    APPEND t_addr.
      t_schedule-po_item     = t_schedule-po_item + 1.
      APPEND t_schedule.
      t_schedulex-po_item    = t_schedulex-po_item + 1.
      APPEND t_schedulex.
      t_account-po_item      = t_account-po_item + 1.
      APPEND t_account.
      t_accountx-po_item     = t_accountx-po_item + 1.
      APPEND t_accountx.
    ENDDO.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        poheader         = s_poheader
        poheaderx        = s_poheaderx
        versions         = s_versions
      IMPORTING
        exppurchaseorder = f_pono
    TABLES
       RETURN                       = t_return
       poitem                       = t_poitem
       poitemx                      = t_poitemx
       poaddrdelivery               = t_addr
       poschedule                   = t_schedule
       poschedulex                  = t_schedulex
       poaccount                    = t_account
       poaccountx                   = t_accountx   .
       WRITE: 'PO No:', f_pono.

  • Test Data Gerneration for  BAPI   "BAPI_PO_CREATE1"

    Hi All,
    We need to debug the   BAPI  "BAPI_PO_CREATE1"  in ECC(6.0) , since we need to test data we tried to use the Report
    "FBGENDAT"  and we set the parametes FBGENDAT  to 'X' in the  SU01  also. but we are not able to get the test data in ECC for the  BAPI.
    Can any one know what would be the problem
    Regards
    Channappa Sajjanar

    Hi Channappa,
    Please follow the steps described under the chapter FBGENDAT:
    http://wiki.sdn.sap.com/wiki/display/SRM/Shoppingcarttransfer
    and go through the steps of the note 539978 again.
    Important that you:
    - execute the report FBGENDAT with the parameter A or B, and fill the function name BAPI_PO_CREATE1 into the input field
    - check if indeed you have set the FBGENDAT=X for the RFC user.
    Regards,
    Peter

  • Getting errors when iam using bapi ' BAPI_PO_CREATE1'

    Hi Sap Gurus,
    I need small info over bapi BAPI_PO_CREATE1.
    While creating Purchase orders using BAPI_PO_CREATE1 it is not allowing me to enter partner function details .I am getting below errors.
    i.e
    1)  it is not allowing to update partner function details.and iam not getting what excact bapi structure for partner function details.here i found 'BAPIEKKOP' in tables option.but these fields are not matching with ME21N screen partner function fields . I want to update PARTNER FUNTCION, PARTNER NAME, DEFALT PARTNER.in bapi structure BAPIEKKOP there is no DEFAULT PARTNER instead of this there is DELETION INDICATOR.
    Pls let me know the exact bapi structure and fields in BAPI.
    2). I am getting the below error when iam posting the Pur.Order
    i.e Item 10 Acct Assgt 1
    Account 460600 does not exist in chart of accounts CANO.
    what does it means? Evenif that Account is existed in chart of account CANO and Even i posted that PO, it showing like above.and iam getting all field in PO like CO area,COST center and G/L account for Account Assingment group 'K' .
    I could not understand why it is giving such type of errors.
    Pls let me know the anwsers for above errors .
    thanks in advance.

    Hi Sap Gurus,
    I need small info over bapi BAPI_PO_CREATE1.
    While creating Purchase orders using BAPI_PO_CREATE1 it is not allowing me to enter partner function details .I am getting below errors.
    i.e
    1)  it is not allowing to update partner function details.and iam not getting what excact bapi structure for partner function details.here i found 'BAPIEKKOP' in tables option.but these fields are not matching with ME21N screen partner function fields . I want to update PARTNER FUNTCION, PARTNER NAME, DEFALT PARTNER.in bapi structure BAPIEKKOP there is no DEFAULT PARTNER instead of this there is DELETION INDICATOR.
    Pls let me know the exact bapi structure and fields in BAPI.
    2). I am getting the below error when iam posting the Pur.Order
    i.e Item 10 Acct Assgt 1
    Account 460600 does not exist in chart of accounts CANO.
    what does it means? Evenif that Account is existed in chart of account CANO and Even i posted that PO, it showing like above.and iam getting all field in PO like CO area,COST center and G/L account for Account Assingment group 'K' .
    I could not understand why it is giving such type of errors.
    Pls let me know the anwsers for above errors .
    thanks in advance.

  • Key indicator of tax residence in BAPI BAPI_PO_CREATE1

    Hi, in BAPI BAPI_PO_CREATE1 return the message "Key indicator of tax residence" .. Follow my POITEM and POITEMX:
        l_bapimepoitem-po_item    = gt_data-item.
        l_bapimepoitem-material   = gt_data-material.
        l_bapimepoitem-plant      = gt_data-centro.
        l_bapimepoitem-pckg_no    = 1.
        l_bapimepoitem-price_unit = 1.
        l_bapimepoitem-net_price  = gt_data-preco_liq.
        l_bapimepoitem-tax_code   = gt_data-iva.
        l_bapimepoitem-item_cat   = gt_data-ctg_item.
        l_bapimepoitem-acctasscat = gt_data-class_cont.
        l_bapimepoitem-preq_no    = ' '.
        l_bapimepoitem-preq_item  = ' '.
        l_bapimepoitem-po_price   = '2'.
        APPEND l_bapimepoitem TO gt_bapimepoitem.
        CLEAR: l_bapimepoitem.
        l_bapimepoitemx-po_item    = gt_data-item.
        l_bapimepoitemx-material   = 'X'.
        l_bapimepoitemx-plant      = 'X'.
        l_bapimepoitemx-pckg_no    = 'X'.
        l_bapimepoitemx-net_price  = 'X'.
        l_bapimepoitemx-price_unit = 'X'.
        l_bapimepoitemx-tax_code   = 'X'.
        l_bapimepoitemx-item_cat   = 'X'.
        l_bapimepoitemx-acctasscat = 'X'.
        l_bapimepoitemx-preq_no    = 'X'.
        l_bapimepoitemx-preq_item  = 'X'.
        l_bapimepoitemx-po_price   = 'X'.
        APPEND l_bapimepoitemx TO gt_bapimepoitemx.
        CLEAR: l_bapimepoitemx.
    Do you know whats wrong???
    Tks!!
    Edited by: luisfel28 on Sep 14, 2011 6:15 PM
    Edited by: luisfel28 on Sep 14, 2011 6:18 PM

    Hi,
    l_bapimepoitem-acctasscat = gt_data-class_cont.Here what you are passing.Check this and post.Please shown this error to functional people.Are you able to create manually.
    Regards,
    Madhu.

  • Call bapi  bapi_po_create1 will get dump message SYNTAX_ERROR

    hi
    when i call bapi will get SYNTAX_ERROR dump!
    i have check in bapi_po_create1 report i found have add support node ( get new function:ZBAPI_PO_CHANGE--> this note will active in other function) and in this function i will found one perform process_po parameter not eq the definition FORM, so will get SYNTAX_ERROR!
    in call function report  BAPI_PO_CREATE1 set command :
    SET EXTENDED CHECK OFF!
    BUT  the dump will happend again!
    how to inactive SYNTAX  check !
    thank you  very much!

    Hi thomas,
    Thanks.
    The info you wanted is as follows:
    Short text
        Exception condition "FAILURE" raised.
    What happened:
       The current ABAP/4 program encountered an unexpected
    situation.
    Error analysis :
    A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised the
    exception
    condition "FAILURE".
    Since the exception was not intercepted by a superior
    program, processing was terminated.
    Short description of exception condition:
    For detailed documentation of the exception condition, use
    Transaction SE37 (Function Library). You can take the called
    function module from the display of active calls.
    Trigger Location of Runtime Error:
        Program Name                            CL_HANDLE_MANAGER_MM==========CP
        Include                                 CL_HANDLE_MANAGER_MM==========CM005
        Row                                     13
        Module type                             (METHOD)
        Module Name                             GET
    Line  SourceCde
        1
        2 METHOD get.
        3
        4   IF my_manager is initial.
        5     CALL METHOD get_manager.
        6   ENDIF.
        7
        8   CALL METHOD my_manager->search EXPORTING im_id = im_id
        9                                  IMPORTING ex_handle = ex_handle
       10                                  EXCEPTIONS failure  = 01.
       11
       12   IF sy-subrc ne 0.
    >>>>>     RAISE failure.
       14   ENDIF.
       15
       16 ENDMETHOD.

Maybe you are looking for

  • SRM - Delete confirmation (service entry sheet)

    Hi, we have the 5.00SRM. The user tried to post twice the same confirmation (service entry sheet) so the system replicated the first one in R3 and the second is in error for the Purchase order lock (message class SAP-T100 message-id BBP_ADMIN 010). I

  • XSD Validation with ABAP XML Parser?

    Hello there, i'm loading xml files into a R/3 System. This all works fine with the standard XML Parser. The XML Files are based on a .xsd structure that is assigned to each file with a external link. To be sure that the xml document conforms to this

  • Using spry value in style attribute

    Hey guys I am trying to <td spr:if ="" style="text-indent:{order}px">{name}<td>     However when I run the spry it doesn't print the style infact <td> is outputted but the style attribute remains blank.It appears that the spry is taking it out... eve

  • I keep getting a -42408 error trying to access the iTunes store since being in China

    I keep getting a -42408 error trying to access the iTunes store since being in China, back now in the UK and the problem has stuck, help!

  • Camileo Pro HD - Where to find additional functions

    Hello! I recently bought a Toshiba "*Camileo Pro HD*" Camcorder, and now I'm wondering where I can find the mp3-player, the motion detector or the eBook functionality? I can't find them in the menu. The manual doesn't mention one of these functions,