cancel
Showing results for 
Search instead for 
Did you mean: 

clearing the values in table while selecting a value from f4 help

Former Member
0 Kudos

Dear Friends,

i have an issue, i selected a value from input field ( f4 help, OVS ) in header data , based on the value one line item is displayed in table ( line items ), now the issue is again if i select another value from ( f4 help ), i am not able to clear previous data in table

could any one pls let me know how to solve this issue

Regards

Vijaya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vijaya Laxmi,

You clear the Item table node before filling with the new item data corresponding to new header field.

Regards,

Ravikiran.K

Answers (1)

Answers (1)

0 Kudos

Hi Vijaya,



method ONACTIONSELECT_SEARCH .

   DATA: NODE_EMPLOYEE TYPE REF TO IF_WD_CONTEXT_NODE .

   DATA: RT_EMPID TYPE REF TO DATA .

   DATA: IT_EMPLOYEE TYPE TABLE OF ZJOYJIT_EMPLOYEE ,

         WA_EMPLOYEE TYPE ZJOYJIT_EMPLOYEE .

FIELD-SYMBOLS: <FS_EMPID> TYPE TABLE .

* RETRIEVING DATA FROM THE SELECT OPTIONS .

   RT_EMPID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'ZEMP_ID' ) .

* ASSIGN IT TO A FIELD SYNBOL .

   ASSIGN RT_EMPID->* TO <FS_EMPID> .

CLEAR IT_EMPLOYEE.

REFRESH IT_EMPLOYEE .

* GET DETAILS FOR THE SELECT_OPTION .

CALL METHOD WD_ASSIST->GET_SELECT_OPTION

                     EXPORTING

                       IM_FS_EMPID = <FS_EMPID>

                     IMPORTING

                       LT_EMPLOYEE_D = IT_EMPLOYEE .

NODE_EMPLOYEE = WD_CONTEXT->GET_CHILD_NODE( 'EMPLOYEE_DETAILS' ) .

SORT IT_EMPLOYEE BY EMP_ID ASCENDING.

NODE_EMPLOYEE->BIND_TABLE( IT_EMPLOYEE ) .

endmethod.

You can clear and refresh the internal table, and then again bind the new internal table based on your search criteria. Refer to the above mentioned code. I think you will get a better idea.

Thanks & Regards,

Joyjit Biswas