‎2009 Jul 28 11:33 AM
Hi,
I have 1 query related with Selection screen modification.
In my Report Program,I have created GUI Status for my selection screen
Now 2 buttons in application toolbar are coming on selection sceen.
For this i used,'At selection screen output' event.
And there are 2 blocks on selection screen.
If user press button1 then block2 should not display.
and if user press button2 then block1 should not display.
but the problem is i m not getting reqd result and also while doing debugging its not showing me sy-ucomm value.
Any pointers on this.
Thanks,
Mamta
‎2009 Jul 28 11:40 AM
Don't use SY-UCOMM, declare TABLES sscrfields, and use sscrfields-ucomm.
- In the PAI/AT SELECTION-SCREEN. setup flag to memorize pressed key (ucomm is volatile)
- In the PBO/AT SELECTION-SCREEN OUTPUT, use LOOP AT SCREEN to set screen attributes of fields of both block, you may put a MODIF ID to each and every fields of each block, one code per block.
(Loot at SAP samples in documentation at [Pushbuttons in the Application Toolbar|http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba80935c111d1829f0000e829fbfe/content.htm] and [Setting Attributes Dynamically|http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dbab6f35c111d1829f0000e829fbfe/frameset.htm])
Regards,
Raymond
‎2009 Jul 28 11:39 AM
Hi ,
In the At Selection Scrren Output.
Please do the following things,
Give the different Group names to different selection screen elements of differnt blocks
Do the Loop on the Screen table
if screen-grup = group1.
scrrenn-output = 0.
modify screen.
Enddo.
Please let me know if you stiil have problem i would send t he exact syntax.
Regards,
Ratna
‎2009 Jul 28 11:44 AM
Hi,
Thanks for ur reply.
For ur reference ,I m using below code.
But after pressing button1,sy-ucomm field is coming blank only.
AT SELECTION-SCREEN OUTPUT.
SET PF-STATUS 'STANDARD'.
CLEAR OK_CODE.
OK_CODE = SY-UCOMM.---->
CASE OK_CODE.
WHEN 'CUSTOMER'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B2'.
SCREEN-INVISIBLE = 1.
ENDIF.
ENDLOOP.
MODIFY SCREEN.
WHEN 'SALES'.
LOOP AT SCREEN.
IF SCREEN-NAME = 'B1'.
SCREEN-INVISIBLE = 1.
ENDIF.
ENDLOOP.
MODIFY SCREEN.
ENDCASE.
Or i have to use this structure : sscrfields.
‎2009 Jul 28 11:51 AM
>
> LOOP AT SCREEN.
> IF SCREEN-NAME = 'B2'.
> SCREEN-INVISIBLE = 1.
> MODIFY SCREEN. "keep the modify screen here
> ENDIF.
> ENDLOOP.
> MODIFY SCREEN.
> WHEN 'SALES'.
> LOOP AT SCREEN.
> IF SCREEN-NAME = 'B1'.
> SCREEN-INVISIBLE = 1.
> MODIFY SCREEN. "keep the modify screen here
> ENDIF.
> ENDLOOP.
> MODIFY SCREEN.
> ENDCASE.
>
>
Hi,
Try like that.
Thanks,
Sri.
‎2009 Jul 28 11:40 AM
Don't use SY-UCOMM, declare TABLES sscrfields, and use sscrfields-ucomm.
- In the PAI/AT SELECTION-SCREEN. setup flag to memorize pressed key (ucomm is volatile)
- In the PBO/AT SELECTION-SCREEN OUTPUT, use LOOP AT SCREEN to set screen attributes of fields of both block, you may put a MODIF ID to each and every fields of each block, one code per block.
(Loot at SAP samples in documentation at [Pushbuttons in the Application Toolbar|http://help.sap.com/saphelp_nw04/Helpdata/EN/9f/dba80935c111d1829f0000e829fbfe/content.htm] and [Setting Attributes Dynamically|http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dbab6f35c111d1829f0000e829fbfe/frameset.htm])
Regards,
Raymond
‎2009 Jul 28 11:41 AM
Hi Mamta,
have it in a group then you can write code accordingly see sample example,
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_r1 RADIOBUTTON GROUP rad
USER-COMMAND clk DEFAULT 'X'. " upload Radio Button
SELECTION-SCREEN COMMENT 5(35) text-003.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
PARAMETERS: p_upl LIKE rlgrap-filename MODIF ID a "Upload File
DEFAULT 'c:\temp\parbmat.xls',
p_werks like t001w-werks MODIF ID a, "Plant
PARAMETERS: p_rest LIKE rlgrap-filename MODIF ID a "Dwonload File Path
DEFAULT 'c:\temp\Success.xls'.
SELECTION-SCREEN : END OF BLOCK 001.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : p_r2 RADIOBUTTON GROUP rad.
SELECTION-SCREEN COMMENT 5(35) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN : BEGIN OF BLOCK 002 WITH FRAME TITLE text-002.
PARAMETERS : p_plant LIKE marc-werks MODIF ID b. "Plant
PARAMETERS : p_lgort LIKE mard-lgort MODIF ID b. "Storage Location
PARAMETERS : p_vkorg LIKE mvke-vkorg MODIF ID b. "Sales Organization
PARAMETERS : p_vtweg LIKE mvke-vtweg MODIF ID b. "Distribution Channel
SELECT-OPTIONS : s_mat FOR mara-matnr MODIF ID b. "Material No No
SELECT-OPTIONS : s_dat FOR mara-ersda MODIF ID b. "Date on Record Created
PARAMETERS : p_down LIKE rlgrap-filename MODIF ID b
DEFAULT 'c:\temp\Material Master.xls'. "Download File Path
SELECTION-SCREEN : END OF BLOCK 002.
AT SELECTION-SCREEN OUTPUT.
*Inactive Fields depending on the radio button
LOOP AT SCREEN.
IF p_r1 = 'X'.
IF screen-group1 = 'B'.
screen-active = 0.
ENDIF.
ELSEIF p_r2 = 'X'.
IF screen-group1 = 'A'.
screen-active = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Edited by: suresh suresh on Jul 28, 2009 12:42 PM
Edited by: suresh suresh on Jul 28, 2009 12:42 PM
‎2009 Jul 28 11:45 AM
Hi,
Check this
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
PARAMETERS: P_EBELN TYPE EKKO-EBELN MODIF ID S1 AS LISTBOX VISIBLE
LENGTH 20,
P_OPNUM(5) TYPE C MODIF ID S1.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-T02.
PARAMETERS: P_MATNR TYPE MARA-MATNR MODIF ID S2,
P_WERKS TYPE EKPO-WERKS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B2.
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'FC02'.
GV_FLAG = 2.
WHEN 'FC01'.
GV_FLAG = 1.
ENDCASE.
AT SELECTION-SCREEN OUTPUT.
CASE GV_FLAG.
WHEN 1.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'S1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDCASE.
‎2009 Jul 28 11:55 AM
Hi,
You can try using MODIF ID to modify your screen elements as per the requirement,
Kindly go through the sample code below,
SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_MAT TYPE MARA-MATNR MODIF ID S1,
P_WER TYPE EKPO-WERKS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK A1.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'S1'.
SCREEN-INVISIBLE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Hope it helps
Regards,
Mansi
‎2009 Jul 29 7:41 AM
Hi All,
Thanks a lot for ur reply.
I used SSCRFIELDS structure.
and two events :
1. AT SELECTION SCREEN to get Ucomm.
2. AT SELECTION SCREEN OUTPUT to modify screen.
Regards,
Mamta