XI: ABAP mapping logs – more standard = better visibility
Everyone who ever tired the abap mappings most probably
also used the traces
to see how the tags are getting populated with values. But are those popular traces
easy to monitor via transaction SXBM_MONI in the XML format? If you’d like to try something else
have a look below. I will try to show an alternative way – standard application log on the ABAP stack.
You can use this log to create log entires which will be visible in a very nice format via transaction SGL1.
The procedure to create this log is quite simple:
Step 1
At first you need to create an object and a subobject
via transaction SGL0 (remember about the Z-prefix).
As you see the application log is very well structured
and provides a nice alternative to mapping traces.
Some of the most common issues with this logs
and it’s use with the ABAP mappings:
Problem
How to turn if ON/OFF dynamically?
Solution
You can create a configuration table in which you
can store the ON/OFF indicator
along with the message
mapping name. This way the logging will be only turned ON
when you need it (no unnecessary logs)
and you can control it via this table.
Problem
How to select only one messageID?
Solution
Just populate logheader-extnumber field
with the messageID
and then you’ll be able to
use the messageID in SGL1.
more info:
Application log – help.sap.com
[SAP Developer Network Blog: Message handling in BSP | Message handling in BSP
]



In 2004s SAP is introducing CheckPoint and log that are dynamically configured in ABAP. I see a great deal of potential in using checkpoints and log statements in ABAP will be very handy in trouble shooting.
Cheers,
Naveen
till then this is a nice way to achieve that I hope:)
Regards,
michal
Shylesh
Thanks for the wonderful blog..
Can you update the t-codes in your blog SGL1 with SLG1 and SGL0 with SLG0.
Regards,
Sumit