Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regarding Application server

Former Member
0 Likes
760

hi friends,

when we upload the data using gui_upload or ws_upload the data will stored in application server?????????

if not how can we upload the data to application server from present server?????????????

1 ACCEPTED SOLUTION
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
740

Hi

<b>Use CG3Y/CG3Z Tcodes.</b>

Regards,

Sreeram

7 REPLIES 7
Read only

Former Member
0 Likes
740

u have to use to write files into App's.server.

OPEN DATA SET.

Regards

Peram

Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
741

Hi

<b>Use CG3Y/CG3Z Tcodes.</b>

Regards,

Sreeram

Read only

Former Member
0 Likes
740

Hi,

try the following code n let me know if it helps u

*"Table declarations...................................................

tables: bkpf. " Accounting Document Header

*"Selection screen elements............................................

parameters:

p_burks like bkpf-bukrs. " Company Code

select-options:

s_gjahr for bkpf-gjahr. " Fiscal year

"----


  • Type declaration of the structure to hold Accounting Document Header*

"----


data:

begin of fs_bkpf,

bukrs type bkpf-bukrs, " Company Code

belnr type bkpf-belnr, " Accounting Document Number

gjahr type bkpf-gjahr, " Fiscal year

blart type bkpf-blart, " Document type

bldat type bkpf-bldat, " Document date in document

end of fs_bkpf.

"----


  • Internal table to hold Accounting Document Header *

"----


data:

t_bkpf like standard table

of fs_bkpf.

"----


  • Type declaration of the structure to hold file data *

"----


data:

begin of fs_table,

str type string,

end of fs_table.

"----


  • Internal table to hold file data *

"----


data:

t_table like standard table

of fs_table.

field-symbols: <fs>.

*" Data declarations...................................................

"----


  • Work variables *

"----


data:

w_char(50) type c,

w_file_name(50) type c value 'YH645_050103'.

select bukrs " Company Code

belnr " Accounting Document Number

gjahr " Fiscal year

blart " Document type

bldat " Document date in document

from bkpf

into table t_bkpf

where bukrs eq p_burks

and gjahr in s_gjahr.

if sy-subrc eq 0.

loop at t_bkpf into fs_bkpf.

do.

assign component sy-index of structure fs_bkpf to <fs>.

if sy-subrc ne 0.

exit.

else.

move <fs> to w_char.

if sy-index eq 1.

fs_table-str = <fs>.

else.

concatenate fs_table-str ',' w_char into fs_table-str.

endif. " IF SY-INDEX...

endif. " IF SY-SUBRC...

enddo. " DO...

append fs_table to t_table.

endloop. " LOOP AT T_KNA1...

endif. " IF SY-SUBRC...

open dataset w_file_name for output in text mode encoding default.

loop at t_table into fs_table.

transfer fs_table-str to w_file_name.

endloop. " LOOP AT T_TABLE...

Kishi.

Read only

Former Member
0 Likes
740

Hi Subash,

U need to use open dataset, read dataset, write dataset and close data set statements to upload data onto application server.

as ur data is on presentation server.

using standarad function modules(GUI_DOWNLOAD) get that data into one internal table and from that internal table to application server.

Regards,

Ravi G

Read only

Former Member
0 Likes
740

Hi,

Using OPEN DATASET u can do it.

Go thru this link,

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm

Regards,

Padmam.

Read only

former_member196280
Active Contributor
0 Likes
740

open dataset <DATA SET NAME> for <output/input> in <text/binary> mode encoding default. "To application server.

Use FM GUI_UPLOAD/ GUI_DOWNLOAD for presentation server.

I guess this information is useful for you.

Reward points to all useful answers.

Regards,

SaiRam

Read only

Former Member
0 Likes
740

Hi,

Use gui_upload to upload the data from Presentation server to application server, if you want to write the data into a file in application server, then use OPEN DATASET and CLOSE DATASET.

check the code below:

FORM upload_csv_file .

CLEAR gv_file.

gv_file = pa_file.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = gv_file

filetype = gc_asc

has_field_separator = gc_x

TABLES

data_tab = gt_dummy

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17.

IF sy-subrc NE gc_zero_num.

MESSAGE i006.

LEAVE LIST-PROCESSING.

ENDIF.

  • Check if the input file is blank

IF gt_dummy[] IS INITIAL.

MESSAGE i007.

LEAVE LIST-PROCESSING.

ENDIF.

ENDFORM. " upload_csv_file

Regards

Kannaiah