‎2008 Jun 16 11:02 AM
Hi,
Is there any function module which converts spool data to internal table.?
Urgent!!!
Answers will be rewarded.
- Rohan
‎2008 Jun 16 11:08 AM
Hi,
report zrich_0003 .
data: list type table of abaplist with header line.
data: ascilines(1024) type c occurs 0 with header line.
start-of-selection.
do 100 times.
write:/ sy-index.
enddo.
call function 'SAVE_LIST'
* EXPORTING
* LIST_INDEX = '0'
tables
listobject = list
exceptions
list_index_invalid = 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.
call function 'LIST_TO_ASCI'
tables
listobject = list
listasci = ascilines
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
check sy-subrc = 0.Thanks
Vikranth
‎2008 Jun 16 11:09 AM
Hi,
data i_msg type standard table of soli initial size 0 with header line.
loop at ascilines.
move ascilines to i_msg-line.
append i_msg.
endloop.
In the previous call to LIST_TO_ACSI we are passing LIST and getting ASCILINES back from it.
call function 'LIST_TO_ASCI'
tables
listobject = list < Passing
listasci = ascilines > Getting
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.Thanks
Vikr4anth
‎2008 Jun 16 11:10 AM
Hi Rohan,
Check this code
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..
‎2008 Jun 16 11:10 AM
HI,
Look into RSTXPDFT4 (program - SE38), you could get the useful information.
‎2008 Jun 16 12:25 PM
Hi
Sending you link of the function module, so go through that one and check it , you will find there.
http://www.erpgenie.com/abap/functions.htm
With Regards
Nikunj shah