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

Application Server

Former Member
0 Likes
513

Hi all,

How send file to application server?

Reply me soon,

Thx,

S.Suresh.

1 ACCEPTED SOLUTION
Read only

Sm1tje
Active Contributor
0 Likes
497

OPEN DATASET and TRANSFER.

3 REPLIES 3
Read only

Sm1tje
Active Contributor
0 Likes
498

OPEN DATASET and TRANSFER.

Read only

Former Member
0 Likes
497

Hi micky,

See below this code..

DATA : FP_V_FILEPATH TYPE STRING.

data : path type string,

path1 type string,

fnam type string.

FP_V_FILEPATH = 'C:\BDC1.prn'.

DATA : BEGIN OF IT_DATA OCCURS 0,

AGE(4) ,

NAME(15),

END OF IT_DATA.

DATA : BEGIN OF WA_DATA,

AGE(4) ,

NAME(15),

END OF WA_DATA.

OPEN DATASET FP_V_FILEPATH

FOR

INPUT IN TEXT MODE ENCODING DEFAULT.

IF SY-SUBRC = 0.

DO.

READ DATASET

FP_V_FILEPATH

INTO WA_DATA .

IF SY-SUBRC = 0.

APPEND WA_DATA TO IT_DATA.

CLEAR WA_DATA.

ELSE.

EXIT.

ENDIF.

ENDDO.

ENDIF.

loop at it_data into wa_data.

write : / wa_data-age , wa_data-name.

endloop.

if wa_data is not INITIAL.

write: 'This file have in application server'.

else.

concatenate '
' sy-host FP_V_FILEPATH into path1.

condense path1 no-gaps.

call method : cl_gui_frontend_services=>file_copy exporting source = path

destination = path1.

write: ' Now This file is sent'.

endif.

This error code is displayed for bond format.

How is change it?

Reply me,

Thx,

S.Suresh

Read only

Former Member
0 Likes
497

Hi,

Please refer code below:



*   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.

Thanks,

Sriram Ponna.