on 10-18-2007 8:33 PM
Hi experts,
I'm a newbie in WDA and I'm facing a problem. I've finished the "Tutorial 2 - BAPI Usage" from SDN. After that I've finished "WDA Tutorial II: Using Select Options...".
Now, I'm trying to enhance the BAPI example with select options, but in SO tutorial the values retrieval and selection are implemented in a method triggered by the button pressing (there's a comment there telling not to do that, it isn't a good practice).
So, I want to read the values entered in SO in the method created by the wizard in the component controller, but I can't find out how to access those select options parameters, as they are created dynamically and not mapped to any context.
Regards.
Fabio Scaravelli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need to do something similiar. All the demos I find are retrieving data from view controller directly. However, the logic needs to reside in component controller. What is the best way to pass select-options value to component controller?
Thanks,
Min
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes, it's tru that Select Option is not mapped to any context. But we can retrive data from Select Option using field symbol.
Here is simple sample code how to retrive data from Select Option:
* Get data from selection
DATA: RT_DATUM_ID TYPE REF TO DATA.
FIELD-SYMBOLS: <FS_DATUM> TYPE TABLE.
* retrive data from select options
RT_DATUM_ID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'DATUM' ) . "DATUM is Selection Field ID
ASSIGN RT_DATUM_ID->* TO <FS_DATUM>.
That is the code to retrive data from Select Option, you just need to change the ID of Selection Field.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jatra,
Thanks for your response. This is what I've already done, but it only works in methods at view level. I want to access these values from a method at component controller level.
It says:
"Web Dynpro Comp. / Intf. Z_WDC_TASKCENTER_000,Web Dynpro Component Controller COMPONENTCONTROLLER
Method SELECIONAR_TAREFAS
Field "M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD(" is unknown. It is
neither in one of the specified tables nor defined by a "DATA"
statement. "DATA" statement. "DATA" statement."
Because M_HANDLER is a view attribute, not accessible from the component controller. I need a way to read it from that.
Regards.
Fabio Scaravelli
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.