‎2007 Sep 13 5:41 AM
hi friends!
i used msg id in report program its working fine. but when i used the message-id in include program it shows not asseciable. I need to dispaly the error in module pool program with the help of message id. how can i write the message id in module pool programs.
Regards
vijay
‎2007 Sep 13 10:59 AM
Hi Vijay..
To attach MESSAGE-ID for a Module pool program follow this Step:
Open the TOP include of the Module pool.
You can see the Statement
PROGRAM <MODULEPOOL> .
Attach the Message ID to this ..
PROGRAM <MODULEPOOL> MESSAGE-ID <MESSAGE CLASS>.
Activate the TOP include.
It works....
<b>Reward if Helpful.</b>
‎2007 Sep 13 5:49 AM
Hi
in module pool programing i think you will creat a report program for that
in the declare that message-id
and all the includes will be included in the report program
so no need to write the message id in include program
in report program inclue that include
reward if usefull
‎2007 Sep 13 5:51 AM
Hi
i am sending you the code see it
i had created on module pool programing and the report program is like this
REPORT ZNNR_MODULE NO STANDARD PAGE HEADING MESSAGE-ID ZNNR.
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
*******DELARATIONS
DATA : OKCODE LIKE SY-UCOMM.
TABLES : ZNNR.
*****END OF DECLARATIONS
OKCODE = SY-UCOMM.
CLEAR OKCODE.
CASE SY-UCOMM.
WHEN 'CRT'.
SELECT SINGLE * FROM ZNNR INTO ZNNR WHERE EMPID = ZNNR-EMPID.
IF SY-SUBRC = 0.
MESSAGE E999 WITH TEXT-001.
ENDIF.
*IF SY-SUBRC <> 0.
INSERT INTO ZNNR VALUES ZNNR.
COMMIT WORK AND WAIT.
CLEAR ZNNR.
IF SY-SUBRC = 0 .
MESSAGE S000 with text-002.
ENDIF.
*endif.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'SAVE'.
SELECT SINGLE * FROM ZNNR INTO ZNNR WHERE EMPID = ZNNR-EMPID.
IF SY-SUBRC = 0.
MESSAGE E999 WITH TEXT-001.
ENDIF.
*IF SY-SUBRC <> 0.
INSERT INTO ZNNR VALUES ZNNR.
COMMIT WORK AND WAIT.
CLEAR ZNNR.
MESSAGE I000 with text-002.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
SET PF-STATUS '100'.
ENDMODULE. " STATUS_0100 OUTPUT
in this you can write the code in include program and include that code in ur report program
reward if usefull
‎2007 Sep 13 6:27 AM
‎2007 Sep 13 10:59 AM
Hi Vijay..
To attach MESSAGE-ID for a Module pool program follow this Step:
Open the TOP include of the Module pool.
You can see the Statement
PROGRAM <MODULEPOOL> .
Attach the Message ID to this ..
PROGRAM <MODULEPOOL> MESSAGE-ID <MESSAGE CLASS>.
Activate the TOP include.
It works....
<b>Reward if Helpful.</b>