Plant not updated in ABUMN

Hi,
While am doing Plant to plant asset transfer ABUMN , Plant not updated in FI Document .Send asset am giving 0001 and receiving Plant 002. both plant same cost center. but plant not updated in FI document .
Thanks
SV

Hi SV,
Once you create the new internal with the specified valid from and valid to, the time-dependent data valid for the date of the request is displayed.
After new time interval defined the data would reflect based on the new plant assignment.
If the assignment is different in other time periods, this is designated by a history indicator after the field.
You can display the entires using filed breakdown function.
Time-Dependent Data - Asset Accounting (FI-AA) - SAP Library
Hope this helps...
Ajay

Similar Messages

  • MGW1_CREATE_BOM- plant not updated in ECC 6.0

    Hi,
    We have upgraded SAP from 4.7 to ECC 6.0. 
    In SAP 4.7
    Program with FM MGW1_CREATE_BOM  works fine .
    In ECC 6.0
    While creating BOM through the same program via FM MGW1_CREATE_BOM everything is created OK- but the plant that i enter in the header structure, is not created and the BOM is general without a plant.
    What am i doing wrong?
    Thanks in advance

    Hi,
    We have upgraded SAP from 4.7 to ECC 6.0. 
    In SAP 4.7
    Program with FM MGW1_CREATE_BOM  works fine .
    In ECC 6.0
    While creating BOM through the same program via FM MGW1_CREATE_BOM everything is created OK- but the plant that i enter in the header structure, is not created and the BOM is general without a plant.
    What am i doing wrong?
    Thanks in advance

  • Profit center not updating with plant change

    We have an issue with the profit center not updating with change in delivering plant.
    A CSR entered a material on a sales order but the material is not extended to their location.  They select a plant to deliver the material from.  At this point the profit center fills in for that plant, from the material master. 
    The issue then is the material is not currently available at that plant so when the availability check is preformed the CSR checks for availability in another plant.  They are able to find an available item at another location so they select that location. 
    When they save the sales order the plant reflects the new delivering plant, but the profit center still reflects the first selected plant.  The profit center does not pull from the material master correctly.
    Has anyone seen this issue before and developed a solution?

    Hello Matthew
    May be you have substitution defined in CO.
    T codes 0KEM or 0KEL
    See the following OSS notes:
    167912 - Substitution call-up points for sales order/billing document
    Hope this helps.

  • Open orders should not update in MD04

    Hi, SD gurus,
    I have the below requirement,
    My business scenario is
    when  total open sales order quantity crosses a particular number(Ex:1000 Pcs) in a month, after that whatever the sales order we create it should not update in MD04.
    Our Business process,
    1. Creating a sales order
    2. Allocation run (here system will execute Credit check, availability check, and listing an Exclusion etc. here we need to enter sales order no, plant, allocation type)
    3. Creating a delivery
    4. Invoicing the customer
    Note:
    Usually when we de check MRP type and allocation in Scheduline category system should not update in MD04, but if we de check this as for our business process system should  not execute Allocation run
    Thanks in Advance
    Yuvaraj.

    Respected Lakshmipathiji,
    Thanks for your clarification but i have query here..
    ""if the users are ready to do this manually once a line item exceeds 1000 pcs a month, well and good""
    How users will check material wise?(suppose if sales order contains more than 100 line items and each line item will have its own requirement updates--will they do this material wise?)
    Is there any report which give the Status on Requirements for group of materials(MD04 status) in Standard SAP??
    Phanikumar

  • 'BAPI_ALM_ORDER_MAINTAIN' Not Updating Fields

    Hi,
    We are using BAPI_ALM_ORDER_MAINTAIN to update Special Stock indicator
    (RESB-SOBKZ) at component level for a service order (IW32).
    BAPI is not updating the value which we are passing for this field but
    intrestingly BAPI is updating rest of the fields at component level,
    like Component Quntity, Componen Plant etc. Only Special Stock
    Indicator field is an exception.
    We are passing value in "BAPI_ALM_ORDER_COMPONENT-SPECIAL_STOCK" field
    and updating BAPI Update table with X for this field.
    Can somebody provide help on this.
    Steps for the Reconstruction 
    Below is the source code which i am using to update Srvice order via
    this BAPI
    REPORT zbapi .
    DATA t_meth TYPE TABLE OF bapi_alm_order_method.
    **Internal table for Operation (BAPI)
    DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
    DATA t_comp TYPE TABLE OF bapi_alm_order_component.
    **Internal Table for Opertaions UP (BAPI)
    DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
    **Internal table for BAPI Return code
    DATA t_ret TYPE TABLE OF bapiret2.
    ***WORK AREA DECLARATIONS
    **Work Area for Hedaer
    DATA:wa_header TYPE caufvdb,
    wa_meth TYPE bapi_alm_order_method,
    wa_op TYPE afvgb,
    wa_comp TYPE resbb,
    wa_comp1 TYPE bapi_alm_order_component,
    wa_comp_up TYPE bapi_alm_order_component_up,
    wa_oper TYPE bapi_alm_order_operation.
    PARAMETERS:TEST.
    ****Fill Method Internal table
    CLEAR wa_meth.
    wa_meth-method = 'SAVE'.
    APPEND wa_meth TO t_meth.
    wa_meth-refnumber = sy-tabix.
    wa_meth-objecttype = 'COMPONENT'.
    wa_meth-method = 'CHANGE'.
    wa_meth-objectkey(12) = '000004000104'.
    wa_meth-objectkey+12(4) = '0010'.
    wa_meth-objectkey+16(4) = '0010'.
    APPEND wa_meth TO t_meth.
    **Component Internal table
    wa_comp1-reserv_no = '0000001072'.
    wa_comp1-res_item = '0001'.
    wa_comp1-activity = '0010'.
    wa_comp1-item_number = '0010'.
    wa_comp1-special_stock = 'B'.
    wa_comp1-requirement_quantity = '15'.
    wa_comp1-stge_loc = '0001'.
    wa_comp1-backflush = 'X'.
    APPEND wa_comp1 TO t_comp.
    **Component Update Internal table
    wa_comp_up-special_stock = 'X'.
    wa_comp_up-backflush = 'X'.
    wa_comp_up-requirement_quantity = 'X'.
    wa_comp_up-stge_loc = 'X'.
    APPEND wa_comp_up TO t_comp_up.
    **Call Bapi
    BREAK-POINT.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
    it_methods = t_meth
    it_component = t_comp
    it_component_up = t_comp_up
    return = t_ret.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    Hi Ferry,
    1. I have also tried ur given code before BAPI_TRANSACTION_COMMIT.
        l_fname = 'SOBKZ'.
        l_fvalue = 'U'.
        CALL FUNCTION 'CO_BH_MOD_SINGLE_FIELDS'
          EXPORTING
            aufnr_imp = wa_meth-objectkey(12)
            field1    = l_fname
            value1    = l_fvalue.
    but this program is giving dump for only this particular Value saying that This is PROTECTED field.
    Can anyone help me out on How to Update Special Stock Indicator on Components Tab of Maintenance Order (IW32).
    If anyone has faced such type of problem & solved it then please let me also.
    2. Which BADI to use for Updating Special Stock Indicator when we press enter on Components tab in Transaction IW32 ?..
    Thanks in advance,
    Hope to get the solution soon from all SAP gurus.
    and help will be appriciated .
    Gaurav.

  • Ekkn is not updated while creating PO

    hi,
    when i execute my ZRFC for PO creation i am getting this problem.
    ekkn table is not get updated with tax code details but successfully PO created
    i can able to get ADRC , ekko, EKPO details (header and itrem details)
    this is my code
    ""Local Interface:
    *"  TABLES
    *"      LT_EKKO STRUCTURE  ZPO_DATA_60 OPTIONAL
    *"      LT_EKPO STRUCTURE  ZPO_ITEM_60 OPTIONAL
    *"      LT_EKET STRUCTURE  ZPO_EKET_60 OPTIONAL
    *"      LT_ADRC STRUCTURE  ZPO_ADRC_60 OPTIONAL
    *"      LT_EKKN STRUCTURE  ZPO_EKKN_60 OPTIONAL
    *"      LT_EKBE STRUCTURE  ZPO_EKBE_60 OPTIONAL
    *"      LT_SUCCESS_PO STRUCTURE  ZPO_SUCCESS
    *"      LT_ERROR_PO STRUCTURE  ZPO_ERROR_60
    *data it_head type standard table of bapimepoheader.
      DATA ls_head TYPE bapimepoheader.
      DATA it_headx TYPE STANDARD TABLE OF bapimepoheaderx.
      DATA ls_headx TYPE bapimepoheaderx.
      DATA it_item TYPE STANDARD TABLE OF bapimepoitem.
      DATA ls_item TYPE bapimepoitem.
      DATA it_itemx TYPE STANDARD TABLE OF bapimepoitemx.
      DATA ls_itemx TYPE bapimepoitemx.
      DATA it_sch TYPE STANDARD TABLE OF bapimeposchedule  .
      DATA ls_sch TYPE bapimeposchedule.
      DATA it_schx TYPE STANDARD TABLE OF bapimeposchedulx.
      DATA ls_schx TYPE bapimeposchedulx.
      DATA it_poact TYPE STANDARD TABLE OF bapimepoaccount.
      DATA ls_poact TYPE bapimepoaccount.
      DATA it_poactx TYPE STANDARD TABLE OF bapimepoaccountx.
      DATA ls_poactx TYPE bapimepoaccountx.
      DATA it_cond TYPE STANDARD TABLE OF bapimepocond.
      DATA ls_cond TYPE bapimepocond.
      DATA it_adrc TYPE STANDARD TABLE OF bapimepoaddrdelivery.
      DATA st_adrc TYPE bapimepoaddrdelivery.
      DATA it_condx TYPE STANDARD TABLE OF bapimepocondx.
      DATA ls_condx TYPE bapimepocondx.
      DATA it_popart TYPE STANDARD TABLE OF bapiekkop.
      DATA ls_popart TYPE bapiekkop.
      data : ret2 type bapiret2 occurs 0 with header line.
      DATA ls_ekko TYPE zpo_data_60.
      DATA st_ekko TYPE zpo_data_60.
      DATA ls_ekpo TYPE zpo_item_60.
      DATA st_ekpo TYPE zpo_item_60.
      DATA:     ls_adrc TYPE zpo_adrc_60,
              ls_ekkn TYPE zpo_ekkn_60,
             ls_eket TYPE zpo_eket_60,
              ls_ekbe TYPE zpo_ekbe_60,
              w_purchaseorder type BAPIMEPOHEADER-PO_NUMBER.
      LOOP AT lt_ekpo INTO st_ekpo.
        ls_ekpo = st_ekpo.
        AT NEW ebeln.
          READ TABLE lt_ekko WITH KEY ebeln = ls_ekpo-ebeln.
          IF sy-subrc = 0.
            ls_head-comp_code = lt_ekko-bukrs.
            ls_head-doc_type = lt_ekko-bsart.
            ls_head-vendor = lt_ekko-lifnr.
            ls_head-purch_org = lt_ekko-ekorg.
            ls_head-pur_group = lt_ekko-ekgrp.
            ls_head-pmnttrms = lt_ekko-zterm.
            ls_head-exch_rate = lt_ekko-wkurs.
           ls_head-incoterms1 = lt_ekko-inco1.
           ls_head-incoterms2 = lt_ekko-inco2.
            ls_head-currency = lt_ekko-waers.
            ls_head-PO_NUMBER = lt_ekko-ebeln.
    *append ls_head to it_head.
    *Parameter: POHEADERX
            ls_headx-comp_code = 'X' .
            ls_headx-doc_type = 'X' .
            ls_headx-vendor = 'X' .
            ls_headx-purch_org = 'X'.
            ls_headx-pur_group = 'X' .
            ls_headx-pmnttrms = 'X'.
            ls_headx-currency = 'X'.
            ls_headx-exch_rate = 'X'.
           ls_headx-incoterms1 = 'X'.
           ls_headx-incoterms2 = 'X'.
            ls_headx-currency = 'X'.
            ls_headx-PO_NUMBER = 'X'.
    *append ls_headx to it_headx.
          ENDIF.
        ENDAT.
        ls_item-po_unit = ls_ekpo-meins.
        ls_item-po_item  = ls_ekpo-ebelp.
        ls_item-material = ls_ekpo-matnr.
        ls_item-price_unit = ls_ekpo-peinh.
        ls_item-orderpr_un = ls_ekpo-bprme.
        ls_item-net_price = ls_ekpo-netpr.
        ls_item-matl_group = ls_ekpo-matkl.
       ls_item-short_text = ls_ekpo-txz01.
        ls_item-plant = ls_ekpo-werks.
        ls_item-stge_loc = ls_ekpo-lgort.
        ls_item-quantity = ls_ekpo-menge.
        ls_item-acctasscat = ls_ekpo-knttp.
        ls_item-gr_basediv  = ls_ekpo-webre.
        ls_item-vend_mat  = ls_ekpo-idnlf.
        ls_item-no_more_gr = ls_ekpo-elikz.
        ls_item-final_inv  = ls_ekpo-erekz.
        ls_item-gr_ind   = ls_ekpo-wepos.
        ls_item-gr_non_val = ls_ekpo-weunb.
        ls_item-conv_num1   = ls_ekpo-bpumz.
        ls_item-conv_den1   = ls_ekpo-bpumn.
        ls_item-ir_ind      = ls_ekpo-repos.
        ls_item-unlimited_dlv = ls_ekpo-uebtk.
        ls_item-reminder1 = ls_ekpo-mahn1.
        ls_item-reminder2  = ls_ekpo-mahn2.
        ls_item-reminder3   = ls_ekpo-mahn3.
        ls_item-vend_mat  = ls_ekpo-idnlf.
        ls_item-no_more_gr = ls_ekpo-elikz.
        ls_item-final_inv = ls_ekpo-erekz.
        ls_item-gr_ind  = ls_ekpo-wepos.
    *Parameter: POITEMX
        ls_itemx-po_unit = 'X'.
        ls_itemx-po_item  = ls_ekpo-ebelp.
        ls_itemx-material = 'X'.
        ls_itemx-price_unit = 'X'.
        ls_itemx-orderpr_un = 'X'.
        ls_itemx-net_price = 'X'.
        ls_itemx-matl_group = 'X'.
       ls_itemx-short_text = 'X'.
        ls_itemx-plant = 'X'.
        ls_itemx-stge_loc = 'X'.
        ls_itemx-quantity = 'X'.
        ls_itemx-acctasscat = 'X'.
        ls_itemx-gr_basediv  = 'X'.
        ls_itemx-vend_mat  = 'X'.
        ls_itemx-no_more_gr = 'X'.
        ls_itemx-final_inv  = 'X'.
        ls_itemx-gr_ind   = 'X'.
        ls_itemx-gr_non_val = 'X'.
        ls_itemx-conv_num1   = 'X'.
        ls_itemx-conv_den1   = 'X'.
        ls_itemx-ir_ind      = 'X'.
        ls_itemx-unlimited_dlv = 'X'.
        ls_itemx-reminder1 = 'X'.
        ls_itemx-reminder2  = 'X'.
        ls_itemx-reminder3   = 'X'.
        ls_itemx-vend_mat  = 'X'.
        ls_itemx-no_more_gr = 'X'.
        ls_itemx-final_inv = 'X'.
        ls_itemx-gr_ind  = 'X'.
        APPEND ls_itemx TO it_itemx.
        APPEND ls_item TO it_item.
        READ TABLE lt_eket INTO ls_eket WITH KEY ebeln = ls_ekpo-ebeln
                                                 ebelp = ls_ekpo-ebelp.
        IF sy-subrc = 0.
    *Parameter: POSCHEDULE
          ls_sch-po_item = ls_ekpo-ebelp.
          ls_sch-sched_line = LS_EKET-ETENR.
          ls_sch-delivery_date = ls_eket-eindt.
          ls_sch-quantity = ls_ekpo-menge .
          APPEND ls_sch TO it_sch.
        ENDIF.
    *Parameter: POSCHEDULEX
        ls_schx-po_item = ls_ekpo-ebelp.
        ls_schx-sched_line = LS_EKET-ETENR.
        ls_schx-po_itemx = 'X' .
        ls_schx-sched_linex = 'X'.
        ls_schx-delivery_date = 'X'.
        ls_schx-quantity = 'X' .
        APPEND ls_schx TO it_schx.
    read table lt_ekkn into ls_ekkn with key ebeln = ls_ekpo-ebeln
                                             ebelp = ls_ekpo-ebelp.
    *Parameter: POACCOUNT
        ls_poact-po_item = ls_ekpo-ebelp.
        ls_poact-serial_no = sy-tabix.
        ls_poact-quantity = ls_ekpo-menge.
        ls_poact-gl_account = ls_ekkn-sakto.
       '0000400000'.
        ls_poact-costcenter = ls_ekkn-KOSTL.
       ls_poact-co_area = '1000'.
        ls_poact-tax_code = ls_ekkn-mwskz.
        APPEND ls_poact TO it_poact.
    *Parameter: POACCOUNTX
        ls_poactx-po_item = ls_ekpo-ebelp.
        ls_poactx-serial_no = sy-tabix .
        ls_poactx-quantity = ls_ekpo-menge.
        ls_poactx-gl_account = ls_ekkn-sakto.
        ls_poactx-costcenter = ls_ekkn-KOSTL.
       ls_poactx-co_area = 'X' .
        ls_poactx-tax_code = ls_ekkn-mwskz.
       'X'.
        APPEND ls_poactx TO it_poactx.
    *Parameter: POCOND
        ls_cond-itm_number = ls_ekpo-ebelp.
        ls_cond-cond_st_no = '001' .
        ls_cond-cond_type = 'PB00' .
        ls_cond-cond_value = '79.900000000' .
        ls_cond-currency = ls_ekko-waers.
        ls_cond-currency_iso = 'USD'.
        ls_cond-cond_unit = 'KG' .
        ls_cond-cond_p_unt = '1' .
        ls_cond-change_id = 'U' .
        APPEND ls_cond TO it_cond.
    *Parameter: POCONDX
        ls_condx-itm_number = ls_ekpo-ebelp.
        ls_condx-cond_st_no = '000' .
        ls_condx-itm_numberx = 'X' .
        ls_condx-cond_type = 'X' .
        ls_condx-cond_value = 'X' .
        ls_condx-currency = 'X' .
        ls_condx-change_id = 'X' .
        APPEND ls_condx TO it_condx.
    *Parameter: POPARTNER,
       ls_popart-partnerdesc = 'OA' .
       ls_popart-langu = 'EN' .
       ls_popart-buspartno = '0000001100' .
       ls_popart-partnerdesc = 'GS' .
       ls_popart-langu = 'EN' .
       ls_popart-buspartno = '0000001200' .
       ls_popart-partnerdesc = 'IP' .
       ls_popart-langu = 'EN' .
       ls_popart-buspartno = '0000001000'.
       APPEND ls_popart TO it_popart.
    Address data
        READ TABLE lt_adrc  INTO ls_adrc WITH KEY addrnumber = ls_ekko-adrnr.
        IF sy-subrc = 0.
          st_adrc-addr_no = ls_adrc-addrnumber.
          st_adrc-name = ls_adrc-name1.
          st_adrc-street = ls_adrc-street.
          st_adrc-district = ls_adrc-city2.
          st_adrc-postl_cod1 = ls_adrc-post_code1.
          st_adrc-city = ls_adrc-city1.
          st_adrc-country = ls_adrc-country.
          st_adrc-region = ls_adrc-region.
          APPEND st_adrc TO it_adrc.
        ENDIF.
        AT END OF ebeln.
          CALL FUNCTION 'BAPI_PO_CREATE1'
            EXPORTING
             poheader                     =  ls_head
             poheaderx                    = ls_headx
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
      POEXPIMPHEADER               =
      POEXPIMPHEADERX              =
      VERSIONS                     =
      NO_MESSAGING                 =
      NO_MESSAGE_REQ               =
      NO_AUTHORITY                 =
      NO_PRICE_FROM_PO             =
    IMPORTING
       EXPPURCHASEORDER              = w_purchaseorder
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
           TABLES
             return                       = ret2
             poitem                       = it_item
             poitemx                      = it_itemx
             poaddrdelivery               = it_adrc
             poschedule                   = it_sch
             poschedulex                  = it_schx
             poaccount                    = it_poact
      POACCOUNTPROFITSEGMENT       =
             poaccountx                   = it_poactx
      POCONDHEADER                 =
      POCONDHEADERX                =
             pocond                       = it_cond
             pocondx                      = it_condx
      POLIMITS                     =
      POCONTRACTLIMITS             =
      POSERVICES                   =
      POSRVACCESSVALUES            =
      POSERVICESTEXT               =
      EXTENSIONIN                  =
      EXTENSIONOUT                 =
      POEXPIMPITEM                 =
      POEXPIMPITEMX                =
      POTEXTHEADER                 =
      POTEXTITEM                   =
      ALLVERSIONS                  =
            popartner                    = it_popart
      POCOMPONENTS                 =
      POCOMPONENTSX                =
      POSHIPPING                   =
      POSHIPPINGX                  =
      POSHIPPINGEXP                =
    if w_purchaseorder is not initial.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           LOOP AT ret2 WHERE type = 'S'.
                lt_success_po-ebeln =   ret2-message_v2.
                lt_success_po-type = ret2-type.
                lt_success_po-message = ret2-message.
                append lt_success_po.
                clear : lt_success_po.
              ENDLOOP.
    else.
    loop at ret2 where type = 'E'.
    move-corresponding lt_ekko to lt_error_po.
    move-corresponding ls_ekpo to lt_error_po.
    move ret2-type to lt_error_po-type.
    move ret2-message to lt_error_po-message.
    append lt_error_po.
    clear : lt_error_po.
    endloop.
      endif.
      CLEAR : ls_ekko,
                  st_ekko,
                  ls_ekpo,
                  st_ekpo,
                  ls_ekkn,
                  ls_ekbe,
                  ls_eket.
        ENDAT.
      ENDLOOP.
    ENDFUNCTION.
    Thanks
    Ruban

    hi,
    I could able to get successful PO creation no.
    but problem is with  tax code(MWskz) not updated for that tax code in EKKN table for that successfully created PO.
    Even though the value is passing into the standard BAPI bapi_PO_create1.
    Thanks
    Ruban

  • Vendor is not updating in batch while doing STO

    Hi All,
    I created a PO with vendor 123456.Did a GR for it.
    In GR i maintained a batch AA1 and received the material. Now the stock is in A plant with batch AA1 and vendor 123456.
    Then i went in to batch AA1 and found that vendor(123456) was updated in batch master.
    Next i created a STO for moving the stock from one plant to another.  Stock transfer A plant to B plant.
    In STO also i used the same batch AA1  and in outbounddelivery i used same batch AA1 and in GR i maintained the same batch AA1 but plant B.
    Now i checked the batch AA1 for plant B.
    Here the vendor is not updated in the batch AA1 for plant B combination.
    What may be the reason.
    If STO is done system cant able to pick the vendor?
    KIndly help me in this regard.
    Regards
    KK

    HI,
    Thanks for the reply.
    Yes you are exactly correct.
    Is there anyother way that vendor can be updated in the batch?
    Regards
    KK
    Edited by: Kishore Kumar Galla on Nov 10, 2009 2:17 AM

  • BAPI_GOODSMVT_CREATE for production order,not update database

    hi guru,
    i am using BAPI_GOODSMVT_CREATE for production order.When i m testing this BAPI
    at se37 it creates one mat doc no and i m not getting any return messages.Now i m
    writing code for it at se38. but it does not update the database even though i used
    bapi_transaction_commit. here sy-subrc = 0.bt when i m checking MSEG table showing
    that mat doc no does not exists.
    please help me out  asap.
    thanks and regurds,
    manasi

    CHECK THIS CODE
    REPORT ZBAPI_GOODSMVT_CREATE.
    *DECLARING INTERNAL TABLE TO HOLD FILE DATA.
    DATA: BEGIN OF itab OCCURS 0,
              text(200),
          END OF itab.
    *DECLARING INTERNAL TABLE TO PASS FILE DATA.
    TYPES: BEGIN OF tw_goodsmvt,
                pstng_date TYPE budat,
                doc_date TYPE bldat,
                material TYPE matnr,
                plant TYPE werks_d,
                stge_loc TYPE lgort_d,
                move_type TYPE bwart,
    *            entry_qnt TYPE erfmg,
                costcenter TYPE kostl,
            END OF tw_goodsmvt,
            tt_goodsmvt TYPE STANDARD TABLE OF tw_goodsmvt.
    DATA: lt_goodsmvt TYPE tt_goodsmvt,
          lw_goodsmvt TYPE tw_goodsmvt.
    *declaring internal table of bapi structure.
    DATA:s_goodsmvt_header LIKE  bapi2017_gm_head_01,
         lt_goodsmvt_item TYPE STANDARD TABLE OF bapi2017_gm_item_create WITH HEADER LINE,
         lt_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA:str_filename TYPE string,
         gm_code TYPE gm_code,
          v_head_count TYPE i VALUE 0,
          v_prev_count TYPE i VALUE 1,
          v_qnt TYPE string,
          v_dummy.
    *selection screen
    SELECTION-SCREEN BEGIN OF BLOCK bk with frame title text_001.
    PARAMETERS:p_docdat TYPE bldat,
               p_pstdat TYPE budat,
               fname LIKE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.
    *to provide F4 functionality.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name = syst-cprog
        IMPORTING
          file_name    = fname.
    * start of selection
    START-OF-SELECTION.
      str_filename = fname.
      gm_code = '06'.
    * to upload data
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = str_filename
          filetype            = 'ASC'
          has_field_separator = 'X'
          read_by_line        = 'X'
        TABLES
          data_tab            = itab.
    *SPLITING DATA TO INTERNAL TABLES.
      LOOP AT itab.
        IF itab+0(1) EQ 'H'.
          v_head_count =  v_head_count + 1.
          IF v_head_count GT v_prev_count.
            PERFORM bapi_upload.
          ENDIF.
          SPLIT itab-text AT ',' INTO v_dummy
                                      lw_goodsmvt-pstng_date
                                      lw_goodsmvt-doc_date.
          s_goodsmvt_header-doc_date   = lw_goodsmvt-doc_date.
          s_goodsmvt_header-pstng_date = lw_goodsmvt-pstng_date.
          v_prev_count = v_head_count.
      ELSEIF itab+0(1) EQ 'L'.
        SPLIT itab-text AT ',' INTO v_dummy
                                    lw_goodsmvt-material
                                    lw_goodsmvt-plant
                                    lw_goodsmvt-stge_loc
                                    lw_goodsmvt-move_type
                                    v_qnt
                                    lw_goodsmvt-costcenter.
    * PASSING DATA TO INTERNAL TABLE TYPE BAPI STRUCTURE.
        lt_goodsmvt_item-material = lw_goodsmvt-material.
        lt_goodsmvt_item-plant    = lw_goodsmvt-plant.
        lt_goodsmvt_item-stge_loc = lw_goodsmvt-stge_loc.
        lt_goodsmvt_item-move_type = lw_goodsmvt-move_type.
        lt_goodsmvt_item-entry_qnt = v_qnt.
        lt_goodsmvt_item-costcenter = lw_goodsmvt-costcenter.
        APPEND lt_goodsmvt_item.
      ENDIF.
      v_prev_count = v_head_count.
      ENDLOOP.
      PERFORM bapi_upload.
    *&      Form  bapi_upload
    form bapi_upload .
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header             = s_goodsmvt_header
        goodsmvt_code               = gm_code
    *   TESTRUN                     = ' '
    * IMPORTING
    *   GOODSMVT_HEADRET            =
    *   MATERIALDOCUMENT            =
    *   MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = lt_goodsmvt_item
    *   GOODSMVT_SERIALNUMBER       =
        return                      = lt_return.
            PERFORM commit_work TABLES lt_return.
            CLEAR : lw_goodsmvt, s_goodsmvt_header.
            REFRESH: lt_goodsmvt[], lt_goodsmvt_item[].
    endform.                    " bapi_upload
    *&      Form  commit_work
    *       text
    *      -->P_LT_RETURN  text
    form commit_work  tables   p_lt_return structure bapiret2.
      IF NOT lt_return[] IS INITIAL.
    *error handling
    loop at lt_return.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = lt_return-id
       LANG            = sy-langu
       NO              = lt_return-NUMBER
       V1              = lt_return-message_v1
       V2              = lt_return-message_v2
       V3              = lt_return-message_v3
       V4              = lt_return-message_v4
    IMPORTING
       MSG             = lt_return-MESSAGE
    EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2.
    WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
                 lt_return-message_v3, lt_return-message_v4.
          CLEAR lt_return.
        ENDLOOP.
      ELSE.
    * commit work
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *   EXPORTING
    *     WAIT          =
       IMPORTING
         RETURN        = lt_return.
    WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
                 lt_return-message_v3, lt_return-message_v4.
          CLEAR lt_return.
    endif.
    endform.                    " commit_work

  • BAPI_SALESORDER_CREATEFROMDAT2 is not updating the ITEM Qty after Free ITEM

    Hi,
    I am using BAPI_SALESORDER_CREATEFROMDAT2 to create a order.We have customization for populating a FREE ITEM for a Order ITEM.
    Now the Problem is that .....if I am passing more then one Material as ITEM it is not updating the next ITEM Qty and also not populating FREE ITEM afterwords first one.
    Please help me.
    Regards
    Ricky

    Hi,
    Find below the code :
      read table i_table_t into lwa_table_s index 1.
      if sy-subrc eq 0.
    *Order Header
        lwa_ord_head_in-doc_type          = 'ZSO'.
        lwa_ord_head_in-sales_org         = '1000'.
        lwa_ord_head_in-distr_chan        = '10'.
        lwa_ord_head_in-division          = '10'.
        lwa_ord_head_in-req_date_h        = lwa_table_s-delivery.
    *Order Header Update
        lwa_ord_head_inx-doc_type         = 'X'.
        lwa_ord_head_inx-sales_org        = 'X'.
        lwa_ord_head_inx-distr_chan       = 'X'.
        lwa_ord_head_inx-division         = 'X'.
        lwa_ord_head_inx-req_date_h       = 'X'.
        lwa_ord_partners-partn_role       =  'AG'.
        lwa_ord_partners-partn_numb       =  lwa_table_s-sold_to.
        append lwa_ord_partners to lt_ord_partners.
        if lwa_table_s-ship_to is initial.
          lwa_ord_partners-partn_role     =  'WE'.
          lwa_ord_partners-partn_numb     =  lwa_table_s-sold_to.
          append lwa_ord_partners to lt_ord_partners.
        else.
          lwa_ord_partners-partn_role     =  'WE'.
          lwa_ord_partners-partn_numb     =  lwa_table_s-ship_to.
          append lwa_ord_partners to lt_ord_partners.
        endif.
        lt_table_it_t = lwa_table_s-zsd_table_it_t.
        loop at   lt_table_it_t into lwa_table_it_s.
          lwa_ord_items_in-material      = lwa_table_it_s-matnr.
          lwa_ord_items_in-plant         = wa_table_s-plant.
          lwa_ord_items_in-target_qty    = lwa_table_it_s-qty.
          lwa_ord_items_in-comp_quant    = lwa_table_it_s-qty.
          append lwa_ord_items_in to lt_ord_items_in.
          lwa_ord_items_inx-material     = 'X'.
          lwa_ord_items_inx-plant        = 'X'.
          lwa_ord_items_inx-target_qty   = 'X'.
          lwa_ord_items_inx-comp_quant   = 'X'.
          lwa_ord_items_inx-updateflag   = 'I'.
          append lwa_ord_items_inx to lt_ord_items_inx.
    Schedule Line Information
          lwa_schedule_lines-sched_line  = 'X'.
          lwa_schedule_lines-req_date    = lwa_table_s-date_del.
          lwa_schedule_lines-date_type   = '1'.
          lwa_schedule_lines-req_qty     = lwa_table_it_s-qty.
          append lwa_schedule_lines to lt_schedule_lines.
          lwa_schedule_lines_x-updateflag = 'I'.
          lwa_schedule_lines_x-sched_line = 'X'.
          lwa_schedule_lines_x-req_date   = 'X'.
          lwa_schedule_lines_x-date_type  = 'X'.
          lwa_schedule_lines_x-req_qty    = 'X'.
          append lwa_schedule_lines_x to lt_schedule_lines_x.
        endloop.
    Here I am getting First Item and it's free configured Item perfectly for the Qty 1.
    But when I pass more then 1 Qty or Multiple ITEMS it is not populating other respective free configured ITEMS with them.Also IT is not updating the other ITEM Qty other the first one.
    For Example:
    Item  No      ITEM            Qty           .......
    10             ITEM1           1 EA        ..........
    20             FREE1          1 DAY     ..........
    30             ITEM2            0             ..........
    40             ITEM3            0             .........
    In above example After 30 and 40 two Free ITEM should be generated with 1 Day and for Qty 1 EA
    Regards
    Ricky

  • G/L Account & the Cost Center not updating in BAPI_PO_CREATE1

    Hi,
    We are using BAPI_PO_CREATE1 for Service PO Creation.
    The System is creating the Purchase Order, but it is not updating the G/L Account & the Cost Center.
    We are passing the following parameters:
                    wa_poaccount-PO_ITEM  = '00010'.
                    wa_poaccount-SERIAL_NO   = '01'.
                    wA_poaccount-quantity   = '100.000'.
                    wa_poaccount-GL_ACCOUNT  = '0058120000'.
                    wa_poaccount-COSTCENTER  = '1000-LSG'.
                    wa_poaccount-itm_number  = '000010'.
                    wa_poaccount-CO_AREA     = '1000'.
                    append wa_poaccount to it_poaccount.
                    clear wa_poaccount.
                    wa_poaccountx-PO_ITEM = '00010'.
                    wa_poaccountx-SERIAL_NO   = '01'.
                    wA_poaccountx-quantity   = 'X'.
                    wa_poaccountx-GL_ACCOUNT = 'X'.
                    wa_poaccountx-COSTCENTER = 'X'.
                    wa_poaccountx-CO_AREA     =  'X'.
                    wa_poaccountx-itm_number  = 'X'.
                    append wa_poaccountx to it_poaccountx.
                    clear wa_poaccountx.
    Please guide how to correct the error.
    Regards,
    PK

    Hi,
    Thanks for the reply.
    We are passing the following parameter in POITEM.
                      clear wa_poitem.
                      wa_POITEM-PO_ITEM = '00010'.
                      wa_POITEM-PLANT = '1003'.
                      wa_POITEM-TAX_CODE = 'S1'.
                      wa_poitem-MATL_GROUP = 'SER04'.
                      wa_POITEM-ACCTASSCAT = 'K'.
                      wa_poitem-ITEM_CAT   = 'D'.
                      wa_poitem-pckg_no    = '0000000001'.
                      wa_POITEM-SHORT_TEXT = 'Freight Service'.
                      append wa_POITEM to it_POITEM.
                      clear wa_poitemX.
                      wa_POITEMX-PO_ITEM = '00010'.
                      wa_POITEMX-PLANT = 'X'.
                      wa_POITEMX-TAX_CODE = 'X'.
                      wa_poitemx-MATL_GROUP = 'X'.
                      wa_poitemx-short_Text = 'X'.
                      wa_POITEMX-ACCTASSCAT = 'X'.
                      wa_poitemx-ITEM_CAT   = 'X'.
                      wa_poitemX-pckg_no    = 'X'.
                      append wa_POITEMX to it_POITEMX.
    Please guide.
    Regards,
    PK

  • BAPI_GOODSMVT_CREATE not updating document flow

    I created a function to create an inbound delivery against a PUrchase Order and then Post the goods receipt against that inbound delivery. The inbound delivery and the material document are created correctly in the DEV environment.
    The issue is that in our QA environment the document are created correctly but the document flow is not updated at all!! Any idea of where should I be looking at to see difference between these environments?
    I'm using BAPI BAPI_GOODSMVT_CREATE  to Post the Goods Receipt.
    Thanks.

    sort delivery by vbeln posnr.
    loop at delivery.
    Populate BAPI variables ready for call
      goodsmvt_header-pstng_date = sy-datlo.
      goodsmvt_header-doc_date = sy-datlo.
      goodsmvt_header-bill_of_lading = delivery-lifex.
      goodsmvt_header-ref_doc_no = delivery-lifex.
      goodsmvt_header-pr_uname = sy-uname.
      goodsmvt_header-header_txt = 'Auto GR of I/Bound Del'.
      goodsmvt_code-gm_code = con_move_code.
      goodsmvt_item-material = delivery-matnr.
      goodsmvt_item-plant = delivery-werks.
      goodsmvt_item-stge_loc = delivery-lgort.
      goodsmvt_item-move_type = con_move_type.
      goodsmvt_item-vendor = delivery-lifnr.
      goodsmvt_item-entry_qnt = delivery-lfimg.
      goodsmvt_item-entry_uom = delivery-meins.
      goodsmvt_item-mvt_ind = con_move_item.
      goodsmvt_item-deliv_numb_to_search = delivery-vbeln.
      goodsmvt_item-deliv_item_to_search = delivery-posnr.
      append goodsmvt_item.
      clear goodsmvt_item.
    endloop.
    *Call BAPI
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
       goodsmvt_header       = goodsmvt_header
       goodsmvt_code        = goodsmvt_code
      TESTRUN           = ' '
      importing
       goodsmvt_headret      = goodsmvt_headret
       materialdocument      = materialdocument
       matdocumentyear       = matdocumentyear
      tables
       goodsmvt_item        = goodsmvt_item
      GOODSMVT_SERIALNUMBER    =
       return           = return.
    Check BAPI RETURN table to ensure call was successful
    loop at return where type = 'E'.
      exit.
    endloop.
    if sy-subrc eq 0.
      rollback work.
      message e999 with 'GR BAPI Failed, process delivery manually'.
    endif.

  • BAPI_PO_CHANGE to update the Price for the line item not updating the Price

    Hi,
    I am using BAPI_PO_CHANGE to update the Price for the line item. This BAPI is not updating the Price. I am using external cummit also, but the BAPI is not updating price.
    I am passing following data to the BAPI.
    Plant: CQ11
    PO                   Material                Price
    4500002142     TEST_BATCH     12
    Please provide suggestion.
    Regards,
    Jubin.

    Hi,
    check this link...this has sample code
    [http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm]
    Regards,
    Surinder

  • Statistic condition values not updated during Sales order Settlement

    Hi,
    In our client we have different Price condition types for based on scenario wise. Ex: Domestic Sales (ZPR1) and Export Sales ZPR2. I have maintained separately value fields for each price condition types.
    We are booking some financial charges, and interest on working capital etc., this cost we need to transfer to COPA each Material wise based on sales revenue.
    For this purpose we have created one COPA Assessment Cycle.  Tracing factor is Sales Revenue and receiver is Materials.
    In COPA Assessment cycle we can give only one base means ZPR1 related value field or ZPR2 related value field.
    For this reason we have created one new statistic condition type,  what is amount there in ZPR1 that amount will updated automatically in statistic condition place and so that we can give once one trance factor in COPA Assessment Cycle. We have assign this statistic condition all pricing procedure
    Now my problem is in MTS scenario statistic condition values updated correctly. But in MTO scenario sales order settlement time statistic condition values not updated.
    So is it possible update during sales order settlement time statistic condition values.
    Please give me suggestion.
    Regards,
    Thiru

    Hi Ajay Sir,
    As you said is correct.
    But in our client we have around 9 Plants and each plant manufacturing product are different. Client Requirement is in COPA Report they need see each product wise sales revenue. In this way we mapped product wise value field.  System already mapped one guy in this way earlier. Now I am doing some changes for relevant to month end activities.
    Some financial changes transfer to COPA each plant wise on Material. Here sender is cost center and receiver is Material. Base is Sales Revenue.
    Please suggest me is there any alternative.
    Regards,
    Thirumalesh .

  • MARA table field STAWN (Comm./imp. code EU ) is not updating in MARC table

    Dear Experts,
    From MARA table field STAWN (Comm./imp. code EU ) is not updating in MARC table field STAWN (Comm./imp. code EU ) by MM02 Transaction
    Is there any SAP standard functionality to over come above issue or needed  ABAP coding for the same ????
    Regards
    Hanumant

    Dear All,
    Thanks for your reply
    I tried to update the the field after adding plant and other detail actually that field will be gray mode (display) and cannot update
    my question i want to update MARC_STAWN field (Forign trade import) for my existing all material , those material MARA_STAWN (basic data 3 ) is also blank but system is allowing me to update in MARA_STAWN (basic data 3) but system will not update to MARC_STAWN (Forign trade import) field.
    What is the best method to Coppy all MARA Stawn fields to the MARC Stawn field.
    Regards
    Hanumant.

  • Actual cost not updating in Pm order

    Hi Experts,
      We have a requirement from management for Having budget control based on department wise.
    For that we are trying out substitution rule by which Pm order is replaced with Internal order .we are having a budget profile and budget for internal order.Now we are able to control budget and system stopping if budget exceeded in migo transaction .We are replacing pm order with IO order with substitution with pm order number range. Issue is after having this setting actual cost is not updating in Pm order and pm report.
    Same is getting updated in mseg against pm order.
    With regards
    Anand.M

    Hi Anand
    Please add the budget profile at Plant maintenance order level no need to add any substitution rule
    budget should also be control at order level
    Thanks
    trinath 

Maybe you are looking for

  • Anyone have any ideas why i can no longer see my Airport express speaker  in Airtunes?

    for the last couple of days i no longer can see my itunes speaker from an old Airport Express (V 6.3) 802.11g.  Airport Utility 5.6 still lets me set it up, so I can see it there.  but for some reaason i can no longer see that speaker selection in it

  • Need to repair HD before installing mavericks HELP !!

    Dear all, I have a perfectly working MacBook Air, built 2012 with 256 GB. Mountain Lion does a great job, but I want to progress to Mavericks. As advised, I ran disk Utility system check and this came up at veryfying disk: Volume bitmap needs minor r

  • Re: No Android Search for Corporate / MS Exchange Email?  TouchDown / other apps?

    If you go into your inbox, you should have a magnifying glass at the bottom along with the new mail icon, folder select, refresh and options.  The magnifying glass will let you search your emails.  Not sure why the main Google Search function will no

  • How to create a multi-line table/column comment

    Can someone tell me how to create a multi-line table or column comment? Apparently, the concatenate operator (||) does not work with the COMMENT statement. I've searched the Oracle manuals and couldn't find an answer. COMMENT ON TABLE sometbl IS 'i w

  • Mutt, gmail and failed sasl

    hello everyone, can't find help for this on the forums or on the net, so resorting to a new post. I've got arch up and running with a minimalist setup, trying to use mutt with gmail via imap. All works fine, except on sending mail it says "sasl authe