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: 

At selection screen output problem

Former Member
0 Kudos

Hi All,

I have one requirement to disable all selection fields in one output block while selecting the first radio buttona and need to enable all fields while selecting the second radio button.

But its not working as per the below code.

************************************************************************************

  • Selection Screen Declaration

************************************************************************************

*********Radiobuttons for projects

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS :p_act RADIOBUTTON GROUP pro DEFAULT 'X',

p_purch RADIOBUTTON GROUP pro .

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

  • Project definition

SELECT-OPTIONS: s_posid FOR prps-posid MATCHCODE OBJECT prsm." OBLIGATORY NO INTERVALS NO-EXTENSION.

  • WBS Element

SELECT-OPTIONS: s_pspnr FOR prps-pspnr MATCHCODE OBJECT prsm.

*Network

SELECT-OPTIONS : s_nplnr FOR ekkn-nplnr.

*Activity

*SELECT-OPTIONS : s_vornr FOR afvc-vornr.

  • Vendor

SELECT-OPTIONS: s_lifnr FOR ekko-lifnr MATCHCODE OBJECT kred.

*Cost centre

SELECT-OPTIONS: s_akstl FOR prps-akstl.

*Document Posting Date

*SELECT-OPTIONS: s_

SELECTION-SCREEN END OF BLOCK b2 .

SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.

SELECT-OPTIONS: s_aedat FOR ekkn-aedat MODIF ID mo1,

s_ebeln FOR ekkn-ebeln MODIF ID mo1.

  • Orders category

PARAMETERS: s_all RADIOBUTTON GROUP off DEFAULT 'X' MODIF ID mo1,

s_open RADIOBUTTON GROUP off MODIF ID mo1,

s_closed RADIOBUTTON GROUP off MODIF ID mo1.

SELECTION-SCREEN END OF BLOCK b3.

SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-004.

PARAMETERS: p_fiinvo AS CHECKBOX .

SELECTION-SCREEN END OF BLOCK b4.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF p_act = 'X' AND

screen-group1 = 'MO1'.

screen-input = '0'.

MODIFY SCREEN.

ELSEIF p_purch = 'X' AND screen-group1 <> 'MO1'.

screen-input = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

I need to press enter to work it out and automatcally not working.

Please suggest a solution.

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member

Hi,

Give usercommand for radiobuttons.

PARAMETERS :p_act RADIOBUTTON GROUP pro usercommand ucomm,

p_purch RADIOBUTTON GROUP pro .

8 REPLIES 8

Former Member

Hi,

Give usercommand for radiobuttons.

PARAMETERS :p_act RADIOBUTTON GROUP pro usercommand ucomm,

p_purch RADIOBUTTON GROUP pro .

0 Kudos

Thanks for your early responds.

problem solved

Former Member
0 Kudos

I hope u forget to use USER-COMMAND.

report ysat_at_ss_output .

parameters: male radiobutton group rb1 user-command ucomm,
            female radiobutton group rb1 default 'X' .

selection-screen skip 2.
selection-screen: begin of block blk1 with frame title  text-001.
parameters: male1(20) modif id sc1 .
selection-screen: end of block blk1.

selection-screen: begin of block blk2 with frame title  text-002.
parameters: female1(20) modif id sc2.
selection-screen: end of block blk2.

at selection-screen output.
loop at screen.
  if male = 'X'.
  if screen-group1 = 'SC1'.
   screen-invisible = '0'.
   screen-input = '1'.
   modify screen.
  endif.
  if screen-group1 = 'SC2'.
   screen-invisible = '1'.
   screen-input = '0'.
   modify screen.
  endif.

else.
  if screen-group1 = 'SC1'.
   screen-invisible = '1'.
   screen-input = '0'.
   modify screen.
  endif.
  if screen-group1 = 'SC2'.
   screen-invisible = '0'.
   screen-input = '1'.
   modify screen.
  endif.
endif.
endloop.
 

Regards,

~Satya

I355602
Advisor
Advisor
0 Kudos

Hi,

Use:-


SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS : p_matnr TYPE vbap-matnr MODIF ID abc,
          p_werks TYPE vbap-werks MODIF ID abc.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS : p_rb1 RADIOBUTTON GROUP gp1 USER-COMMAND,
          p_rb2 RADIOBUTTON GROUP gp1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.
  IF p_rb1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'ABC'.
        screen-invisible = 1. "hide controls
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ELSEIF p_rb2 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'ABC'.
        screen-invisible = 0. "display controls
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.

Hope this helps you.

Regards,

Tarun

qamar_javed
Participant
0 Kudos

Hi,

Just check my code:

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

PARAMETERS: R_SO TYPE C RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND FLAG,

P_SO TYPE VBELN ,

R_PO TYPE C RADIOBUTTON GROUP R1,

P_PO TYPE EBELN .

SELECTION-SCREEN : END OF BLOCK B1.

AT SELECTION-SCREEN OUTPUT."ON RADIOBUTTON GROUP r1.

LOOP AT SCREEN.

IF SCREEN-NAME = 'P_SO' OR SCREEN-NAME = '%_P_SO_%_APP_%-TEXT'.

IF R_SO EQ 'X'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

IF SCREEN-NAME = 'P_PO' OR SCREEN-NAME = '%_P_PO_%_APP_%-TEXT'.

IF R_PO EQ 'X'.

SCREEN-ACTIVE = '1'.

ELSE.

SCREEN-ACTIVE = '0'.

ENDIF.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

Proceed in this way and use the modif id for all the same elemenst for one radio button.

Hope this solves your problem.

Regards,

Qamar.

Former Member
0 Kudos

HI,

use the folowing declaration for teh radio button

PARAMETERS :p_act RADIOBUTTON GROUP pro DEFAULT 'X' user-command abc,

u need to assign a user command so as to enable button click.

Former Member
0 Kudos

Use

USER-COMMAND fcode (your any of the fcod)

for example


s_open RADIOBUTTON GROUP off MODIF ID mo1 USER-COMMAND fcode ,
s_closed RADIOBUTTON GROUP off MODIF ID mo1 USER-COMMAND fcode .

Regrda,

Alpesh

dev_parbutteea
Active Contributor
0 Kudos

Hi,

just add the user-command addition to the radio button,

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS :p_act RADIOBUTTON GROUP pro DEFAULT 'X' USER-COMMAND inf,

p_purch RADIOBUTTON GROUP pro .

SELECTION-SCREEN END OF BLOCK b1.

Regards.