cancel
Showing results for 
Search instead for 
Did you mean: 

error : passing parameters from method to FM is empty ?

Former Member
0 Kudos

Hello,

import parameters are not being passed to the end ???

i have a workflow with a task, this task is calling a method called METHOD1 and this method is linked to a function module FM1.

The workflow is triggered by an even, so i did binding between the event container and the workflow container, and then between the workflow container and the task container, so METHOD1 has import parameters.

when i debug, the values of the import parameters are in the source code of the program under SWO1 but when from there the system calls FM1 prviding the correct import parameters for FM1, the parameters are not reaching, when debugging FM1 i see that its import parameters are empty.

Any ideas as to why this is happening ?

points are awarded.

Regards

Accepted Solutions (0)

Answers (2)

Answers (2)

pokrakam
Active Contributor
0 Kudos

Hi,

I suggest you check the log and follow your parameters all the way through. Firstly, use the technical log!

Now look at the WF container (top-level item). Value there - good. If not then event binding is broken or value isn't in the event.

Then click on the item representing your task and see if your values are in the container. If not then task binding is broken.

You can also test the task on its own using SWUS.

Hope that helps,

Mike

0 Kudos

Hi,

Just a check:

1. I hope you are doing the SWC_GET_ELEMENT CONTAINER (Workflow Container) (Variable).

2. Are the values coming into the variables? Can you see the values while debugging

3. Just play around with the Import parameter type. Change it to pass by value. I think this should not affect but just on curiosity.

Else, it should work. I am not sure why you are not getting the values!

Best regards,

Sudhi

Former Member
0 Kudos

Hello,

thanks for your answers.

Still did not work. Here is what i have:

the workflow is triggered by the even "changed"

so i am binding the object key from the event container to the workflow container, and then from the workflow container to the task container. the task takes a method that has import parameters, these import parameters are the keys of the object that created the event. So when the task is calling the method, the import parameters have values, then this method exports these parameters to the function module, the function module have import interface, in the function module, the parameters are reaching empty, but when i am in the method the parameters have values. so why i am loosing these values once the method calls the function module.

I tried doing pass by reference and pass by value -> did not work.

- Yes i made sure that they are of the same types

- what is SWC_GET_ELEMENT CONTAINER and why should i use it -> No i am not using it.

-the variables that i defined in the workflow container are set as , import, export and mandatory. - > is this correct ? i tried import and mandatory but this too did not work.

Can you guys please provide me with more insight as to why this is happening ?

regards

points are awarded.

Former Member
0 Kudos

Hello again,

yes i am using SWC_GET_ELEMENT CONTAINER in the source code of the program of the method.

0 Kudos

I am not sure why this is happening. If you have checked the workflow log and all the container elements are filled. Even the note 318860 does not apply here as the values are transferred from the Task to the Method.

The workaround to this is that you can pass the WIOBJECT to the task container. By doing this you pass the entire instance to the taks container and then you can just use your Attributes and key fields to get the value.

Hope this helps,

Sudhi