Application Development 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: 

Simple Report Layout Questions...

Former Member
0 Kudos

I have created a report screen with 2 radio buttons and 3 checkboxes.

The checkboxes are under the second radio button - and they apply only if the user selects the second radio button.

My questions are these:

1) How do I indent the checkboxes so that they are few spaces off of the extreme left of the screen?

2) How do I disable (gray out) the checkboxes when the user selects the first radio button?

Thanks in advance.

5 REPLIES 5

Former Member
0 Kudos

In the layout of the screen, you can place your check boxes beneath the second radio button and may also enclosed them in a Box for proper alignment. though not mandatory

Assign the Group1 some value for check boxes.

In PAI check which radio button is selected.

iMODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'RAD1'.

clear flag.

WHEN 'RAD2'.

flag = ' X'.

ENDCASE.

ENDMODULE.

IN PBO, then disbale the check Box as per your requirement.

MODULE status_0100 OUTPUT.

SET PF-STATUS 'SCREEN_100'.

LOOP AT SCREEN.

IF screen-group1 = 'MOD'. "group code for screen modification

IF flag = ' '.

screen-input = '0'.

ELSEIF flag = 'X'.

screen-input = '1'. "activate the screen, hence inputis enabled

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE.

regards

Abhi

0 Kudos

Abhi,

That is a great solution for a dialog program.

However, I am trying to do this through a simple report program. PBO and PAI are not options - to my knowledge.

former_member206439
Contributor
0 Kudos

Hi

Check the below smaple logic .

I wrote it for disable the fileds you can use the same logic for chack box also

Moderator message - Please respect the 2,500 character maximum when posting. Please do not try to get around this by splitting into multiple posts. Anyway, the correct answer here was to search before posting Rob

Edited by: Rob Burbank on Apr 27, 2010 2:34 PM

Former Member
0 Kudos

You can actually hide them instead of greying out if you wish. ACTIVE will disable INVISIBLE will hide.

Make sure you have user command on your radiobutton (doesn't matter what letter combination you use)


PARAMETERS: P_RADIO1 RADIOBUTTON GROUP ONE DEFAULT 'X' USER-COMMAND ABC,
SELECT-OPTIONS: S_MMSTA FOR MARC-MMSTA MODIF ID INS.

* Sales selected - show sales, hide inspection, hide basic
    IF P_RADIO1 = 'X'.
      REFRESH: S_MMSTA, S_WERKS.
      CLEAR P_INSMK.
      IF SCREEN-GROUP1 = 'INS'.
        SCREEN-INVISIBLE = '1'.
        SCREEN-ACTIVE    = '0'.
      ENDIF.
   ENDIF.

If you want to indent the fields you can use the SELECTION-SCREEN BEGIN OF LINE command


SELECTION-SCREEN BEGIN OF LINE.
  SELECTION-SCREEN COMMENT 51(17) TEXT-S04 FOR FIELD E_HDATE.
  selection-screen position 70.
  PARAMETERS: E_HDATE LIKE SY-DATUM.
SELECTION-SCREEN END OF LINE.

Edited by: Brad Gorlicki on Apr 27, 2010 11:59 PM

Former Member
0 Kudos

Hi John,

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.

PARAMETERS RAD1 RADIOBUTTON GROUP RAD

DEFAULT 'X' USER-COMMAND flag.

PARAMETERS:RAD2 RADIOBUTTON GROUP rad.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.

PARAMETERS CHECK1 AS CHECKBOX MODIF ID HD.

PARAMETERS CHECK2 AS CHECKBOX MODIF ID HD.

PARAMETERS CHECK3 AS CHECKBOX MODIF ID HD.

SELECTION-SCREEN END OF BLOCK B2.

SELECTION-SCREEN END OF BLOCK B1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF SCREEN-GROUP1 = 'HD' AND RAD2 NE 'X'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Hope this solves your problem...

It keeps the checkboxes in a block under the 2nd radio button....