Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

parameter is functional/ not functional based from radiobutton

Hello experts,

Based from the code below, How can I make the parameter 'p_code' accept input only if the user clicks on the pr_edit button? I asked this yesterday but that was a different program. Again, thank you guys and take care!

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

PARAMETERS: pr_upld RADIOBUTTON GROUP grp MODIF ID id3.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 03(30) text-a11 FOR FIELD p_flnme MODIF ID id3.

PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\' MODIF ID id3.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(32) text-002 FOR FIELD p_dcode MODIF ID id1.

PARAMETERS: p_dcode LIKE vbak-kunnr MODIF ID id1,

p_name1 LIKE kna1-name1 MODIF ID id1.

SELECTION-SCREEN END OF LINE.

PARAMETERS: pr_list RADIOBUTTON GROUP grp MODIF ID id4,

pr_add RADIOBUTTON GROUP grp MODIF ID id2,

pr_edit RADIOBUTTON GROUP grp MODIF ID id5.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 03(30) text-a12 FOR FIELD p_code MODIF ID id2.

*PARAMETERS: p_kunnr LIKE zts0001-kunnr.

PARAMETERS: p_code LIKE zts0001-cdseq MODIF ID id6.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK box1.

*----


AT SELECTION-SCREEN OUTPUT.

*----


SELECT SINGLE kunnr comp_flag INTO (gc_kunnr,v_compflag)

FROM zsoemailid

WHERE bname = sy-uname.

IF v_compflag EQ space.

LOOP AT SCREEN.

IF screen-group1 = 'ID1'.

screen-input = '0'.

screen-output = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID2'.

screen-active = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID3'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID4'.

screen-active = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID5'.

screen-active = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID6'.

screen-active = '1' .

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSEIF v_compflag NE space.

LOOP AT SCREEN.

IF screen-group1 = 'ID1'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID2'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID3'.

screen-active = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID4'.

screen-active = '1'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID5'.

screen-active = '0'.

MODIFY SCREEN.

ELSEIF screen-group1 = 'ID6'.

screen-active = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question