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

IDOC Error Raise.

Former Member
0 Likes
1,549

Hi..

I have an outbound Configuration for my Delivery using the Message control technique in SAP.

Now,I am testing it manually by going in the transaction code WE15 (RSNAST00) and running it for my application object(Delivery Number).

If everything is smooth then no problem, but if there is an error at any place inside the FM (used to create an o/b IDOC) then I am raising an error with the statement "RAISING ERROR_MESSAGE_RECEIVED".

The poblem is that I want this message to be visible in the Output processing Log of my delivery document which is not taking place now.

How shall I approach this problem?

Thank You

11 REPLIES 11
Read only

Former Member
0 Likes
1,345

Hi Subash,

For you to update message in the output processing log of the delivery document, you need to use below funtion module.

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'

EXPORTING

msg_arbgb = sy-msgid

msg_nr = sy-msgno

msg_ty = sy-msgty

msg_v1 = sy-msgv1

msg_v2 = sy-msgv2

EXCEPTIONS

OTHERS = 0.

REGARDS

SRIKANTH M

Read only

0 Likes
1,345

Thank you Srikant..

I checked that part in RSNAST00..you are correct that in my case this FM is not getting triggered because of a different returncode value used before the FM.

If the returncode value is 999 then only the values will be updated in the NAST table else not...

Now my problem is that in the program RSNAST00, if there is an err in my FM it is returning the sy-subrc = 1 which is passed to the return code.

I want to make it 999 in order to trigger the Output Log.

How shall I do that?

Read only

0 Likes
1,345

Subash,

I suggest you use the Function Module 'NAST_PROTOCOL_UPDATE' in your outbound Function Module. I suggest you do not change any return code. This will work.

Regards

Srikanth M

Read only

0 Likes
1,345

Nice suggestion Srikant..

I will do that and get back to you..

Thanks a lot..

Read only

0 Likes
1,345

Nice suggestion Srikant..

I will do that and get back to you..

Thanks a lot..

Read only

0 Likes
1,345

Hi Srikant...actually I tried that ...its failing there also..

I think we need to chg the return code anyhow if it is possible

Please guide me.

Thanks

Read only

0 Likes
1,345

Hi subash

I used this code before in a similar scenario , its working. In your outboud program just use below FM and see if there are any exceptions. Pass proper message type , number etc. Let's if this works.

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'

EXPORTING

msg_arbgb = sy-msgid

msg_nr = sy-msgno

msg_ty = sy-msgty

msg_v1 = sy-msgv1

msg_v2 = sy-msgv2

EXCEPTIONS

OTHERS = 0.

regards

Srikanth M

Read only

0 Likes
1,345

Hi Srikant

Thanks again

But if you see inside the from NEW_DYN_PERFORM of the program RSNASTED, then you wll clearly see that even if the return code is NE '0' , still the error values are getting updated in the Table NAST.

So, I think it is something else that is preventing the error message.

however in the debug mode when the change the returncode to 999 then it shows me the message.

I couldnt understand the logic.

Thanks.

Read only

0 Likes
1,345

Hi subash,

Lets not change te return code to 999. We will call the Function module in our out bound program , and update the message ourselves.

regards

Read only

0 Likes
1,345

Hi Srikant..

Thanks a lot for your precious time...

I was using a message ID that was deleted from the system due to some reasons..:-)..thats why the err mrssage was not coming...

I know the reason is very silly...

Anyways thanks for your valuable assistance.

Read only

0 Likes
1,345

hahahah ... good that you got it .

Regards

Srikanth M