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

Similar Messages

  • MRP views in MM02

    I need to create a Screen Variant  and apply to a Z transaction which only allows users access to change MRP Information u2013 MRP1, MRP2, MRP3 and MRP4 tabs. in the Material Master.
    I do not want to give everyone access to MM02 u2013 Change Material Master as this allows them to change all master data within the Material.
    I only want them to be able to change MRP1, MRP2, MRP3 and MRP4 tabs.
    How to make the screen variant for this. I haven't worked on screen variants..Just need details on that. Please help.
    Edited by: yorker on Jun 27, 2011 9:08 AM

    Hi,
    No need of creating any Trasnaction/Screen Variant
    Go to OMT3B - Copy New Screen Seq from 21 and under "Data screens" delete all except MRP.
    Now Go to OMT3E - Here under "User screen reference", assign a Key to all user whom you want to give change option for MRP views. Now In Screen Seq Control Screen, maintain an entry with SRef; Trans as MM02, SRef: User as that Key, SRef: mat Type as *, SRef: Industry as * and assign the new Screen Seq.
    Now Check in MM02.

  • BDC for MM02 - MRP area

    Hello everyone!
    I have developed a BDC program to batch input data into MM02 / MRP area.
    It's working perfectly fine when I use mode 'A' in CALL TRANSACTION statement, but when I change it to 'N', so I can give this for the customer to test, it stops working, giving me an error in one of the screens, saying the "MRP area  is not assigned to plant CH01" (when running with mode "E" it also gives me the error).
    Here's my coding:
    REPORT  zload_mrp_areas.
    Data and variables definition
    DATA:  bdcdata    LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_header OCCURS 0,
            link      LIKE mara-matnr,
            matnr     LIKE mara-matnr,
            werks     LIKE marc-werks,
            mstae(2)  TYPE c,
            perkz(2)  TYPE c,
          END OF t_header.
    DATA: BEGIN OF t_details OCCURS 0,
            muvbr(5)  TYPE c,
            unvbr(5)  TYPE c,
            matnr     LIKE mara-matnr,
            priod(6)  TYPE c,
            gsvbr(5)  TYPE c,
          END OF t_details.
    DATA: v_count(3)  TYPE n,
          v_week      LIKE scal-week,
          v_week1(6)  TYPE n,
          v_week2(6)  TYPE n,
          v_page(5)   TYPE p DECIMALS 2,
          v_index(3)  TYPE n,
          v_field(19) TYPE c,
          v_mode      TYPE c,
          v_date1     LIKE sy-datum,
          v_date2     LIKE sy-datum,
          v_date3     TYPE i.
    Screen definition
    SELECTION-SCREEN  BEGIN OF BLOCK 1 WITH FRAME TITLE text-001.
    PARAMETERS: headfile     LIKE rfpdo1-febauszf OBLIGATORY,
                detsfile     LIKE rfpdo1-febauszf OBLIGATORY.
    SELECTION-SCREEN  END OF BLOCK 1.
    File selection
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR headfile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          mask      = ',Multicash,*.txt'
          static    = 'X'
        CHANGING
          file_name = headfile.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR detsfile.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          mask      = ',Multicash,*.txt'
          static    = 'X'
        CHANGING
          file_name = detsfile.
    START-OF-SELECTION                                           *
    START-OF-SELECTION.
    Load files
      PERFORM load_files.
      PERFORM process_file.
    *&      Form  LOAD_FILES
          Load files from network to SAP
    FORM load_files .
    File upload
      DATA: l_filename TYPE string.
      l_filename = headfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = l_filename
          filetype            = 'ASC'
        TABLES
          data_tab            = t_header.
      IF sy-subrc <> 0.
      ENDIF.
      l_filename = detsfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = l_filename
          filetype            = 'ASC'
        TABLES
          data_tab            = t_details.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " LOAD_FILES
    *&      Form  process_file
          Load files into Material Master
    FORM process_file .
      LOOP AT t_header.
        REFRESH bdcdata.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0060'.
        PERFORM bdc_field   USING 'RMMG1-MATNR'     t_header-matnr.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '/00'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0070'.
        PERFORM bdc_field   USING 'BDC_OKCODE'       '=SELA'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0070'.
        PERFORM bdc_field   USING 'BDC_OKCODE'       '=ENTR'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '0080'.
        PERFORM bdc_field   USING 'RMMG1-WERKS'     t_header-werks.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=ENTR'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4004'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=SP12'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4000'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=PB42'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0010'.
       PERFORM bdc_field   USING 'SMDMA-BERID(01)' 'X'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=AEND'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=SP04'.
        CLEAR v_week.
        CALL FUNCTION 'GET_WEEK_INFO_BASED_ON_DATE'
          EXPORTING
            date = sy-datum
          IMPORTING
            week = v_week.
        CALL FUNCTION 'WEEK_GET_FIRST_DAY'
          EXPORTING
            week = v_week
          IMPORTING
            date = v_date1.
        LOOP AT t_details WHERE matnr = t_header-matnr.
          CLEAR: v_week1, v_week2.
          v_week1 = v_week.
          v_week  = t_details-priod.
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
            EXPORTING
              week = v_week
            IMPORTING
              date = v_date2.
          v_date3 = v_date1 - v_date2.
          v_page  = v_date3 / 7.
          IF v_page > 11.
            v_index = v_page MOD 11.
            v_page  = v_page / 11.
            COMPUTE v_count = TRUNC( v_page ).
          ELSE.
            v_index = v_page.
          ENDIF.
          IF v_index IS INITIAL.
            v_index = 11.
            v_count = v_count - 1.
          ELSE.
            v_index = v_index + 1.
          ENDIF.
    Paging
          IF v_count NE 0.
            v_count = v_count + 1.
            DO v_count TIMES.
              PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
              PERFORM bdc_field   USING 'BDC_OKCODE'      '=P-'.
            ENDDO.
            PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
            PERFORM bdc_field   USING 'BDC_OKCODE'      '=P++'.
            v_count = v_count - 1.
            DO v_count TIMES.
              PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
              PERFORM bdc_field   USING 'BDC_OKCODE'      '=P-'.
            ENDDO.
          ENDIF.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          v_field = 'RM03M_DB-KOVBW(*)'.
          REPLACE '*' WITH v_index INTO v_field.
          PERFORM bdc_field   USING v_field     t_details-muvbr.
          v_field = 'RM03M_DB-VBWRT(*)'.
          REPLACE '*' WITH v_index INTO v_field.
          PERFORM bdc_field   USING v_field     t_details-unvbr.
         PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '=WEIT'.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '/00'.
          PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
          PERFORM bdc_field   USING 'BDC_OKCODE'      '=P++'.
        ENDLOOP.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0020'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=UEBE'.
        PERFORM bdc_dynpro  USING 'SAPLMD_MGD1'     '0010'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=UEBE'.
        PERFORM bdc_dynpro  USING 'SAPLMGMM'        '4000'.
        PERFORM bdc_field   USING 'BDC_OKCODE'      '=BU'.
        DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
        v_mode = 'N'.
        CALL TRANSACTION 'MM02' USING bdcdata
                       MODE   v_mode
                       UPDATE 'S'
                       MESSAGES INTO ITAB.
        if sy-subrc is initial.
        endif.
      ENDLOOP.
    ENDFORM.                    " process_file
    *&      Form  BDC_DYNPRO
          text
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
    *&      Form  BDC_FIELD
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    Can anyone help? Please!
    Thanks and regards,
    Fernanda

    You are trying to access one of the MRP area which is not yet assigned to CH01 plant. You need to make sure wheather the MRP view was already created for that material for CH01 plant.
    So, first check your data against the MARC for material and plant. If you don't fine any material for that plant than don't run BDC for that plant.
    Regards,
    Naimesh Patel

  • Finding if mrp view exists

    hi
    i am working on an enhancement within cif to transfer material master in ecc to scm .
    i need to check if mrp view exists or no for every material transferred.
    now how do i do this coding wise ?  which field or table do i need to check if mrp view has been defined or no.

    Hi,
    Use FM 'SELECTION_VIEWS_FIND'
    Check below thread
    Select a specific view in MM02/MM01
    https://forums.sdn.sap.com/click.jspa?searchID=6788689&messageID=4407517
    Regards,
    Atish
    Message was edited by:
            Atish Sarda

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

  • MRP view in material master creation

    Hi Guys,
    Can anyone tell me how to change the settings for field dependency. My requirement is to use only the filed for "reorder point" in MRP view and do not enter any other data like MRP type or lot sizing etc.
    I have tried changing the setting for field selection group for MRP type etc but whenever i enter the value in Reorder point field it asks me for MRP type and does not allow me proceed...
    Thank you for your help.
    Regards,
    Siddharth

    Hi
    You cannot change that dependency as it is done through program code and not thru config.
    If you want reorder point only as an info field and not for actual Reorder point planning, I suggest you to explore any other unused information field in the masterial master.
    You can also use classification
    Best regards
    Ramki

  • Material Master MRP View not be created till Basiv View is created

    Hello All,
    I need an information where i would like to know if an MRP view in a Material master can be restricted without the creation of the Basic View. Basically an MRP view is getting created even though the Basic View of material master is not there and it needs to be stopped.
    Thanks for your inputs.
    Ismail

    Dear Syed ,
    If you want to prevent end users update other material master views , you can apply the concept of SAP note 545380 - FAQ: Authorizations material master , with this you will not more problem with this kind of problem.
    Hope this can help you.
    Please let me know if my thinking about your question is correct.
    best regards,
    Carlos Moçatto

  • Special Procurement MRP View VS. Costing View

    Hi Experts,
    What's the difference between the 2 Special Procurement Key in the MRP veiw and the Costing View?  Should they always be the same?
    Thanks,
    Kumar

    Hi,
    MRP:
    You use special procurement when you want to be able to override the procurement type in the material master or define the procurement type more precisely.
    If the procurement type is in-house, you can nevertheless force the system to ignore the BOM and routing, and process the material as if it were externally procured, by specifying the special procurement as external.
    Costing:
    If you enter a special procurement type in the Costing view of the material master record, it will be used in costing.
    If you do not enter a special procurement type in the costing view of the material master record, the system will use the special procurement type in the MRP view.
    For further Clarification revert.
    Regards,
    S.Babu

  • MRP view maintenance

    Hi All,
    I have developed a programme to uplaod MRP views for huge number of materials across Plants.
    There are few material for which one strange thing is observed
    1. Material A plant 1-MSTA -D not mantained, but the same is there in MM01
    2..MaterialA plant 2-MSTA-D maintained and its maintained in MM01.
    Is MRP maintained on the basis of Plant or Storage location or both...because my programme is looking at material plant combination level and uploading the MRP as per maintenance status maintained in table MSTA.
    But in above case, it gave an error probably  because for one storage location MRP was maintained  and for other not...
    Can you all throw some light on this....
    Regards,
    Satyendra

    One thing i missed...there are few plants for which above things are appearing for all the materials...
    i.e MRP view maintained in MM03 but for the same materials MSTA doesnt have D status for those plants..
    Regards,
    Shailesh

  • MRP view maintenance for Material Master

    What is the basic entry for R3 material master, if, I want EBP below condition works:
    Stock in R/3 sufficient: Shopping Carts creates MatReservation.
    Stock in R/3 not sufficient: Shopping Cart still creates MatReservation, and when run MRP (in R/3), it gives Purchase Requisition, with the exact shortage qty.
    Info: We have set customizing in EBP so that every follow-on document for Shopping Cart will be Reservation.
    -Mimi-

    In R/3  , the material should have MRP view and all planning related settings ...
    wr u want to go for consumption based planning or deterministic planning .
    Based on the planning procedure setting in MRP views of the R/3 sytem , PRs will get generated.
    This is what u are looking for .. otherwise post your feedback...
    Regards
    Mani

  • New lot size in MRP view

    Hi ALL
    Any one can suggest how can we configure a new lot size for  MRP view in ECC.
    regards
    Vikas

    Hello Vikas,
    I am not too sure ? Can you not change the field ? It doesnot need any cofiguration on the MRP view level. The value needs to be set
    Thanks
    Amber

  • How to delete MRP view data after create in Material master data ?

    Hi all ,
          After user  create a useless MRP view data in Material master data , how to remove it ?

    Hi
    Material master once created cannot be deleted.Only thing u can do is to mark it for deletion
    Go to Logistics > Materials management > Material master > Material > Flag for deletion > Immediately.
    Give the necessary data that is needed for the view you want to delete.
    Press and flag the view you want to delete.
    Now the view is flagged for deletion. This means that it's use is limited and it will be cleaned up or really deleted at the next clean up of the system.
    regards
    Anand

  • How to create MRP view using BO BUS1001006 & Method CreateViews.

    Guys,
    I need to create MRP view using BO BUS1001006 & Method CreateViews.
    i am not able to unterstand, what i need to specify to create MRP view, other than material number.
    what field i need to send for MRP view.
    Regards.
    santosh.
    Edited by: santosh koraddi on Jun 23, 2010 6:14 PM

    Hi,
    I have a similar question, have done a search and I see this sort of thing has come up a few times but with no definitive answer.... this thread seems close but don't really understand the solution (I'm not an ABAPER)
    I have a material master creation workflow under construction, it uses BUS1001006 and method createviews.
    The issues is that I want to restrict creation of certain views to certain agents, I have a fork in my workflow and its meant to split up the various views for various agents.
    The problem is that if an agent in one of the forks completes their views the workflow tries to get them to completes teh other views which they do not have authoisation to do... anyway the end result is that the workflow thinks all teh views have been created and the workflow items dissappear from the others inboxes.
    How do I setup my workflow such that each agent in each fork only has to complete the views they have authorisation to maintain and leaves work items in the inboxes of other agents for them to complete?

  • MRP view in MM60 list

    Dear pandits,
    I am doing material plant extn. thro lsmw from plant x to plant y.
    Could I fetch following MRP views aprat from  MRP type (appearing already .)
    reorder point,  MINBE
    mrp controller, DISPO
    lot size , DISLS
    maximum stock level MABST
    thanks
    v balajee

    Hi ,
    I think u will not all these fields in MM60 report.
    All these fields u will get in MARC TABLE,go to se16.give MARC table.In the initial screen,go to settings list format- chosse fields-select all the fileds which u want and enter.
    Then in the initial screen,give plant X and execute.
    U can download all these details to excel sheet and can be used for lsmw.

  • Seasons in MRP view

    Hi,
    My customer wants to view MRP in seasons wise. Is that possible in MRP screen?
    Please let me know if any method available in MRP..
    Thanks,
    Rohith

    Hello Vikas,
    I am not too sure ? Can you not change the field ? It doesnot need any cofiguration on the MRP view level. The value needs to be set
    Thanks
    Amber

Maybe you are looking for

  • Export and Import of data fails

    Hi, Import and Export of data fails. Sometimes the application itself crashes when i try to import data. The error i get while importing data using a rule file is Reading Rule SQL Information For Database [Rev_FLA] Reading Rules From Rule Object For

  • Duplicate schema System.String in BizTalk.System

    Hello, In BizTalk 2010 Administration Console, in BizTalk.System application, I have the schema System.String#string twice (Version=2.0.0.0 and Version=4.0.0.0). And I'm pretty sure that's what cause me this error in my orchestration : There was a fa

  • Switching from wireless g to n rputer

    I have a linksys wrt54gs withh speedbooster g router switching to wrt160n router. When connecting n router I receive error message stating ethernet cables not plugged in, they are plugged in correctly and when I switch back to g router every thing is

  • How To Open A Cursor Using Exec_SQL?

    Declare V_Connection_id Exec_SQL.ConnType; V_CursorID Exec_SQL.CursType; V_SqlStr VarChar2(30000); V_NIgn PLS_Integer; Cursor V_User_Cur Is Select Group_Name From NVS_USERS_VS_GROUPS_VW Where Upper(USR_NAME) = User; Begin V_Connection_id := Exec_SQL.

  • Getting the points on a sphere

    Hi everybody, I'm very new to java 3d so I'm sorry if there's a really simple answer to my question but I'm having no luck so far. I need to work out the length between two points on a sphere and to do this I need to work out the angle between the tw