‎2006 Jul 26 8:11 AM
hi mates
i used open dataset file <file name> ,now is there any need to use call funcation upload for data migration to application server r the above syntax is enough.
‎2006 Jul 26 8:16 AM
Hi Devan,
Then DataSet Syntax is used only to open and read the File. you can pass these value to an internal table and use Call Transaction or use Direct insert statement or BAPI specific for inserting into the Target Database.
Thanks,
Prashanth
‎2006 Jul 26 8:20 AM
hello,
*To open the data set
OPEN DATASET P_SFILE FOR OUTPUT IN TEXT MODE
*Move data to dataset
Loop at itab.
transfer itab to p_sfile.
endloop.
*Close Dataset
CLOSE DATASET P_SFILE .
Regards,
Naimesh
‎2006 Jul 26 8:23 AM
Hi,
Use the following code.
OPEN DATASET FILE1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
IF SY-SUBRC EQ 0.
Transfer File to Application Server
LOOP AT ITAB.
TRANSFER ITAB TO FILE1.
ENDLOOP.
ELSE.
MESSAGE I000(VZ) WITH 'Exception'.
ENDIF.
CLOSE DATASET FILE1.
Regards,
Viven
‎2006 Jul 26 8:24 AM
for uploading you have to use TRANSFER command
DAta FNAME(20) value 'AMIT'
TYPES: Begin of line,
col1 type I,
col2 type I,
end of line.
TYpES ITAB type LIN occurs 10.
DAta: lin type line,
tab type itab.
OPEN DATASET FNAME FOR OUTPUT.
LOOP AT ITAB.
TRNASFER LIN TO FNAME.
ENDLoop.
OPEN DATASET FNAME for Input.
DO.
READ DATASET FNAME into LIN.
if sy-subrc <> o.
exit.
endif.
write: / lin-col1, lin-col2.
enddo.
close dataset FNAME.
Message was edited by: amit bhadauria
Message was edited by: amit bhadauria
‎2006 Jul 26 8:25 AM
Hi Devan,
The upload FM is used only to upload data from ur presentation server(desktop) to internal table.
Once internal table is ready, un can upload it to application server using dataset syntax.
Sreedhar