on 12-17-2012 12:56 PM
Hi Gurus,
My requirement was In Sales order screen in Item level we added one button if we click on that it should go directly to our own directory, so we have to create one directory path and also we need to upload images for particular sales order line item.
I tried with using class
cl_gui_frontend_services=>directory_create in that i getting Controller error Exception Please help on this issue.
Regards,
vishwanatha
Hi Vishwanatha,
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
DATA: lr_file TYPE REF TO cl_thtmlb_fileupload.
DATA: lv_str TYPE xstring,
lv_file_size TYPE sdok_fsize,
lv_filepath TYPE string.
DATA :mime_repository TYPE REF TO if_mr_api,
content TYPE xstring,
url TYPE string.
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
* Type cast server event to cl_htmlb_fileupload
lr_file ?= htmlb_event_ex.
* Assign filepath and filesize to local variables
lv_filepath = lr_file->file_name.
lv_file_size = lr_file->file_length.
* Move content to file_content
lv_str = lr_file->file_content.
CLEAR url.
CONCATENATE '/SAP/BC/BSP/SAP/MY_PICS/' lv_filepath INTO url.
mime_repository = cl_mime_repository_api=>get_api( ).
CALL METHOD mime_repository->put
EXPORTING
i_url = url
i_content = lv_str
i_check_authority = space
i_dev_package = '$TMP'.
IF sy-subrc = 0.
gv_url = url.
ENDIF.
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Regards
Rajarama U
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.