Select-Options search help with where
Hi Experts,
I need to have a search help in my selection screen with a Where clause.
I've tried to search it but I cant find answers.
The logic is like this, wherein the search help for my selection screen should just have the value PM001 and ZMIS.
SELECT-OPTIONS stsma estat tj30 FOR s_eqpstt FOR tj30t-estat WHERE stsma = 'PM001' and stsma = ZMIS.
Thanks
Sorry, a little more detail... create a view, of search help type, with the columns you present and restrict those two values. Then create the search help with that view. Then add the search help to the select-option.
Regards,
Edgar
Similar Messages
-
Can i have html code for date select options (SEARCH HELP)
Hi frinds,
I have a BSP Page with input as date.
Can i have html code for date select options (SEARCH HELP)
MoosaHi
Please find the sample code below.
FROM DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X" <- Search help
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_FROMDATE %>" />
TO DATE
<htmlb:inputField id = "dd"
width = "45%"
type = "DATE"
showHelp = "X"
alignment = "CENTER"
maxlength = "10"
disabled = "TRUE"
value = "<%= w_TODATE %>" />
Thanks
kalyan -
Selection screen - search help with dynamic sql query
hey ,
is it possible to change the search help of the selection field ?
when i create the range table i put a data element :
create a range table that consists of this new data element
LT_RANGE_TABLE = WD_THIS->M_HANDLER->CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
can i control the search help via the the data element or by other methods ?
i want that when the user press F4 the values that will show is the result of a sql query that i will write .
is it possible ?
thanks
ASA.Hi,
yes it is possible...
This is my test code for say personal number select options...
lt_range_table = wd_this->m_handler->create_range_table(
i_typename = 'PERSNO' ).
add a new field to the selection
wd_this->m_handler->add_selection_field(
i_id = 'PERSNO'
I_VALUE_HELP_TYPE = if_wd_value_help_handler=>CO_PREFIX_SEARCHHELP
I_VALUE_HELP_ID = 'ZHELP_WDA_PERNR' "this is the custom search help we need to create
I_NO_INTERVALS = abap_true
it_result = lt_range_table
i_read_only = read_only ).
do the following:
1) copy the std function module: F4IF_SHLP_EXIT....to ZF4IF_SHLP_EXIT_pernr (in my case i am testing for pernr so my fm
name is like that....obviously it can be anything you want...under the recommended naming convention)
2) look for "STEP SELECT"
STEP SELECT (Select values)
3)write the code as follows:
"NOTE: this is my testing code...but you can build your logic on it....
IF CALLCONTROL-STEP = 'SELECT'.
types: begin of zpri_listing,
pernr type PERSNO,
end of zfund_listing.
DATA: lo_syuname TYPE sy-uname.
data itab type standard table of Zpri_LISTING.
data wa type zpri_listing.
DATA : t_fields LIKE TABLE OF shlp_tab-fielddescr.
DATA : w_fields LIKE LINE OF shlp_tab-fielddescr.
DATA : l_fname TYPE dfies-lfieldname.
IF lo_syuname <> sy-uname. "means we were here before and ITAB is filled...fm retains its data values...unless refresh happens
"this if condition make sure that we do not do this select all the time as long as the same user is logged in...
"a user can press f4 many times...you might want to enhance this logic a little bit more for performance
lo_syuname = sy-uname.
))))))))))))))HERE DO YOUR SELECT(((((((((((((((((((((
select pernr from "sometable" into table itab.
ENDIF.
LOOP AT shlp_tab.
LOOP AT shlp_tab-fielddescr INTO w_fields.
l_fname = w_fields-fieldname.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
parameter = w_fields-fieldname
OFF_SOURCE = 0
LEN_SOURCE = 0
VALUE =
fieldname = l_fname
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = itab
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
parameter_unknown = 1
OTHERS = 2
ENDLOOP.
ENDLOOP.
IF sy-subrc EQ 0.
callcontrol-step = 'DISP'.
ELSE.
callcontrol-step = 'EXIT'.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.
4) save and activate this function module...
5) go to se11 and create "Elementary srch hlp"....
6) fill out all the necessary fields...i am assuming that you already know how to create the search helps...
look for this field: "Search help exit" and put your function name which you created in the above steps...
in this example i have: ZF4IF_SHLP_EXIT_pernr....
7) create and activate the search help....
hope this helps...i just tested this and it is working for me....
Thanks..
AS... -
Is it possible to make a search help with dynamic selection table?
Hi Experts,
Is it possible to create search helps with dynamic seletion tables means
i dont know the selection table names at the time of creation of search help.
These tables will be determined at runtime.
if yes, Please give an idea how to create and pass the table names at runtime.
Thanks
Yogesh GuptaHi Yogesh,
Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'field to return from itab'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'field on your screen to be filled'
stepl = sy-stepl
window_title = 'some text'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Darley -
Search help with new selection within if more than 500 entries
Dear all,
I created a new search help and this works fine ... If I compare my search help with a default search help from SAP, I have 1 small feature that not seems to work ... With the default one, it is possible to make a new selection within the search help by clicking on the arrow down :
If I look at my search help, I don't have the possibility to make a new selection :
Does anyone how this can be done ?
Thanks in advance !
Greetz,
Kurt.HI,
Here are the general steps to get you started.
1. Identify the search help being used (on the ship-to-party field, F1 then Tech Info). I believe you want the collective search help SD_DEBI.
2. Create your own search help with the fields you want to use with SE11, like 'ZDEBI' as an example.
3. Append 'ZDEBI' to SD_DEBI. (Goto->Append Search Help).
4. Clean things up by "Hiding" the old search help. In the 'Included Search Help' tab of the collective search help SD_DEBI, there is a check box that you can tick to hide included search helps. -
Hi Guru Search Help with Restriction
Hi guru,
What is my requirment . I created elementry search in se11 and i used this search in dialog program. Its shows all company code and commidity code.
But boss I want restrict this search help only for one Company Code (GB).It should show company code and commidity code only GB comapny Code.
Where I can restrict this search help.
Please give me possible help.
Point will rewards.
Thanks&Regards
RamanaHi Mr. Kumar,
I'll give one examle for which I had done the same scenerio for PP module for version selection...Please find the eg. code. In this scenerio I had restricted only 4 versions....
I'll give you code from select option till at selection-screen on value request...
In this I have also done the validation part...
First create a elementary search help with required fields... As per my scenario I had created two fields VERSB & VBTXT. In my scenario I have given restriction on VERSB....
then the same search help you have to use in the program to pass to the parameters..
****Select Options....
SELECT-OPTIONS: S_VERNUM FOR T459V-VERSB OBLIGATORY NO-EXTENSION NO INTERVALS.
*****At Selection-Screen on value request....
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_VERNUM-LOW.
PERFORM F4HELP.
******Form F4HELP....
FORM F4HELP .
REFRESH IT_DDSHSELOPS.
CLEAR WA_DDSHSELOPT.
WA_DDSHSELOPT-SHLPNAME = 'ZVERSB'.
WA_DDSHSELOPT-SHLPFIELD = 'VERSB'.
WA_DDSHSELOPT-SIGN = 'I'.
WA_DDSHSELOPT-OPTION = 'EQ'.
WA_DDSHSELOPT-LOW = '04'.
APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
WA_DDSHSELOPT-LOW = 'TC'.
APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
WA_DDSHSELOPT-LOW = 'TE'.
APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
WA_DDSHSELOPT-LOW = 'TL'.
APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
EXPORTING
TABNAME = 'T459V'
FIELDNAME = 'VERSB'
SEARCHHELP = 'ZVERSB'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'VERSB'
SELECTION_SCREEN = 'X'
CALLBACK_SELOPT = IT_DDSHSELOPS.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
*******At selection Screen on above select option field...for validation
AT SELECTION-SCREEN ON S_VERNUM.
PERFORM VALIDATEVERSIONS.
*******Form VALIDATEVERSIONS
FORM VALIDATEVERSIONS .
REFRESH R_VERNUM.
CLEAR R_VERNUM.
R_VERNUM-SIGN = 'I'.
R_VERNUM-OPTION = 'EQ'.
R_VERNUM-LOW = '04'.
APPEND R_VERNUM.
R_VERNUM-LOW = 'TC'.
APPEND R_VERNUM.
R_VERNUM-LOW = 'TE'.
APPEND R_VERNUM.
R_VERNUM-LOW = 'TL'.
APPEND R_VERNUM.
IF NOT S_VERNUM-LOW IN R_VERNUM.
CALL FUNCTION 'C14Z_MESSAGES_SHOW_AS_POPUP'
EXPORTING
I_MSGID = 'ZPP'
I_MSGTY = 'E'
I_MSGNO = '015'
I_MSGV1 = 'Please Select'
I_MSGV2 = 'One of these'
I_MSGV3 = 'Versions'
I_MSGV4 = ': 04, TC, TE, TL.'.
CALL SCREEN 1000.
ENDIF.
ENDFORM. " VALIDATEVERSIONS
This code will help you to work on your query...
Please reward a point . I am sure this will help you....
Cheers.....
Sagun Desai.... -
What is the use of search helps? where can we creat it?
use of search helps and where can we create it?
Hi narendra
LOCK OBJEC TS
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
check this link for example.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
tables:vbak.
call function 'ENQUEUE_EZLOCK3'
exporting
mode_vbak = 'E'
mandt = sy-mandt
vbeln = vbak-vbeln
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
SEARCH HELPS
1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
3)An elementary search help defines the standard flow of an input help.
4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
pls go through this for search help creation
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Search Help Exits:
Re: dynamic values for search help
Re: Dynamic search help
Match code objects are same as Search helps, where they are used in Previous versions of SAP.
Now in the newer versions Search helps are replaced them.
Standard Texts are the texts which are maintained in SO10 Tcode
Every SAP application document is maintained with HEADER and ITEM texts
and these texts are fetched from SAP using the READ_TEXT Function module
by passing TEXT ID, TEXTNAME,TEXTOBJECT and LANGUAGE fields
You can double click on any long text in the systesm and you can see these paramters in the text editor.
Text Modules are created and used in Smartforms.
check these links
http://www.sap-img.com/abap/attach-a-search-help-to-the-screen-field.htm
http://help.sap.com/saphelp_webas620/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/97/24a23fa34ffb47e10000000a114084/content.htm
Reward points if useful
Regards
Pavan -
Hai,
Can any one give example for search help with Programming?
I hope we can create search help with help of coding.
With Regards,Jaheer.yes u can create search help by using match code in programs
for eq
go with abap editor se 38
provide the name of program
parameters : vendor like lfa1-lifnr matchcode object yzob.
double click on yzob
provide description for search help
provide selection method
provide search help parameter
enable check box for import and export
provide lpos
spos
save check activate
press f4 for check and import values i.e it will display a records list available in database table
rewards points please -
Search Help with Web Dynpro call on another system
Hi all,
I have to create a search help with web dynpro on a field but the database is on another system... How can I do?
Many Thanks in advance...I would use a search help exit. Nothing WDA specific here, as this has been possible long before WDA came around. With a search help exit you define the search help like normal, but instead of database table or view being the source of selection, you have a function module. Within the coding of this function module you can call an RFC to read data from another system or call a web service if you need to bridge over to something that isn't ABAP based.
You can read more about Search Help Exits here:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm -
Hi all,
I have to create a search help with web dynpro on a field but the database is on another system... How can I do?
Many Thanks in advance...I would use a search help exit. Nothing WDA specific here, as this has been possible long before WDA came around. With a search help exit you define the search help like normal, but instead of database table or view being the source of selection, you have a function module. Within the coding of this function module you can call an RFC to read data from another system or call a web service if you need to bridge over to something that isn't ABAP based.
You can read more about Search Help Exits here:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm -
Pass select option and parameter with submit
Hello,
I have two programs and what i have to do is to use the selection screen information from program A and submit it to program B so that this second program will generate a report with this information.
After program B is executed it creates some files in a server, which i will have to use later in program A. I cannot modify the program B since its not part of the requirement.
But the thing is that i am having problems when submiting a select option and a parameter together.
It would be really useful if someone could give some examples of this.
Example of what i want to do:
SUBMIT PROGRAM_B
WITH S_MATNR EQ S_MATNR ->pass all the values from a select option.
WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
AND RETURN
Regards,
RobertoHi,
Try this for select-options:
SUBMIT PROGRAM_B
WITH S_MATNR *IN* S_MATNR ->pass all the values from a select option.
WITH P_WERKS EQ P_WERKS ->pass a single value from a parameter.
AND RETURN
Hope it helps.
Regards,
Gilberto Li
Edited by: Gilberto Li on Feb 2, 2009 10:24 PM
Edited by: Gilberto Li on Feb 2, 2009 10:33 PM
Edited by: Gilberto Li on Feb 2, 2009 10:33 PM -
Supress 'Further Selection' And 'Search Help' buttons from LDB selection sc
Hi,
How to supress/invisible 'Further Selection' And 'Search Help' buttons from LDB selection screen?
waiting for reply.
Shweta.Hi,
1) try to use another version of sel-screen
2) work with loop at screen:
LOOP AT SCREEN.
CASE SCREEN-NAME.
WHEN 'ANLAGE-LOW' OR 'ANLAGE-HIGH'
OR '%_ANLAGE_%_APP_%-TEXT'
OR '%_ANLAGE_%_APP_%-VALU_PUSH'
OR '%_UNTNR_%_APP_%-TEXT'
OR 'UNTNR-LOW' OR 'UNTNR-HIGH'
OR '%_UNTNR_%_APP_%-VALU_PUSH'
OR 'BEREICH2' OR 'BEREICH3'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0.
SCREEN-OUTPUT = 0.
WHEN 'BUKRS-LOW'.
SCREEN-REQUIRED = 1.
WHEN OTHERS.
CONTINUE.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
A. -
Help needed with search help with ina search help
Hi all,
i have a field fld1 (non primary key )and to the dataelement of that field a search help is assigned in table ztable1.
That search help is referring to a table in which fld1 is primary key in ztable2.
I have created another search help with all the fileds in ztable1 and iam using this search help in a selection screen returning another field say fld2.
in this search help i have drill down for fld2, which in turn gives the fields of ztable2.
This is working fine.
i have created another search help with the fields of ztable1 but this time its its returning the value of fld1. for some reason in this search i am not able to see the drill downn for fld1 .
can anyone tell me how to get the drill down even the import parameteris fld1
Thankshi,
any suggestions on this
thanks -
Date selection and search help component in jsp
Hi all:
In sap portal jsp development enviorment, is it possible to easily program the date selection and search help ( just look like search help in webdynpro ) ?Hello Jianhong,
the easiest way to set a value help is using HTMLB component in your JSP.
To do it, use next code:
<hbj:inputField
id="DateInputField"
type="date"
showHelp="TRUE"
... other attributes
/>
Before using HTMLB components in your JSP, don't forget to add this line to your page:
<%@ taglib uri= "tagLib" prefix="hbj" %>
regards.
mz -
Select-option or parameter with display mode
hai experts,
i need to give select-option or parameter with display mode in selection-screen.
my requirement is.......
to give last print out time in selection screen with display mode mean user cant able to change the time......
reward avail for hope ful answer.....
thanks in advance...
regards,
jai.mHi jaya,
write the following code.
parameters: p1 type c.
initialization.
p1 = 'c'.
at selection-screeen output.
loop at screen.
if screen-name = 'P1'.
screen-input = '0'.
modify screen.
endif.
endloop.
regards,
Santosh Thorat
Maybe you are looking for
-
How do i sync my phone to a new itunes without loosing everything?
I had to have my laptop restored as it was broken which meant everything was wiped so i had to reinstall itunes. When i plugged my phone in expecting it to be fine it wouldnt sync with my laptop without wiping the contents and replacing it with the c
-
Just tried to download and install latest ITunes update and it would not finish update. I aborted the update and then my ITunes will not open. I keep getting and error stating that file MSVCR80.dll not found. I reinstalled my original ITune file but
-
Before I go through the hassle of tweaking all kinds of settings in windows and scrubbing and reinstall drivers (and thereby getting progressi'vely more frustrated), I want to see if anyone else has had the same problem I am and if they found a solid
-
hi i m hasan, i am just about to create my first ever project. i have to create a program for a cyber cafe. i have taken all the detail of the requirement from the cyber cafe. i will be creating it using Java Swing. now how should i start working on
-
my ipod touch battery died. tried recharging but nothing is happening. tried multiple chargers and usb ports. what do i do?