‎2006 Nov 08 11:05 AM
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
‎2006 Nov 08 11:17 AM
‎2006 Nov 08 11:17 AM
‎2006 Nov 08 11:19 AM
why dont u use the fm format_message.
it should take care of ur requirements if the parameters are passed
santhosh
‎2006 Nov 08 1:13 PM
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
‎2006 Nov 08 1:37 PM
Hi,
Hope this FM BALW_BAPIRETURN_GET2 will help you to return log msg.
Regards
Yamini.A
‎2006 Nov 08 1:49 PM
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
‎2006 Nov 08 1:51 PM
‎2006 Nov 09 2:12 PM
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