Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re:ABAP

Former Member
0 Likes
590

hi,

i need to schedule background job but in my program iam using the write stmts for displaying tabs as requested by the user , tht list format is displayed in the text file for customer but when i schedule the job,iam getting the output list which i need to disable without effecting the text file.

WRITE :/1 'ORDER'.

WRITE : 6 SY-VLINE.

WRITE : 7 S_DATA-CUSO LEFT-JUSTIFIED.

WRITE : 17 SY-VLINE.

WRITE : 18 S_DATA-CUIN LEFT-JUSTIFIED.

WRITE : 24 SY-VLINE.

WRITE : 25 S_DATA-ARKTX LEFT-JUSTIFIED.

WRITE : 42 SY-VLINE.

WRITE : 43 S_DATA-V_QTY1 LEFT-JUSTIFIED.

WRITE : 53 SY-VLINE.

WRITE : 54 S_DATA-WADAT_IST LEFT-JUSTIFIED.

WRITE: 64 SY-VLINE.

WRITE : 65 S_DATA-VBELN LEFT-JUSTIFIED.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

LIST_INDEX = SY-LSIND

TABLES

LISTASCI = DOWNTAB

LISTOBJECT = ABAP_LIST

EXCEPTIONS

EMPTY_LIST = 1

LIST_INDEX_INVALID = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

ENDIF.

hi,

i need to schedule background job but in my program iam using the write stmts for displaying tabs as requested by the user , tht list format is displayed in the text file for customer but when i schedule the job,iam getting the output list which i need to disable without effecting the text file.

WRITE :/1 'ORDER'.

WRITE : 6 SY-VLINE.

WRITE : 7 S_DATA-CUSO LEFT-JUSTIFIED.

WRITE : 17 SY-VLINE.

WRITE : 18 S_DATA-CUIN LEFT-JUSTIFIED.

WRITE : 24 SY-VLINE.

WRITE : 25 S_DATA-ARKTX LEFT-JUSTIFIED.

WRITE : 42 SY-VLINE.

WRITE : 43 S_DATA-V_QTY1 LEFT-JUSTIFIED.

WRITE : 53 SY-VLINE.

WRITE : 54 S_DATA-WADAT_IST LEFT-JUSTIFIED.

WRITE: 64 SY-VLINE.

WRITE : 65 S_DATA-VBELN LEFT-JUSTIFIED.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

LIST_INDEX = SY-LSIND

TABLES

LISTASCI = DOWNTAB

LISTOBJECT = ABAP_LIST

EXCEPTIONS

EMPTY_LIST = 1

LIST_INDEX_INVALID = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
566

Hi,

You can check for the field sy-batch.

If the program is scheduled this field will contain a 'X' value. You can put a condition to check for this field and your problem should be solved.

REWARDS IF HELPFUL!!!

Read only

Former Member
0 Likes
566

Hi,

If I have understood you correctly,you want to download the data from your report in a text file which you want to schedule as a background job.

If that is the case,then there are 2 options to download the data,one is on the Presentation Server and the other is Application Server.

If you want to save it on the local PC or Presentation server,then use GUI_DOWNLOAD Function module and remove the write statements from your report.Populate the data in an internal table and pass it to the FM.

In acse, you want to download the data on the Application Server(T-code AL11),use Open Dataset and Close Dataset keywords for which you will get the documentation easily anywhere on the net.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.

Read only

Former Member
0 Likes
566

Hi,

insert your write statements inside IF statements as shown.

IF sy-batch is initial.

<< write statements>>

endif.