Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Radio Button validation on Selection Screen

Former Member
0 Likes
2,096

Dear All,

I have a selection screen where in which I am supposed to do a validation. Only one radio button is active at a time fine I am able to do the validation.

Here I have a mandatory field which is active only for one radio button but for the other radio button it should not be active.

I have validated it but the mandatory field I am not able to handle.

Could someone tell me how this can be done???

Thanks & Regards,

Reddy.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
880

You must handle the "Required" field manually in the code without using the OBLIGATORY extension.

report zrich_0001 .


parameters: p_rad1 radiobutton group gr1 default 'X',
            p_rad2 radiobutton group gr1.
parameters: p_fld1 type c.

at selection-screen.

  if p_rad2 = 'X'.

    if p_fld1 is initial.
      message e001(00) with 'You must fill this field'.
    endif.
  endif.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
881

You must handle the "Required" field manually in the code without using the OBLIGATORY extension.

report zrich_0001 .


parameters: p_rad1 radiobutton group gr1 default 'X',
            p_rad2 radiobutton group gr1.
parameters: p_fld1 type c.

at selection-screen.

  if p_rad2 = 'X'.

    if p_fld1 is initial.
      message e001(00) with 'You must fill this field'.
    endif.
  endif.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
880

make the field optional,(remove the mandatory addition for that parameter).

see this link:

Regards,

ravi

Read only

Former Member
0 Likes
880

the mandatory check is a system handled option which we cant change at abap runtime

Harish