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

need selection screen logic

Former Member
0 Likes
473

Hi,

i designed my selection screen like this .Its working fine when i am selecting the radiobottons.

But iwant if i execute the report by default vendor path should display in my selection screen.Then if i am cliclking the customer radio botton then customer path should come.how to do iT?????

PARAMETERS:

rb_vend RADIOBUTTON GROUP g2 USER-COMMAND abc, " Radio 1

rb_cust RADIOBUTTON GROUP g2. " Radio 2

*File path

SELECTION-SCREEN SKIP 1.

PARAMETERS: pa_vend TYPE rlgrap-filename

MODIF ID ven .

PARAMETERS: pa_cust TYPE rlgrap-filename

MODIF ID cus.

SELECTION-SCREEN END OF BLOCK b3 .

AT SELECTION-SCREEN OUTPUT.

**Handling Path for download to PC .

IF rb_vend = c_x and

pa_vend IS INITIAL.

pa_vend = co_vend.

ELSE.

pa_cust = co_cust.

ENDIF.

*Set prompting for target file.

IF rb_vend = c_x. " Vendor related data download

LOOP AT SCREEN.

IF screen-group1 = 'VEN'.

screen-active = 1.

screen-invisible = 0.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'CUS'.

screen-active = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF rb_cust = c_x. " customer related data download

LOOP AT SCREEN.

IF screen-group1 = 'CUS'.

screen-active = 1.

screen-invisible = 0.

MODIFY SCREEN.

ENDIF.

IF screen-group1 = 'VEN'.

screen-active = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

IF screen-group1 = 'VEN' OR

screen-group1 = 'CUS'.

screen-active = 0.

screen-invisible = 1.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
429

Hello Subhasis,

If i understand your req. correctly, when you execute the report you want the Vendor Radio-Button & Vendor Path to be selected by default. If so, try this:

PARAMETERS:
rb_vend RADIOBUTTON GROUP g2 USER-COMMAND abc DEFAULT 'X',              " Radio 1
rb_cust RADIOBUTTON GROUP g2.                   " Radio 2

BR,

Suhas

3 REPLIES 3
Read only

Former Member
0 Likes
429

Hi ,

keep the vendor path in initialization as default.This will show vendor path once u execute the program as default.

And enable the customer path when you select radiobutton customer for that field in at selection screen ouput.

Br,

Vijay.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
430

Hello Subhasis,

If i understand your req. correctly, when you execute the report you want the Vendor Radio-Button & Vendor Path to be selected by default. If so, try this:

PARAMETERS:
rb_vend RADIOBUTTON GROUP g2 USER-COMMAND abc DEFAULT 'X',              " Radio 1
rb_cust RADIOBUTTON GROUP g2.                   " Radio 2

BR,

Suhas

Read only

Former Member
0 Likes
429

HI,

use this code..........

PARAMETERS : P_RB1 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND AC,
             P_RB2 RADIOBUTTON GROUP G1.
PARAMETERS : P_FILE TYPE RLGRAP-FILENAME MODIF ID ZFI.
PARAMETERS : P_FILE1 TYPE RLGRAP-FILENAME MODIF ID ZF1.


AT SELECTION-SCREEN OUTPUT.
*-- for default values on selection sceen
LOOP AT SCREEN .
*-- if radio button from excelsheet is selected
    IF P_RB2 = 'X'.

      IF SCREEN-GROUP1 = 'ZFI'.
        SCREEN-ACTIVE = '0'.
      ENDIF.

      IF SCREEN-GROUP1 = 'ZF1'.
        SCREEN-ACTIVE = '1'.
      ENDIF.

*-- if radio button from database is selected
    ELSEIF P_RB1 = 'X'.

      IF SCREEN-GROUP1 = 'ZFI'.
        SCREEN-ACTIVE = '1'.
      ENDIF.

       IF SCREEN-GROUP1 = 'ZF1'.
        SCREEN-ACTIVE = '0'.
      ENDIF.

    ENDIF.

    MODIFY SCREEN.

  ENDLOOP.

regards

Gaurav