*&---------------------------------------------------------------------*
*& Report ZINPUT_MODE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZINPUT_MODE NO STANDARD PAGE HEADING.
*& Report ZINPUT_MODE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZINPUT_MODE NO STANDARD PAGE HEADING.
DATA: V_FILE TYPE STRING.
" ZAPP_SERVER.TXT CONTAINS SHIPPMENT HEADER DATA IN APPLICATION SERVER
V_FILE = 'ZAPP_SERVER.TXT'.
DATA: V_STRUCTURE TYPE STRING. " FOR DISPAYING THE DATA
****************************************************************
" OPEN DATASET STATEMENT IS USED TO OPEN/PLACE OUR FILE IN
" THE APPLICATION SERVER EITHER IN TEXT MODE OR BINARY MODE
" OR LEGACY BINARY MODE.
" HERE INPUT MEANS READING THE DATA INTO THE FILE.
***************************************************************
OPEN DATASET V_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC <> 0.
MESSAGE E000(ZMY_MESSAGE)." FILE CANT BE OPENED
ELSE.
DO.
*****************************************************************
" READ DATSET STATEMENT IS USED TO READ THE DATA FROM
" APPLICATION SERVER.
****************************************************************
READ DATASET V_FILE INTO V_STRUCTURE.
IF SY-SUBRC NE 0.
EXIT.
ELSE.
WRITE:/ V_STRUCTURE. " DISPLAYING THE DATA
ENDIF.
ENDDO.
ENDIF.
CLOSE DATASET V_FILE.
OUTPUT: