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

Error in module pool program

Former Member
0 Likes
789

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)

6 REPLIES 6
Read only

Former Member
0 Likes
717

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.

Read only

0 Likes
717

hai,

after executing when i am trying to click radio buttons and push button for 'exit'. i am getting error.

Read only

Former Member
0 Likes
717

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

Read only

0 Likes
717

hai,

i am declaring my varibles as "char" type only.

Read only

0 Likes
717

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

Read only

Former Member
0 Likes
717

Can you please explain exactly when are you getting the error ?