on 12-02-2017 7:37 PM
Hello All,
I have designed a SAPUI5 screen where I need to upload multiple files along with multiple table entries into the SAP Backend system. I was able to SAVE table entries using CREATE_DEEP_ENTITY but could not find any solution to upload multiple files using this method.
I am aware of CREATE_STREAM method which is used for file upload but in my case I cannot use it because I need to submit the payload in a single batch operation in order to complete my workflow.
One possible way would be to return a status flag from CREATE_DEEP_ENTITY and then call CREATE_STREAM subsequently but this will only increase the complications in my workflow.
Hi Ajay,
You need to call this method inside the batch operation method. Check methods where you can add the logic. Redefine methods :
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN. ( it_operation_info -> Use this parameter to call deep entity method, operation_type you can call here)
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_PROCESS.
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END.
Regards,
Tejas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know upload of multiple files/media entities/streamed data is not possible via Deep Create method because the file contents is transferred as a raw stream/xtring data. If you use a POST call and encapsulate all the files for upload in a single attempt, you cannot upload files with diffirent formats because the ContentDisposition header will be unique. Further read - https://archive.sap.com/discussions/thread/3746296
Also , how are you planning to handle the file upload in case of creation/save of table entires fails? You need to have a handshaking mechnaism between table entry creation and file upload since it looks like file upload is dependent on the table entry creation status. Think about it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.