2007 Jun 05 3:24 AM
Hi all,
I need to place the contents of an internal table to the application server.
I have the file path.
can anybody tell me in which modes i have to open the dataset and the procedure for doing it.
Thanks,
Praveena.
2007 Jun 05 3:29 AM
Hey praveena
U need to write pice of code for this.
Try This transaction. CG3Z or CG3Y(ANY one will these tcode used to upload data to App. server.
Reward me its helpful
Ravi
Hey praveena
U need to write pice of code for this.
Try This transaction. CG3Z or CG3Y(ANY one will these tcode used to upload data to App. server.
Reward me its helpful
Ravi
2007 Jun 05 3:26 AM
data p_file(128) type c.
open dataset p_file for output in text mode .
loop at uritab.
transfer to p_file
endloop.
close dataset p_file
2007 Jun 05 3:29 AM
Hey praveena
U need to write pice of code for this.
Try This transaction. CG3Z or CG3Y(ANY one will these tcode used to upload data to App. server.
Reward me its helpful
Ravi
2007 Jun 05 3:33 AM
data file(128) type c value 'file.txt'.
open dataset file for output in <b>text</b> mode .
loop at <itab>."where your data is in
transfer itab TO file
endloop.
close dataset file .
Reward points to all useful answers.
Regards,
SaiRam
2007 Jun 05 3:33 AM
hi Praveena,
do this way ...
* Download internal table to Application server file(Unix)
DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.
open dataset e_file for output in text mode.
lOOP AT it_datatab......
transfer it_datatab to e_file.
ENDLOOP.
close dataset e_file.CG3Y - to download file from application server.
CG3Z - to upload file from presentation server to application server.
Regards,
Santosh
2007 Jun 05 11:45 AM
Hi Praveena,
Find the code below which explains the sytax to put data into the application server. Here "P_FILE2" is a parameter which would contain the name of the file in application server.
Name of the internal table is it_main1 here all the fields are converted into the text format and "TRANSFER" syntax is used.
-
OPEN DATASET p_file2 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
MESSAGE text-015 TYPE 'E'.
ENDIF.
LOOP AT it_main1 INTO x_main1.
TRANSFER x_main1 TO p_file2.
ENDLOOP.
CLOSE DATASET p_file2.
-
Reward points if useful.
Thanks,
Tej..
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |