REPORT CHAP2604.
* Data declarations for later use
PARAMETERS FILENAME(128) DEFAULT 'c:\users\default\testfile.dat'
LOWER CASE.
TABLES CUSTOMERS.
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = FILENAME
TABLES
DATA_TAB = ALL_CUSTOMERS
EXCEPTIONS
FILE_OPEN_ERROR = 1
OTHERS = 2.
CASE SY-SUBRC.
WHEN 1.
WRITE 'Error when file opened'.
EXIT.
WHEN 2.
WRITE 'Error during data transfer'.
EXIT.
ENDCASE.
* Display the result
LOOP AT ALL_CUSTOMERS.
WRITE: / ALL_CUSTOMERS-NAME,
ALL_CUSTOMERS-CITY.
ENDLOOP.
ABAP,ABAP report,Interactive Report,ALV grid,ALV list,IDOC,User Exit,RFC,Smartform,sapscript,ABAP Performance,Remote Function Module( RFC ),Function Module,Modularization techniques,ABAP tools,ALV report Generator,ABAP Interview Questions,BDC,BAPI,ALE,BADI, EDI,InternalTable,DataStructure,LSMW,Domain,DataElement,Basis and Administration ,ABAP HR development,ABAP Debugger,BW,ExceptionHandling,Download FI, CO, MM, PP, SD, PM, PS, QM, SM, HR, BW, APO,ABAP Tutorial
Search on this Website
Thursday, May 6, 2010
Reading data from a file (presentation server),ABAP Code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment