Important Validations for MTL Material Transaction

Hi All,
I am creating an OAF page for material transaction -- for material issue and receipt.
For this I am inserting a record into MTL transaction interface table and the running the transaction manager API in oracle, which populate mtl_material_transactions table.
But after general insertion i found that the record is getting error out due to oracle validation. The item may be lot or serial controlled.
Please let me know the validations performed by this program, so that I can handle these before inserting into interface tables.
Any help/document will be appreciated.
You can mail me to [email protected] as well.
Regards
Riyas

Riyas,
You have to insert the serial number if it is a serial controlled item or it will fail always. Before inserting into the interface table you can validate whether it is serial no is exists or not from the wsh_serial_numbers or mtl_serial_numbers.
You can compare the values from the inventory_itme_id to get the serial numbers.
You can use the below query to validate the records. It might be helpful.
1stà select * from oe_order_headers_all where header_id=4838351
2ndà select * from wsh_delivery_details where source_header_id=4839902
3rdà select * from wsh_serial_numbers where delivery_detail_id=5088694
INSERT INTO mtl_serial_numbers_interface
(source_code, source_line_id,
transaction_interface_id,
last_update_date, last_updated_by,
creation_date, created_by,
last_update_login, fm_serial_number,
to_serial_number, product_code
--product_transaction_id
VALUES ('Miscellaneous issue', 7730351,
71737725,
--mtl_material_transactions_s.NEXTVAL, --transaction_interface_id
SYSDATE, --LAST_UPDATE_DATE
fnd_global.user_id, --LAST_UPDATED_BY
SYSDATE, --CREATION_DATE
fnd_global.user_id, --CREATED_BY
fnd_global.login_id, --LAST_UPDATE_LOGIN
'168-154-701',
--FM_SERIAL_NUMBER
'168-154-701', --TO_SERIAL_NUMBER
'RCV'
--PRODUCT_CODE
--l_rcv_transactions_interface_s
--v_txn_interface_id --product_transaction_id

Similar Messages

  • BAPI needed  for  change material(Transaction : MM02)

    Hi all,
    We have a requirement where in we need to post the documents throuh BAPI for change material (Transaction: MM02).
    Any inputs on this..is highly appreciable...
    thanks in advance...
    regards..
    prathima.

    CHECK THIS CODE
    *& Report  ZBAPI_MATERIAL_SAVEDATA
    REPORT  ZBAPI_MATERIAL_SAVEDATA NO STANDARD PAGE HEADING MESSAGE-ID (ZHNC).
    TYPES:BEGIN OF TY_MAT,
           MATERIAL(4),
           IND_SECTOR(1),
           MATL_TYPE(4),
           MATL_GROUP(9),
           BASE_UOM(3),
           BASE_UOM_ISO(3),
           PLANT(4),
           DEL_FLAG(1),
           PUR_GROUP(3),
           BASE_QTY(13),
           STGE_LOC(4),
           MRP_IND(1),
           SALES_ORG(4),
           DISTR_CHAN(2),
           DEL_FLAG1(1),
           MIN_ORDER(13),
           LANGU(2),
          MATL_DESC(40),
       END OF TY_MAT.
    DATA: IT_DATA TYPE TABLE OF TY_MAT,
          WA_DATA LIKE LINE  OF IT_DATA.
    *decalraing flag
    data: v_flag value ''.
    *DECLARING WORK AREAs  TO BE PASSED TO THE FUNCTION MODULE.
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,
          BAPI_CLIENTDATA LIKE BAPI_MARA,
          BAPI_CLIENTDATAX LIKE BAPI_MARAX,
          BAPI_PLANTDATA LIKE BAPI_MARC,
          BAPI_PLANTDATAX LIKE  BAPI_MARCX,
          BAPI_STORAGELOCATIONDATA LIKE BAPI_MARD,
          BAPI_STORAGELOCATIONDATAX LIKE BAPI_MARDX,
          BAPI_SALESDATA LIKE BAPI_MVKE,
          BAPI_SALESDATAX LIKE BAPI_MVKEX,
          BAPI_MAKT LIKE BAPI_MAKT,
          BAPI_RETURN LIKE BAPIRET2.
    *INTERNAL TABLE TO HOLD THE MATERIAL DESCRIPTION
    DATA: BEGIN OF IT_MAKT OCCURS 0.
    INCLUDE STRUCTURE BAPI_MAKT.
    DATA END OF IT_MAKT.
    DATA:BEGIN OF IT_RET OCCURS 0.
    INCLUDE STRUCTURE BAPIRET2.
    DATA END OF IT_RET.
    *INTERNAL TABLE TO HOLD HEADER DATA
    DATA: IT_EXCEL TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *SELECTION-SCREEN ELEMENTS
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETER: FNAME TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MATMAS.XLS' .
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
                P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
                P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
                P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK B1.
    *DECLARATION OF EXCELAL TABLE
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FNAME.
    PERFORM F_GET_FILE USING FNAME.
    START-OF-SELECTION.
    PERFORM F_XLS_ITAB USING FNAME
                       CHANGING IT_EXCEL.
    PERFORM F_MOVE_DATA.
    perform F_GET_DATA.
    *&      Form  F_GET_FILE
          text
         -->P_FNAME  text
         <--P_SY_SUBRC  text
    FORM F_GET_FILE  USING    P_FNAME LIKE FNAME.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
      STATIC              = ' '
      MASK                = ' '
      CHANGING
        FILE_NAME           = P_FNAME
    EXCEPTIONS
      MASK_TOO_LONG       = 1
      OTHERS              = 2
    IF SY-SUBRC <> 0.
    MESSAGE E006(ZHNC).
    ENDIF.
    ENDFORM.                    " F_GET_FILE
    *&      Form  F_XLS_ITAB
          text
         -->P_FNAME  text
         <--P_IT_EXCEL  text
    FORM F_XLS_ITAB  USING    P_FNAME
                     CHANGING P_IT_EXCEL.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = FNAME
        I_BEGIN_COL                   = P_BEGCOL
        I_BEGIN_ROW                   = P_BEGROW
        I_END_COL                     = P_ENDCOL
        I_END_ROW                     = P_ENDROW
      TABLES
        INTERN                        = IT_EXCEL
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " F_XLS_ITAB
    *&      Form  F_MOVE_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_MOVE_DATA .
    DATA : LV_INDEX TYPE I.
    FIELD-SYMBOLS <FS>.
    *--- Sorting the internal table
    SORT IT_EXCEL BY ROW COL.
    CLEAR IT_EXCEL.
    LOOP AT IT_EXCEL.
    MOVE IT_EXCEL-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
    ASSIGN COMPONENT LV_INDEX OF STRUCTURE WA_DATA TO <FS>.
    *--- Asigning the field value to a field symbol
    MOVE IT_EXCEL-VALUE TO <FS>.
    AT END OF ROW.
    APPEND WA_DATA TO IT_DATA.
    CLEAR WA_DATA.
    ENDAT.
    ENDLOOP.
    ENDFORM.                    " F_MOVE_DATA
    *&      Form  F_GET_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM F_GET_DATA .
    LOOP AT IT_DATA INTO WA_DATA.
    MOVE-CORRESPONDING WA_DATA  TO  BAPI_HEAD.
    BAPI_HEAD-BASIC_VIEW ='X'.
    BAPI_HEAD-SALES_VIEW ='X'.
    BAPI_HEAD-PURCHASE_VIEW ='X'.
    BAPI_HEAD-STORAGE_VIEW ='X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_CLIENTDATA.
    BAPI_CLIENTDATAX-MATL_GROUP = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM = 'X'.
    BAPI_CLIENTDATAX-BASE_UOM_ISO = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_PLANTDATA.
    BAPI_PLANTDATAX-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_PLANTDATAX-DEL_FLAG = 'X'.
    BAPI_PLANTDATAX-PUR_GROUP = 'X'.
    BAPI_PLANTDATAX-BASE_QTY = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_STORAGELOCATIONDATA.
    BAPI_STORAGELOCATIONDATA-PLANT = BAPI_PLANTDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-PLANT = BAPI_STORAGELOCATIONDATA-PLANT.
    BAPI_STORAGELOCATIONDATAX-STGE_LOC = BAPI_STORAGELOCATIONDATA-STGE_LOC.
    BAPI_STORAGELOCATIONDATAX-MRP_IND = 'X'.
    MOVE-CORRESPONDING WA_DATA TO BAPI_SALESDATA.
    BAPI_SALESDATAX-SALES_ORG = BAPI_SALESDATA-SALES_ORG.
    BAPI_SALESDATAX-DISTR_CHAN = BAPI_SALESDATA-DISTR_CHAN.
    BAPI_SALESDATAX-DEL_FLAG = BAPI_SALESDATA-DEL_FLAG.
    BAPI_SALESDATAX-MIN_ORDER = 'X'.
    REFRESH IT_MAKT.
    IT_MAKT-LANGU = WA_DATA-LANGU.
    IT_MAKT-MATL_DESC = WA_DATA-MATL_DESC.
    APPEND IT_MAKT.
    CLEAR IT_RET.
    REFRESH IT_RET.
    PERFORM F_CALL_BAPI.
    READ TABLE IT_RET WITH KEY TYPE = 'S'.
    IF SY-SUBRC EQ 0.
    PERFORM F_BAPI_COMMIT.
    WRITE:/ 'MATERIAL CREATED OR UPDATED SUCESSFULLY WITH MATERIAL NO',WA_DATA-MATERIAL.
    ELSE.
    MESSAGE E000(ZHNC) WITH 'ERROR IN CREATING THE MATERIAL'.
    *WRITE: / 'ERROR IN CREATIN MATERIAL',IT_RET-MESSAGE.
    *PERFORM F_DOWNLOAD.
    ENDIF.
    *ENDIF.
    ENDLOOP.
    ENDFORM.                    " F_GET_DATA
    *&      Form  F_CALL_BAPI
          text
    -->  p1        text
    <--  p2        text
    FORM F_CALL_BAPI .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        HEADDATA                   = BAPI_HEAD
       CLIENTDATA                 =  BAPI_CLIENTDATA
       CLIENTDATAX                =  BAPI_CLIENTDATAX
       PLANTDATA                  =  BAPI_PLANTDATA
       PLANTDATAX                 =  BAPI_PLANTDATAX
       STORAGELOCATIONDATA        =  BAPI_STORAGELOCATIONDATA
       STORAGELOCATIONDATAX       =  BAPI_STORAGELOCATIONDATAX
       SALESDATA                  =  BAPI_SALESDATA
       SALESDATAX                 =  BAPI_SALESDATAX
    IMPORTING
       RETURN                     =  IT_RET
    TABLES
       MATERIALDESCRIPTION        = IT_MAKT
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
      RETURNMESSAGES             =
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    APPEND IT_RET.
    ENDFORM.                    " F_CALL_BAPI
    *&      Form  F_BAPI_COMMIT
          text
    -->  p1        text
    <--  p2        text
    FORM F_BAPI_COMMIT .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      WAIT         =
    IMPORTING
      RETURN        =
    ENDFORM.                    " F_BAPI_COMMIT

  • Cost Estimation Through Two PIR valid for same material

    Hello Everyone
    I am trying to costing strategy with PIR (Purchase Info Record). Just to check whether its working right or not i have only choosen sub strategy 'Effective Price from Quotation'. My problem is we have got more than one PIR for the same material from different vendors (both have valid dates). My first question is how system will calculate if both PIRs for same material is valid with different prices.
    My expectation was that system should pick up the price from PIR which has regular vendor flag ticked in PIR master record but this is not the case. System is picking up the price from the other PIR although i don't know the logic. I am observing system is picking the lower price (as i tested two materials) in both cases. Can anybody guide me how can i make sure that system picks up the price from PIR which has regular ticked or can anybody suggest something elsethat which is right sub strategy to use for PIR?
    Thanks in advence

    Hi Young Sun
    The link really helped me a lot to understand the process how system is picking up price. We don't use source list and quota requirement. I have noticed that system will not consider regualr flag tick in PIR for costing unless you you configure at backend in
    Material Logistics->Purchasing->Source Determination->Define Regular Vendor
    Once i have activated that tick system is working fine and picking up the price from regular vendor flag. If regular vendor is not ticked system will go vendor with lower price.
    @Imdad: Thanks for your kind help as well and input.
    Many thanks again.
    Regards

  • MTL MATERIAL TRANSACTION error 'CALL_TO_CONTRACTS'. Please help.

    I am getting the following error from the MTL_TRANSACTIONS_INTERFACE table while running a material transaction.
    You have encountered an unexpected error in 'CALL_TO_CONTRACTS': (No Data Found).
    I know that there is an query not being properly fulfilled and it's giving me back this error.
    Does anybody know the specific reason that this error happens?
    I don't know how to track down where this query is. I'm trying to find the package that it is in.
    Any help would be meet with much thanks.

    I get this error too when trying to display a content area with a single URL element (displaying the CA as a portlet).
    When the URL is set to open in a NEW window no error.
    But if I select the URL item to open inside the folder (CA) I get the error.
    Pls let me know if you find a solution since I would like to have my CA shown ONLY as a portlet and not as a new window....

  • Performance improvement in mtl material transactions query

    Hello All,
    We have some millions of records in mtl_material_transactions and we need to extract some transactions based on particular OU(currently 1 OU) and some filtering condition. This program will run every 5 min in the prod environment so there would be minimal records (1 to 50) which are eligible to be picked up in each run. Currently the below query is taking 2 to 4 min depending on the server load. Even there are no eligible records for pickup then also it is running 2 to 4 min. If there are any improvement points please suggest us.
    Below is the query details and explain plan
    WITH mtst AS
    SELECT mtt.transaction_source_type_id, mtt.transaction_type_id,
    mtt.transaction_action_id
    FROM mtl_transaction_types mtt
    WHERE EXISTS (
    SELECT 1
    FROM apps.sga_denpyo_comm_maint sdcm
    WHERE sdcm.unso_event = 'M'
    AND sdcm.unso_extract = 'Y'
    AND mtt.transaction_type_id = sdcm.mtl_type_id)
    AND mtt.transaction_source_type_id '2'),
    mp AS
    (SELECT organization_id
    FROM mtl_parameters
    WHERE master_organization_id = 1773)
    SELECT mt.transaction_id, NVL (mt.attribute3, '00') attribute3
    FROM mtl_material_transactions mt, mtst, mp
    WHERE mt.transaction_source_type_id = mtst.transaction_source_type_id
    AND mt.transaction_type_id = mtst.transaction_type_id
    AND mt.transaction_action_id = mtst.transaction_action_id
    AND mt.transaction_date > '01-JAN-2000'
    AND mt.organization_id = mp.organization_id
    AND SUBSTR (NVL (mt.attribute3, '00'), 1, 1) = '0'
    AND mt.transaction_quantity < 0
    AND NVL (mt.transaction_reference, 'XXX') NOT LIKE 'NO%'
    AND NVL (mt.transaction_reference, 'YYY') NOT LIKE 'KR%'
    AND NVL (mt.transaction_reference, 'ZZZ') NOT LIKE 'UNSO_CANCEL%'
    ORDER BY mt.transaction_id
    Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
    SELECT STATEMENT Optimizer Mode=CHOOSE 1 162
    SORT ORDER BY 1 73 162
    FILTER
    TABLE ACCESS BY INDEX ROWID INV.MTL_MATERIAL_TRANSACTIONS 1 43 51
    NESTED LOOPS 1 73 116
    MERGE JOIN CARTESIAN 1 30 65
    NESTED LOOPS 1 22 59
    SORT UNIQUE
    TABLE ACCESS FULL SGA.SGA_DENPYO_COMM_MAINT_ALL 1 11 11
    TABLE ACCESS BY INDEX ROWID INV.MTL_TRANSACTION_TYPES 1 11 1
    INDEX UNIQUE SCAN INV.MTL_TRANSACTION_TYPES_U1 1
    BUFFER SORT 33 264 64
    TABLE ACCESS FULL INV.MTL_PARAMETERS 33 264 6
    INDEX RANGE SCAN INV.MTL_MATERIAL_TRANSACTIONS_N9 202 4

    Kindly avoid using Where, Rather use Where exists. Also Create an index that will be helpful in increasing performance significantly.

  • MTL MATERIAL TRANSACTIONS having zero unit cost

    Hi All,
    For some of the POs, we are getting zero unit cost in the Receiving Account, but rest of the POs are working fine and correct data is populated.
    This is not with any particular Org as well. Any idea what can be the reason so that the cost will be zero in there.
    I am new to costing/Finance module, so please let me know if I am not making sense or missing any information that will be important to get the solution.
    Thanks,

    Amit
    What is your costing method in that organization? Can you please check the price in the PO for that item which is giving you this issue?
    This can happen: If your price in the PO is Zero and you are using any costing method when you receive this is what happens:
    Cr Accrual Account @Po Price
    Dr Receiving Account @Po Price (could be Zero)
    When you deliver to Inventory depending on the costing method value will change:
    In std costing
    Cr Receiving @ po price (zero)
    Cr Purchase Price Variance @st cost
    Dr Inventory @ std cost
    In avg costing
    Cr Receiving cost @ Po Price
    Dr Inventory @ po price
    But the cost will be recalculated as
    (onhand qty*current cost+po qty*po_price)/(onhand_qty+po_qty). So if the cost was 100 and onhand was 1 and if the po qty is 1 and po price is Zero cost will become 50.
    Thanks
    Nagamohan

  • Validation for MIRO

    I want" Bussines area & Section Code "
    So i created the validation for all vendor transaction ie. FB60,F-43,F-48 & MIRO.
    Validation is based on
    Tcode & Account type
    But i m not getting the compulsory field for MIRO.
    For all other transation i m getting the right validation.
    Then Why it doesnt take for MIRO?
    What will be the sollution for that?
    Plz tell me.

    Hi,
    Do you want to subsittute the GSBER in tax line item in MIRO?
    if yes, then it works as design.In general taxes should not be
    posted with business area as per note 199886. Therefore GSBER
    is coded to be deleted when postings do not happen directly in FI.
    Due to technical reasons the logic for postings directly in FI
    (such as FB60) differs: There would be no deletion.
    I recommend not to substitute the business area for tax items
    (to be conform with note 199886) but if you really want to do this in
    general you can implement the following modification on your own risk:
    function FI_SUBST_GSBER
          ELSE.
          If GSBER differs -> mark as not unique
            IF gsber_tab-gsber <> t_accit-gsber.
              CLEAR gsber_tab-flg_unique.
              MODIFY gsber_tab INDEX sy-tabix.
            ENDIF.
          ENDIF.
    >>>>>>>>>>>>>>>>>>>>>>>START-OF-DELETION>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
          IF t_accit-taxit = xon AND t_accit-xbilk = xon.
            IF brazil IS INITIAL.   "do not clear for brazil  "note 436374
              CLEAR t_accit-gsber.
              MODIFY t_accit.
            ENDIF.                                            "note 436374
          ENDIF.
    >>>>>>>>>>>>>>>>>>>>>>>END-OF-DELETION>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        ENDIF.
      ENDLOOP.
    Hope the above informations can help to you!
    Best Regards,

  • Validation for ABAON

    Hi Gurus,
    We have a requirement for while run the transaction code ABAON put a validation for
    1. Transaction type 206  = If Posting Year(ABAON screen field) Less than or equal to Capitalized Year(ANLA-AKTIV from the Asset entered); transaction will raise error message - "Asset Capitalized Year should be prior to posting year"
    2. Transaction type 256  = If Posting Year(ABAON screen field) and Capitalized Year(ANLA-AKTIV from the Asset entered) is not equal to current date year; transaction will raise error message "Capitalized date and Posting date year should be in current year only".
    I have added two validations through transaction OAZ1 and these working for one company code and not working for other.
    Please help me out,
    Thanks in advance...
    Tirumula Rao Chinni

    Hi Ajay,
    I have mentioned in validation
    Prerequisite
    SYST-TCODE = 'ABAON' AND ANEP-BWASL = '206'
    Check
    U906
    Message
    Capitalized year should be less than Posting year for TType 206
    Message number YA     006
    And written in code
    FORM U906  USING B_RESULT.
    Check if capitalization year is prior of Posting year,
    If not thow error message.
      IF ANEK-BUDAT(4) LE ANTS-AKTIV(4).
         B_RESULT  = B_FALSE.
      ELSE.
         B_RESULT  = B_TRUE.
      ENDIF.
    ENDFORM.
    Please let me know, any solution.... My problem not yet solved
    Regards
    Tiru

  • We look for BAPI/Function to As-Built for Serialized Material (tran.COIB)

    Hello ,
    We look for BAPI/Function to As-Built for Serialized Material (transaction COIB).
    We check transaction COIB in order to create insatlled base for production orders(bill of equipments)
    We look for BAPI/ Function in order to run that process automatically in background base of some rules we will decide. Do you know if there is BAPI/ Function  refer to it?

    Sorry but I found the function group IBPP with the function modules:
    IBPP_CHANGE_IBASE
    IBPP_CREATE_IBASE
    IBPP_GET_IBASE_DOWN_ALL
    For our requirements these fmodules are sufficient.
    Regards

  • Validation for PO text in the material master :- BADI implementation

    Hi experts,
    I am trying to do a validation on the Purchase Order Text (long text) which must always be filled in Language EN and DE.
    Thus if a user tries to edit a material in MM02 or creates a new one in MM01 - this box of long text (PO text) must be filled, else it should throw an error.
    i created a BADI and inside that i am calling the FM read_text , but it check for only existing text already saved in the database.
    WHAT ABOUT THE RUN-TIME (ex creating a material).
    or what if the user purposely deletes an existing PO long text and then tries to save it (database might already have a PO long text saved for that material).
    Kindly help me if there is any FM which can be called to check in the Runtime if the PO long text is filled or if we can do some customizing and make that PO long text Mandatory.
    Please not we need this field mandatory only for only 03 plants, that's where the problem is coming.
    Many Many thanks in advance.
    Rittik.

    Hello Rittik,
    Please use Exit 'EXIT_SAPLMGMU_001' for your requirement. I checked and below code (READ_TEXT) picks latest text from the transaction in processing and hence can be used for raising any error. Let me know if you face any issues.
    if WMARC-WERKS = '...........' or '...'.
      lv_name = WMARA-matnr.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
    *   CLIENT                        = SY-MANDT
          id                            = 'BEST'
          language                      = 'E'
          name                          = lv_name
          object                        = 'MATERIAL'
    *   ARCHIVE_HANDLE                = 0
    *   LOCAL_CAT                     = ' '
    * IMPORTING
    *   HEADER                        =
        TABLES
          lines                         = lt_line
        EXCEPTIONS
          id                            = 1
          language                      = 2
          name                          = 3
          not_found                     = 4
          object                        = 5
          reference_check               = 6
          wrong_access_to_archive       = 7
          OTHERS                        = 8
      IF sy-subrc <> 0.
    *    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    endif.
    Regards,
    Diwakar

  • Importing Material transaction on a FIFO organization.

    We are trying to load material transactions using MTL_TRANSACTION_INTERFACE.
    The organization is setup as FIFO costed. We are able to load the MTL_TRANSACTION_INTERFACE, we can also sees
    the transaction on the Open Interface from inventory and to run the transaction import.
    The material transaction is created in inventory and visible on the Material Transaction Interface as well.
    If we check the material transaction layers we are not able to see the cost layer, as has not been created.
    We would like to understand if additional setup is needed in order to have the cost layer created for the imported
    transactions.
    We have found a note on metalink (https://metalink.oracle.com/metalink/plsql/f?p=130:14:12598912247982725952::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,262980.1,1,1,1,helvetica) that was referring to WIP and says to load also the CST_COMP_SNAP_INTERFAC if we want to have the cost layers created.
    But the table above requires a wip entity id, and we are not loading Work in process, only misc receipt.

    Are the loaded transactions still in MTL_TRANSACTION_INTERFACE or have they been transferred to Material Ledger i.e. MTL_MATERIAL_TRANSACTIONS ?
    I assume that when referring to Cost Layers, you are referring to cost layers in CST_INV_LAYERS. If so, I would like to mention that cost layers in this table are created when the transaction is being Costed which happens after the transactions get created in MTL_MATERIAL_TRANSACTIONS and when Cost Manager has costed the transaction.
    Hope it helps.
    Thanks, Ram

  • Validation for PO text in the material master.

    Hi experts,
    I am trying to do a validation on the Purchase Order Text (long text) which must always be filled in Language EN and DE.
    Thus if a user tries to edit a material in MM02 or creates a new one in MM01 - this box of long text (PO text) must be filled, else it should throw an error.
    i created a BADI and inside that i am calling the FM read_text , but it check for only existing text already saved in the database.
    WHAT ABOUT THE RUN-TIME (ex  creating a material).
    or what if the user purposely deletes an existing PO long text and then tries to save it (database might already have a PO long text saved for that material).
    Kindly help me if there is any FM which can be called to check in the Runtime if the PO long text is filled or if we can do some customizing and make that PO long text Mandatory.
    Please not we need this field mandatory only for only 03 plants, that's where the problem is coming.
    Many Many thanks in advance.
    Rittik.

    Hi,
    You can maitain the PO text of material master record in english and german. To do this goto POtext view below languages maintained create icon will be there select that give the english language, enter the text in english and save. Again select german and enter the PO text.
    To get the PO text view mandatory , go to SPRO, logistic general, material master, fielld selection,define plant specific feild selection and plant specific screen selection. For 3 plants you can configure here.Hence the POtext view will be mandatory and gives error if not maintained. I hope this will resolve your issue. Thanking you.

  • In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE!

    In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.

    …and the other 98 missing features.
    Just use Pages '09, which should be in your Applications/iWork folder.
    Rate/review Pages 5 in the App Store.
    Peter

  • Import multiple info records for 1 material item in repository

    Hi Guys,
    I have got sort of a puzzle I can not solve at the moment, maybe some one can help me to solve it. The situation in our system landscape is as follows:
    Systems:
    SRM 5.0 (Classic implementation scenario)
    ECC 6.0
    SRM-MDM 2.0
    PI 2005
    Material master is maintained in R/3 and the materials are replicated to SRM. From SRM we replicate all materials to the catalog repository in SRM-MDM.
    As the material master in R/3 is vendor independent, the materials replicated to SRM also have no vendor attached. For the first initial material replication from SRM to the catalog SRM-MDM this also means that the products in the main table of the repository, u2018catalog positionsu2019, will not have a vendor or vendor number attached (i.e. no reference to a source of supply).
    To assign a source of supply in the repository to a product (record) we will use info records which are replicated from R/3 to SRM-MDM. The mapping for this in the Import Manager can only be based on the product number. As this is the only unique value available which can map a info record to a already existing (but vendor less) ptoduct item in the catalog.
    As long as every item in the repository has only one unique info record, meaning one source of supply with a specific price, there is no issue in the above scenario. Based on the product-id, the info record data will be matched with the material item in the catalog.
    The issue for me arises when multiple info records exists for the same material. The info records can heave different vendors and different prices. All possible vendors should be available in the catalog for the same material (at least this is the requirement ).
    At this point the product-id will no longer be an unique value. Importing the info records will cause problems, as only one material record is available in the repository for the specific product-id (remember that when doing a initial replication of the material master to the catalog, no vendor data is replicated).
    Does anyone had this issue before, and knows a solution? Is it for example possible during the import of the info records in the Import manager, to duplicate material records in the destination data, based on the number of info records available in the source data for the same product-id. Or is there an other solution that I am missing?
    Your help would be appreciated!
    Regards,
    Skander

    Hi Shai & Ravi,
    Thanks for your answers. The MDM version which we are using is 5.5 - currently on SP6
    @ Shai: you are right; the standard SRM-MDM 2.0 catalog repository has a qualified lookup table u2018priceu2019, in which itu2019s possible to store the info record data. The standard fields in this sub-table are: Purchase Org, Amount, Currency Lower B, PIR-ID, price based quantity and Price based quantity UoM.
    I added some extra fields (non qualified), to accompany the remaining info record data (product no. u2013 vendor id  u2013 product category)  which is exported/imported, via the standard extraction program in R/3: Tcode MECCM
    I tried the solution Ravi proposed. This scenario works fine when, for example you want to maintain multiple info records for one specific material record in the main table (all info records related to the same source of supply, i.e. vendor). But as I described, the info records we import for one product can have different vendors. 
    The source of supply (vendor) in the shopping cart of SRM is determined via the u2018supplieru2019 field in the main repository table (which is in itself a flat lookup table ). What happens now is that all related info records are added to the u2018price informationu2019 field of the specific product record in the main table. Thus info records which have different suppliers are attached to a record in the main table which will have one specific supplier in the u2018supplieru2019 field. So from my point of view this will not work.
    I am still stuck with the situation that the material master import will only import one record for every distinct product, which can have multiple info records. The info records can/will have different vendors. As the supplier field in the main table determines the source of supply in the shopping cartu2026. Iu2019am seeking for a solution which will duplicate the material records in the main table, based on the amount of imported info records for that specific material record, that have distinct vendors.
    Shai, if you have some useful info on how you accomplished this requirement on a previous version of SRM-MDM, it would be greatly appreciated if you can share it..
    Thx.
    Skander

  • Duty calculation for import PO for a specific material group

    Hi All,
    As per company requirement, we need to do changes in duty calculation for import PO for a specific material group.
    Current scenario :  Currently  duty calculating on MRP with abatement  35% ( We have ABTT condition @ 35% of MRP).
    For example:
    Material: ABC , Basic Price = 1000, MRP = 2000 and duty is 10%
    Duty  Amt = 2000(MRP) - 700(35% ABTT) *10%(Duty) = 130
    Cess 2 % = 2.6
    Ecess 1 % = 1.3
    Total duty =  133.9
    This duty (133.9) paid to custom vendor and loads in material cost.
    New Requirement:  For vendor payment purpose duty should be calculate as above but  for material cost should be calculated on Basic price.
    For Example:    
    Material: ABC , Basic Price = 1000, MRP = 2000 and duty is 10%
    Duty  Amt = 1000(BP) *10%(Duty) = 100
    Cess 2 % = 2
    Ecess 1 % = 1
    Total duty =  103 ( It should load in Material cost)
    New Condition Diff Duty Amt = (1300-1000)*10% = 30
    Cess 2 % = .6
    Ecess 1 % = .3
    Diff Duty Amt = 30.9 ( It should not be added in material Cost)
    Paid to custom vendor = 103 + 30.9 = 133.9
    Kindly suggest how to achieve this.
    Regards
    Jitendra

    Hi,
       Please check whether the requirement is logical or not.  Did you check the requirement with your accounts team?
       If you have different duty calculation for MIGO and MIRO, how the GL accounts will get balanced? As of my understanding, the requirement is clearly not logical.
    Regards,
    AKPT

Maybe you are looking for

  • Is in PI7.1 possible asynchronous communication between SOAP and ABAPProxy?

    Hi, when method execute_asynchronous has disapeared since XI/PI 7.1, is there still way how to use ABAP proxy in asynchronous way? We need to build asynchronous connection SOAP->PI->ABAP_Proxy. In PI, both interfaces are defined as asynchronous (outb

  • How do I install Quark 7.2 on iMac 10.4.9?

    Installer crashes as Quark tries to install. I have tried a "safe boot" install, a "new user" install, checking the "rosetta" box, getting another version from Quark- NOTHING. Previously, I transferred files from a laptop to this iMac, including an o

  • Create new system and client with TDMS

    Hi all; I am tested the TDMS product with good results. I want create a new system and do one copy with time reduction time for new development system What it´s the best solution? - Install new system and do the client copy with TDMS or - System copy

  • IMac screen is dark

    The screen is dark on my 2006 iMac.  Is there a way to reset or do I need a new part?  Also, what cable do I need to connect it to a MacBook Pro to recover data?

  • IMac is very hot top half of machine

    I was wondering if anyone out there has a new 24" aluminum frame iMac and has noticed that the aluminum chassis gets very hot, and I do mean hot. I was wondering whether Apple intentionally went to the aluminum frame so that it would act as a heat si