PRoblem regarding Submit -> Open/Transfer/Close Dataset
Hello again, I know I keep asking the same topic (regarding datasets) for the past week. Its been a new topic for me. However, I have a program which I am testing that is shown below.
<b>REPORT ZPROG_COOL7 NO STANDARD PAGE HEADING.
DATA: ITAB_LIST TYPE STANDARD TABLE OF ABAPLIST WITH HEADER LINE.
PARAMETERS: PNAME TYPE SYCPROG. (this does nothing yet ...)
SUBMIT ZPROGRAM EXPORTING LIST TO MEMORY AND RETURN
USING SELECTION-SET 'CEDEX'.
CALL FUNCTION 'LIST_FROM_MEMORY'
LISTOBJECT = ITAB_LIST
NOT_FOUND = 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.
IF SY-SUBRC = 0.
CALL FUNCTION 'WRITE_LIST'
LISTOBJECT = ITAB_LIST.
DATA: LD_FILENAME TYPE LOCALFILE.
DATA: I_MONTH TYPE TABLE OF T247 WITH HEADER LINE.
DATA: IHTML TYPE TABLE OF W3HTML WITH HEADER LINE.
CALL FUNCTION 'WWW_LIST_TO_HTML'
list_index = sy-lsind
HTML = IHTML.
LD_FILENAME = '
OPEN DATASET LD_FILENAME FOR OUTPUT IN BINARY MODE.
LOOP AT IHTML.
TRANSFER IHTML TO LD_FILENAME.
CLOSE DATASET LD_FILENAME.
As you can see it is suposed to get a list from a diffrent program, write the list, and then transfer the list into a directory in the SAP application server. This all works fine on foreground but in Background Proccessing the story is diffrent.
Here is the problem:
If Iam to send a job in background, the report will generate fine if you view the spool list <b>but there HTML file that is supposed to be saved becomes blank.</b> Is there a way to solve this issue? Thank you all take care, and good day.