06-25-2009 7:43 AM
Hi,
When a delivery printed, i can get its spool number but i want to upload this spool's contents into an internal table?
Is that possible?
Thanks.
06-25-2009 8:22 AM
Hi,
YOu can use the function module
REPORT Ztest.
*Type Declarations
TYPES: BEGIN OF ty_rdidata,
line(1000) TYPE c,
END OF ty_rdidata.
DATA: ws_spool LIKE tsp01-rqident,
i_rdidata TYPE STANDARD TABLE OF ty_rdidata,
wa_rdidata TYPE ty_rdidata.
PARAMETERS: p_sp TYPE tsp01-rqident.
ws_spool = '0000019125'.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'
EXPORTING
rqident = ws_spool
FIRST_LINE = 1
LAST_LINE =
TABLES
buffer = i_rdidata
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8
.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF..
regards,
nazeer
06-25-2009 8:23 AM
Hi,
Please search in SDN before you post, you will get lots of answers.
YOu can use the function module
*Type Declarations
TYPES: BEGIN OF ty_rdidata,
line(1000) TYPE c,
END OF ty_rdidata.
DATA: ws_spool LIKE tsp01-rqident,
i_rdidata TYPE STANDARD TABLE OF ty_rdidata,
wa_rdidata TYPE ty_rdidata.
PARAMETERS: p_sp TYPE tsp01-rqident.
ws_spool = '0000019125'.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB_RAW'
EXPORTING
rqident = ws_spool
FIRST_LINE = 1
LAST_LINE =
TABLES
buffer = i_rdidata
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8
.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF..
regards,
nazeer
06-25-2009 10:21 AM
Hi,
Use the FM RSPO_RETURN_ABAP_SPOOLJOB to read the file from the spool by giving the spool number. This brings in to an itab.
hope it'll help u.
Regards,
Sneha.
06-25-2009 10:26 AM
instead of otf data try getting the otf data which comes in form of an internal table.