Locking through BAPI

Hi SDN,
I am updating a strandard Database table through BAPI.I can lock the object (an database entry ) through BAPI.But if i lock the object ,i am not able to update the database table. The BAPI gives an error message as 'Status is set as locked.so can't update'.Is it possible to lock the object and then update and then unlock the object through BAPI?

I suppose you are talking about using ENQUEUE / DEQUEUE function calls when you say locking and unlocking. If you are using these functions to lock the particular  table, then you should not get a problem while updating.
CALL ENQUEUE function
Update the table
CALL DEQUEUE function

Similar Messages

  • Material Master Update through BAPI - Follow up material not updated

    Hi Experts,
    I am updating the material master through a custom transaction using the BAPI  'BAPI_MATERIAL_SAVEDATA'. Rest of the fields are updating correctly except for discontinuation ind., effective out date & follow-up material.
    When I try to update it through MM02 it is working fine. However, when I pass the same data through BAPI it is throwing an error message that 'the material XXXXXX does not exist or is not activated'.
    Please advice.
    Thanks & Regards,
    Ashu Arora

    Some more fields need to be updated along with the discont. indicator. Now working fine.

  • Problem while posting FI document through BAPI - Multiple Exchange Rates

    I am able to post FI document with multiple exchange rates for the same currency using FB01. But, when I try to post the same document details using BAPI_ACC_DOCUMENT_POST , it throws an error F5 701 - Inconsistent Rate for Currency XXX .
    How can we avoid this error while posting through BAPI ?
    Thanks & Regards,
    Nidhi

    Hi Nidhi,
    Value range
        The field CURR_TYPE (currency type) describes the role played by a
        currency in the SAP System.
        The currency type can take on the following values, for example:
        o   00      Transaction currency
        o   10      Company code currency
        o   20      Controlling area currency
        o   30      Group currency
        o   40      Hard currency
        o   50      Index-based currency
        o   60      Global company currency
        If an entry is not made in the field CURR_TYPE, the default value "00"
        is retained.
        If only one data record is transferred in transaction currency for each
        line item, the field CURR_TYPE does not need to be filled out. If
        several data records are transferred for each line item, the currency
        type must be entered for each record.
    If the parameter CurrencyAmount is filled with the currency fields,
    a complete document check including characteristics and value
    components of profitability analysis (CO-PA). Otherwise, the account
    assignment objects are checked.
    Check the BAPI documentation SE37.
    Regards,
    Boobalan Suburaj

  • Problem in uploading Bom through Bapi

    Hi
    i am uploading Bom data useing CSAP_MAT_BOM_CREATE bapi.
    the header data through bapi is going fine but
    i am not able to upload 2 line item...
    i  think i need to pass OBJECT_ID  & IDENTIFIER though CSDEP_DAT ,CSDEP_DESC,CSDEP_SORC Structure.
    can any body tell me from where i can get OBJECT_ID  & IDENTIFIER  ..as there no such fields in my file.
    Regards
    ABG.

    Just a little word about "Bapi" : this FM is not a BAPI (it's a special kind of API, only BAPI* FMs are/can be BAPIs). CSAP_MAT_BOM_CREATE is just an API (SAP says you can use this FM).
    Did you read the 100 threads about this FM, here are some of the threads for example:
    1) did you read the example in the function module documentation? YOUR QUESTION IS ANSWERED IN THAT DOC
    2) why don't you use BAPI_MATERIAL_BOM_GROUP_CREATE?
    3) read other threads

  • Freight vendor updation in GR document through BAPI

    Dear All
    In my system we are creating Goods Receipt in background through *BAPI BAPI_GOODSMVT_CREATE*. In my PO we have entered freight condition FRB1 for that PO line item and assigned a vendor code different from material vendor. For this freight condition FRB1 in the configuration we have maintained in Control Data 2 field Vendor in GR as 2 ( i.e. Entry always possible). This will help us to change freight vendor different from freight vendor maintained in PO line item.
    Now my query is that how can I achieve this through BAPI  BAPI BAPI_GOODSMVT_CREATE when I am creating GR in background. In which field of BAPI should we pass the freight vendor at the time of GR creation.
    Regards
    Satish Kumar

    Hi Satish,
    With standard SAP this is not Possible
    As indicated in the attached note 356665, the field SUPPL_VEND has no
    function. Please, have a look at this note for further information.
    In dialog (with MB01 or MIGO) you have the possibility to enter another
    freight vendor different than the vendor in your purchase order (or your
    scheduling agreement) as long as you have, in your purchasing condition
    type, "Vendor in GR" (V_T685A-BNKWE) maintained with the appropiate
    value. Then, by posting the Goods Receipt, you will update EKBZ with
    this new freight vendor.
    Unfortunately in the standard system this functionality is not available
    when working with the BAPI BAPI_GOODSMVT_CREATE or with the Idoc
    WMMBID02.
    There is no customizing setting or tool that you could use inside the
    standard system to change it.

  • Service PO Invoice posting through BAPI

    Hi Gurus,
    Please help me to resolve the issue explained below:
    We are using a third party tool for scanning incoming invoices from vendor.The scanned invoice details pass though SAP Interface and with the help of standard BAPI_INCOMINGINVOICE_CREATE in SAP ECC, invoices are automatically posted.
    Till now , we only had material/Goods PO invoices which use to get posted with quantity blocks before GR done.In future,SAP PM
    module will be implemented and service PO invoices will also be posted using this process.We have following issues for posting
    of invoices for service items:
    1.For service PO Invoice to get posted though BAPI, service entry number is mandatory without which system does not allow to post the invoices that is we can not have quantity blocked invoices if services have not been entered for service items.Even invoices can not be parked without service entry sheet no. for service items using BAPI.Please advise how this scenario can be handled.
    2.Second scenario is that if a particular service line has multiple service entry sheet numbers then which service entry sheet number should system use to post the invoice?
    Kindly advise.
    Thanks & Regards,
    Niti

    Dear Vipin,
    May I assume the following scenario. When you post an invoice manually and there's a small difference between the vendor amount and the total of the suggested amounts on items (plus VAT), you just adjust one of the items or enter unplanned delivery costs and this way avoid the disbalance.
    However, when you post the invoice automatically through BAPI, no such adjustment is made and the system tries to post the difference to the account defined behind the account key DIF. For this posting the system shall assign a tax code. One way to define this code is to assign the default tax codes in IMG for IV -> Incoming Invoice -> Maintain Default Values for Tax Codes.
    Or just make sure you define all the item amounts explicitly in the BAPI and there's no disbalance.
    BR
    Raf

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

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

    fyi
    change decimal places in PO quantity

  • Profit Center not getting uploaded through BAPI for MM01. Pls help

    Hello all,
                  I am getting an errror while uploading a file through BAPI for MM01 , The error says
    Error:
    Profit center 1000/sslcommon does not exist
    for material: AC2
    *& Report  ZBAPI_DUMMY
    REPORT  ZBAPI_MM01.
    *& Report  ZBAPI2
    TABLES
    FLAGS *
    DATA: F_STOP. " Flag used to stop processing
    DATA DECLARATIONS *
    DATA : V_EMPTY TYPE I, " No. of empty records
    V_TOTAL TYPE I. " Total no. of records.
    STRUCTURES & INTERNAL TABLES
    *--- BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,  " Header Segment with Control
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2, " Return Parameter
    BAPI_MARDL LIKE BAPI_MARD,
    BAPI_MARDX LIKE BAPI_MARDX.
    *--- Internal table to hold excel file data
    DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold Matetrial descriptions
    DATA: BEGIN OF IT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- Internal to hold the records in the text file
    DATA : BEGIN OF IT_DATA OCCURS 100,
    WERKS(4), " Plant
    MTART(4), " Material type
    MATNR(18), " Material number
    MATKL(9) , " Material group
    MBRSH(1), " Industry sector
    MEINS(3), " Base unit of measure
    SPART(2), " Division
    EKGRP(3), " Purchasing group
    PRCTR(10), " Profit Center
    VPRSV(1), " Price control indicator
    BKLAS(4), "Valuation Class
    *stprs(12), " Standard price
    PEINH(3), " Price unit
    SPRAS(2), " Language key
    MAKTX(40), " Material description
    LGORT(4) , " storage location
    DISMM(2) , "MRP TYPE
    VERPR(23), " Moving Average Price
    MTVFP(2) , " Availability Check
    DISLS(2) , "Lot Size
    DISPO(3) , "MRP Controller
    BESKZ(1) , "Procurment Type
    FHORI(3) , "SCHEDMARGIN KEY
    PERKZ(1) , "Period Indicator
    END OF IT_DATA.
    SELECTION SCREEN. *
    SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
    PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY  " Input File
    PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
    PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
    P_BEGROW TYPE I DEFAULT 2 NO-DISPLAY,
    P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
    P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK SCR1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *--- Validating file
      PERFORM VALIDATE_FILE USING P_FILE.
    START-OF-SELECTION
    START-OF-SELECTION.
    *--- Perform to convert the Excel data into an internal table
      PERFORM CONVERT_XLS_ITAB.
      IF NOT IT_DATA[] IS INITIAL.
    *--- Perform to delete Header lines
        PERFORM DELETE_HEADER_EMPTY_RECS.
      ENDIF.
    END OF SELECTION. *
    END-OF-SELECTION.
    *--- Perform to upload Material Master data
      PERFORM UPLOAD_MATMAS.
    Form : validate_input_file
    Description : To provide F4 help for file if read from PC
    FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          FILE_NAME     = F_FILE
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
      ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    text
    FORM CONVERT_XLS_ITAB.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = P_FILE
          I_BEGIN_COL = P_BEGCOL
          I_BEGIN_ROW = P_BEGROW
          I_END_COL   = P_ENDCOL
          I_END_ROW   = P_ENDROW
        TABLES
          INTERN      = IT_INTERN.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--- Perform to move the data into an internal data
      PERFORM MOVE_DATA.
    ENDFORM. " CONVERT_XLS_ITAB
    *& Form MOVE_DATA
    text
    FORM MOVE_DATA.
      DATA : LV_INDEX TYPE I.
      FIELD-SYMBOLS <FS>  .
    *--- Sorting the internal table
      SORT IT_INTERN BY ROW COL.
      CLEAR IT_INTERN.
      LOOP AT IT_INTERN.
        MOVE IT_INTERN-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
        ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS> .
    *--- Asigning the field value to a field symbol
        MOVE IT_INTERN-VALUE TO <FS> .
        AT END OF ROW.
          APPEND IT_DATA.
          CLEAR IT_DATA.
        ENDAT.
      ENDLOOP.
    ENDFORM. " MOVE_DATA
    *& Form DELETE_HEADER_EMPTY_RECS
    To delete the Header and empty records
    FORM DELETE_HEADER_EMPTY_RECS.
      DATA: LV_TABIX LIKE SY-TABIX.
      IF NOT P_HEADER IS INITIAL.
        LOOP AT IT_DATA.
          IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
            DELETE IT_DATA FROM 1 TO P_HEADER.
    P_HEADER = 0.
            EXIT.
          ENDIF.
        ENDLOOP.
      ENDIF.
      CLEAR IT_DATA.
    *--- To delete the empty lines from internal table
      LOOP AT IT_DATA.
        LV_TABIX = SY-TABIX.
        IF IT_DATA IS INITIAL.
          V_EMPTY = V_EMPTY + 1.
          DELETE IT_DATA INDEX LV_TABIX..
        ENDIF.
      ENDLOOP.
      CLEAR IT_DATA.
    *--- Total no of recs in file
      DESCRIBE TABLE IT_DATA LINES V_TOTAL.
      IF V_TOTAL = 0.
        MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
        F_STOP = 'X'.
        STOP.
      ENDIF.
    ENDFORM. " DELETE_HEADER_EMPTY_RECS
    *& Form UPLOAD_MATMAS
    to upload Material Master data
    FORM UPLOAD_MATMAS .
      LOOP AT IT_DATA.
    Header
        BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
        BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
        BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
        BAPI_HEAD-BASIC_VIEW = 'X'.
        BAPI_HEAD-PURCHASE_VIEW = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW = 'X'.
        BAPI_HEAD-storage_view ='X'.
        bapi_head-mrp_view = 'X'.
        bapi_head-COST_view ='X'.
    Material Description
        REFRESH IT_MAKT.
        IT_MAKT-LANGU = IT_DATA-SPRAS.
        IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
        APPEND IT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
        BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
       bapi_mara1-unit_of_wt = it_data-gewei.
        BAPI_MARA1-DIVISION = IT_DATA-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION = 'X'.
    Plant - Purchasing
        BAPI_MARC1-PLANT = IT_DATA-WERKS.
        BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
        BAPI_MARC1-PROFIT_CTR = IT_DATA-PRCTR.
        BAPI_MARC1-MRP_TYPE = IT_DATA-DISMM.
        BAPI_MARC1-AVAILCHECK = IT_DATA-MTVFP.
        BAPI_MARC1-LOTSIZEKEY = IT_DATA-DISLS.
        BAPI_MARC1-MRP_CTRLER = IT_DATA-DISPO.
        BAPI_MARC1-PROC_TYPE = IT_DATA-BESKZ.
        BAPI_MARC1-SM_KEY = IT_DATA-FHORI.
        BAPI_MARC1-PERIOD_IND = IT_DATA-PERKZ.
        BAPI_MARCX-PLANT = IT_DATA-WERKS.
        BAPI_MARCX-PUR_GROUP = 'X'.
        BAPI_MARCX-AVAILCHECK = 'X'.
        BAPI_MARCX-PROFIT_CTR = 'X'.
        BAPI_MARCX-MRP_TYPE = 'X'.
        BAPI_MARCX-MRP_CTRLER = 'X'.
        BAPI_MARCX-SM_KEY = 'X'.
        BAPI_MARCX-LOTSIZEKEY = 'X'.
       Storage Location.
        BAPI_MARDL-PLANT     = IT_DATA-WERKS.
        BAPI_MARDL-STGE_LOC = IT_DATA-LGORT.
        BAPI_MARDX-PLANT    = IT_DATA-WERKS.
        BAPI_MARDX-STGE_LOC = IT_DATA-LGORT.
    Accounting
        BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
        BAPI_MBEW1-VAL_CLASS = IT_DATA-BKLAS.
        BAPI_MBEW1-MOVING_PR = IT_DATA-VERPR.
       bapi_mbew1-std_price = it_data-stprs.
        BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
        BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        BAPI_MBEWX-MOVING_PR = 'X'.
    *--- BAPI to create material
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
        HEADDATA = BAPI_HEAD
        CLIENTDATA = BAPI_MARA1
        CLIENTDATAX = BAPI_MARAX
        PLANTDATA = BAPI_MARC1
        PLANTDATAX = BAPI_MARCX
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA = BAPI_MARDL
    STORAGELOCATIONDATAX = BAPI_MARDX
    VALUATIONDATA = BAPI_MBEW1
    VALUATIONDATAX = BAPI_MBEWX
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA = BAPI_MVKE1
    SALESDATAX = BAPI_MVKEX
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
        IMPORTING
        RETURN = BAPI_RETURN
        TABLES
        MATERIALDESCRIPTION = IT_MAKT
    UNITSOFMEASURE =
    UNITSOFMEASUREX =
    INTERNATIONALARTNOS =
    MATERIALLONGTEXT =
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
        IF BAPI_RETURN-TYPE = 'E'.
          WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,
    IT_DATA-MATNR.
        ELSEIF BAPI_RETURN-TYPE = 'S'.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          =
         IMPORTING
           RETURN        = BAPI_RETURN
          WRITE: 'Successfully created material' ,IT_DATA-MATNR.
        ENDIF.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          =
        IMPORTING
          RETURN        = BAPI_RETURN
      ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS

    the Profit center 1000/sslcommon  not created. first create the profit center and then upload your data.check tcode KE52 for created profit centers...

  • F-28 Post incoming payment through BAPI with Clearing

    Hi Gurus
    I have a requirement to post Customer incoming payment through BAPI, I have seen some post where using
    BAPI_ACC_DOCUMENT_POST , we can post on account and later using f-32 we can clear. but there s some limitation doing that.
    In f-28 residual line items also got generated for short or excess payment. There is a problem for residual item posting also.
    If  residual amount belongs to more than one Profit Center then GL currency view and Local Currency view is also mismatching.
    Is is possible to clear customer line item also at the time of posting through BAPI.
    If any one implemented BAPI or any automatic process to post F-28 please share your experience and challenges.
    Thanks in advance
    Subrata Sarkar

    Hi
    There could be multiple approaches to this depending on what you want to achieve. If you just want to uplaod the documents, than the BAPI you mentioned could be the right approach. If however, you have fixed criterion for cash application for open items, you can probably look at a BDC to do the clearing.Once the BDC is recorded work with your ABAP colleague to write this up in a custom transaction. This is particualrly useful if you have more items to clear against an incoming payment.
    regards
    Sanil Bhandari

  • Transfer the Pur Order Info through BAPI's between SAP R/3 Systems Using XI

    How to Create a Purchase Order for the Vendor and transfer this data through BAPI's between SAP R/3 Systems Using "Exchange Infrastructure(XI)".
    Please kindly let me know the procedure for creating BAPI's and how to transfer this information between SAP R/3 systems. Please kindly mention the NAVIGATION for this scenario.

    Hi Revathi,
    If you want to do an IDOC to IDOC scenario, then the Points to be noted are:
    1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
    2. You import the IDOC and use the same in your mapping.
    3. You do not need a sender IDOC adapter, and no sender agreement, but a receiver IDOC adapter and a receiver agreement is needed.
    IDOC -> File scenario ref:
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
    File -> IDOC ->
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    (It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)
    Apart from this if you need any info on how to configure your ALE, partnet profile,etc  drop me a mail, I have excellent tutors that can help you in the same.
    Regards,
    Bhavesh

  • Need to Post Components in Production Order in MB1A through BAPI as Planned Good Issue

    Hi ,
    I have created a Program to upload data s for MB1A through BDC , it works fine, but for huge data s it takes more time.  alternatively created one more Program which updates through BAPI Function Module  "BAPI_GOODSMVT_CREATE".  It works fine , but one issue noted, after posting through Function Module , components are posted as Unplanned Goods Issue.   I need to post the components as " Planned Goods Issue" instead of "Unplanned Goods Issue " . This can viewed through Tcode : C003
    Below are the  inputs passed for BAPI Function Moduel
    **&------Header Contents of bapi Upload-------------------&*
    header-pstng_date = sy-datum.                                              " Posting date
    header-doc_date    = sy-datum.                                             " Document Date
    header-header_txt  = '000001002280'.                                     " Header text
    header-pr_uname   = sy-uname.                                            " User Name
    header-ref_doc_no  = '000001002280'.                                    " Header Ref. Doc. No.
    CONCATENATE sy-uname sy-uzeit c_method INTO  header-ref_doc_no_long SEPARATED BY '-'.  " Refer  Text
    *Item Data
    wa_item-material   = '000000000010000800'.                             "Material
    wa_item-plant      = '3910'.                                              "Plant
    wa_item-stge_loc   = 'WIP'.                                            "Storage Location
    wa_item-move_type  = '261'.                                            "Movement Type
    wa_item-entry_qnt  = '1'.                                                  "Quantity
    wa_item-entry_uom  = 'PC'.                                              "Unit
    *wa_item-res_item  =  1.                                                  "Reservation Item
    *wa_item-reserv_no =                                                      " Reservation Number
    wa_item-batch      = '0000011027'.                                    "Batch No
    *wa_item-mvt_ind   = 'F'.                                                  "Movement Indicator
    *wa_item-stck_type = 'F'.                                                 "Stock Type
    wa_item-orderid    = '000001002260'.                                 "Order ID
    wa_item-prod_date  = SY-DATUM.
    *wa_item-GL_Account = '610000'.                                     "GL Account
    *TRANSLATE wa_item-batch TO UPPER CASE.
    *APPEND wa_item TO it_item.
    c_code = '03'.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
    goodsmvt_header       = header
    goodsmvt_code         = c_code
    TABLES
    goodsmvt_item         = it_item
    goodsmvt_serialnumber = it_sno
    return                = return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
          wait = 'X'.
        commit work and wait.
    Even i tried to pass "Movement Indicator , GL Account etc" , Still not able to fix the issue. Can anyone suggest how to post the Production Order components as "Planned Goods Issue".  I am not sure any other values to be password.
    BR,
    Murali

    I have made something like your :
    * Alimtentation de la BAPI de mouvement de stock MM.
    move : sy-datum        to ls_header-pstng_date ,
            sy-datum        to ls_header-doc_date ,
    * Indique le code mouvement
            '03'            to lw_code.      " 03 normalement, mais je veux que ca plante
    loop at lt_ltap
          into ls_ltap.
       move : ls_ltap-matnr   to ls_item-material ,
              ls_ltap-werks   to ls_item-plant ,
              ls_ltap-lgort   to ls_item-stge_loc ,
              '261'           to ls_item-move_type ,
              ls_ltap-vsolm   to ls_item-entry_qnt ,
              ls_ltap-meins   to ls_item-entry_uom ,
              i_ltak_vb-benum to ls_item-orderid ,
              i_ltak_vb-rsnum to ls_item-reserv_no ,
              ls_ltap-rspos   to ls_item-res_item ,
              ls_ltap-rsart   to ls_item-res_type.
       append ls_item to lt_item.
       clear  ls_item.
    endloop.
    I have to put the reservation number to have it works.
    Fred

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

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

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

  • How to update Assignment field in Accounting Document through BAPI ?

    I need to change Assignment field in already posted accounting document through bapi or some other automatic method. Please tell me exactly which bapi I should use and how can I pass the changed assignment field?

    Hey,
    I couldnt find any BAPIs which update an accounting document. I think the safest way is to record FB02 and use BDC/Call Transaction.
    -Kiran
    *Please reward useful answers

  • Sales order uploading through bapi

    hi
    i want to upload sales order to bapi pls give the code and i also error handling through bapi
    regards
    A.K

    Hi Awadhesh,
    pls look at this link you will get a clear idea and the code.
    http://abaplovers.blogspot.com/2008/02/bapi-sales-order-create-code.html
    Happy to help you.
    Regards,
    Viveks

  • Print of TO created through Bapi

    Hi friends,
    I want to have immediate printing of the TO created through BAPI l_to_create_multiple.
    I don't want to change the configuration setting what is the other way to get TP printed immediately.
    Thanks,
    Kiran

    Immediate printing of Transfer order is depend on the spool code setting.If the transfer order which you are creating through L_TO_CREATE_MULTIPLE is having the spool code and print immediately is activated for the spool code then it should trigger the printing.
    SPRO---LE  - WM --ACTIVITIES -- DEFINE PRINT CONTROL  (Definition -----Spool code)

Maybe you are looking for

  • Best practice when FACT and DIMENSION table are the same

    Hi, In my physical model I have some tables that are both fact and dimension table, i.e. in the BMM they are of course separated into Fact and Dim source (2 different units) and it works fine. But I can see that there will be trouble when having more

  • Item overview FoC field

    Hi firends, in t-code ME21N at item level, there is a check box for free of cost delivery, whenever I make Purchase Order for Item category 'D' services, and I press enter after filling all the required fields, this check box becomes gray, means no i

  • No Video audio or music

    My iPhone 5s recently stopped playing the audio on videos and music without headphones or connected to my car. When I hit the play button my music immediately will pause. When I play videos they play without any audio. My phone is up to date. I have

  • Chart in pivot table not shows computed data

    [related thread|http://forums.oracle.com/forums/thread.jspa?threadID=945178] !http://img194.imageshack.us/img194/4729/asuifuadsfuiasduifuasdf.jpg! in the example above, "market" is put on the "rows" "brand" is put on the "columns" "value" is put on t

  • No country information has been maintained for US

    We have run into an issue of an older delivery going on Embargo block for a domestic order, shipping within the US. Here is what we have in place for the US. Do I need to make a configuration change to prevent domestic orders from going on Embargo bl