cancel
Showing results for 
Search instead for 
Did you mean: 

Popup for file path in WEB DYNPRO

Former Member
0 Kudos

Hi,

I have a requirement like below:

I have a button in my view. When I clicked on that button it should show popup to select a file.

Could you please help me out.

I tried using file upload UI element. But, it is only to select existing files in PC. But, for me I may choose new file also, sinc I need to download the data into that file.

Please help me out.

BOTTOM LINE IS : I NEED TO DOWNLOAD THE DATA INTO THE FILE GIVEN IN POPUP.

Thanks,

Sandeep

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

I tried using file upload UI element. But, it is only to select existing files in PC. But, for me I may choose new file also, sinc I need to download the data into that file.

Have you tried using the [file download UI element?|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/58/0cc24133c06324e10000000a1550b0/frameset.htm]

seems to me that this would be only logical...

Answers (2)

Answers (2)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

When you use File Download UI element, you will get a save option where system automatically shows a dialog to select the path.

phanir_mullapudi
Active Participant
0 Kudos

Hi, If its a server file, try to use something like this functionality we use in an abap program.

CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'

IMPORTING

serverfile = p_file ( your file path & name in server, If file name doesnt exist, it will be created in that path )

EXCEPTIONS

canceled_by_user = 1

OTHERS = 2.

Once you have all your data in internal table i_output,

OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT MESSAGE v_message.

LOOP AT i_output INTO w_output.

TRANSFER w_output-line TO p_file.

CLEAR w_output.

ENDLOOP.

CLOSE DATASET p_file.