cancel
Showing results for 
Search instead for 
Did you mean: 

how to give upload option to upload jpg/jpeg/gif file in web dynpro abap

sahai
Contributor
0 Kudos

hi,

i want to know how can i upload jpg/jpeg/gif file ,

i have to give option to the user to upload an image file to the server using my application any help will be highly appreciated.

thanks and regards,

sahai.s

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I think ur scenario was if you submitted multiple pernr number in 1st component ,

each pernr number should n details should appear in 2nd application,

for above scenario u can use workflow integration in wda.

for this create custom workflow pass tat pernr parameter to workflow n receive tat pernr in 2nd application .

for integrate workflow u can use swfvisu t-code

Regards,

Srinivasan.R

former_member389677
Active Participant
0 Kudos

Hi Sahai,

Please refer this link

http://help.sap.com/saphelp_nw04s/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

Hope this will helps you.

Regards

Shaira

Abhinav_Sharma
Contributor
0 Kudos

Hi Sahai,

You can use fileupload UI element to uplaod the images from your application. Now, if u want to save the images in z-tables what you can do is to write a INSERT query and thus can save the content in the table. E.g.

DATA lo_nd_n_upload TYPE REF TO if_wd_context_node.

DATA lo_el_n_upload TYPE REF TO if_wd_context_element.

DATA ls_n_upload TYPE wd_this->element_n_upload.

data ls_file_upload TYPE ZFILEUPLOAD.

  • navigate from <CONTEXT> to <N_UPLOAD> via lead selection

lo_nd_n_upload = wd_context->get_child_node( name = wd_this->wdctx_n_upload ).

  • get element via lead selection

lo_el_n_upload = lo_nd_n_upload->get_element( ).

IF lo_el_n_upload IS not INITIAL.

  • get all declared attributes

lo_el_n_upload->get_static_attributes(

IMPORTING

static_attributes = ls_n_upload ).

  • ls_n_upload will contain the File name file type and file contents *

ls_n_upload-file_size = xstrlen( ls_n_upload-file_contents ).

ls_file_upload-FILE_NAME = ls_n_upload-FILE_NAME.

ls_file_upload-FILE_TYPE = ls_n_upload-FILE_TYPE.

ls_file_upload-FILE_SIZE = ls_n_upload-FILE_SIZE.

ls_file_upload-FILE_CONTENTS = ls_n_upload-FILE_CONTENTS.

insert zfileupload from ls_file_upload.

ENDIF.

This way you can save the image in the table

Regards

Abhinav Sharma