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

Find log message ? For tonight !

Former Member
0 Likes
3,320

Hi all,

I got a problem with my search of logs and i really need some help.

I make a program which will add new EAN for a material. No problem, the program works well, but they ask me to add an ALV with all program result.

I use the following BAPI :

BAPI_MATERIAL_MAINTAINDATA_RT

and for every modification the program make, I got a new log number (That i can see with transaction SLG1)

Here is my problem.

I manage to return log numbers (external number), but in fact, i should use this number to find the last line of my log.

Like "Material XXXXXX changed"

or : "EAN number already use for material XXXXXX"

But even if i've got the log number, i can't find any table including my log, which would allow me to give the right error message.

Where can i find it ? Is there a BAPI which could give me a table with all message for just importing my log number ?

I have to end this program tonight. I really thank you for all help you can give.

R.P

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,031

Hi

The table should be message table T100.

Max

7 REPLIES 7
Read only

Former Member
0 Likes
2,032

Hi

The table should be message table T100.

Max

Read only

Former Member
0 Likes
2,031

why dont u use the fm format_message.

it should take care of ur requirements if the parameters are passed

santhosh

Read only

0 Likes
2,031

Thx for your answers, but i still got a problem.

Max, i've seen that the message is in the table T100, but i need the ID (like M3 for example) and the message number (like 381) to access the right message.

That is my problem.

When i got the log number (This log number allows me to see the log with transaction SLG1) i don't know how I can retreive the corresponding "log table".

Santhosh, i tried your fm, but i need ID message and message number. Those are the two informations i need first, and i only got the log number (External number).

To be simple, and trying to be as clear as possible, I just want to retreive (and write with ALV, that's ok) the last line of a log that we can see with SLG1 and with a particular log number.

3 hours before i have to finish... Help needed 😃

Thx to you all

R.P

Read only

Former Member
0 Likes
2,031

Hi,

Hope this FM BALW_BAPIRETURN_GET2 will help you to return log msg.

Regards

Yamini.A

Read only

Former Member
0 Likes
2,031

hey ya,

ur bapi returns bapireturn structure rite.

loop that and the return structrure will have msg id and msg nr which u can supply to the function module.

else if

u can create a message class in se91 coz u want only 2 messages.

do post back if any issues

santhosh

Read only

0 Likes
2,031

No pressure guys......

Regards,

Rich Heilman

Read only

0 Likes
2,031

Finally that was done... just in time.

I find the following BAPI :

BAPI_APPLICATIONLOG_GETDETAIL

It allows me to have all detailled message of a protocol.

I really thank you all for your help.

Best regards,

R.P