cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the "Write file" error message ?

Former Member
0 Kudos

Hi

I have an action block WriteFile that is working fine. But when this action block receives an invalid file path, it throws an exception and an error message in the server log. So I put a Catch action block to get the error message and handle it, the issue is that the error message is not setted in the catch action block.

I need the message that I found in the server log to send to the caller:

"/usr/sap/MID/integracao/ETON/DEV/ETON_RECEBE/_ETON_FICTICIO_1/OPLIST.ASC (No such file or directory)"

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

What is setup as the "Default File Path" set to in the MII Menu -> System Management -> System Properties page?  The above path also does not exist as there's no drive letter and unless you specified a share location for usr it will never find the folder (plus if it's a share path you need a double slash).

Also, the catch block isn't ignored and that's why the trace action appears as green since it did run.

Sam

Former Member
0 Kudos

Salvatore, thank you for your reply.

My

To solve the problem I put my own message like "It was not possible to save the file, check the path", but I think that the best way is use the error message of the WriteFile action block.

0 Kudos

Can you please share a picture of your transaction so that I can better understand the logical flow of what you are doing?  Perhaps there is another way to achieve what you want.

The error message from the Write File action should be visible in the Catch action "Message" field which would look something like this:

"Error from action: " & Catch_WriteFile.Source & " was caught with message: " & Catch_WriteFile.Message

Then you can use the SAP MII XML Document -> Fatal Error block to report this back to the user.


Sam

PS: the Fatal Error block has to be used in conjunction with the Document action block.

swaroop_anasane
Active Contributor
0 Kudos

Hi Michel,

You should be getting some error number right?

Warm regards,

Swaroop

Former Member
0 Kudos

Hi Swaroop Anasane, thank you for your time.

I do not have any error number, the Catch action block is completely ignored