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

functionmodule to capture error messages

Former Member
0 Likes
911

Hello All,

Iam validating data and if validation fails im storing that record in a temporary table .Now I need to write all this error messages to spool.

may I know the function module to write error messages to spool.

Plz advise

thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
878

My understanding is that the spool is created for the background job. If you are running it in the background, then you can simply do

loop at itab_error.

write itab_error.

endloop.

5 REPLIES 5
Read only

Former Member
0 Likes
879

My understanding is that the spool is created for the background job. If you are running it in the background, then you can simply do

loop at itab_error.

write itab_error.

endloop.

Read only

Former Member
0 Likes
878

Data:Begin of itab occurs 0,

mtype(255),

end of itab.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

INTO Itab-mtext.

Append itab.

The write itab to spool.

USe :FM:JIT03_WRITE_TEXT_TO_SPOOL

This will resolve the issue.

Regards,

Gurpreet

Read only

Former Member
0 Likes
878

Thanks for your replies guyz, the one thing forgot to mention is , this is in CRM.

Read only

Former Member
0 Likes
878

Hi

in this case you can create an internal table for populating the error messages .

At the end you can use these function modules to send it to spool.

RSPO_OPEN_SPOOLREQUEST

RSPO_WRITE_SPOOLREQUEST

RSPO_CLOSE_SPOOLREQUEST

hope this will resolveyour problem.

Regards

hareesh.

Read only

Former Member
0 Likes
878

Thanks for your time.

just use

write 😕 message you wanted.