cancel
Showing results for 
Search instead for 
Did you mean: 

Send table contents into work item

nkr1shna
Contributor
0 Kudos

Hi Experts,

We have one Z table filled with contents.

Now we need to send contents of this Z table ( maximum 10 rows) as content of workitem. Please suggest me way to achieve this feature.

Best Regards,

Krishna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

You can get the content of the table in to a multiline container element (in workflow), and then bind it to the step (which should have similar multiline container element). Then you can use the multiline element for example in the task description if you want.

Regards,

Karri

nkr1shna
Contributor
0 Kudos

Hi Karri,

Thanks for your response, Appreciated.

Can you please guide me how to fill table contents in the multi line container varaible. I am new to workflow and appreciate if you can give me some tips

Regards

Krishna

Former Member
0 Kudos

Well, you could for example create a new method to your business object. Inside this method you can do a select to the table and the method can return the internal table. Then just call this method in your workflow step and return the table to the multiline container element.

Even better would be to use new (virtual) attribute in your business object, if your scenario allows it.

If you can give some more details about what you are doing, I am sure that someone can give you more detailed answer.

Regards,

Karri

Former Member
0 Kudos

You can use the Macro SWC_SET_TABLE in order to populate the value in the method container.

Make sure you define the attribute as Export Prameter in the method and then click on the program then the code gets generated automatically and you have to write simple code regarding populating this values.

Thanks

Arghadip

nkr1shna
Contributor
0 Kudos

Thanks again for your good answers.

Let me know explain my scenario details

1. Z table is used to store item qty and item description and other details.

2. We have to read this Z table and send contents of this table as work item for approver.

3. Approver sees the contents of the Z table and decides to approve/rejects.

4. Basedon approval, using contents of Z table we have to create RFQ.

This is the overall scope of my work.

Any good suggestions/alternatives or best practices to achieve above scenario will be appreciated.

Regards

Krishna

bpawanchand
Active Contributor
0 Kudos

Hi,

I think you can make use of the work item display tab and display the whol;e contents.PLease check this [article|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/15666] [original link is broken] [original link is broken] [original link is broken];

Regards

Pavan

Former Member
0 Kudos

Now I have a feeling that you are asking that how to start a workflow and deliver the contents of a table to it (in order to display them in the work item). If this is the case, you can start the workflow with function SAP_WAPI_START_WORKFLOW (or perhaps also with SAP_WAPI_CREATE_EVENT, if you are having some suitable business object that you can use in yoru scenario). This funtion has a parameters SIMPLE_CONTAINER. You can fill the contents of your table into this parameter. This requires that you have a similar type of (input) multiline container element in your workflow.

What comes to actually displaying the table content, Pawan's blog might be helpful. Anyhow, you can also simply use the table contents in the task description directly, which is easier, but maybe doesn't look so cool.

Regards,

Karri

nkr1shna
Contributor
0 Kudos

Hi Karri

Many Thanks for responding back with more valuable inputs.

Yes, I agree with you on displaying table contents in the work item description field. Here displaying this table contents is "Key" , Since by viewing this information approver will make a call on approving or rejecting for further processing.

In case if you get any elegant alternative to display the contents, Please do let me know.

Regards

Krishna

Former Member
0 Kudos

Hi,

Well, easy solution would be to just use a decision step (With approve & reject buttons) in workflow and display the table content in the task description. Do you have some problem with this solution, or?

Or you could also just create a simple screen with an ABAPer, in which you display the table content and have approve and reject buttons. You can call this screen from the busines object (or class) method. Then just complete the work item for example with SAP_WAPI_WO*COMPLETE.

Regards,

Karri

nkr1shna
Contributor
0 Kudos

Hi Karri,

Thanks again for valuable inputs.

I like your second approach which allows approver to verify table contents seeing on the screen and using buttons he can either approve or reject.

I will try this option and come back if there are any questions. I will also share my result after completion of this step.

Many Thanks for your time and effort, Appreciated.

Regards

Krishna

Answers (0)