07-17-2008 12:21 PM
Hi Friends,
I want to add two push buttons in a selection screen and on clicking the first push button the second push button should become inactive. Also a screen relevant for the first push button should be displayed.
Kindly guide me to do this.
TIA.
Regards,
Mark K
07-17-2008 12:24 PM
Hi Mark,
Try this program for creatin push buttons in selection screen
TABLES:
sscrfields,
mara.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN: FUNCTION KEY 2.
SELECT-OPTIONS: s_extwg FOR mara-extwg. "External material group
*----------------------------------------------------------------------*
INITIALIZATION.
*----------------------------------------------------------------------*
DATA: ls_functxt TYPE smp_dyntxt.
*
ls_functxt-icon_id = '@42@'.
ls_functxt-quickinfo = 'button1'.
sscrfields-functxt_01 = ls_functxt.
ls_functxt-icon_id = '@43@'.
ls_functxt-quickinfo = 'button2'..
sscrfields-functxt_02 = ls_functxt.
*----------------------------------------------------------------------*
AT SELECTION-SCREEN.
*----------------------------------------------------------------------*
CASE sscrfields-ucomm.
WHEN 'FC01'.
* disable the other button
ENDCASE.
//kothand
07-17-2008 12:24 PM
Hi Mark,
Try this program for creatin push buttons in selection screen
TABLES:
sscrfields,
mara.
SELECTION-SCREEN: FUNCTION KEY 1.
SELECTION-SCREEN: FUNCTION KEY 2.
SELECT-OPTIONS: s_extwg FOR mara-extwg. "External material group
*----------------------------------------------------------------------*
INITIALIZATION.
*----------------------------------------------------------------------*
DATA: ls_functxt TYPE smp_dyntxt.
*
ls_functxt-icon_id = '@42@'.
ls_functxt-quickinfo = 'button1'.
sscrfields-functxt_01 = ls_functxt.
ls_functxt-icon_id = '@43@'.
ls_functxt-quickinfo = 'button2'..
sscrfields-functxt_02 = ls_functxt.
*----------------------------------------------------------------------*
AT SELECTION-SCREEN.
*----------------------------------------------------------------------*
CASE sscrfields-ucomm.
WHEN 'FC01'.
* disable the other button
ENDCASE.
//kothand
07-17-2008 12:24 PM
hiiii
you can use following code for this..just use button name istead of p_docno name in this code
AT SELECTION-SCREEN OUTPUT .
IF p_rad2 IS INITIAL .
LOOP AT SCREEN.
IF screen-name CS 'p_docno'.
screen-active = 0.
MODIFY SCREEN.
ENDIF. " IF screen-name CS 'p_docno'.
ENDLOOP. " LOOP AT SCREEN.
ELSE.
LOOP AT SCREEN .
IF screen-name CS 'p_docno'.
screen-active = 1.
screen-input = 1.
MODIFY SCREEN.
ENDIF. " IF screen-name CS 'p_docno'.
ENDLOOP. " LOOP AT SCREEN .
ENDIF. " IF p_rad2 IS INITIAL .
regards
twinkal
07-17-2008 12:25 PM
Mark,
i would suggest to use SDN search option by giving appropriate term.
and for screen active inavtive you can search by giving
loop at screen in SDn search option.
am sure you will get your answer.
Amit.
07-17-2008 12:26 PM