Modification of selection screen
in selection screen....
i hav two radiobuttons.. and three pushbuttons.
requirement is if one radiobutton is selected only two pushbuttons should b visible.
i know its possible using loop at screen n modify screen.
i tried but nt able to get it.
help me wit coding plz......
Hi,
Try like below
SELECTION-SCREEN BEGIN OF BLOCK blk1.
PARAMETERS : rb1 RADIOBUTTON GROUP rad USER-COMMAND com,
rb2 RADIOBUTTON GROUP rad.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON 5(10) b1 USER-COMMAND bu1.
SELECTION-SCREEN PUSHBUTTON 20(10) b2 USER-COMMAND bu2.
SELECTION-SCREEN PUSHBUTTON 35(10) b3 USER-COMMAND bu3.
SELECTION-SCREEN end OF LINE.
SELECTION-SCREEN end OF BLOCK blk1.
INITIALIZATION.
MOVE : 'Button 1' TO b1,
'Button 2' TO b2,
'Button 3' TO b3.
AT SELECTION-SCREEN OUTPUT.
CASE 'X'.
WHEN rb1.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'B1'.
screen-invisible = 0.
WHEN 'B2'.
screen-invisible = 0.
WHEN 'B3'.
screen-invisible = 0.
WHEN OTHERS.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
WHEN rb2.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'B1'.
screen-invisible = 0.
WHEN 'B2'.
screen-invisible = 0.
WHEN 'B3'.
screen-invisible = 1.
WHEN OTHERS.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDCASE.
Cheers,
jose.
Similar Messages
-
Modification on selection screen of report
Hello guys,
I have a requirement where in i need to modify the initial selection screen as per clients requirement. The scenario is as follows:
Suppose 'EMPLOYEE' and 'PORTFOLIO' are two of the fields of a cube on which the report will be run. Now suppose there are three employees as A, B and C and A handles portfolios X & Y, B handles portfolios W & Y while C handles portfolios X & Z.
The initial selection screen of report will have two selection fields first as the employee and second as the portfolio.
When we do F4 at employee it will display A, B and C. Now the requirement is if we F4 at portfolio it should display only the relevant one for that employee.
For example: if i give employee as A and when i do F4 at portfolio screen it should give me only X and Y and not all the portfolios viz. W, X, Y & Z
Is there a way to achieve the above scenario????Hi Chakradhar,
Refer this code :
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-456.
PARAMETERS PO RADIOBUTTON GROUP RADI USER-COMMAND R.
SELECTION-SCREEN END OF BLOCK BL2.
AT SELECTION-SCREEN OUTPUT.
CALL SCREEN 100.
when user will click on this radio button , a pop up screen will appear dynamically.
Reward points if helpful.
Regards,
Hemant -
If I do NOT use any event, except AT SELECTION SCREEN, Do I get any issues?
Hi Experts,
Pls. let me know that, If I do NOT use any event, except AT SELECTION SCREEN, Do I/prog. get any issues? (am also using AT SELECTION SCREEN OUTPUT for list box preperation).
For some reason(execution of the report prog. with ENTER button), am using ONLY these 2 events.
For full detials, pls. see my other thread with title,
Is it possible to execute a REPORT prog. with pressing of ENTER button?
thanqHi
srinivas see this program
i am executing this program with out any event it is not showing any error but not giving output
when i put start-of-selection then it is showing output
*& Report ZNNR_REPORT33
REPORT ZNNR_REPORT33 NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
******DATA DECLARATIONS**********
DATA : BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARA-MATNR,
WERKS LIKE MARC-WERKS,
PSTAT LIKE MARC-PSTAT,
EKGRP LIKE MARC-EKGRP,
END OF IT_PLANT.
DATA : BEGIN OF IT_PONO OCCURS 0,
EBELN LIKE EKKO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
LGORT LIKE EKPO-LGORT,
END OF IT_PONO.
TABLES EKKO.
********END OF DATA DECLARATIONS*********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S2.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-004.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1 DEFAULT 'X' user-command uc1.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******END OF SELECTION SCREEN DESIGN****************
***********SCREEN MODIFICATIONS*******************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R1 EQ 'X' AND SCREEN-GROUP1 EQ 'S2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
IF R2 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
********END OF SCREEN MODIFICATIONS*****************
***************SCREEN VALIDATIONS *****************
at selection-screen.
SELECT SINGLE *
FROM EKKO
INTO EKKO
WHERE EBELN IN S_EBELN.
IF SY-SUBRC <> 0.
SET CURSOR FIELD 'S_EBELN-LOW'.
MESSAGE E999 WITH TEXT-005.
clear S_ebeln-low.
ENDIF.
********end of screen validation*****************
IF R1 EQ 'X'.
*ULINE AT /1(48).
WRITE : SY-VLINE ,2 'MATERIAL NUMBER',
21 SY-VLINE , 22 'PLANT',
27 SY-VLINE , 28 'STATUS',
43 SY-VLINE , 44 'GRUP', 48 SY-VLINE.
ULINE AT /1(48).
ENDIF.
IF R2 EQ 'X'.
WRITE : SY-VLINE , 2 'PO NUMBER',
12 SY-VLINE, 13 'ITEM',
18 SY-VLINE,19 'MATERIAL NUMBER',
37 SY-VLINE, 38 'PLANT',
44 SY-VLINE, 45 'GRUP',
49 SY-VLINE.
ULINE AT /1(50).
ENDIF.
start-of-selection.
*set pf-status '100'.
IF R1 EQ 'X'.
SELECT MATNR
WERKS
PSTAT
EKGRP
FROM MARC
INTO TABLE IT_PLANT
WHERE WERKS = P_WERKS.
LOOP AT IT_PLANT.
WRITE : SY-VLINE , 2 IT_PLANT-MATNR COLOR COL_KEY,
21 SY-VLINE , 22 IT_PLANT-WERKS COLOR COL_KEY,
27 SY-VLINE ,28 IT_PLANT-PSTAT COLOR COL_NORMAL,
43 SY-VLINE ,44 IT_PLANT-EKGRP COLOR COL_NORMAL.
ENDLOOP.
ENDIF.
IF R2 EQ 'X'.
SELECT EBELN EBELP MATNR WERKS LGORT
FROM EKPO
INTO TABLE IT_PONO
WHERE EBELN IN S_EBELN.
LOOP AT IT_PONO.
WRITE : SY-VLINE , 2 IT_PONO-EBELN COLOR COL_KEY,
12 SY-VLINE , 13 IT_PONO-EBELP COLOR COL_KEY,
18 SY-VLINE , 19 IT_PONO-MATNR COLOR COL_NORMAL,
37 SY-VLINE , 38 IT_PONO-WERKS COLOR COL_NORMAL,
44 SY-VLINE , 45 IT_PONO-LGORT COLOR COL_NORMAL, 49 SY-VLINE..
ENDLOOP.
ENDIF.
ULINE AT /1(50).
WRITE :/10 'PAGE NUMBER', SY-PAGNO, '/' ,SY-PAGNO.
ULINE AT /1(50).
WRITE :/10 'PAGE NUMBER', SY-PAGNO. -
Selection Screen Layout.
Hi,
I need to layout a selection screen like the one below:
RadioButton1
Parameter1
Select-Option1
RadioButton2
RadioButton3
Items (Parameter1 and Select-Option1) should be disabled when RadioButton1 is not selected.
I cant quite figure out how i would insert (Parameter1 and Select-Option1) between RadioButton1 and 2. I dont want to waste precious time to do research for this, so I opted to ask the experts(you..).
Thanks,
FrankHi
*& Report ZNNR_SAMPLE22
REPORT ZNNR_SAMPLE22 NO STANDARD PAGE HEADING MESSAGE-ID ZNNR LINE-SIZE 100 LINE-COUNT 65(4).
******DATA DECLARATIONS**********
DATA : BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARA-MATNR,
WERKS LIKE MARC-WERKS,
PSTAT LIKE MARC-PSTAT,
EKGRP LIKE MARC-EKGRP,
END OF IT_PLANT.
DATA : BEGIN OF IT_PONO OCCURS 0,
EBELN LIKE EKKO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
LGORT LIKE EKPO-LGORT,
END OF IT_PONO.
TABLES EKKO.
********END OF DATA DECLARATIONS*********
********SELECTION SCREEN DESIGN ***********
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R3 RADIOBUTTON GROUP G1 DEFAULT 'X' USER-COMMAND UC1.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R3.
SELECTION-SCREEN END OF LINE.
PARAMETER : P_WERKS LIKE MARC-WERKS MODIF ID S1.
SELECT-OPTIONS : S_EBELN FOR EKKO-EBELN NO INTERVALS MODIF ID S1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R1 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-002 FOR FIELD R1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS : R2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN COMMENT 5(20) TEXT-003 FOR FIELD R2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
******END OF SELECTION SCREEN DESIGN****************
***********SCREEN MODIFICATIONS*******************
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R3 EQ 'X' AND SCREEN-GROUP1 EQ 'S1'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
********END OF SCREEN MODIFICATIONS*****************
execute this one -
Selection screen modification based on various buttons in selection screen
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,
MamtaHi 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 -
At-selection-screen modification
Hi Experts,
I am doing the selection screen modification. The selection screen is designed such as i have two radio buttons 1. header & 2. Item anb beside header radio button i have field sales document number and beside item radio button sales item number field.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) text-005.
SELECTION-SCREEN: position 32.
parameter:p_sh type c radiobutton group rg. "Sales header
selection-screen: comment 35(15) for field p_sh.
selection-screen: comment 60(20) for field p_vbeln.
parameter:p_vbeln like vbak-vbeln MODIF ID gp5. "Sales Document
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: position 32.
parameter:p_si type c radiobutton group rg. "Sales Item
selection-screen: comment 35(15) for field p_si.
selection-screen: comment 60(20) for field p_posnr.
parameter:p_posnr like vbap-posnr MODIF ID gp6. "Sales Document Item
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: skip.
This is the selection screen code where for sales document i have assiged Modif id GP5 for Item Modif id GP6. so when i check radio button p_sh ( header ) then sales document ( p_vbeln) shoudl be active for input .
if i check p_si (item) then both saleds document (p_vbeln) and p_posnr both have different group names i.e GP5 & GP6 should be active. i.e screen-inpu = 1.
I have written the following code for header but for item i am unable to make screen-input = 1 for two different groups. how to do that?
LOOP AT SCREEN.
IF ( P_SH NE 'X' AND SCREEN-GROUP1 EQ 'GP5' ) OR
( P_SI NE 'X' AND SCREEN-GROUP1 EQ 'GP6' ).
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
This code is working when i click header radio button but for when i click item radio button (p_si) only item field is active i am unable to make sales docuemnt active at same time. please help me in this regard.
Regards,
sunil kairam.Hi,
Check this piece of code changed a bit.
PARAMETERS : p_ct RADIOBUTTON GROUP grp .
SELECT-OPTIONS : s_kunnr FOR kna1-kunnr,
PARAMETERS : p_sh RADIOBUTTON GROUP grp.
SELECT-OPTIONS : s_vbeln FOR vbak-vbeln,
PARAMETERS : p_si RADIOBUTTON GROUP grp.
SELECT-OPTIONS : s_vbeln1 FOR vbak-vbeln,
s_posnr for vbak-posnr.
IF p_ct IS NOT INITIAL .
LOOP AT SCREEN.
CASE screen-name.
WHEN 'S_KUNNR-LOW'.
screen-input = 1.
MODIFY SCREEN.
WHEN 'S_KUNNR-HIGH'.
screen-input = 1.
MODIFY SCREEN.
WHEN 'S_VBELN-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_VBELN-HIGH'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_VBELN1-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_VBELN1-HIGH'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_POSNR-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_POSNR-HIGH'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ELSEIF p_sh IS NOT INITIAL.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'S_KUNNR-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_KUNNR-HIGH'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_VBELN-LOW'.
screen-input = 1.
MODIFY SCREEN.
WHEN 'S_VBELN-HIGH'.
screen-input = 1.
MODIFY SCREEN.
WHEN 'S_VBELN1-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_VBELN1-HIGH'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_POSNR-LOW'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'S_POSNR-HIGH'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
now one more ELSEIF p_si IS NOT INITIAL
now make s_vbeln1 and s_posnr as input 1 and rest others as input 0.
endif.
Regards,
Nagaraj -
Hi Experts,
Kindly gothrough the below codes and when i click on rb2 radiobutton only that selection option must appear but it is coming when i execute the program,, can any one help to resolve this issue...,
*& Report ZPROGRAM_KPI
REPORT ZPROGRAM_KPI.
TYPE-POOLS SLIS.
tables : pb4000.
DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT LIKE LINE OF IT_FCAT.
DATA : IT_FCAT1 TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT1 LIKE LINE OF IT_FCAT1.
data : lv_end TYPE dats,
lv_beg TYPE dats,
v type i.
data : begin of wa_pb40001,
pernr type pb4000-pernr,
SUBTY TYPE PB4000-SUBTY,
begda type pb4000-begda,
end of wa_pb40001,
it_pb40001 like table of wa_pb40001.
data : begin of wa_pb40002,
pernr type pb4000-pernr,
SUBTY TYPE PB4000-SUBTY,
begda type pb4000-begda,
end of wa_pb40002,
it_pb40002 like table of wa_pb40002.
selection-screen begin of block k with frame title text-001.
parameter : rb1 radiobutton group t, rb2 radiobutton group t.
selection-screen end of block k.
if rb1 = 'X'.
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
i_date_old = sy-datum
IMPORTING
e_date_new = lv_end.
lv_beg = lv_end.
lv_beg+6(2) = '01'.
SELECT pernr SUBTY FROM pb4000 INTO TABLE it_pb40001 where begda BETWEEN lv_beg AND lv_end.
perform fcat using '1' 'PERNR' 'Personnel number' '20' 'C610'.
perform fcat using '1' 'SUBTY' 'Sub type' '20' 'C310'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = 'Report for displaying personnel number in previous month'
IT_FIELDCAT = IT_FCAT
TABLES
t_outtab = IT_PB40001.
elseif rb2 = 'X'.
select-options s_date for wa_pb40001-begda obligatory.
SELECT pernr SUBTY FROM pb4000 INTO TABLE it_pb40002 where begda in s_date.
perform fcat1 using '1' 'PERNR' 'Personnel number' '20' 'C610'.
perform fcat1 using '1' 'SUBTY' 'Sub type' '20' 'C310'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = 'Report for displaying personnel number using selection screen'
IT_FIELDCAT = IT_FCAT1
TABLES
t_outtab = IT_PB40002.
endif.
*& Form FCAT
text
-->P_0068 text
-->P_0069 text
-->P_0070 text
form FCAT using FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN
FP_EMPHASIZE.
WA_FCAT-COL_POS = FP_COL_POS.
WA_FCAT-FIELDNAME = FP_FIELDNAME.
WA_FCAT-SELTEXT_M = FP_SELTEXT_M.
WA_FCAT-OUTPUTLEN = FP_OUTPUTLEN.
WA_FCAT-EMPHASIZE = FP_EMPHASIZE.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_fCAT.
endform. " FCAT
*& Form FCAT
text
-->P_0068 text
-->P_0069 text
-->P_0070 text
form FCAT1 using FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN
FP_EMPHASIZE.
WA_FCAT1-COL_POS = FP_COL_POS.
WA_FCAT1-FIELDNAME = FP_FIELDNAME.
WA_FCAT1-SELTEXT_M = FP_SELTEXT_M.
WA_FCAT1-OUTPUTLEN = FP_OUTPUTLEN.
WA_FCAT1-EMPHASIZE = FP_EMPHASIZE.
APPEND WA_FCAT1 TO IT_FCAT1.
CLEAR WA_fCAT1.
endform. " FCAT
Regards,
Thiru. RCopy paste this code for your new requirement:
REPORT ZTEST15.
TYPE-POOLS SLIS.
TABLES : PB4000.
DATA : IT_FCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT LIKE LINE OF IT_FCAT.
DATA : IT_FCAT1 TYPE SLIS_T_FIELDCAT_ALV,
WA_FCAT1 LIKE LINE OF IT_FCAT1.
DATA : LV_END TYPE DATS,
LV_BEG TYPE DATS,
V TYPE I.
DATA : BEGIN OF WA_PB40001,
PERNR TYPE PB4000-PERNR,
SUBTY TYPE PB4000-SUBTY,
BEGDA TYPE PB4000-BEGDA,
END OF WA_PB40001,
IT_PB40001 LIKE TABLE OF WA_PB40001.
DATA : BEGIN OF WA_PB40002,
PERNR TYPE PB4000-PERNR,
SUBTY TYPE PB4000-SUBTY,
BEGDA TYPE PB4000-BEGDA,
END OF WA_PB40002,
IT_PB40002 LIKE TABLE OF WA_PB40002.
SELECTION-SCREEN BEGIN OF BLOCK K WITH FRAME TITLE TEXT-001.
PARAMETER : RB1 RADIOBUTTON GROUP T DEFAULT 'X' USER-COMMAND RB,
RB2 RADIOBUTTON GROUP T.
SELECT-OPTIONS S_DATE FOR WA_PB40001-BEGDA MODIF ID DAT.
SELECTION-SCREEN END OF BLOCK K.
AT SELECTION-SCREEN OUTPUT.
IF RB1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'DAT'.
SCREEN-ACTIVE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN.
IF RB1 = 'X'.
CLEAR: S_DATE[], S_DATE.
ENDIF.
IF SY-UCOMM = 'ONLI'.
IF RB1 = 'X'.
CALL FUNCTION 'OIL_LAST_DAY_OF_PREVIOUS_MONTH'
EXPORTING
I_DATE_OLD = SY-DATUM
IMPORTING
E_DATE_NEW = LV_END.
LV_BEG = LV_END.
LV_BEG+6(2) = '01'.
SELECT PERNR SUBTY FROM PB4000 INTO TABLE IT_PB40001 WHERE BEGDA BETWEEN LV_BEG AND LV_END.
PERFORM FCAT USING '1' 'PERNR' 'Personnel number' '20' 'C610'.
PERFORM FCAT USING '1' 'SUBTY' 'Sub type' '20' 'C310'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = 'Report for displaying personnel number in previous month'
IT_FIELDCAT = IT_FCAT
TABLES
T_OUTTAB = IT_PB40001.
ELSEIF RB2 = 'X'.
IF S_DATE-LOW IS INITIAL.
MESSAGE 'Enter date' TYPE 'E' DISPLAY LIKE 'S'.
ENDIF.
SELECT PERNR SUBTY FROM PB4000 INTO TABLE IT_PB40002 WHERE BEGDA IN S_DATE.
PERFORM FCAT1 USING '1' 'PERNR' 'Personnel number' '20' 'C610'.
PERFORM FCAT1 USING '1' 'SUBTY' 'Sub type' '20' 'C310'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_GRID_TITLE = 'Report for displaying personnel number using selection screen'
IT_FIELDCAT = IT_FCAT1
TABLES
T_OUTTAB = IT_PB40002.
ENDIF.
ENDIF.
*& Form FCAT
text
-->FP_COL_POS text
-->FP_FIELDNAME text
-->FP_SELTEXT_M text
-->FP_OUTPUTLEN text
-->FP_EMPHASIZE text
FORM FCAT USING FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN
FP_EMPHASIZE.
WA_FCAT-COL_POS = FP_COL_POS.
WA_FCAT-FIELDNAME = FP_FIELDNAME.
WA_FCAT-SELTEXT_M = FP_SELTEXT_M.
WA_FCAT-OUTPUTLEN = FP_OUTPUTLEN.
WA_FCAT-EMPHASIZE = FP_EMPHASIZE.
APPEND WA_FCAT TO IT_FCAT.
CLEAR WA_FCAT.
ENDFORM. " FCAT
*& Form FCAT1
text
-->FP_COL_POS text
-->FP_FIELDNAME text
-->FP_SELTEXT_M text
-->FP_OUTPUTLEN text
-->FP_EMPHASIZE text
FORM FCAT1 USING FP_COL_POS
FP_FIELDNAME
FP_SELTEXT_M
FP_OUTPUTLEN
FP_EMPHASIZE.
WA_FCAT1-COL_POS = FP_COL_POS.
WA_FCAT1-FIELDNAME = FP_FIELDNAME.
WA_FCAT1-SELTEXT_M = FP_SELTEXT_M.
WA_FCAT1-OUTPUTLEN = FP_OUTPUTLEN.
WA_FCAT1-EMPHASIZE = FP_EMPHASIZE.
APPEND WA_FCAT1 TO IT_FCAT1.
CLEAR WA_FCAT1.
ENDFORM. " FCAT -
Selection Screen field modification
Hi Experts,
I wanted to disable certain fields based on some selection.
I wanted to know what is the meaning of below statement.
SCREEN-OUTPUT = 1.
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
Also what is the meaning of SCREEN-ACTIVE = 0.Hi,
Check this program
*& Report YSS_TRIAL2
REPORT yss_trial2.
TABLES:mara,kna1.
PARAMETERS: p_b1 RADIOBUTTON GROUP gr1 USER-COMMAND fc DEFAULT 'X',
p_b2 RADIOBUTTON GROUP gr1.
SELECT-OPTIONS:s_one FOR mara-matnr MODIF ID md1,
s_two FOR kna1-kunnr MODIF ID md2.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_b1 EQ 'X'.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MD2'.
screen-active = '1'.
screen-input = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ELSEIF p_b2 EQ 'X'.
IF screen-group1 = 'MD2'.
screen-active = '1'.
screen-input = '1'.
screen-invisible = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MD1'.
screen-active = '1'.
screen-input = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Hope this will helpReward points if helpful.
Regards
Shibin -
Dynamic Selection screen modification
Hi,
I have two radio buttons R_A and R_B and 2 parameters P_A and P_B on selsection screen
When i click on R_A , P_A should be visible ---> It Works
When i click on R_B , P_B should be visible ---> It Works
But after clicking on R_B if i click on R_A, then P_B is visble and P_A is not visible.
How should i go abt this.???HI,
Chk this:
Selection-screen begin of block b1 WITH FRAME NO INTERVALS.
Parameters: s1 radiobutton group g1 user-command u1 default 'X',
p_name(10) MODIF ID M1,
p_email(20) MODIF ID M1,
s2 radiobutton group G1.
Parameters: p_name1(10) MODIF ID M2,
p_fax(10) MODIF ID M2.
Selection-screen end of block b1 .
AT SELECTION-SCREEN OUTPUT.
* IF S_BOX = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M3'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ELSE.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
* ENDIF.
IF S1 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M2'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP1 = 'M1'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF S2 = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ELSEIF SCREEN-GROUP1 = 'M2'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
regards,
madhumitha -
How to use MODIF ID at a SELECTION-SCREEN
Hello,
how can use a SELECTION-SCREEN block with MODIF ID? My SELECTION-SCREEN definition looks like the example below and I want to combine it with a MODIF ID - how can I do this?
SELECTION-SCREEN BEGIN OF BLOCK par3 WITH FRAME TITLE text-003.
PARAMETERS: p_pfadn LIKE rlgrap-filename
DEFAULT '/home/dsbftp/due_test/konditionen_avs3.txt'.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_trans TYPE tcode DEFAULT 'JC03',
p_appl TYPE kappl DEFAULT 'J0'.
SELECTION-SCREEN END OF BLOCK par3.
thxHi Mike,
To modify the appearance of an input field on the selection screen, you must assign the parameter to a modification group as follows:
PARAMETERS <p> ...... MODIF ID <key> ......
The name of modification group <key> should be a three-character variable name without quotation marks.
The MODIF ID addition always assigns <key> to the SCREEN-GROUP1 column of internal table SCREEN.
Parameters assigned to a modification group can be processed as an entire group with the LOOP AT SCREEN and MODIFY SCREEN statements during the AT SELECTION-SCREEN OUTPUT event.
You can do the following modifications to the selection screen elements:
1) REQUIRED: When you set REQUIRED = 1, a field that is ready for input is made mandatory
2) INPUT: When you set INPUT = 1, Ready for input, even if Input is not set statically.
3) OUTPUT: When you set OUTPUT = 1, Field is for display only
4) INTENSIFIED: When you set OUTPUT = 1, Field is highlighted
4) INVISIBLE: When you set INVISIBLE = 1, Screen field is not displayed, regardless of the static attributes.
5) ACTIVE: When you set ACTIVE = 1, At the beginning of the PBO, ACTIVE is always set to 1, regardless of the static attribute settings. Setting ACTIVE to 0 automatically sets INPUT = 0, OUTPUT = 0, and INVISIBLE = 1.
Here is the sample code:
REPORT modif_example.
PARAMETERS: FIELD1(10) MODIF ID FL1,
FIELD2(12) MODIF ID FL2,
FIELD3(15) MODIF ID FL3,
FIELD4(20) MODIF ID FL3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'FL1'.
SCREEN-INPUT = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF SCREEN-GROUP1 = 'FL2'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
IF SCREEN-GROUP1 = 'FL3'.
SCREEN-REQUIRED = '1'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
Hope it helps.
Regards,
Neeraj Gupta -
Selection screen modification in case of SAP Query
Hi All,
I want to modify the selection screen in a standard progam.
This program is getting generated through SAP QUERY.
i want to modify some fields and also delete some fields in the
selection screen. All these fields which i want to modify or delete
are the logical database fields.So i can't do it through the t-code SQ01
and SQ02. Also this is a program generated through the SAP QUERY,
so i can't modify the generated code. Request if any one of you can suggest me to solve this.
Waiting for a prompt reply!!
Thanks,
RupeshGo to SQ02
Select your Infoset-->Change
On next Screen.
Select GoTo->Code->Initialization.
Write there code
LOOP AT SCREEN.
IF screen-name EQ 'SP$00004'.
screen-required = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
ABAP selection screen modification
Hello,
I have the following selection screen:
PARAMETERS:
p_kalaid LIKE kala-kalaid,
p_kalabe LIKE kala-kalabez,
p_kalada LIKE kala-kaladat,
p_klvaf LIKE kalv-klvar,
p_tvers LIKE kala-tvers,
p_kokrs LIKE kala-kokrs,
p_bukrs LIKE kala-bukrs,
p_group LIKE kala-rfc_group.
When I choose F4 on <b>p_kalaid</b> and then select one value proposed, it fills <b>p_kalaid</b> (as expected), but it fills <b>p_kalada</b> automatically as well!
My goal is to have all parameters fill in automatically with data from tables <b>KALA</b> and <b>KALV</b> based on my key selection (<b>p_kalaid</b>)... how can i do this?
Thanks,
TimHy!
I don´t know if there is an easier way,
but I would try it to program the F4 Matchcode selection in the event AT SELECTION-SCREEN. by my own!
After that you could read the other information with the result from the selcection and fill the other parameters.
There is a function where you can program your own selection but I forgot the name! (Something with MATCHCODE and F4 in it!) Sorry...
Jesus loves you!
Manuel -
PNP Selection Screen Modification
Hi All,
Can anyone tell how to remove the payroll period section completely from the pnp selection screen. I tried all the means going to HR Report Category, I couldnt find the perfect category to hide the payroll period selection. It neither allow me to create a new one for my program. Please help me out as soon as possible with steps/navigation whichever possible..
Thanks in advance,
Charanyou can create your own selection screen by going to Attributes -> HR Report Category -> New Report Category(button on the bottom of popup screen).
here, you can select/deselect selection criteria.
it looks like you were in the correct place - why didn't it let you create a new report category?
if helpful, please don't forget to reward points.
thanks,
robert. -
Sap query report-selection screen modification
Hi
I have created a SAP query report using the logical database KDF ,the selection screen was created automatically.For vendor report open item and Cleared item Push button would be there in FBL1N but here it only displays Open key date,clearing dates.The open key date is mandatory to give though i give clearing dates as i need vendor cleared items.
Is ther way to change the selection screen to get the option open item and cleared item push button as in FBL1N.
This is because i was filtering a vendor only for particular doc type only for clearing items but report takes open item too though i meantioned clearing date rate.How to modify the selection screen in sap query report when Logicaldatabase is selcted.I need to get only the cleared items.I donot need open items.Then if go for BSIK is it wrong.Should go only for BSAK.
I couldnt find the table BSAK in logical database KDF.
Edited by: mysap query on Mar 18, 2009 3:15 PM
Edited by: mysap query on Mar 18, 2009 3:15 PM -
RFDOPR10 selection screen modifications
Hi,
I am attempting to modify the transaction S_ALR_87012178. I have copied RFDOPR10 into ZRFDOPR10.
I need to modify the selection screen. The problem I am encountering is that there are only some selection-screen elements in the report. Where are the other ones coming from? IE. Customer selection through Line item selection.
The only elements that I can find in the report are Output Control and Further selections.Option 1:
On the program attributes screen where the link to the logical database is, there is a field "Selection Screen" which for some logical databases gives you a choice of what selection screen the LDB will provide, perhaps even a blank one.
Option 2:
In some cases where a selection screen is set up by a logical database, there are options available in customizing through SPRO to control the layout of that selection screen.
The one I am familiar with is logical database PNP for HR where the resulting selection screen can be changed significantly in HR customising.
It may be that there are some similar options for the DDR selection screen - I suggest you check the relevant area of the IMG (SPRO), particularly any "Information System" customizing options.
hope this is of some assistance.
Andrew
Maybe you are looking for
-
How to send an XML file via HTTP_POST
I have an ABAP program that creates an XML file and I need to somehow post this XML file to a webserver and read the HTTP Response that it sends back. I see that there is a function module called HTTP_POST but I've never used it before. I also see
-
I have a WD 2 tb hard drive that I want to use to back up my Mac Pro quad core. How do I create a back up startup disk? Also, when I used Time macine, it only backed up users and not the system or library folders. Ideas?
-
JTextField1.toString() has no "text="
Instances of JButton, JLabel and JTextField all have a getText() method. However, the following produces strings containing the text for JButton and JLabel, but not for JTextField (see below). Why would that be? There are occasions when it would be u
-
why is there no facebook in the safari share button as advertised, only the twitter, and imessage button
-
Query SELECT case.case_objid FROM [email protected] case, table_x_cwp_tickect_details_vw t WHERE CASE.case_condition_cd IN ('OPEN', 'OPEN-DISPATCH', 'OPEN-REJECT', 'OPEN-RETURNED') AND case.case_type_cd in ('CUSTOMER FAULT', 'CHRONIC','SC