Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

message id

vijy_mukunthan
Active Contributor
0 Likes
1,497

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

1 ACCEPTED SOLUTION
Read only

varma_narayana
Active Contributor
972

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>

4 REPLIES 4
Read only

Former Member
0 Likes
972

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

Read only

Former Member
0 Likes
972

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

Read only

0 Likes
972

thanks for u r code i worked it. its working fine.

Read only

varma_narayana
Active Contributor
973

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>