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

program logic

Former Member
0 Likes
701

hi all,

i am a very interesting problem.I need to execute two blocks of code.

If i get an error in first block then i dont hv to stop the execution(i have to move to second block), and also have to give an error message.

I hv found half of solution. Use EXIT statement when we error occur(dont show the message,instead store it and show it after execution of second block.

Now, my question is how do I store a message.

Any other solution is also welcome.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

uwe_schieferstein
Active Contributor
0 Likes
682

Hello

If you have to store many message and the might have a hierarchical structure then I would recommend to use interface IF_RECA_MESSAGE_LIST (available since SAP release >= 6.20).

For an example see my Wiki posting [ Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]

Alternatively, you may use the function modules of function group SMSG:

- MESSAGES_INITIALIZE
- MESSAGE_STORE
- MESSAGES_SHOW

Please note that you can use IF_RECA_MESSAGE_LIST to save the collected messages as persistent application log (transaction SLG1 ).

Regards

Uwe

5 REPLIES 5
Read only

Former Member
0 Likes
682

Hi,

You could easily do it by using an ALV. Store the error messages in an internal table and then diplay it by using the ALV.

Thanks

Nayan

Read only

0 Likes
682

Even I thought of this solution but didnt go ahead since this has to be run i background...

Read only

uwe_schieferstein
Active Contributor
0 Likes
683

Hello

If you have to store many message and the might have a hierarchical structure then I would recommend to use interface IF_RECA_MESSAGE_LIST (available since SAP release >= 6.20).

For an example see my Wiki posting [ Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]

Alternatively, you may use the function modules of function group SMSG:

- MESSAGES_INITIALIZE
- MESSAGE_STORE
- MESSAGES_SHOW

Please note that you can use IF_RECA_MESSAGE_LIST to save the collected messages as persistent application log (transaction SLG1 ).

Regards

Uwe

Read only

0 Likes
682

thanx man..it looks like a solution...

Read only

0 Likes
682

Hi, can you please explain me how the issue got solved. I am eager to know this concept. Kindly share this with me please.