cancel
Showing results for 
Search instead for 
Did you mean: 

validation of check boxes

Former Member

in one of my alv  has two rows, one column is check box, i have to validate at least one check box should be selected, could any one pls let me know  how to solve this issue

Thanks

Vijaya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First read the value of the alv table into internal table through

GET_STATIC_ATTRIBUTES_TABLE:


LT_ND_NODE->GET_STATIC_ATTRIBUTES_TABLES(IMPORTING TABLE = LT_NODE ).


then loop the internal table LT_NODE to CHECK the CHECKBOX value is 'X'.Set the flag = 1 if you find any value as 'X' or else 0(intial value).

Check if flag = 'X' then proceed further or else come out of the method.

Regards,

Priyanka

Answers (1)

Answers (1)

former_member210252
Contributor
0 Kudos

Hi Vijaya,

Once you read the values into internal table using GET_STATIC_ATTRIBUTES_TABLE then use the below code

LT_NODE->GET_STATIC_ATTRIBUTES_TABLES(IMPORTING TABLE = IT_TABLE ).

Then READ TABLE IT_TABLE into WA_TABLE where CHECKBOX = 'X'. This could result you either true or false. If true proceed as you like.

Loop on Internal table just to see if CHECKBOX is checked or not would be a performance problem rather than that just use READ statement.

Regards,

Rafi