cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting parameter of type table in Method of a Class

Former Member
0 Kudos

Hi Experts,

I want to pass an internal table from my method in ABAP class to a workflow.

For thi spurpose i have cretaed a parameter of type table in the method.

My problem is that i am not able to bind this to a workflow/task container.

I can see all the other parameters of the method in thw workflow while binding except for the parameter of type table ( i.e internal table ).

Any idea ?

Thanks,

Radhika.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

not resolved!

pokrakam
Active Contributor
0 Kudos

Table types must be defined in the dictionary.

Former Member
0 Kudos

hi,

In your case while declaring the parameters for method, task container and workflow container did you check the multiline in order to specify that the parameter being passed is an internal table.?

Also,

In the workflow builder , for your workflow,

Goto extras> transport> Synchronize run time buffer.

The binding error may also occur when there's no proper synchronization. Try the steps and check it.

Thanks

Sharath

saumya_govil
Active Contributor
0 Kudos

Hi Radhika,

Create a workflow and task container element of the same datatype as that of the internal table created in the class method.

Then while binding pass the values between the method -> workflow container -> task container.

Check the binding for errors.

Hope this helps!

Regards,

Saumya

Former Member
0 Kudos

Hi Saumya,

As replied to above, i have created multiline containers of the same type as that in the method class, but while binding the exporting table type parameter of the method is not available in the task.

Can you suggest something ?

saumya_govil
Active Contributor
0 Kudos

Hi Radhika,

I hope your class method is saved and activated without errors.

Try closing and reopening the SWDD transaction and check if still the parameter is not visible in workflow binding.

Regards,

Saumya

Former Member
0 Kudos

Hi Saumya ,

The class and the workflow both are active.

I think there is a problem with the way the table type has to be declared in the Class, not sure though.

saumya_govil
Active Contributor
0 Kudos

Hi Radhika,

Can you check the table type and data being stored in the table then.

Please state if you have any queries regarding the same.

Regards,

Saumya

Former Member
0 Kudos

The table contains just 1 field for email ids.

I have cretaed a Structure 'zemails' in se11 and declared a type 't_emails' in public section.

Public Section

Types: t_emails type standard table of zemails.

Then i created an exporting parameter 'lt_emails' of type t_emails in the method.

After the method is exceuted i get all the emails in this parameter( lt_emails which is an internal table ) .

The only problem is binding in the workflow. lt_emails is not avaliable for binding in the task.

bpawanchand
Active Contributor
0 Kudos

Assuming that you are trying to export the internal table from class method to task conatiner.

I have cretaed a Structure 'zemails' in se11

Already you have created a Structure in the SE11 , why don't you just create one Table Type of ZEMAILS in SE11. Once you hvae created in DDIC then in the class signature declare the ltmails of type the tabale type that you create. and then in the task conatiner also try to declare the container element with the same name and same table type.

In the class method declare the lt_mails as Exporting. save and actiavte. And one more thing if that element is not present in the Task conatiner then as soon as you try to open in the change mode and click on the binding button of the task it will prompt you asking whether you want to trnasfer the mssing elements if you clcik Yes then the same element which you have declared in the class will created with the same type. but make sure in the task conatiner you delcare the lt_mails as IMport export element.

Former Member
0 Kudos

Hi,

Assign Table Type to the Workflow Container Elements , same do it in Method Container, and in task click the missing elements that popus up and bind the Task with the Method.

also,

is your table type a Local Type or is it a global data object ??

Let me know if this works

Thanks

Ravi

Former Member
0 Kudos

Hi Ravi,

Thank You for the quick response.

The table type is a local type that i have declared in the public section of the class.

I have created multiline containers in the task and the workflow, but when i do the binding between the task and the method, the table type variable is not available to bind .

Can you tell me where i am going wrong ?

Thanks

Radhika.