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

Inbound IDOC Error Raise?

Former Member
0 Likes
2,342

Hi..

I want to raise an error message in case of Inbound IDC processing.

I have coded as below:

FORM ZRAISE_IDOC_ERROR_IN2

TABLES XIDOC_STATUS STRUCTURE bdidocstat

USING DOCNUM LIKE EDIDC-DOCNUM

XMSGV1 LIKE BDIDOCSTAT-MSGV1.

XIDOC_STATUS-docnum = DOCNUM.

XIDOC_STATUS-status = '51'.

XIDOC_STATUS-msgid = 'WHSDHL'.

XIDOC_STATUS-msgty = 'E'.

XIDOC_STATUS-msgno = '999'.

XIDOC_STATUS-msgv1 = XMSGV1.

APPEND XIDOC_STATUS.

COMMIT WORK.

My error message is appearing but not in the IDOC Display part of the screen WE02.

What I mean is that I can very well see th error number 51 in the IDOC STATUS but I need to double click to the status to see the error message. After double clicking I need to go to the status details tab of the screen to see my message.

I want my message to be displayed in the first screen itself.

Hi..

I want to raise an error message in case of Inbound IDC processing.

I have coded as below:

FORM ZRAISE_IDOC_ERROR_IN2

TABLES XIDOC_STATUS STRUCTURE bdidocstat

USING DOCNUM LIKE EDIDC-DOCNUM

XMSGV1 LIKE BDIDOCSTAT-MSGV1.

XIDOC_STATUS-docnum = DOCNUM.

XIDOC_STATUS-status = '51'.

XIDOC_STATUS-msgid = 'WHSDHL'.

XIDOC_STATUS-msgty = 'E'.

XIDOC_STATUS-msgno = '999'.

XIDOC_STATUS-msgv1 = XMSGV1.

APPEND XIDOC_STATUS.

COMMIT WORK.

My error message is appearing but not in the IDOC Display part of the screen WE02.

What I mean is that I can very well see th error number 51 in the IDOC STATUS but I need to double click to the status to see the error message. After double clicking I need to go to the status details tab of the screen to see my message.

I want my message to be displayed in the first screen itself.

11 REPLIES 11
Read only

Former Member
0 Likes
1,539

hi,

if u juz expand teh status records and tehn further expand teh '51' u can very well c teh message on ur intial scrren only, no need of double clikcing rt??

theja.

Read only

0 Likes
1,539

Yes Thejaswi..

but the point is that I can't see it in the first screen itself.Thats the reason I need to double click to the status number to see the complete message.

But with other message it comes on the first screen itself.

Thanks

Read only

Former Member
0 Likes
1,539

Hi Subhash,

under status node you can see the Staus details clearly with status number etc. what is the problem you are facing.

Regards

vijay

Read only

0 Likes
1,539

Hi Vijay.

I will explain you in detail..

When I click on my status node I get numbers

51

62

64

50

74

The first 51 number has one more node attached to it which on double clicking will give us the text.

nI the second status of again 51 there is no node attached to it because of which I am unable to see the long text of the error message, which further compels me to double click on it to see the text.

I want it to replicate it in exactly the same manner as the first 51 number comes ie. a node should appear with my err message also.

thnks

Read only

Laxmana_Appana_
Active Contributor
0 Likes
1,539

Hi,

pass your own error text to these variables.

idoc_status-msgv1 = 'error'.

idoc_status-msgv2 = 'error occured'.

idoc_status-msgv3 = 'error occured'.

idoc_status-msgv4 = 'error occured'.

then If you select any error IDOC's (51 status) in WE02 , under ALV grid there are two fields with header 'status notification for sel.IDOC'.

here you can see two (error) messages

1.IDoc: 000000000XXX Status: Application document not posted

2.error text (ex: IDOC xxx failed due to xxxx error)

Regards

Appana

Read only

sridhar_k1
Active Contributor
0 Likes
1,539

Check you are passing correct message ID WHSDHL and message number 999.

Regards

Sridhar

Message was edited by: Sridhar K

Read only

0 Likes
1,539

I believe you should be inserting your error into the EDIDS table.

Read only

0 Likes
1,539

Hi Sridhar.

I checked it

My message ID doesnt exist in the system .

Now my question is what message ID to use ?

Thanks

Read only

0 Likes
1,539

That's the reason extra node is not displayed, find appropriate message in the message id used by the application or use ID 00, number 398.

Use B1 519 instead of 00 398.

Regards

Sridhar

Message was edited by: Sridhar K

Read only

0 Likes
1,539

Hi Sridhar..

Thanks for your ultimate solution:-)

Its working now.

But I am still not clear with the thing that why the node was not appearing when you have not defined a message ID?

Thanks

Read only

0 Likes
1,539

The extra node displays the message of the id and number you are passing in the status record, if the id or number doesn't exist, there's no message to show.

When you double click on the status 51 it's showing the message you have assigned to status-msgv1 field.

Regards

Sridhar