Hello Guru's,
I need a clarification and detailed explanation ( Code ) for my query.
Is it possible to refer field symbols in the assistant class method. i just gone through one example WDA program of select-options.
**************** - Using Select-Options in Web Dynpro for ABAP
In that they mentioned field symbols . But simply they written the code in view. As far as my understanding sql queries should not write inside view.
So iam practising to write each and every sql queries ( select queries ) inside assistant class. Could you please explain me how to write or refer field symbols inside assistant class method.
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
DATA: WSFLIGHT TYPE SFLIGHT.
FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.* Retrieve the data from the select option
RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).* Assign it to a field symbol
ASSIGN RT_CARRID->* TO <FS_CARRID>.CLEAR ISFLIGHT. REFRESH ISFLIGHT.
SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
WHERE CARRID IN <FS_CARRID>.
NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
ENDMETHO
In other words.simply i dont want select query in middle of that code.. i need to metion that in assistant class method. and should need to call the assistant method here. please help.