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.

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

  • 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.

  • Sort Key indicator

    Hi
    i am facing a problem related to sort key indicator. i am using sort key indicator 012 i.e. vendor number in TDS Gl account so that it will show the vendor number in TDS gl account line item assignment field. but the system does not show the vendor number in assignment field.
    secondly when i choose withholding tax base at the time of line item display of TDS gl account, system shows blank in that field.
    how i can get both the values in TDS gl account.
    regards
    Deepak
    Patni Computer

    You will need to create a substitution rule that will place these into your fields.  Vendor is not in the GL line. You can export the values to memory and then import them to the lines you wish. If the information you want appears in your BSEG line item you can do substitutions without exports.
    pls assign points if helpful as a way to say thanks.

  • 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.

  • 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.

  • Key combination of Tax code / Vendor not working for JVRD condition Type.

    Dear All.
    I have maintain the pricing condition JVRD under key combination of Tax Code / Vendor . But the same is not reflecting in the Purchase Order. Have also  checked the validity periods  .
    Kndly advice
    AVS

    Hi
    Please check the following:
    1. whether you have maintained the cond.type in tax procedure in tcode OBQ3.
    2. whether you have maintained the cond.type in IMG activity: LogisticsGeneral>>Tax on goods mov.>>India>>Determination of excise duty>>Cond.based excise determination>> classification of condition type
    3. Also, check whether any other condition record is maintained for the vendor at any other level in FV13.
    Regards
    Prabhu

  • 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 )

  • Group Indicator for Tax Line Items

    Hi,
    Can anyone tell me where can we define Group Indicator for Tax Line Items
    Thanks & Regards

    1) If you are going to post your program code, you should only post the relevant part.
    2) You certainly should take the time and effort to remove commented out code
    3) This is not a training forum. Before posting questions you should search - not just this site, not just using a search engine, but your course notes. Run the program in debug, and put some effort into determining the error. Then ask a colleague to help. Only if all that fails, post here.
    Thread locked.

  • 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

  • What is the t.code of accounting key creation in TAX

    hi all
    anybody can tell me what is the t.code of accounting key creation in TAX
    regards
    kalai

    Hi,
    Check out here:
    SPRO-IMG-Sales & Distribution--basic functionsaccount assignment costing-revenue account determination---define and assign account keys.
    Aravind

Maybe you are looking for