on 07-15-2012 4:00 AM
hi
how to upload any file (.txt,.doc,.xls,.pdf etc.) from desktop to application server without validating and without bringing into internal table ,in webdynpro abap .
your afforts will be appriciated.
It cannot be done. What ever file u upload, It is first filled in the internal table and then processed further.Morever i recommend validating is a good practice. May i know the requirement that why u want to do like that ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use file upload UI element to upload the file from desktop to webdynpro, and then read the file content(XSTRING format) from the attribute binded to FILE UPLOAD UI element and write below logic to transfer the content to Application server.
CONSTANTS path_name TYPE localfile VALUE '/usr/sap/tmp/'.
DATA lo_nd_upload TYPE REF TO if_wd_context_node.
DATA lo_el_upload TYPE REF TO if_wd_context_element.
DATA ls_upload TYPE wd_this->element_upload.
*
** navigate from <CONTEXT> to <UPLOAD> via lead selection
* lo_nd_upload = wd_context->get_child_node( name = wd_this->wdctx_upload ).
*
* lo_el_upload = lo_nd_upload->get_element( ).
** get all declared attributes
* lo_el_upload->get_static_attributes(
* IMPORTING
* static_attributes = ls_upload ).
CONCATENATE path_name ls_upload-file_name into file.
OPEN DATASET file FOR OUTPUT IN BINARY MODE MESSAGE msg.
TRANSFER ls_upload-file_content TO file.
CLOSE DATASET file.
Regards, Venkat.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.