Passing PID into new MM view

Stiles, Les Les.Stiles at icn.siemens.com
Tue Feb 18 13:56:56 EST 2003


I am having a problem passing the MRP profile PID (DPR) to the MRP view I am
creating.
 
A custom Material Master generic method to create individual MM views was
published by Ronan Fox on this Forum Jan. 16, 2003. It appears to be an
extract of the standard "CreateViews" method of BUS1001006. It works well
for some views but I tried to adapt his method to create individual views
where I needed to pass pertinent PID values (see below).
 
For the MRP view, I wanted to pass the MRP Profile value via PID 'DPR', so I
created a Method Parameter 'ViewProfile' (MARC-DISPR). I pass the profile
value from the Workflow Container to the Task and on to the Method using
User Decision choices to select the desired Container Operation. Thus far I
can create the view but the MRP Profile does not get loaded. Unfortunately I
also am not knowledgeable enough ABAP-wise to determine what I am doing
wrong.
 
Any help would be greatly appreciated,
 
Les Stiles
Systems Analyst, QM & WF
Siemens ICN
400 Rinehart Rd
Lake Mary FL 32746
(407) 942-6777
les.stiles at icn.siemens.com
 
BEGIN_METHOD CREATE_CN_MRP_VIEW CHANGING CONTAINER.
DATA: IT_MOFF TYPE MOFF,
      VIEWPROFILE like MARC-DISPR.
 
  SWC_GET_ELEMENT CONTAINER 'ViewProfile' VIEWPROFILE.
 
    SELECT SINGLE * FROM MOFF INTO IT_MOFF
                              WHERE STATM = 'D'
                              AND   MATNR =  OBJECT-KEY-MATERIAL.
  IF SY-SUBRC IS INITIAL.
    PERFORM CREATE_MRP_VIEW USING IT_MOFF ViewProfile.
  ELSE.
    Call transaction 'MM02' and Skip First Screen.
  ENDIF.
END_METHOD.
 
FORM CREATE_MRP_VIEW USING MOFF STRUCTURE MOFF ViewProfile.
 
    SET PARAMETER ID 'MAT' FIELD OBJECT-KEY-MATERIAL.
    SET PARAMETER ID 'LAG' FIELD ' '.
    SET PARAMETER ID 'DPR' FIELD ViewProfile.
    SET PARAMETER ID 'MTA' FIELD MOFF-MTART.
    SET PARAMETER ID 'MTP' FIELD MOFF-MBRSH.
 
    SET PARAMETER ID 'MXX' FIELD MOFF-STATM. "Sicht-Popup #bergehen
    SET PARAMETER ID 'MM5' FIELD ' '.        "Org-Popup #bergehen
    SET PARAMETER ID 'MM6' FIELD ' '.        "Mat.VB durchlaufen-Flag
 
    CALL TRANSACTION 'MM01' AND SKIP FIRST SCREEN.
ENDFORM.
 


More information about the SAP-WUG mailing list