cancel
Showing results for 
Search instead for 
Did you mean: 

Error Log Location

Former Member
0 Kudos

Hello Community,

Earlier this week, a support ticket was opened for a NetWeaver WebAS ABAP instance having trouble printing. I found the root cause; it was an inaccurate profile parameter (rspo/host_spool/print).

Tracking down the problem was a bit cumbersome.... Not only did the output request properly generate, but the print event finished successfully (albeit no printing took place). I couldn't find any log files from the WebAS that indicated that an external command was failing to execute.

Where would a log for an invalid shell/OS command be found? Was there a more efficient way to solve this problem?

1.) Print from SAP (db02 -> users -> print -> sp01 -> print directly)
    --> print successful, but nothing printed
2.) Print from the OS as <sid>adm (lp -d device file.txt) 
    --> print successful
3.) Checked output device in SPAD
    --> everything looks kosher
4.) Checked for entries in  /var/spool/lp/logs/requests
    --> only requests from OS print requests recorded
5.) Scratched my head for a bit
6.) Checked profile parameter "rspo/host_spool/print"
    --> facepalm

Regards,

Zach Shay

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Zach,

That kind of problems frequently occurs because of sending unrecognized escape char(s) to the printer processor. Under this circumstance, I recommend that you set "ASCIIPRI" for the test reasons. If it is not work, then you can check the other simple device types.

Best regards,

Orkun Gedik

Former Member
0 Kudos

Orkun,

Thank you for the reply. In this particular instance, the print command was trying to run a script that did not exist.

In case you are not familiar with *nix environments, here is a little background. When a command is successfully executed from a shell, it typically returns "0." If there is an error, the return value is typically non-zero.

[root@xxx ~]$ doesNotExist.sh
doesNotExist.sh: Command not found.
[root@xxx ~]$ echo "$?"
1
[root@xxx ~]$ echo "$?"
0

doesNotExist.sh doesn't exist, so an error message is printed, and 1 is returned. $? is a shell variable for the current return code. Since printing the current return code succeeded, echo returned 0 (as demonstrated by the second echo command).

Does WebAS ABAP have the ability to recognize when an OS command returns non-zero? If so, where would this be logged?

Thank you,

Zach

Former Member
0 Kudos

Hi Zachary,

As far as I know that SAP WebAS is not storing last error code or return code at anywhere. Under this circumstance you can try SM49/SM69 transaction to execute and see the output of OS command at OS level.

Best regards,

Orkun Gedik

Former Member
0 Kudos

Hi,

I have often found this SAP Help link very useful, in trouble-shooting my printer problems, just because it gives a flow-chart based approach, you can use this from next time on:

http://help.sap.com/SAPhelp_nw70/helpdata/en/d9/4a8fbb51ea11d189570000e829fbbd/content.htm

For your specific problems you could have tried logging the data, the way you can do this is discussed here, it gives you detailed information then:

http://help.sap.com/SAPhelp_nw70/helpdata/en/d9/4a904a51ea11d189570000e829fbbd/content.htm

And also check this:

http://help.sap.com/SAPhelp_nw70/helpdata/en/d9/4a903051ea11d189570000e829fbbd/content.htm

- Regards, Dibya