Application Development 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: 

how to export all error messages from co54

Former Member
0 Kudos

Dear all,

Good day to you all, I am ABAPer, I have an Abap question related to this SAP t-code CO54.

Our user is using CO54 to check error messages every day, it is not convinient by clicking on the "Log(Shift+F10)" buttton to see the detail error one by one (go in and go out..). In this case, i am trying to write a simple Abap program to retrieve all the error message to a report, then user able to view all the error message in one page/screen.

COMH-ERRK='D': Processing status of the process message/the control recipe

COMH-WERK='XXXX': Plant

COMH-SEDAT='27.10.2015': Date on Which Record Was Created

COMH-MSCLA='ZI_PRODS': Process Message Category

Based on the above SAP table COMH, the report is able to select all the error messages with all the detail data from another table COME, eg. material#, serial#, batch#, qty, uom, movement_type and so on. BUT, i am yet to find out what is the actual logic/table using by SAP, how to retrieve the actual error message shown as below 2 samples! I am not sure where these error messages stored/hiden somewhere in SAP.

sample-error-1

No by- or co-product item for material 1003 order 1073037 found

=> Message could not be processed by destination ZI03 Z_COCI_CONFIRM_MATERIAL_PROD_C

sample-error-2

Serialnumber 322915452552300884 already assigned to HU 00000100000000543227.

=> Message could not be processed by destination ZI03 Z_COCI_CONFIRM_MATERIAL_PROD_C

I am trying to find out more information from following function calls, then i can copy & built some logic into my customised Abap report, 

SE37 APPL_LOG_DISPLAY

SE37 BAL_DSP_LOG_DISPLAY

SE38 .... PERFORM tree_add_nodes ...

SE38 ... PERFORM tree_add_nodes_expand ...

BUT I still yet to find out the logic behind, what is the tables and functions that i can use to retrieve all the error-process-messages,,, if anybody know about this, can anyone help me about this. Thank you very much in advance

Best regards,

alx

1 ACCEPTED SOLUTION

0 Kudos

Hi,

The messages are thrown from the message class CB and if you wish to build the same logic you must check with the include LCO51FTB and to be more precise with the subroutine show_logs_for_sent_messages

hope this helps

5 REPLIES 5

0 Kudos

Hi,

The messages are thrown from the message class CB and if you wish to build the same logic you must check with the include LCO51FTB and to be more precise with the subroutine show_logs_for_sent_messages

hope this helps

0 Kudos

Hi Sundaranmoorthy,

Thank you for your information.

Actually i am tyring (already tried) put in this function call 'APPL_LOG_DISPLAY' into my Abap program, put somehow i still haven't figured out how to retrieve the error-data,, I suspect it should be stored inside these table BALDAT & BALHDR. but I still don't know how to read and convert the data from this table BALDAT into TEXT format. Following are some sample data and relationship between COMH, BALHDR & BALDAT.

COMH-MSID= 100000000046937997

BALHDR-EXTNUMBER= 100000000046937997

BALHDR-LOG_HANDLE = LYwUvZfU3D3X0800mAZ{t0

BALDAT-LOG_HANDLE = LYwUvZfU3D3X0800mAZ{t0

BALDAT-CLUSTD=

0497597E9C86D785F2F3290DAFA541C7186BE8082E238C95440D452D1FC6122F92BA121CD0C576544351938619F10B706A163F4AC3202C949F47691884D2A0E3343C

1A862BD2A0638C996A682BC7614E35ECA0CA71A8D5909831BF4C35BC5539CEA9861D5839D66A48E81863A61ADACA7198530D3BA8721C6A352466C4AF2B530D6DE5B8

FF060101020280003431303200000000552F0000121F9D02746BFE2E7104511C7F37BB1A21125224964182040B03DEDD1A23D8184F89A0518C10B009014B4B0B0B0B

Anyone can help me about this, thank you.

Best Regards,

alx 

0 Kudos

I found the logic and managed to fix my abap. Resolved.

0 Kudos

This message was moderated.

0 Kudos

Hello. Would you please share with us how did you solved this Issue? I'm yet to find the solution on how to retrieve the data from the messages with error, but already managed to get the data from the COMH table. Please!