‎2014 Aug 27 4:32 AM
Hi,
We are facing issue while capturing message in BDCMSGCOLL structure in Call transaction using bdcdata. The message which are like
Message 'Message Text' Type 'S' Display LIke 'E' .
This message is captured as Success on the Message structure instead of error & user are asking to update it as Error as it is looking like Error message to the end user.
Please provide resolution to the issue.
Regards,
Kapil
‎2014 Aug 27 5:36 AM
Hi Kapil,
Hope I understand, if not reply me.
If you are uploading many datas via BDC means, you can append the messages to internal table,
After that you can display it with record data and its corresponding message ?.
If your are uploading one data means you can display with Type 'E', other data's will not be processed ?.
Regards,
Venkat.
‎2014 Aug 27 6:19 AM
Hi Venkat,
I am not doing any upload, i am just doing a replay of the transaction ME21 & in that there are many error message which encounter while creating a PO but when i have check the logic , they are basically a success message which are display like Error so when i have called ME21 transaction using below statement
call transaction ME21 using BDCDATA
into messages bdcmsgcoll.
I am getting the message as success only since the message are of type success but as they are display like E , so user want that in msgcoll structure these messages must be shown as Error.
Regards,
Kapil.
‎2014 Aug 27 9:36 AM
Hi Kapil,
Since you already know the message ID and the number for that particular message, try checking for it in your result table for messages. If that exists, change it to 'E'.
LOOP AT msg_tab WHERE msgid = 'Your Msg ID'
AND msgnr = 'Msg No.'
*
msg_tab-msgtyp = 'E'.
MODIFY msg_tab.
*
ENDLOOP.
‎2014 Aug 27 10:22 AM
Hi sharmila,
Actualy , i don't want to hardcode the things , i want to know why message structure is showing the exact message type not how it is shown to the end user.
Also, can this behavior of the Message be change by passing some parameter in option or by passing some mode.
Regards,
Kapil.
‎2014 Aug 27 10:35 AM
Hi,
here is a similar (same) thread, this might help you.
http://scn.sap.com/thread/3396615
I do not see your code but if you have a look at the "helpful answer" in this thread it might be the case you are facing as well? So this part with the condition check...
‎2014 Aug 27 10:45 AM
Kapil,
The message structure will only have the actual message type. " DISPLAY LIKE 'E' " is only used for GUI display.
I don't think you could control this through options or mode in CALL TRANSACTION.
‎2014 Aug 27 11:07 AM
Hi,
you may consider to use function BAPI_PO_CREATE. Hereyou get a RETURN table with all messages reelvant for user.
And, I don't know SAP uses the DISPLAY LIKE technique in ME21(N). Is this from a user exit?
Regards
Clemens
‎2014 Aug 27 12:57 PM
Hi Clemens,
Agreed , i can use the bapi but there is a limitation to do it through BDC only.actually this is not just to upload the data but to replicate the user steps in frontend and track user messages which encounter while processing .
Standard SAP uses Display like E to display message line enter purchase req / Enter plant that i have checked that is the only reason why in BDCMSGCOLL structure showing all message as Success .
Regards,
Kapil.