cancel
Showing results for 
Search instead for 
Did you mean: 

Passing data entered in report to form of workflow

Former Member
0 Kudos

How to send data from Report SE38 to workflow? I want to send employee details filled in form generated after execution of report to local administrator for taking decision. i want to send data entered in report to form of workflow. Can anybody give any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

former_member184495
Active Contributor
0 Kudos

Hi NC,

are you calling your WF from a report,

or your report is run from the WF and again you want those values from your report to the FORM of your WF?

Aditya

Former Member
0 Kudos

I am calling workflow from report using following code

emp-element = 'PERNR'.

emp-value = '1000'.

emp-TAB_INDEX = 1.

emp-type = 'C'.

emp-elemlength = 18.

append emp.

KEY = '1000'.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'ZBUS1000'

objkey = KEY

event = 'HIRED'

CREATOR = w_creater

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

START_RECFB_SYNCHRON = 'X'

  • NO_COMMIT_FOR_QUEUE = ' '

  • DEBUG_FLAG = ' '

  • NO_LOGGING = ' '

  • IDENT =

  • IMPORTING

  • EVENT_ID =

TABLES

EVENT_CONTAINER = emp

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2

.

but i am not getting data in the workflow form.

Former Member
0 Kudos

Hello,

Please recheck whether the event 'HIRED' in the BO ZBUS1001 has the event parameter to store the PERNR that is being passed. If not create one if you want to send the PERNR from the report. If you want to send many fields, then it is better that you create a structure of all the fields and use the same in the event parameter and in the report to fill and pass it through the event_container parameter in the same way as you are doing now.

Hope this is clear and will help you.

Regards,

Samson

Former Member
0 Kudos

i am giving screen shot of the event for my object

Overview

Parameter Obj. Type First Release

modify_wa ZBUS1000 700

pernr ZBUS1000 700

and the code is

swc_create_container emp.

emp-element = 'pernr'.

emp-value = '1001'.

emp-TAB_INDEX = 1.

emp-type = 'C'.

emp-elemlength = 18.

append emp.

*swc_set_element Emp 'PERNR' 1111.

KEY = '1000'.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'ZBUS1000'

objkey = KEY

event = 'HIRED'

CREATOR = w_creater

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

START_RECFB_SYNCHRON = 'X'

  • NO_COMMIT_FOR_QUEUE = ' '

  • DEBUG_FLAG = ' '

  • NO_LOGGING = ' '

  • IDENT =

  • IMPORTING

  • EVENT_ID =

TABLES

EVENT_CONTAINER = emp

EXCEPTIONS

OBJTYPE_NOT_FOUND = 1

OTHERS = 2

.

still it is not working can you correct me please.

Former Member
0 Kudos

Hi,

First of all, how many fields do you want to send from the report to the workflow....Is it just a PERNR or some other fields as well.

If you want to pass more than one, what I feel better is to create a new structure type first. Use the same structure to create an event parameter in the event of the BO. Use the same in the report as well.

Hope I am not confusing you.

Regards

Sam

Former Member
0 Kudos

I want to pass all fields of a z table.

While creating event parameters it asks create with ABAP Dictionary field proposals? shall i say yes to this and pass the table? If i do that it doesnt show anything in parameter list.

If i say no i will have to create parameters one by one .

please suggest on this.

Former Member
0 Kudos

Hello,

Say no when the system asks to create with ABAP Dictionary field proposals. Once you give a name to the parameter, in the section of 'Data Type reference', give the name of your ztable in the field 'Reference Table'. Make it a multiline parameter if you want to pass many entries of the table.

In this way you can create the parameter which has the same structure as that of the table. Now in the program populate a work area with the values first and then use this workarea while populating the variable event_container of the function module SWE_EVENT_CREATE.

Hope this will help.

Regards,

Samson

Former Member
0 Kudos

Parameter PERNR

Object type ZBUS1000

Release 700

Name PERNR

Description PERNR

Reference table ZEMP_TAX_DED

Reference field PERNR

I have created field PERNR in above way .

And then writing the code.

data : emp TYPE STANDARD TABLE OF swcont with header line.

emp-element = 'PERNR'.

emp-value = '1001'.

emp-TAB_INDEX = 1.

emp-type = 'C'.

emp-elemlength = 18.

append emp.

and passing emp to EVENT_CONTAINER of SWE_EVENT_CREATE

Still it is not working.Can you help?

Former Member
0 Kudos

Hi,

First check whether the variable event_container is filled properly or not by debugging the report. Then check the binding from the event to workflow container. In the workflow log check whether the data has been passed through the event parameter to the workflow container. You must have created an element in the workflow container with reference to PERNR. Check the binding.

In this way you will be able to figure out as to where the fault is.

Hope this will help.

Regards,

Samson

Former Member
0 Kudos

Where can i see whether data has been passed through the event parameter to the workflow container or not. Please help.

Former Member
0 Kudos

Hello,

You should have linked the event 'HIRED' as the triggering event to the workflow that you want to start. Select the entry and click on the binding.....In the binding editor please check that the event parameter 'PERNR' is mapped to an element in the workflow container. If you havent created a parameter, then create an element in the workflow container of type PERNR and map the same in the event binding.

If the above is fine. Check the workflow log by creeating one of the instances.

Hope this will help.

Regards,

Samson

Former Member
0 Kudos

Thanks a lot. I got the data in the Form of workflow.

Former Member
0 Kudos

Can you please tell me how to put the data entered in the Form of workflow to ztable?

Former Member
0 Kudos

Hi,

Create a method in the BO to update the data that is entered in the form. Import the values into the method and use the ABAP coding to update the table.

A small suggestion that it would be better if you could raise a new thread for this.

Hope this will help.

Regards,

Samson

Former Member
0 Kudos

I have raised a new thread . Can you please tell me in detail ? While creating method it is asking Create with function module

as template? If i say yes it is asking for FM . If i say no it is asking for many parameters , which one suits my requirement i dont know.

Please ans to my new thread.

Answers (0)