cancel
Showing results for 
Search instead for 
Did you mean: 

In webdynpro ,Passing field symbols as values to class methods

Former Member
0 Kudos

Hi

Please tell me the ways of accessing database in webdynpro abap(not directly). I am calling Class method for accessing database. As currently I am directly accessing database in my webdynpro application. I have created a class and method for the same.

In my method I want to use select statement which will return table with values to webdynpro application. So for select statement(Calling Method) I need to use my field symbol values as where in clause .

Could anyone please help with example code?

Thanks,

Ujjwal

Accepted Solutions (0)

Answers (3)

Answers (3)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

data: in_line type ref to data.

CREATE DATA in_line LIKE LINE OF <dyn_tab>.

ASSIGN in_line->* TO <dyn_wa>.

You can create a data reference and assign it to a field symbol and change the values. direclty passing field symbols is not possible.

Abhi

alejandro_bindi
Active Contributor
0 Kudos

A Data reference (TYPE REF TO data) is not the same as a field symbol.

You cannot pass field symbols as method parameters and this applies to ABAP OO regardless of Web Dynpro. (use the right forum next time).

What you can do is simply declare the parameters with the same type of the variables the field symbols are pointing to. If it is generic then use DATA as the parameter type (not TYPE REF TO data).

Regards

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Ujwal

You can have type ref to DATA as method parameters and pass it to the method.

Abhi