cancel
Showing results for 
Search instead for 
Did you mean: 

XLSX data is not passed to Workflow via SAP_WAPI_CREATE_EVENT

Former Member
0 Kudos

Hello,

I am having issue to pass XLSX file data to workflow container via SAP_WAPI_CREATE_EVENT. But system is not passing XLSX data to workflow container. My XLSX data is in SOLI format and then i am passing the SOLI data to event container by declaring below code.

data: it_content type standard table of SOLI,

i_container type standard table of SWCONT,

gw_container type swcont.

loop at it_content[] into wa_content.

gw_container-element = 'IT_SOLIX'.

gw_container-value = wa_content.

append gw_container to i_container[].

endloop.

call function 'SAP_WAPI_CREATE_EVENT'

exporting

object_type = 'ZTEST' (Business Object)

object_key = obj_key

event = 'TRIGGER' (EVENT)

commit_work = 'X'

importing

return_code = lv_return

tables

input_container = i_container.

I am not getting any error but system is not passing the SOLI data to workflow via event container.

Binding for event container and with workflow container is fine and having no issues.

I have tried to pass the PDF data in SOLI format and with this code it was successfully passed to workflow container.

Only for XLSX and XLS filedata, system is not passing the content to workflow container.

even i have tried using macros also with SWC_SET_TABLE, but same result. Data is not passed to workflow container.

Appreciate your help here.

Regards,

Nikhil

Accepted Solutions (0)

Answers (1)

Answers (1)

pokrakam
Active Contributor
0 Kudos

Why on earth would you want to carry around a partially decoded excel file in the workflow container? I can't think of any reason where this is a sensible approach. Either decode and read the Excel up front, or save it somewhere or attach it to WF and then read it when you need it.

Former Member
0 Kudos

Hi Mike,

Actually XLSX file is coming from fiori front end then converted it into SOLI format. Same file we need to attach it to workitem so user can see that xlsx file and based on that they will take an action. So as per the requirement, i have to send the XLSX file data to workflow container.

Regards,

Nikhil

pokrakam
Active Contributor
0 Kudos

I repeat my question: why go through all the trouble of converting to SOLI and then back again? The WF container is not really designed as a data transport, and in that format it's useless until you put it back together again, so I see no point.

If I want to transport a car I either drive it to where it needs to be or I put it on a car transporter. But I don't take it apart and go by bus.

Former Member
0 Kudos

Hi Mike,

I am repeating again that as per the requirement, i need the excel file data in my workitem. and i am not not getting the data in workflow container. So my question is how do i attach the xlsx file to my workitem.

Hope i clarify the requirement.

pokrakam
Active Contributor
0 Kudos

<sigh>

Option 1: Read Excel. Extract data. Store in table with key. Start WF with key. When needed, read data from table.

Option 2: Store Excel somewhere. SapOffice, Server, MIME repository, DMS, ArchiveLink, Z-Table, Cloud, anywhere. Attach file link/reference to WF. When needed, read file, extract data, do whatever.

Option don't-do-it: Part-decode Excel into SOLI. Stuff WF container full with half-baked intermediate program-internal format. Make sure nobody can ope it or make any sense of it other than with your special task that can recombine it (Remember that the container is accessible to users). Flummox support if they should ever try to look into container to fix any issues or answer any questions.