10-22-2014 1:37 PM
Hi,
I have a function that creates idocs, and in the end it sets the status of the idoc.
Therefore I use a structure of the type BDIDOCSTAT, and I fill the fields status and the variables for the message.
However, when I look at the status of an existing idoc in WE02, I can see that in the status details (Sts Details) the messages are put in a text field.
Apparently this way the message in the text field is presented as a drop down below the status number.
But... in the type BDIDOCSTAT, there is no text field...
Is there a way to fill this text field and get the message presented as a drop down, like the standard??
Thank you!!
10-22-2014 2:14 PM
Why don't you just use data element EDI_STATUS for your field as this already has a value table?
10-22-2014 4:48 PM
Hi,
use this code:
CLEAR idoc_status.
idoc_status-uname = sy-uname.
idoc_status-status = status. "-> code status (table TEDS1)
idoc_status-docnum = docnum. "-> iDoc number
IF status = '53'.
idoc_status-msgty = 'S'.
* ELSEIF status EQ <error_status>.
ELSE.
idoc_status-msgty = 'E'.
ENDIF.
idoc_status-msgid = msgid.
idoc_status-msgno = msgno.
idoc_status-msgv1 = msgv1.
idoc_status-msgv2 = msgv2.
idoc_status-msgv3 = msgv3.
idoc_status-msgv4 = msgv4.
idoc_status-segnum = segnum.
idoc_status-repid = <main_report>.
idoc_status-routid = <segment_name>.
APPEND idoc_status.
let me know,
AI
10-22-2014 5:18 PM
Hi Alessandro,
Thanks, but
that's exactly the code that I am using. But if I use this and I go to WE02, I have to double click on the status and go to the tab (Sts details) to see the message in msgv1.
Apparently, there must be another way to do it, because the standard statuses have a little triangle in front of the number, and when you click on that, there is a dropdown with the text of the message.
That's how they want it...
10-23-2014 9:58 AM
Hi,
you are safe that status field isn't blank? because if you look below image, you see that ,in red, is displayed message that you have inserted in "status" field, while in blue, is displayed message custom (fields: msgid, msgno, msgv1, msgv2, msgv3, msgv4).
let me know,
AI