‎2010 Feb 04 11:54 AM
hai all,
i am working on a module pool program based on radio buttons and check boxes, the requirement is
Grouping radio Buttons Place 5 radio buttons and group 2 as one group and 3 as another group. If any of the first group radio button is selected a check box should be visible. If any of the second group radio button is selected check box should be invisible. When that Check box is checked a list box should be visible.
i designed the screen and wrote logic for button . when i am trying to execute i am getting an error called
invalid field format(screen error)
‎2010 Feb 04 11:56 AM
Hi,
Provide more information so that we can help.
At which line are you getting the error?
Debug the program and you will find it.
‎2010 Feb 04 11:58 AM
hai,
after executing when i am trying to click radio buttons and push button for 'exit'. i am getting error.
‎2010 Feb 04 11:59 AM
Hi
Genrally these kind of error occurs because of different data type defined in Screen Layout and in Coding.
Check First the Field which you have created in layout is of same data type as of your internal table field. If you have specified your field in coding part of type 'I'. So in layout also it should be defined of type 'I' with same length. By default it takes char format.
Thanks
Suganya
‎2010 Feb 04 12:02 PM
‎2010 Feb 04 3:32 PM
Hi Gautam,
I just tried with 2 check boxes in each group and got it right.
Please check the following points:
1. Declare all the radio buttons and check boxes as character variables with length 1, in the TOP Include
Eg:
data: rad1(1),
rad2(1),
rad3(1),
rad4(4),
check(1),
visible(1) value ' ', " variable declared as a status flag
ok_code like sy-ucomm.In the MODULE USER_COMMAND_xxxx (of PAI), write the logic to set / reset the status flag according to the radio button selection:
Eg:
MODULE USER_COMMAND_0100 INPUT.
case ok_code.
when 'R1'.
visible = 'X'.
when 'R2'.
visible = ' '.
when 'EXIT'.
leave program.
endcase.
ENDMODULE.3. In the PBO, create a module to display the check box if the flag is set.
Eg:
if visible = 'X'.
loop at screen.
if screen-name = 'CHECK'.
screen-invisible = 0.
modify screen .
endif.
endloop.
endif.
if visible = ' '.
loop at screen.
if screen-name = 'CHECK'.
screen-invisible = 1.
modify screen .
endif.
endloop.
endif.Regards,
Shiny
‎2010 Feb 04 1:11 PM
Can you please explain exactly when are you getting the error ?