MM02 - MRP1 view

Hi,
I am running BDC to change DISMM (MRP type), MINBE (Reorder Point), DISLS (Lot size), MABST (Maximum Stock Level).
I am getting the error while processing the session,
"Input value is longer than screen field" for MABST field.
Any suggestions please...
Thanks in advance,
KC

Hi,
Please, go through code,
data: begin of it_mrp occurs 0,
      MATNR like RMMG1-MATNR,
      WERKS like RMMG1-WERKS,
      MAKTX like MAKT-MAKTX,
      DISMM like MARC-DISMM,
      MINBE like MARC-MINBE,
      DISLS like MARC-DISLS,
      MABST like MARC-MABST,
      end of it_mrp.
loop at it_mrp.
perform bdc_dynpro      using 'SAPLMGMM' '0060'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-MATNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=AUSW'.
perform bdc_field       using 'RMMG1-MATNR' it_mrp-matnr.
                             '1087'.
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(06)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SCHL'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(06)'
                              'X'.
perform bdc_dynpro      using 'SAPLMGMM' '0080'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-WERKS'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'RMMG1-WERKS' it_mrp-werks.
                             '1000'.
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'MAKT-MAKTX' it_mrp-maktx.
                             'Connecting Rod'.
*perform bdc_field       using 'MARA-MEINS'
                             'PC'.
*perform bdc_field       using 'MARC-DISGR'
                             'PP01'.
perform bdc_field       using 'MARC-DISMM' it_mrp-dismm.
                             'V1'.
perform bdc_field       using 'MARC-MINBE' it_mrp-minbe.
                             '1'.
*perform bdc_field       using 'MARC-DISPO'
                             '000'.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-MABST'.
perform bdc_field       using 'MARC-DISLS' it_mrp-disls.
                             'HB'.
perform bdc_field       using 'MARC-MABST' it_mrp-mabst.
                             '5'.
perform bdc_dynpro      using 'SAPLSPO1' '0300'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_transaction.
endloop.
Thanks,
KC

Similar Messages

  • BDC- To add ABC indicator in MM02-- MRP1

    Hi,
    I am working on BDC- To add ABC indicator in MM02--> MRP1.
    Problem -->
    In some material+ plant  - Reorder point is there. In this case I need to take additional 'BDC_okcode' for ENTER.
    HOW CAN I DO THIS? 
    I tried it with 'Select statement' between the Perform statement, but it's not working?
    IF wa_file-matnr IS NOT INITIAL.
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '0060'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RMMG1-MATNR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTR'.
          PERFORM bdc_field       USING 'RMMG1-MATNR'
                                        wa_file-matnr.
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '0070'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'MSICHTAUSW-DYTXT(11)'.
          PERFORM bdc_field       USING 'MSICHTAUSW-KZSEL(11)'
                                         'X'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTR'.
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '0080'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RMMG1-WERKS'.
          PERFORM bdc_field       USING 'RMMG1-WERKS'
                                        wa_file-werks.
          PERFORM bdc_dynpro      USING 'SAPLMGMM' '4000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BU'.
          PERFORM bdc_field       USING 'MARC-MAABC'
                                        wa_file-maabc.
          SELECT SINGLE minbe INTO v_minbe FROM marc
                       WHERE matnr = wa_file-matnr
                         AND werks = wa_file-werks.
          IF v_minbe GT 0.
            PERFORM bdc_field     USING 'BDC_OKCODE'
                                        '/00'.
          ENDIF.
        ENDIF.
        CALL TRANSACTION 'MM02' USING it_bdcdata MODE p_mode MESSAGES INTO it_msg.

    Hi,
    Try to use Bapi and see ..Please find the sample code.
    LOOP AT t_itab INTO wa_itab.
        CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
          EXPORTING
            input        = wa_itab-matnr
          IMPORTING
            output       = wa_headdata-material
          EXCEPTIONS
            length_error = 1
            OTHERS       = 2.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    prepare the follwing structres ( plantdata,headdata, plantdatax)       .
    * Select the MRP view
        wa_headdata-mrp_view =  'X'.
    * Call the Bapi to create the MRP view.
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
          EXPORTING
            headdata       = wa_headdata
            plantdata      = wa_plantdata
            plantdatax     = wa_plantdatax
          TABLES
            returnmessages = t_return.
    ENDLOOP
    Regards,
    Nagaraj

  • MRP group field can not be displayed in MRP1 view

    Hi all
    MRP group field can not be displayed in MRP1 view
    please guide me
    thx

    Hi avinash
    consulte your MM guy material master screen group and selection is done by MM guys in general. There they can do setting for this.
    Also why you need MRP group. If it is maintained. It should be done properly otherwise it will create lot of problems.
    Regards
    J . Saravan

  • Delete a planned order for materials changed to ND (No planning) MRP1 view

    Hi guys !
    1. I changed the MRP Type "reorder point" to "no planning" (ND indicator in MRP1 view) for some materials.
    2. ¿There is a process to regenerate or delete the planned order created before or have to be a manual process, for example from MD15?
    Regards & thanks in advanced !

    >
    FRANCISCO RODRIGUEZ wrote:
    > Dear  kumar kumar,
    >
    > Before put the question, i was testing the MRP with delete & create new planned order but it doesnt work..why? because when you changed the material to ND, the MRP transactions like MD01, MD02, MD03, send a error message: "Material not plannig" so they does not consider the material anymore.
    >
    >  Definitly, i think to delete in a manual process (MD15).
    >
    > Thanks to everybody.
    Dear,
    even i know ND will not plan ( MRP )
    My view was before changing to ND, delete the existing header material demand & Run MRP
    with option 3, so that system will delete all plan orders of this material ( No Manual process )
    Anyways Good Luck !!!
    Regards
    Madhu

  • Maximium lot  size is 200 in MRP1 view.I have purchase order which 400 qty

    Maximium lot  size is 200 in MRP1 view.I have purchase order which 400 qty , but my system is allowing to  pick 400 qty, can you please say wat may be the reason
    regards
    sakthi

    Hello,
    As others others experts are saying your maximum lot size will only work for MRP run not for manual created PR.
    The system takes this value into account during the automatic lot size calculation for planned orders and production orders. The lot size of the individual orders cannot exceed this value
    Regards.
    Alok Tiwari

  • How to add  subscreen(mrp area)  to mrp1 view

    Hello SAP GURUS,
      while creating the material with FERT material type, i found that there was no subscreen containing data for mrp area in mrp1 view.How to add this subscreen in mrp1 view.
        I checked all the customization data like maintain screen sequence order,assign material type, industry sector and all to the screen sequence reference.Everything is there,than also couldn't manage.
         So if you know the process than plz share.

    Hi,
    The below link may be useful.
    https://wiki.sdn.sap.com/wiki/display/ABAP/ABAPDevelopmentand+Programming
    (At the end of the Page) In this all the pages of MM01_Screen Exit PArt 1 and Part2 are useful..
    If you click on any one of thm it will lead you to the Attachments where in you can look into all the attachments..
    Regards,
    Siva

  • MM02 Select View option releated

    I would like to confirm my understanding regarding MM02 Select View popup screen where we get list of views like Basic data1, MRP 1, etc.
    Is this views are only controlled in OMS2 and OMT3E for one particular material type?
    Is there anyway where we can restrict these number of views  to any specific user, if this can be done how these can be restricted?
    Thank you very much
    Regards,
    Arvind

    Hi,
    1) control though spro
    You can control the view through Logistics general--> Material master >Configuring material master> User setting.
    Here you can select the User name & then select the view selection--> list of screen.
    you can select the which you want control
    2) better control form authorization object
    restrict by authorization object:
    M_MATE_STA ( for particular view authorization )
    M_MATE_MAR with  ( for particular material type authorization)

  • How to get the list data in MM01/MM02 Classification view

    Hi,
    Anyone know the FM that we use for getting the list in Clasification View of MM01/MM02?
    Thanks,
    Alfred

    hii,
    U can use the below fm to get the classification view in MM02..
    CLFM_OBJECT_CLASSIFICATION
    CLFM_OBJECTS_CLASSIFICATION
    BAPI_OBJCL_CREATE_KEY
    CLFM_CLASS_CLASSIFICATION
    or if u want data from classificaton view then use this function module.
    CLAF_CLASSIFICATION_OF_OBJECTS
    Regards,
    Anil N.

  • MM02 - MRP view - III

    Hi,
    I am  changing some of the fields in MRP view of MM02 transaction using a BDC program, while doing recording, the MRP view is of VIEW number 06 in the list of views.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(06)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SCHL'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(06)'
                                  'X'.
    But for some materials this  'MSICHTAUSW-KZSEL(06)', is going to some other views instead of MRP view.
    In any way, can we define the MRP view name instead of giving the view number as 06.
    Thanks in advance,
    KC

    Hi,
    Please check this sample code on how to find views number in MM02.
    TABLES : t130m,
                   t134.
    DATA: kstatus LIKE t130m-pstat,
    hstatus LIKE t130m-pstat,
    tkstatus LIKE t130m-pstat,
    bildsequenz LIKE t133k-bilds,
    berecht_akt(2) TYPE c.
    DATA: BEGIN OF ztab_new OCCURS 30.
    INCLUDE STRUCTURE mbildtab.
    DATA: END OF ztab_new.
    CLEAR t134.
    SELECT SINGLE * FROM t134 WHERE mtart = <mtart>.
    CALL FUNCTION 'MATERIAL_INIT'
    EXPORTING
    tcode = 'MM01' or MM02
    kz_berprf = 'X'
    IMPORTING
    it130m = t130m
    tkstatus = tkstatus
    EXCEPTIONS
    no_authority = 1
    wrong_call = 2
    kstatus_empty = 3
    tkstatus_empty = 4
    aktyp_tcode_mismatch = 5
    tcode_not_found = 6
    material_article_mismatch = 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.
    CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'
    EXPORTING
    materialart = 'HALB' "Material Type
    tcode_ref = t130m-trref
    IMPORTING
    bildsequenz = bildsequenz.
    CALL FUNCTION 'SELECTION_VIEWS_FIND'
    EXPORTING
    bildsequenz = bildsequenz
    pflegestatus = t134-pstat "tkstatus
    TABLES
    bildtab = gt_bild
    EXCEPTIONS
    call_wrong = 1
    empty_selection = 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.
    http://sap4.com/contentid-110.html
    Also you can check  view VCM_T133A or tables T133A and T133B.
    Regards,
    Ferry Lianto

  • Mm01/mm02 different views, bdc

    Hello Abapers,
    Is there a table that we can query, or a function that we can use to find out what views and only the applicable views (e.g. Basic Data 1, Basic Data 2, Purchasing, MRP 1, etc.) that are available for a certain material?
    Any help would be much appreciated. Thanks.

    Hello,
    MARC-PSTAT will contain the information for the material and the views associated with it. For eg.
    000000000000216038   3100   DEALSVQBG
    For each view it will have a single letter associated with it.
    A  Work scheduling
    B  Accounting
    C  Classification
    D  MRP
    E  Purchasing
    F  Production resources/tools
    G  Costing
    K  Basic data
    L  Storage
    P  Forecasting
    Q  Quality management
    S  Warehouse management
    V  Sales
    X  Plant stocks
    Z  Storage location stocks
    I thought you were using a bdc and wanted to use a view if it was present or not.
    Regards,
    Shekhar KUlkarni

  • Mandatory check for ABC Indicator- MRP1 view

    Dear All,
    I want to make ABC Indicator mandatory for ROH material type and to the particular plant. How can I achieve this?
    I tried to change in customization (Change 'Field selection for data screens' ), but its effecting other fields also. because in the field selection group 51 has so many other fields.
    Should I have to create new field section group & field reference Or any other way? Need your valuable guidance.
    Thanks.

    hi Vijay,
    if you want to control it thru configuration then you have to create a new field selection group and then you can make the ABC indicator mandatory.
    you can also use the user exit in material master which will throw an error message at the time of saving of material master if the ABC indicator field is blank.
    Regards,
    Anoop singh

  • MM02 Sales view - Create new Cross distribution chain material status

    Dear Gurus,
    I need to CREATE new:
    - Distribution chain specific material status
    - Cross distribution chain material status
    Can anyone please help urgently on this?
    Many thanks for your help
    Kind regards
    Chris

    IMG > Logistics general > Material Master > Settings for Key Fields > Data Relevant to Sales and Distribution > Define Sales Statuses

  • Can not change the ABC indicator in Material master MRP1 View?

    Hi All,
    I could not change the ABC indicator in Material master for material X. Could some one please specify the condition or prerquisit for making chnages in ABC indicator?

    Hi Animesh,
    In Logistics Information system , ABC analysis can being done  and results updated in Material master for ABC indicator by background job run.
    The relevant transaction is MC40  ( Total Analysis) .
    This transaction when run in backgroung with field "Update ABC Ind.in background processing mode" clicked, will update the ABC indicator appropriately.
    You can find different criteria based on which A, B,C is decided.
    I hope this will be useful to you.
    Please check and confirm.
    Regards
    Datta

  • Query for MRP Purchase Requisition

    Hi Gurus,
    Currently system is creating Purchase requisition for BOM Material, which I don't want system should create PR for this material.
    I know MRP type ND but i need someother ways to stop it
    Appricate your response
    Thanks
    Sastry

    Hi,
    You can try the following option-
    1) Tcode - MM02-> MRP1 view - > Plant sp-matl status - 01 ( Blocked for procment/whse)
    2) Tcode - MM02-> MRP2 view - > Procurement type - Blank(No procurement)
    Sudarshan

  • Planning run with NETPL

    Hello Friends,
    I am using NETPL planning run and planning horizon is 3 months. I have a material for which requirement exists in Oct 2011.
    When I saw the planning file entry I saw only NETCH is ticked and not NETPL. Till this point is okay.
    But when I execute the MD03 with NETPL, system is creating purchase requisition for this requirement.Actually system should not have created the PR. I can understand the system creating the PR with NETCH. Please explaing why this is happening.
    Thanks,
    PL

    Dear ,
    Fundamentally , if you are using NETPL in MD03/MD02/MD01 , then any requirement with thin 3 months of Planning horizon should be planned only and will not cosider the requiirement beyond PH.
    Please check the following :
    1.Check in OMDX-What is the Planning Horizon ?
    2.Did you maintain MRP group  in  MMR -MM02-MRP1 view ??  If you are using MRP group and defined a Planning Horizon for this MRP group, then the priority will be for the Planning Horizon pertaining to MRP group rather than the Planning Horizon pertaining to Plant.Just check the planning file entries. I think these materials must be having planning file entry with NETCH so it will not consider the total planning horizon even kept in OMDX.
    3.What is the Re-scheudling Hozon kept in OPPQ-Define Carry all over all plant parameters?? Did you select Create Purchase Req Indicator as 2 OR 1 ??   Please refer this thread : MRP run creating extra proposals
    4.Compare the Factory Calander set up with holidays for that particualr Planning Hozon period  in work days .Even it is not that important .
    I suspect the NETCH in planning file entery where as you r planning with NETPL.
    Check all those points  and come back .
    Regards
    JH

Maybe you are looking for