‎2008 Sep 24 6:10 AM
Hi All,
currently I am working for Data Migration, and i need to copy my flat file to Application Server.
How to write a program to do this using Data Sets..
Regards,
Anil.
‎2008 Sep 24 6:14 AM
HI
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
READ DATASET p_file INTO wa_account.
IF sy-subrc <> 0.
EXIT.
ELSE.
APPEND wa_account TO t_account.
ENDIF. " If sy-subrc <> 0.
ENDDO. " DO
CLOSE DATASET p_file.OPEN DATASET p_file FOR INPUT---> this line is for reading the data set
OPEN DATASET p_file FOR OUTPUT --> this is to write data to the data set
instead of READ you need to use TRANSFER statement to write the data to the data set after opening the file in OUPTUT mode.
after transferring the data CLOSE the DATASET.
to upload the data from flat file use GUI_UPLOAD FM pass the table
Regards
Pavan
‎2008 Sep 24 6:14 AM
HI
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
READ DATASET p_file INTO wa_account.
IF sy-subrc <> 0.
EXIT.
ELSE.
APPEND wa_account TO t_account.
ENDIF. " If sy-subrc <> 0.
ENDDO. " DO
CLOSE DATASET p_file.OPEN DATASET p_file FOR INPUT---> this line is for reading the data set
OPEN DATASET p_file FOR OUTPUT --> this is to write data to the data set
instead of READ you need to use TRANSFER statement to write the data to the data set after opening the file in OUPTUT mode.
after transferring the data CLOSE the DATASET.
to upload the data from flat file use GUI_UPLOAD FM pass the table
Regards
Pavan
‎2008 Sep 24 6:15 AM
hi,
before asking basic questions search in SCN u will get lot of posts.
u can use CG3Y,CG3Z transactions to upload and download files to application server.
or u can use open dataset,closed dataset concept.
‎2008 Sep 24 6:15 AM
What about F1 on read Data set??SAP says somthing or completely dumb?