cancel
Showing results for 
Search instead for 
Did you mean: 

Uploading Files

Former Member
0 Kudos

Hi All,

I have a requirement where i need to enhancement the standard Web dynpro Component where i need to attach the UI elements to upload the Files and save them in Background.

This is an requirement from E-rec Application in Registration Page. I need to add the Attachment on the initial screen before the user profile is created and then i need to submit the the Attachment (Resume) in system after the Profile is created.

I have seen the standard Webdynpro component where we submit the attachment after the user profile is created. but how to attache the file on the screen before the user is created and submit the it in IT 5134 after the user profile is created.

Could any one help me out to achieve this requirement.

Thank You!

Regards

Naram

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Create a context node with attributes

NAME - STRING

TYPE - STRING

CONTENT - XSTRING

Bind it with properties of the File upload UI Element

NAME - fileName

TYPE - mimeType

CONTENT - data

Once you select the file. Name, type and content will automatically come to the context node. From the context node you can process the data.

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

This link will help you.Steps for uploading.

http://www.sap.com/turkey/partners/icc/scenarios/pdf/HTTPAPI_E.pdf

Regards,

Karthik.R

manigandan_d2
Explorer
0 Kudos

Attach means, you need to add resume and store the file in the back end.

For that we need to maintain three fields in back end table (custom table) with other key fields.

1) Attachment data - Xstring (type)

2) Attachment Type - string (type)

3) Attachment name - String (type)

From the File Upload UI element

UI "data" field to -> Attachment data

UI "fileName" field to ->Attachment name

UI "mimeType" field to ->Attachment type

Update/ save it in back end table, based on the requirement.

Opening the Attachment in UI in event Action:

Pass the table value to the below class as mentioned.

cl_wd_runtime_services=>attach_file_to_response(

EXPORTING

i_filename = Attachment_name

i_content = Attachment_data

i_mime_type = Attachment_type ).