on 08-22-2012 1:51 PM
Hello All,
I have an object WDEVENT TYPE REF TO CL_WD_CUSTOM_EVENT.
now i have written the below code.
DATA LT_PARAMS TYPE WDR_EVENT_PARAMETER_LIST.
DATA LS_PARAMS TYPE WDR_EVENT_PARAMETER.
*Check if toggle cell is getting expanded or colapsed.
LT_PARAMS = WDEVENT->PARAMETERS.
READ TABLE LT_PARAMS INTO LS_PARAMS WITH KEY NAME = 'EXPANDED'.
IF LS_PARAMS-VALUE = 'X'. i.e. node expanded.
I want to do some coding here to populate a table popin based on my requirement.
But the problem is i am getting an syntax error saying i can not compare the ls_params-value with 'X' as ls_params-value is refreing to generic data type DATA.
i tried to get this value into fieldsymbol but still facing the same problem.
Pls suggest how can i compare this value? or how can i get the value in ls_params-value into any charecter variable?
solved my self..thankyou.. i have done in this way
DATA LT_PARAMS TYPE WDR_EVENT_PARAMETER_LIST.
DATA LS_PARAMS TYPE WDR_EVENT_PARAMETER.
FIELD-SYMBOLS : <FS_VALUE> TYPE STRING.
DATA : LV_VALUE TYPE C.
*Check if toggle cell is getting expanded or colapsed.
CLEAR : LT_PARAMS[],LS_PARAMS.
LT_PARAMS = WDEVENT->PARAMETERS.
READ TABLE LT_PARAMS INTO LS_PARAMS WITH KEY NAME = 'EXPANDED'.
ASSIGN LS_PARAMS-value->* TO <FS_VALUE> CASTING.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moved to correct space as suggested by Amy.
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramanuja,
I think you didn't get any replies because the discussion is in the wrong forum. I think you wanted the community, Web Dynpro ABAP.
I know you've already solved the issue yourself, but in case it is helpful to you, class CL_WD_CUSTOM_EVENT has methods that will let you read an individual parameter and automatically cast it to a non-generic data type. For example,
wdevent->get_char(
exporting
name = 'EXPANDED'
importing
value = lv_char01 ).
if lv_char01 = 'X'.
* node is expanded
endif.
You can also read all parameters at once, casting the name/value pairs to type string.
wdevent->get_data(
exporting
name = if_wd_application=>all_url_parameters
importing
value = lt_parameters ). " type tihttpnvp
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.