Selection screen modification
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. R
Copy 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
Similar Messages
-
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 -
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 -
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 -
How to can we do selection-screen modification for LDB?
Hi All,
I have custom field in my selection-screen of LDB PNP.
Can you people please let me know how can I put the selection-screen modificaiton For ex:
i have created
parameters a as checbox.
select-options: p_btrtl for p0001-btrtl no-intervals.
now If the check box is selected then p_btrtl we can enter values or esle If check box is not selected then p_btrtl will be grayed out, ( I.e. SCREEN-INPUT = 0)
This is simple from ABAP without LDB. But with LDB can we achieve?????????????
Satish
Edited by: Satish Vasireddy on Jun 23, 2010 4:05 PMyou can use the following logic for the additional selection validation. I have done by using PNP LDB. Ex : I have done for one of the field in IT0377.
SELECT-OPTIONS: s_bplan FOR p0377-bplan.
*& Form check_selection_0377
This subroutine is used to check the selection screen
FORM check_selection_0377.
LOOP AT p0377 WHERE pltyp IN s_bplan
AND levl1 IN s_lti
AND begda LE pn-endda
AND endda GE pn-begda.
CALL FUNCTION 'HR_CHECK_AUTHORITY_INFTY'
EXPORTING
tclas = 'A'
pernr = pernr-pernr
infty = p0377-infty
subty = p0377-subty
begda = pn-begda
endda = pn-endda
level = 'R'
EXCEPTIONS
no_authorization = 1
internal_error = 2
OTHERS = 3.
IF NOT sy-subrc IS INITIAL.
DELETE p0377.
ENDIF.
ENDLOOP.
selection not found and no value selected
IF sy-subrc NE 0.
READ TABLE s_bplan.
IF sy-subrc EQ 0.
REJECT.
ENDIF.
READ TABLE s_lti.
IF sy-subrc EQ 0.
REJECT.
ENDIF.
ENDIF.
ENDFORM. " check_selection_0377
Regards,
Preetham -
At Selection Screen modification for a paramter
hi
two questions
I am trying to make a parameter field have a default value with un-editable mode...
So I did it this way
*& Report Z_506757_TEST3 *
REPORT Z_506757_TEST3 .
TYPES: STR(20).
TABLES: VBRP.
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS: FNAME TYPE STR,
LNAME TYPE STR,
FINAL TYPE STR DEFAULT '200'.
SELECTION-SCREEN END OF BLOCK B1.
*INITIALIZATION.
final = '200'.
APPEND final.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'FINAL'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
PERFORM MERGE.
ENDLOOP.
*& Form merge
text
FORM MERGE.
CONCATENATE FNAME LNAME INTO FINAL.
ENDFORM. "merge
I dont get the default value as 200.. if the screen-input = 0... so how should handle this problem
Another problem is if i fill the FNAME AND LNAME fields, WITHOUT PRESSING THE EXECUTE BUTTON i should get the value filled in the FINAL field
Can this be handled in the At-SELECTIOn Screen output
Is this possibleI tried this code in my system and it works as expected. The field FINAL is not input enabled and is defauled to 200.
REPORT zkartest.
TYPES: str(20).
PARAMETERS: fname TYPE str,
lname TYPE str,
final TYPE str DEFAULT '200'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'FINAL'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
Doubt in selection screen modification
Hi all,
I have a Checkbox (select all) in my selection screen and 23 other check boxes.
When i click the 'select all' checkbox, all the 23 checkboxes should be selected automatically in the selection screen and the lf i remove the tick mark in the checkbox, all the 23 check boxes should be cleared automatically and it should allow the user to select any of the checkboxes on his own..
I'm able to select all, when it is ticked. But my pbm is when the 'select all' tick mark is removed, i'm clearing all the 23 checkboxes. so after this, if the user a select any check box on his own, it is not taken. Bcoz, i'm clearing all the value in 'at selection screen' event.
Could any one help to achieve this ...
Regards,
ShanthiHi Shanti,
Here is the modified code of the fellow SDN. Just check. It works as u requested.
REPORT zvenkat_notepad.
SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME.
PARAMETERS:p_all AS CHECKBOX USER-COMMAND rusr.
SELECTION-SCREEN : END OF BLOCK blk1.
SELECTION-SCREEN : BEGIN OF BLOCK blk2 WITH FRAME.
PARAMETERS: p_chk1 AS CHECKBOX,
p_chk2 AS CHECKBOX,
p_chk3 AS CHECKBOX,
p_chk4 AS CHECKBOX,
p_chk5 AS CHECKBOX,
p_chk6 AS CHECKBOX,
p_chk7 AS CHECKBOX,
p_chk8 AS CHECKBOX,
p_chk9 AS CHECKBOX,
p_chk10 AS CHECKBOX,
p_chk11 AS CHECKBOX,
p_chk12 AS CHECKBOX,
p_chk13 AS CHECKBOX,
p_chk14 AS CHECKBOX,
p_chk15 AS CHECKBOX,
p_chk16 AS CHECKBOX,
p_chk17 AS CHECKBOX,
p_chk18 AS CHECKBOX,
p_chk19 AS CHECKBOX,
p_chk20 AS CHECKBOX,
p_chk21 AS CHECKBOX,
p_chk22 AS CHECKBOX,
p_chk23 AS CHECKBOX.
SELECTION-SCREEN : END OF BLOCK blk2.
AT SELECTION-SCREEN." OUTPUT.
IF p_all = 'X'.
p_chk1 = 'X'.
p_chk2 = 'X'.
p_chk3 = 'X'.
p_chk4 = 'X'.
p_chk5 = 'X'.
p_chk6 = 'X'.
p_chk7 = 'X'.
p_chk8 = 'X'.
p_chk9 = 'X'.
p_chk10 = 'X'.
p_chk11 = 'X'.
p_chk12 = 'X'.
p_chk13 = 'X'.
p_chk14 = 'X'.
p_chk15 = 'X'.
p_chk16 = 'X'.
p_chk17 = 'X'.
p_chk18 = 'X'.
p_chk19 = 'X'.
p_chk20 = 'X'.
p_chk21 = 'X'.
p_chk22 = 'X'.
p_chk23 = 'X'.
ENDIF.
IF sy-ucomm = 'RUSR' AND p_all = space.
CLEAR:
p_chk1,
p_chk2,
p_chk3,
p_chk4,
p_chk5,
p_chk6,
p_chk7,
p_chk8,
p_chk9,
p_chk10,
p_chk11,
p_chk12,
p_chk13,
p_chk14,
p_chk15,
p_chk16,
p_chk17,
p_chk18,
p_chk19,
p_chk20,
p_chk21,
p_chk22,
p_chk23.
ENDIF.
Regards,
Venkat.O -
Selection screen modifications
Hi,
I have a sales o order, quantity, unit and material on the selection screen. I have to provide the validations in the following way
If I enter the material number on the selection screen then I need to make quantity as mandatory field.
If I enter value on sales order then I need to make material as disable mode.
Suppose if that sales order is not there in the vbak table then I need to make material as enable mode.
Please give me the guidance to do this. If possible please send me the logic because I have very less time to do R&D. I will give the points.
Thanks a lot in advance.Hai,
AT SELECTION-SCREEN OUTPUT.
IF materialnumber IS NOT INITIAL.
LOOP AT SCREEN.
SCREEN-NAME = 'PARAMETER FOR QUANTITY'.
SCREEN-REQUIRED = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF salesordernumber IS NOT INITIAL.
LOOP AT SCREEN.
SCREEN-NAME = 'PARAMETER FOR MATERIAL'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
THANKS,
NEERAJ
ENDIF. -
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 -
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
Maybe you are looking for
-
Ok, I have found defining classes in .as files can be very useful for me. I have a few functions that are being called over and over again in different movies. There is what I want / need to do in order to stream line the creating and updating of the
-
Need to change Index tablespace from existing tablespace to new one? Do i need to rebuild the index to accomplish this? (using- Alter index <index-name> rebuild tablespace <index-tablespace>;.) Or is there any other option?
-
Every time I touch my Iphone 4s a box appears around whatever I touch and Siri tells me what I am touching and I have to double tap it to bring the app up. It also won't let me scroll up or down and scrolling sideways is difficult.
-
IM003 error loading ODBC driver
I'm getting this error when I try to connect a C++ ISAPI dll to a 9i database using the 9i ODBC driver. Other apps connect successfully, the 'Test Connect' works fine from the ODBC administrator. Everyone and his dog have permissions to use the ORACL
-
Slippery problem: disappearing data from SMB shares
I have an Xserve running 10.5.8 serving as a Samba PDC for my school. Clients are using XP Pro SP2. Every user gets a home directory which is mounted at logon as a mapped drive, and a profile folder which contains the Desktop, My Documents, personal