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

Report help

Former Member
0 Likes
610

Hi Experts,

My requirement is, I have two parameters, and two radio buttons like C and D and one Pushbutton (P) in selection screen. When user enter two parameter values, and select Radiobutton C or D, then this data should be inserted into ztable and Flag is set to either C/ D accordingly. When I click on the pushbutton, then the parameter value should be clear.

Selection screen designed, i need only code support.

Thanks in advance.

Regs

Rams

Max rewards will be given

1 ACCEPTED SOLUTION
Read only

venkata_ramisetti
Active Contributor
0 Likes
575

Hi,

You can write code similar to below. You have to use USER-COMMAND with Radio button definition in the selection-screen.

PARAMETERS:

PARAMETERS P0 RADIOBUTTON GROUP RADI USER-COMMAND CM1,

PARAMETERS P1 RADIOBUTTON GROUP RADI USER-COMMAND CM2.

AT SELECTION-SCREEN OUTPUT.

IF SY-UCOMM = 'CM1'.

UPDATE ZTABLE.

ELSEIF SY-UCOMM = 'CM2'.

UPDATE ZTABLE.

ELSEIF SYUCOMM = 'BUT1'.

CLEAR DATA

ENDIF.

Thanks,

Ramakrishna

5 REPLIES 5
Read only

venkata_ramisetti
Active Contributor
0 Likes
576

Hi,

You can write code similar to below. You have to use USER-COMMAND with Radio button definition in the selection-screen.

PARAMETERS:

PARAMETERS P0 RADIOBUTTON GROUP RADI USER-COMMAND CM1,

PARAMETERS P1 RADIOBUTTON GROUP RADI USER-COMMAND CM2.

AT SELECTION-SCREEN OUTPUT.

IF SY-UCOMM = 'CM1'.

UPDATE ZTABLE.

ELSEIF SY-UCOMM = 'CM2'.

UPDATE ZTABLE.

ELSEIF SYUCOMM = 'BUT1'.

CLEAR DATA

ENDIF.

Thanks,

Ramakrishna

Read only

0 Likes
575

Hi Rk,

Can you send the code details

thanks in advance

regs

rams

Read only

0 Likes
575

hi,

try:

SELECTION-SCREEN FUNCTION KEY 1.
parameters : p1(10).

AT SELECTION-SCREEN.
if sy-ucomm = 'FC01'.
 clear p1.
endif.

A.

Read only

0 Likes
575

Hi Ramesh,

You may have to make some changes to the below code.

I assumed that you are using a table ZTABLE with fields FIELD1 & FIELD2.

REPORT ZTEST1.

TABLES: ZTABLE.

PARAMETERS:

PARAMETERS P0 RADIOBUTTON GROUP RADI USER-COMMAND CM1,

PARAMETERS P1 RADIOBUTTON GROUP RADI USER-COMMAND CM2.

PARAMETERS FIELD1 TYPE ZTABLE-FIELD1.

PARAMETERS FIELD2 TYPE ZTABLE-FIELD2.

AT SELECTION-SCREEN OUTPUT.

IF SY-UCOMM = 'CM1'.

CLEAR ZTABLE.

ZTABLE-FIELD1 = FIELD1.

ZTABLE-FIELD2 = FIELD2.

INSERT ZTABLE FROM ZTABLE.

ELSEIF SY-UCOMM = 'CM2'.

ZTABLE-FIELD1 = FIELD1.

ZTABLE-FIELD2 = FIELD2.

INSERT ZTABLE FROM ZTABLE.

ELSEIF SYUCOMM = 'BUT1'.

CLEAR: ZTABLE, FIELD1, FIELD2.

ENDIF.

START-OF-SELECTION.

ANY FURTHER LOGIC CAN BE WRITTE HERE

Hope this helps you.

Ramakrishna

Read only

Former Member
0 Likes
575

hi ramesh,

tables: sscrfields.

selection-screen PUSHBUTTON 20(10) but1 USER-COMMAND clr.

parameters: p1 like lfa1-lifnr,

p2 like lfa1-name1.

AT SELECTION-SCREEN.

case sscrfields.

WHEN 'CLR'.

clear p1.

clear p2.

endcase.

hope this helps,

do reward if it helps,

priya.