2008 Aug 25 11:02 AM
Then how can I get the information?
For exmple.
cl_my_clss->get_value( exporting ev_data = .... ) .
ev_data is a type of data.
I can not use DATA : lv_mine type data. because generic data should be used in formal parameter, however , if I use a field symbol, how to assign value with out knowing the data type?
Best regards,
Hi Blake,
As per my understanding,
You are getting the data type from the database table....
You want to use the same data type....
Lets say for example:
You have a db table x with field y having data type Z.
What you do is that, while declaring the data type for the attribute in the method use the reference as table_name-field_name(x-y).
Or....
use ANY. This will give you a chance to map any field type to this method....
Note: Using ANY will limit the syntax that you can use within the method......
Regards,
Kunjal
2008 Aug 25 11:36 AM
Hello Blake,
I am a little confused about the requirement. Can you please elebroate the same so that better understanding can help me give you some precise solution...
Regards,
Kunjal
2008 Aug 27 7:30 AM
Hi Kunjal,
I just want to know, for example there is a method called set_attribute:
set_attribute( importing type data )
in my program where invoke the set_attribute
I also don't know the data type of my code. Because they are get from a table.
which type I should use ? I can not use
DATA : lv_data type data.
Because it can only be used as a formal parameter.
Best regards,
Blake Le
2008 Aug 27 7:39 AM
Hi Black,
In the data declaration Declare a data object with type ANY and then use this data object as the Type of importing Parameter.
like.
field-symbols <v_data> type ANY.
method get_value importing lv_data like <v_data>.
2008 Aug 27 7:46 AM
Hi Blake,
As per my understanding,
You are getting the data type from the database table....
You want to use the same data type....
Lets say for example:
You have a db table x with field y having data type Z.
What you do is that, while declaring the data type for the attribute in the method use the reference as table_name-field_name(x-y).
Or....
use ANY. This will give you a chance to map any field type to this method....
Note: Using ANY will limit the syntax that you can use within the method......
Regards,
Kunjal
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |