Application Development 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: 

Transfer file to application server

Former Member
0 Kudos

Hi,

Is there any Fm to send a file from presentation server to application server.

Regards

Nishant

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi nishant,

1. CG3Z

2. we can use the above tcode for this purpose.

3. Internall it calls this FM.

<b>C13Z_FRONT_END_TO_APPL</b>

regards,

amit m.

5 REPLIES 5

Former Member
0 Kudos

Hi nishant,

1. CG3Z

2. we can use the above tcode for this purpose.

3. Internall it calls this FM.

<b>C13Z_FRONT_END_TO_APPL</b>

regards,

amit m.

0 Kudos

You can also try the tcode CG3Z to upload your file.

Former Member
0 Kudos

Hai Nishant

Try with the following Code

tables : mara.

data : begin of it_mara occurs 0,

matnr like mara-matnr,

ernam like mara-ernam,

mtart like mara-mtart,

mbrsh like mara-mbrsh,

meins like mara-meins,

end of it_mara.

selection-screen begin of block b1 with frame title TEXT-001.

parameters : P_file like rlgrap-filename

default 'G:\Sreenivasulup.txt'.

selection-screen skip 1.

select-options : S_matnr for mara-matnr.

selection-screen end of block b1.

at selection-screen on value-request for p_file.

*--Get the F4 help for Sales Deal File

perform get_val_help changing p_file .

*start-of-selection.

  • perform select_data.

end-of-selection.

  • if not it_mara[] is initial.

perform Display_Appl_data.

  • endif.

&----


*& Form select_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM select_data.

select

matnr

ernam

mtart

mbrsh

meins

into table it_mara

from mara

where matnr in S_matnr.

ENDFORM. " select_data

&----


*& Form get_val_help

&----


  • text

----


  • <--P_P_FILE text

----


FORM get_val_help CHANGING P_P_FILE.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

FILE_NAME = p_file.

IF SY-SUBRC <> 0.

else.

message s003 with 'File' 'Saved' 'Sucessfully'.

ENDIF.

ENDFORM. " get_val_help

&----


*& Form Display_Appl_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM Display_Appl_data.

OPEN DATASET P_FILE FOR INPUT IN BINARY MODE. "TEXT MODE ENCODING

*DEFAULT.

do.

read dataset P_FILE into it_mara.

IF SY-SUBRC = 0.

append it_mara.

clear it_mara.

else.

exit.

ENDIF.

enddo.

CLOSE DATASET P_FILE.

loop at it_mara.

write : / it_mara.

endloop.

ENDFORM. " Display_Appl_data

Thanks & Regards

Sreenivasulu P

Former Member
0 Kudos

hi Nishant

I think there is no seperate Fm to send file directly from PS to AS . We should fist upload data from PS to the internal table and then from Internal table to AS using Open data set.

Regards

sandhya

0 Kudos

THanks a lot guys... Problem solved..

I have rewarded points for helpful answers..

Cheers

Nishant