DATA: JOBNAME TYPE TBTCO-JOBNAME.
DATA: JOBCOUNT TYPE TBTCO-JOBCOUNT.
DATA: LISTIDENT TYPE TBTCPV-LISTIDENT.
DATA: JOBNO TYPE TSP01-RQIDENT.
DATA: DATE TYPE C LENGTH 12.
DATA: flag TYPE I.
DATA: BEGIN OF i_outtab OCCURS 0,
str(255) TYPE C,
END OF i_outtab.
DATA: BEGIN OF BUFFER OCCURS 100000,
TEXT(6000) TYPE C,
END OF BUFFER.
DATA: startline TYPE I, endline TYPE I.
DATA: JOBCOUNT TYPE TBTCO-JOBCOUNT.
DATA: LISTIDENT TYPE TBTCPV-LISTIDENT.
DATA: JOBNO TYPE TSP01-RQIDENT.
DATA: DATE TYPE C LENGTH 12.
DATA: flag TYPE I.
DATA: BEGIN OF i_outtab OCCURS 0,
str(255) TYPE C,
END OF i_outtab.
DATA: BEGIN OF BUFFER OCCURS 100000,
TEXT(6000) TYPE C,
END OF BUFFER.
DATA: startline TYPE I, endline TYPE I.
" GETTING DATE WISE SPOOL NUMBER
SELECT SINGLE JOBCOUNT FROM TBTCO INTO JOBCOUNT WHERE JOBNAME = 'job_name' AND SDLSTRTDT = SY-DATUM.
SELECT SINGLE LISTIDENT FROM TBTCPV INTO LISTIDENT WHERE JOBCOUNT = JOBCOUNT AND JOBNAME = 'job_name' .
CONCATENATE SY-DATUM+6(2) SY-DATUM+4(2) SY-DATUM+0(4) INTO DATE SEPARATED BY '_'.
JOBNO = LISTIDENT.
IF JOBNO NE '0'.
" FETCHING SPOOL DATA TO BUFFER
startline = 1.
DO.
REFRESH BUFFER.
endline = startline + 99999.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = JOBNO
first_line = startline
last_line = endline
desired_type = 'RAW'
TABLES
BUFFER = BUFFER
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
IF sy-subrc <> 0.
EXIT.
ENDIF.
LOOP AT BUFFER.
i_outtab-str = BUFFER-TEXT.
APPEND i_outtab.
CLEAR i_outtab.
ENDLOOP.
startline = endline + 1.
ENDDO.
Thank you it is really such a wonderful blogpost on sap videos Please Share More Information.
ReplyDeleteThankyou for wonderful article. It has more Information in Your Website sap training videos.
ReplyDeleteI am planning to join sap abap with them after reading your blog.
ReplyDeleteHope the best will turn out.
Call them at 8122241286 in chennai.
www.thecreatingexperts.com
We provide sap abap technical course, call us to know more about us and join with us.
ReplyDeleteCall them at 8122241286 in chennai.
www.thecreatingexperts.com
Thank you for your post on sap video tutorials.
ReplyDeleteSAP ABAP training is provided in CHENNAI.
ReplyDeleteTHE CREATING EXPERTS is one of the leading trainer in SAP who provides real time training
http://thecreatingexperts.com/sap-abap-training-in-chennai/
contact 8122241286
It has Wonderful Information on sap hana training server access.
ReplyDeleteIt was so nice article.I was really satisified by seeing this article sap training videos.
ReplyDelete