09-06-2010 5:03 AM
Hi,
I need to read the production system spool data from development system and display it in a report. Is there any SAP function module to do this ? or any other way i can achieve the same..
09-07-2010 8:52 AM
Hello,
U should use RFC to get spool data from production system
and use functions for reading spool in function group SPOOL_SP01R
Here is an example which reads a spool from an external system and prints it,
maybe it'll useful for u :
REPORT x.
TYPE-POOLS sp01r.
DATA : out_view TYPE sp01r_oview OCCURS 0 WITH HEADER LINE,
rs_selfield TYPE slis_selfield.
START-OF-SELECTION.
out_view-sys = 'KKBXQ104'. "<-- external system ID ( find it in transaction SM59)
out_view-pjident = '12605'. "<-- Spool request number you see in SP01
out_view-selected = 'X'.
out_view-sindex = 1.
APPEND out_view.
rs_selfield-tabname = '1'.
rs_selfield-tabindex = 1.
rs_selfield-value = 'X'.
rs_selfield-before_action = 'X'.
CALL FUNCTION 'RSPO_RPRINT_OUTREQ'
EXPORTING
tend = 1
* POPUP = 'X'
TABLES
out_view = out_view
CHANGING
rs_selfield = rs_selfield
* EXCEPTIONS
* ERROR = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
09-07-2010 9:19 AM
Hello,
You can create an RFC connection in the system for the target system in SM59.
And you can then view the spool requests from the target system via SP01 -> inpu the System Name.
Regards,
David