cancel
Showing results for 
Search instead for 
Did you mean: 

i want to open mm03 with material no. when i enter in screen no. 100 . in module pool programming

former_member809080
Participant
0 Kudos
<br>TYPES: BEGIN OF st_mara,<br><br>         ernam TYPE mara-ernam,<br>         mtart TYPE mara-mtart,<br>         matkl TYPE mara-matkl,<br>       END OF st_mara.<br><br>TYPES: BEGIN OF st_ekko,<br>         bukrs TYPE ekko-bukrs,<br>         bstyp TYPE ekko-bstyp,<br>         bsart TYPE ekko-bsart,<br>       END OF st_ekko.<br><br>TYPES: BEGIN OF st_vbak,<br>         auart TYPE vbak-auart,<br>         vkorg TYPE vbak-vkorg,<br>         vtweg TYPE vbak-vtweg,<br><br>       END OF st_vbak.<br><br>DATA: wa_mara TYPE ST_MARA,<br>      WA_EKKO TYPE ST_EKKO,<br>      WA_VBAK TYPE ST_VBAK.<br><br>DATA: IN_MATNR TYPE MARA-MATNR,<br>      IN_EBELN TYPE EKKO-ebeln,<br>      IN_VBELN TYPE VBAK-vbeln.<br><br>MODULE status_0100 OUTPUT.<br>  SET PF-STATUS 'BACK'.<br>*  SET TITLEBAR 'xxx'.<br>ENDMODULE.<br><br>MODULE user_command_0100 INPUT.<br><br> CASE SY-UCOMM .<br><br>   WHEN 'BACK'.<br>     LEAVE PROGRAM.<br><br>   WHEN 'DISPLAY1' .<br><br>         CALL FUNCTION 'CONVERSION_EXIT_ALZSN_INPUT'<br>        EXPORTING<br>          input  = in_matnr<br>        IMPORTING<br>          output = in_matnr.<br>     SELECT SINGLE<br><br>                       ernam<br>                       mtart<br>                       matkl<br>                               FROM mara INTO CORRESPONDING FIELDS OF wa_mara<br>                               WHERE matnr = in_matnr.<br><br>   IF sy-subrc = 0.<br>        CALL SCREEN 200.<br><br>      ELSE.<br>        MESSAGE 'DATA NOT FOUND' TYPE 'I'.<br>      ENDIF.<br><br>      WHEN 'DISPLAY2'.<br><br>    SELECT SINGLE  BUKRS<br>                 BSTYP<br>                 BSART FROM EKKO INTO CORRESPONDING FIELDS OF WA_EKKO<br>                 WHERE EBELN = IN_EBELN.<br><br>      IF SY-SUBRC = 0.<br>        CALL SCREEN 300.<br>      ELSE.<br>        MESSAGE 'DATA NOT FOUND' TYPE 'I'.<br>      ENDIF.<br><br>      WHEN 'DISPLAY3'.<br><br>        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'<br>  EXPORTING<br>    input         = IN_VBELN<br> IMPORTING<br>   OUTPUT        = IN_VBELN<br>          .<br><br>      SELECT SINGLE auart<br>                    vkorg<br>                    vtweg FROM vbak INTO wa_vbak WHERE vbeln = in_vbeln.<br><br>      IF sy-subrc = 0.<br>        CALL SCREEN 400.<br>      ELSE.<br>        MESSAGE 'DATA NOT FOUND' TYPE 'I'.<br>      ENDIF.<br>ENDCASE.<br><br>ENDMODULE.<br>MODULE user_command_0200 INPUT.<br>  CASE  SY-UCOMM.<br>   WHEN 'BACK'.<br>     LEAVE PROGRAM.<br><br>    WHEN 'DIS1'.<br>  CALL TRANSACTION 'MM03' .<br>            WHEN 'B1'.<br>      CALL SCREEN 100.<br><br>  ENDCASE.<br><br>ENDMODULE.<br><br>MODULE user_command_0300 INPUT.<br><br>  CASE SY-UCOMM.<br>    WHEN 'BACK'.<br>     LEAVE PROGRAM.<br><br>    WHEN 'DIS2'.<br>      CALL TRANSACTION 'ME23N'.<br>    WHEN 'B2'.<br>      CALL SCREEN 100.<br><br>  ENDCASE.<br><br>ENDMODULE.<br><br>MODULE user_command_0400 INPUT.<br><br>  CASE SY-UCOMM.<br>    WHEN 'BACK'.<br>     LEAVE PROGRAM.<br><br>     WHEN 'DIS3'.<br>       CALL TRANSACTION 'VA03'.<br>       WHEN 'B3'.<br>      CALL SCREEN 100.<br>      ENDCASE.<br><br>ENDMODULE.
Sandra_Rossi
Active Contributor

Position cursor on MM03 material field > press F1 > button "technical info" > you can see a parameter ID.

Use ABAP statement SET PARAMETER to set the value you want before CALL TRANSACTION.

Works most of the time anywhere.

Accepted Solutions (0)

Answers (0)