cancel
Showing results for 
Search instead for 
Did you mean: 

when click on display button it did not open tcode 'ME23N' in module pool programming.

former_member809080
Participant
0 Kudos

TYPES: BEGIN OF st_mara,

ernam TYPE mara-ernam,
mtart TYPE mara-mtart,
matkl TYPE mara-matkl,
END OF st_mara.

TYPES: BEGIN OF st_ekko,
bukrs TYPE ekko-bukrs,
bstyp TYPE ekko-bstyp,
bsart TYPE ekko-bsart,
END OF st_ekko.

TYPES: BEGIN OF st_vbak,
auart TYPE vbak-auart,
vkorg TYPE vbak-vkorg,
vtweg TYPE vbak-vtweg,

END OF st_vbak.

DATA: wa_mara TYPE st_mara,
wa_ekko TYPE st_ekko,
wa_vbak TYPE st_vbak.

DATA: in_matnr TYPE mara-matnr,
in_ebeln TYPE ekko-ebeln,
in_vbeln TYPE vbak-vbeln.

DATA: r1,
r2,
r3.
DATA: gv_screen TYPE sy-dynnr.

MODULE status_0200 OUTPUT.
SET PF-STATUS 'BACK'.

IF r1 IS INITIAL AND r2 IS INITIAL AND r3 IS INITIAL.
r1 = 'X'.
ENDIF.

IF r1 IS NOT INITIAL .
gv_screen = '210'.
ELSEIF r2 IS NOT INITIAL .
gv_screen = '220'.
ELSEIF r3 IS NOT INITIAL .
gv_screen = '230'.
ENDIF.
ENDMODULE.

MODULE user_command_0200 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM .

WHEN 'DIS' .

CALL FUNCTION 'CONVERSION_EXIT_ALZSN_INPUT'
EXPORTING
input = in_matnr
IMPORTING
output = in_matnr.


SELECT SINGLE

ernam
mtart
matkl
FROM mara INTO wa_mara
WHERE matnr = in_matnr.

IF wa_mara IS INITIAL.

SELECT SINGLE bukrs
bstyp
bsart FROM ekko INTO wa_ekko
WHERE ebeln = in_ebeln.

ENDIF.

IF wa_mara IS INITIAL AND wa_ekko IS INITIAL.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = in_vbeln
IMPORTING
output = in_vbeln.

SELECT SINGLE auart
vkorg
vtweg FROM vbak INTO wa_vbak WHERE vbeln = in_vbeln.

ENDIF.

WHEN 'C1'.
CLEAR in_matnr.
CLEAR wa_mara.
CLEAR in_ebeln.
CLEAR WA_EKKO.
CLEAR in_vbeln.
CLEAR wa_vbak.

ENDCASE.
ENDMODULE.

MODULE user_command_0210 INPUT.
CASE sy-ucomm.
WHEN 'DIS1'.
SET PARAMETER ID 'MAT' FIELD in_matnr.
CALL TRANSACTION 'MM03' .
ENDCASE.
ENDMODULE.

MODULE user_command_0220 INPUT.
CASE sy-ucomm.

WHEN 'DIS2'.

SET PARAMETER ID 'BES' FIELD in_ebeln.
CALL TRANSACTION 'ME23N'.

ENDCASE.

ENDMODULE.

MODULE user_command_0230 INPUT.

CASE sy-ucomm.
WHEN 'DIS3'.
SET PARAMETER ID 'AUN' FIELD in_vbeln.
CALL TRANSACTION 'VA03'.

ENDCASE.
ENDMODULE.
Sandra_Rossi
Active Contributor

You could just debug your program and see that it doesn't execute CALL TRANSACTION. So, the title of the question should not contain "did not open tcode 'ME23N'", as it's not the point.

View Entire Topic
former_member809080
Participant
0 Kudos
DISPLAY button is under the document type

former_member809080
Participant
0 Kudos

I Change display name like

DISPLAY = DISPLAY 1.