Clear a parameter at selection-screen
Hi guys, haven't found the answer to this one yet:
at my selection screen, I have the field p_name(40), it's default value is "Insert your name here", what I need is:
when the user selects the field to input data, the field must be cleared to receive the name.
already tried "at selection-screen" but it didn't react to field selection (or did I anything wrong?)
thank you
What you are asking for is simply not apart of the functionality of the SAPgui. The actions which you are talking about, placing the cursor is a field, and firing an event to the application is not possible within the SAPgui presentation client. Instead, keep you parameter P_NAME clear with not default value and just have a selection screen comment beside it.
report zrich_0001.
selection-screen begin of line.
selection-screen comment 1(10) com1.
parameters: p_name(40) TYPE C.
selection-screen comment (30) com2.
selection-screen end of line.
initialization.
com1 = 'Name'.
com2 = 'Please enter your name here'.
Regards,
RIch Heilman
Similar Messages
-
How can we place a F4 help in a parameter in selection screen
Hi,
How can we place a F4 help in a parameter in selection screen. Can we do add a Process 0n Value request similar to a module pool prg in stadard report program.
sajiHello Saji,
Try below attached report.
Regards,
Naimesh.
Reward, if it is useful..!
REPORT ZTEST_NP_1.
DATA: HELPVAL1 LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE .
DATA: VALUE_TAB LIKE PDTASK-OTEXT OCCURS 2 WITH HEADER LINE.
DATA: VALUE LIKE FEBMKA-BANKN,
GIVEN_VALUE LIKE HELP_INFO-FLDVALUE.
DATA: IT_T005T LIKE T005T OCCURS 0 WITH HEADER LINE,
IT_T002T LIKE T002T OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN: BEGIN OF BLOCK BLK1 WITH FRAME TITLE ABC.
PARAMETERS: P_SPRAS LIKE T002T-SPRAS,
P_LAND1 LIKE T005T-LAND1.
SELECTION-SCREEN: END OF BLOCK BLK1.
INITIALIZATION.
ABC = 'Selection Criteria:'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LAND1.
PERFORM VALUE_REQUEST_LAND1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SPRAS.
PERFORM VALUE_REQUEST_SPRAS.
*& Form VALUE_REQUEST_land1
FORM VALUE_REQUEST_LAND1.
*---- Reading the Screen values.
DATA: LT_DYNPFIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
LV_DYNAME LIKE D020S-PROG,
LV_DYNUMB LIKE D020S-DNUM.
*-------Append field which you want to read from the screen
LV_DYNAME = SY-REPID.
LV_DYNUMB = SY-DYNNR.
LT_DYNPFIELDS-FIELDNAME = 'P_SPRAS'.
APPEND LT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LV_DYNAME
DYNUMB = LV_DYNUMB
TABLES
DYNPFIELDS = LT_DYNPFIELDS.
SELECT * FROM T005T
INTO TABLE IT_T005T
WHERE SPRAS = P_SPRAS.
REFRESH: HELPVAL1, VALUE_TAB.
CLEAR: HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
*---- Append field name for the columns in the help popup
HELPVAL1-TABNAME = 'T005T' .
HELPVAL1-FIELDNAME = 'LAND1' .
HELPVAL1-SELECTFLAG = 'X' . " will return the value on the screen
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
HELPVAL1-TABNAME = 'T005T' .
HELPVAL1-FIELDNAME = 'LANDX' .
HELPVAL1-SELECTFLAG = ' ' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
LOOP AT IT_T005T.
VALUE_TAB = IT_T005T-LAND1.
APPEND VALUE_TAB.
VALUE_TAB = IT_T005T-LANDX.
APPEND VALUE_TAB.
ENDLOOP.
GIVEN_VALUE = P_LAND1.
CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
EXPORTING
DISPLAY = SPACE
GIVEN_VALUE = GIVEN_VALUE
IMPORTING
SELECT_VALUE = VALUE
TABLES
FIELDS = HELPVAL1
VALUETAB = VALUE_TAB.
IF NOT VALUE IS INITIAL.
P_LAND1 = VALUE. " Assing value to the parameter
ENDIF.
ENDFORM. " VALUE_REQUEST_land1
*& Form VALUE_REQUEST_SPRAS
FORM VALUE_REQUEST_SPRAS.
REFRESH: HELPVAL1, VALUE_TAB.
CLEAR: HELPVAL1, VALUE_TAB, GIVEN_VALUE, VALUE.
HELPVAL1-TABNAME = 'T002T' .
HELPVAL1-FIELDNAME = 'SPRSL' .
HELPVAL1-SELECTFLAG = 'X' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
HELPVAL1-TABNAME = 'T002T' .
HELPVAL1-FIELDNAME = 'SPTXT' .
HELPVAL1-SELECTFLAG = ' ' .
APPEND HELPVAL1 .
CLEAR HELPVAL1 .
SELECT * FROM T002T
INTO TABLE IT_T002T
WHERE SPRAS = SY-LANGU.
LOOP AT IT_T002T.
VALUE_TAB = IT_T002T-SPRSL.
APPEND VALUE_TAB.
VALUE_TAB = IT_T002T-SPTXT.
APPEND VALUE_TAB.
ENDLOOP.
GIVEN_VALUE = P_SPRAS.
CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
EXPORTING
DISPLAY = SPACE
GIVEN_VALUE = GIVEN_VALUE
IMPORTING
SELECT_VALUE = VALUE
TABLES
FIELDS = HELPVAL1
VALUETAB = VALUE_TAB.
IF NOT VALUE IS INITIAL.
P_SPRAS = VALUE.
ENDIF.
ENDFORM. " VALUE_REQUEST_SPRAS -
Hi Gurus,
What I need to do is to put the default value for parameter on selection screen. It should be the email address of the person who run this program (from user profile).To get this value I called BAPI_USER_GET_DETAIL . How to pass the value to the parameter on selection screen now?
Thank you in advance.
Regards,
LenaTry this:
REPORT ztest LINE-SIZE 80 MESSAGE-ID 00.
PARAMETERS e_mail TYPE bapiadsmtp-e_mail.
DATA: return TYPE TABLE OF bapiret2,
email TYPE TABLE OF bapiadsmtp WITH HEADER LINE.
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'BAPI_USER_GET_DETAIL'
EXPORTING
username = sy-uname
TABLES
return = return
addsmtp = email.
LOOP AT email.
e_mail = email-e_mail.
EXIT.
ENDLOOP.
Rob -
How to clear parameters defined in selection screen on back button
Hi,
I have a report with parameters, few being input fields, and check boxes. After report is executed when user selects the back button, the selection screen is displayed again but with the old selection values. I want to clear them.
So in the Initialization even I added the code to clear all these parameters;
CLEAR: p_aaa, p_bbb, p_ccc.
I debugged and control passes through this code but still the fields are not cleared and they retain the old input values.
How to clear them ?
thnks>
Rob Burbank wrote:
> Yes he did. My mistake.
>
> But isn't this what he wants? To clear the Selection screen so that something has to be entered?
>
> Rob
IMO, he only wants to clear the selection screen parameters on the click of 'BACK' button
in the list screen. If the OP clears the selection screen variables in AT SELECTION-SCREEN OUTPUT
even, the values assinged to the selection parameters in the INITIALIZATION and with the DEFAULT addition of the PARAMETERS and SELECTION-OPTIONS statements will also be overwritten even when the report is executed for the
first time.
-Rajesh. -
How to populate values in a Listbox parameter in selection screens
I have a parameter(as list box) field in selection screens. And now I want to populate a list from a ztable field values. How to do that.
Thanks in AdvanceHi,
You have to use the FM VRM_SET_VALUES.
Check this example..
TYPE-POOLS: vrm.
PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
DATA: t_data TYPE vrm_values.
INITIALIZATION.
DATA: s_data TYPE vrm_value.
<b>***Here you to have to do the select and populate the internal table
***t_data.</b>
s_data-key = 'ABCD'.
s_data-text = 'First four'.
APPEND s_data TO t_data.
s_data-key = 'EFGHI'.
s_data-text = 'Second four'.
APPEND s_data TO t_data.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEST'
values = t_data
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
START-OF-SELECTION.
WRITE: / p_test.
Thanks,
Naren -
Difficulty in adding new parameter in selection screen of GR55 report
Hi Gurus,
I have a requirement to add an extra field in Cost center:Act/Plan/Comm CC Cur report.This is otherwise a Z report in report painter with 0% code (T-code : GR55-> Report group->Report).But,when we go to technical information of this report,it has four standard sap programs,which contains code for this selection screen.It does not even have a modification scope.
Selection screen of this report contains following parameters:
Selection values:
Controlling Ar
Fiscal Year
From Period
To Period
Plan Version
Selection Groups:
Cost Center Group
Or value(s)
Cost Element Group
Or value(s)
My requirement is to add one more parameter : Purchase oeder in new block:
Is there any way to achieve it.
Note: Copying the standard progs into custom prog is not working,i already tried that.
Please let me know your suggestions,if any one of you came across such requirement before.it is very impoertant for me.
Thanks in advance,
MeenakshiHi meenakshi239,
you can always use implicit enhancement spots.
Regards,
Clemens -
Problem in PRD to display check box parameter on selection screen
hi ,
i had one problem, i created one report which will show customer advances, for this report i created one selection screen, i transport req to QAS and PRD it shows fine. after that i need to add one more check box to that report selection screen. i transport reqt to QAS and PRD, in QAS it is woking fine but in PRD i am not able to see the check box which i was enterd. transport was perfect. i am saw the report coding in PRD that has the Check box statement. but it not comming,
1, why the selection screen is not showing that check box parameter ?
2, i had 19 selection fields is their any restriction to display the selection screen ?
please try to solve it for me,
thanq,
rajesh.kHello Rajesh,
First check the Log of your TR. whether it is transported properly without any error or with error.
again delete your Checkbox statement and write code again then try to transport again.
there is no any limitation to provide option on selection screen. you can give as per your requirement.
Regards,
Sujeet -
How to add f4 help for a parameter in selection screen (Report)
hai friends
I am hving a pblm regarding the F4 help in selection screen for a parameter field ,currenly this parameter field is for personnel number , now in f4 help all the personnel numbers r listing ,i need to include the name of the corresponding personnel numbers along with it ,how do i do that .please give me a help.
thankyouHai
you first extract personal number and name into one internal table say itab.
THEN CALL THE FM.
AT SELECTION-SCREEN ON VALUE REQUEST FOR P_PARAMETER.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = P_PARAMETER
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
VALUE_ORG = 'S'
WINDOW_TITLE = 'Open Quantity'
TABLES
VALUE_TAB = ITAB. -
Problem in adding parameter in selection screen
Hi,
I am trying to add a parameter on the selection screen of a standard transaction(EG90 in ISU system).I added it through enhancement point but i am not getting how to maintain text for that parameter.As it is a standard transaction when i am going to goto->selection text and trying to maintain it,it is asking for the access code.Do i have any option for it or i should go for zcreation of the transaction.
Mukesh KumarHi,
unfortanly you need to enter an access code if you want to change somethink in standard without user-exit.
So....you need to create a z-transaction, if you want to add it.
Regards
Nicole -
Passing parameter from selection screen to corresponding report program.
Hi all,
I am developing a report in which there is a selection screen containing 2 list boxes having month 'from' and 'to' ;ie the month range for which the report is to be run and a parameter for year.below it i have 2 radio button options which will lead to the report that the user clicks on.
I have done the following in the code.
selection-screen begin of block b1 with frame title text-001.
parameters: month1(10) as listbox visible length 10 obligatory.
parameters: month2(10) as listbox visible length 10.
parameters: year(4) obligatory.
selection-screen : end of block b1.
selection-screen: begin of block b2 with frame title text-002.
parameters: rb1 radiobutton group g1,
rb2 radiobutton group g1.
selection-screen : end of block b2.
if rb1 = 'X'.
submit ZMIS1.
ENDIF.
if rb2 = 'X'.
submit ZMIS2.
endif.
Now i want the values selected in the listbox and the year to be passed in the report that will be selected in the radiobutton (ie ZMIS1 or ZMIS2) so that the corresponding report output will be displayed directly with the inputs given in the selection screen .
Please tell me how to do this.Thanks in advance.You also have to pass Selection-screen data for called program the way it has been shown down.
REPORT ZVENKAT_ALV_LIST.
DATA:
IT_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS,
WA_RSPARAMS LIKE LINE OF IT_RSPARAMS.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: MONTH1(10) AS LISTBOX VISIBLE LENGTH 10 OBLIGATORY.
PARAMETERS: MONTH2(10) AS LISTBOX VISIBLE LENGTH 10.
PARAMETERS: YEAR(4) OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UC1,
RB2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN : END OF BLOCK B2.
IF RB1 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS1 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
IF RB2 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS2 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
Thanks
Venkat.O -
How to disable parameter in selection screen
hi experts,
SELECTION-SCREEN BEGIN OF BLOCK server WITH FRAME TITLE text-009.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: data_app RADIOBUTTON GROUP csbi.
SELECTION-SCREEN COMMENT 4(35) text-006 FOR FIELD data_app."744242
parameters : p_fname1 like rlgrap-filename default 'D:\usr\sap\ESP\DVEBMGS32\work\.boma1.dat' modif id s1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: data_frn RADIOBUTTON GROUP csbi DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(35) text-007 FOR FIELD data_frn."744242
PARAMETERS: p_fname2 LIKE rlgrap-filename DEFAULT 'D:\Documents and Settings\czfnct\Desktop\boma.xls' modif id s2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK server.
my requirement is when data_frm radio button is active p_fname1 should be disabled or disappeared.
and when data_app radio button is active p_fname2 should be disabled or disappeared.
kindly suggest how to acheive it.
regards,
pavanhi,
try like this
SELECTION-SCREEN BEGIN OF BLOCK server WITH FRAME TITLE text-010.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: data_app RADIOBUTTON GROUP csbi DEFAULT 'X' USER-COMMAND ucom.
SELECTION-SCREEN COMMENT 4(35) text-008 FOR FIELD data_app. "744242
PARAMETERS : p_fname1 LIKE rlgrap-filename DEFAULT 'D:\usr\sap\ESP\DVEBMGS32\work\.boma1.dat' modif id s1..
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: data_frn RADIOBUTTON GROUP csbi.
SELECTION-SCREEN COMMENT 4(35) text-009 FOR FIELD data_frn. "744242
PARAMETERS: p_fname2 LIKE rlgrap-filename DEFAULT 'D:\Documents and Settings\czfnct\Desktop\boma.xls' modif id s2. .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK server.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF data_app = 'X'.
IF screen-name = 'P_FNAME1' .
p_fname1 = 'D:\usr\sap\ESP\DVEBMGS32\work\.boma1.dat' .
screen-input = 1.
ENDIF.
IF screen-name = 'P_FNAME2' .
screen-input = 0.
CLEAR p_fname2.
ENDIF.
MODIFY SCREEN.
ELSEIF data_frn = 'X'.
IF screen-name = 'P_FNAME2' .
p_fname2 = 'D:\Documents and Settings\czfnct\Desktop\boma.xls' .
screen-input = 1.
ENDIF.
IF screen-name = 'P_FNAME1'.
screen-input = 0.
CLEAR p_fname1.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
reward if useful... -
Parameter for selection screen
Hi All,
I want a parameter (Input box) in my selection-screen which can hold 250 characters . I don't want to make screen for this, I want to do it using selection-screen only. Is it possible to do this.
Please provide me solution for this.
Thanks.
ShwetaHi All,
I am very thankful to u all getting involved in providing solution to my thread. I am also trying to get it for select-option but not getting.
As Dande suggested the table name holding 250 character field and the syntax I tried using it but its holding only 45 characters. I am not sure whether it will hold more than 45 characters or not.
Dilleep, As Naveen suggested for parameter it is working fine for me , I am using Ecc 6.0 .
Amit , its a request from my side , I f u have any solution or suggestion related to my query please do provide it, I will appreciate and and I will be v thankful to u , but if u don't have any suggestions please don't give such type of comments "Why don't u try it yourself", As I tried it , and tryining the same (becoz its my problem) ,not getting proper solution so posting in the thread. If u have such type of answer please ignore the thread.
Thanks.
Shweta. -
Infoset Query- How do I clear the in-built selection screen in LDB
Dear Experts,
When LDB is used in queries unwanted selection screen blocks appear.
Please help in getting rid of the same.
Kind Regards
Jogeswara RaoHello Jogeswara,
1. In the Infoset push button Extras and then select Code tab.
2. Select AT SELECTION-SCREEN OUTPUT for Code Section.
Suppose your query is based on logical database KDF and you went to hide the SELECT-OPTIONS for Company Code.
loop at screen.
if SCREEN-NAME = '%_KD_BUKRS_%_APP_%-TEXT' OR
SCREEN-NAME = '%_KD_BUKRS_%_APP_%-OPTI_PUSH' OR
SCREEN-NAME = '%_KD_BUKRS_%_APP_%-TO_TEXT' OR
SCREEN-NAME = '%_KD_BUKRS_%_APP_%-VALU_PUSH' OR
SCREEN-NAME = 'KD_BUKRS-LOW' OR
SCREEN-NAME = 'KD_BUKRS-HIGH'.
screen-invisible = '1'.
screen-active = '0'.
modify screen.
endif.
endloop.
Kind Regards,
Rae Ellen Woytowiez -
Showing dim for parameter in selection screen
hi,
i would like to have 2 parameters become dim (not active) when selection screen showing so that user not allowed to enter anything.
i tried both method but also not working. what i have missed.
thanks
p_1 DEFAULT 'SS' MODIF ID dim,
p_2 DEFAULT 'MARA' MODIF ID dim,
method1
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'dim'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
method2
INITIALIZATION.
LOOP AT SCREEN.
IF SCREEN-NAME = 'p_1' OR
SCREEN-NAME = 'p_2'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.Hi,
write the method 2 in AT SELECTION-SCREEN OUTPUT. e.g.
At Selection-screen output.
LOOP AT SCREEN.
CASE screen-group1.
WHEN 'DIM' .
screen-invisible = 0.
screen-active = 1.
ENDCASE.
CASE screen-name.
WHEN 'p_1'.
screen-input = 1.
WHEN 'p_2'.
screen-input = 1.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
Regards,
Amit -
Clear parameters at a selection screen
Hi
I've a report with three parameters, but when i change one of them the value of last doesn't desappear. I try with clean [others values of parameters], but doesn't work.
Can help me ?
ThanksHi,
Try to clean the parameters in Selection-Screen Events.
AT SELECTION_SCREEN.
AT SELECTION_SCREEN OUTPUT.
Apart from selection screen events parameters wont change.
Hope this resolves your issue.
Esle,Copy & Paste your codes.
Regards,
Gurpreet
Maybe you are looking for
-
IPhone AppleID signin on another iPhone
Yesterday, I downloaded and installed the new iOS6 on two iPhones. I signed on with my Apple ID on my friends phone to get questions answered, etc. and then discovered that I shouldn't have done this. My friend did not remember their ID and I signe
-
Paste stopped working in Dreamweaver CC
All of the sudden my paste function does not work when I copy something outside Dreamweaver and try to paste it inside Dreamweaver. I can copy/paste within Dreamweaver CC just fine. I did try to look it up online, but could only find directions for t
-
I Just got an iPad air 2 mini. Cannot open PDFs attachment. I have the Adobe reader app but still unable. A how can I do this?
-
Time Machine, just doesn't stop running on my machine
I have three internal SATA drives, one of which is dedicated to Time Machine backups, the initial backup seemed to go okay, but now when Time machine runs, it never stops, the little syncing arrows go round and round in the side, and no amount of cli
-
How to install without onscreen instructions?
How do I install Adobe Photoshop Elements9 and Premiere Elements9 when I do not get any pop up windows after I insert the disk into the computer drive?