Fill Find edit box of Formatted search screen

Hi,
I have an edit box and a choose button.
when I click on that choose button I get a formatted search screen.
I want the value typed in the edit box to be defaulted in the
Find Edit box of the foratted search screen.
Say I type "1" in my edit box, My formatted search screen should pop up having "1"
in the Find edit box and results pertaining to value "1"(like wild card search)
should be displayed in the formatteed search screen.
Can anyone tell me as how to implement this?

The reference to $[x.0.0] was simply meant to point you towards using the formatted search syntax for selecting fields from the current screen for use in your query.
The two techniques I mentioned were not meant to be used together, you could either use the sendkeys, or the $[x.0.0] syntax depending on which result you wanted.
The $[x.0.0] syntax actually goes in the query that is saved for the formatted search, you don't need to do anything with it programatically at runtime, business one does it for you.  You can get a formatted search to pick values up from the current screen by using syntax such as $[$4.0.0] or $[$OINV.CARDCODE]. This particular example will pick up the cardcode from a document screen.  Look in the standard help file under Formatted Searches for more details.
I have attached a sample query showing how it can be used with fields based on userdatasources in custom screens.  This one can be used to show product lookups out when the user has already keyed in a partial product code.  At runtime the $[#018.UItem] reference automatically gets replaced with the value currently in the item field.
DECLARE @Item Varchar(20)
SET @Item = RTRIM($[#018.UItem]) + '%'
SELECT T0.ItemCode, T0.ItemName FROM OITM T0 WHERE T0.ItemCode LIKE @Item FOR BROWSE
If you haven't seen this type of formatted search processing before, I would recommend you try to spend a little time learning it - it sometimes eliminates the need for writing SDK code at all.
Regards,
John.

Similar Messages

  • Formatted Search screen - populate multiple fields

    I have an Employee Id field in my screen.
    On clicking Choose button,I use a Formatted Search screen to populate value to that field.
    I also have other fields like employee Name,department which should be populated, once an employee Id is chosen from Formatted Search screen.
    The functionality is like that of "Purchase Order screen".
    Once a vendor Id is chosen Name,Contact Person etc get populated in "Purchase Order screen".
    How do I do that?
    Should I trap the Choose button event of Formatted Search screen?
    Please help.

    I think all you are missing is a check to make sure you don't try and re-run the lookup when you are validating the return value from a previous lookup.
    I made a minor change to my code and achieved the behaviour you described.  I have extracted the relevant  code from the application .  Unfortunately it looses its indentation when I post it, so it might be quite hard to read.  It uses recordsets for the validation as in practice most of the real validation is more complex than this cut-down sample.
    This particular example is from a screen with a Customer Code prompt, and displays the customers name below it.
    Regards,
    John.
    <b>Constant holding menu uid of Formatted Search</b>
    Public Const AZU_MNU_SEARCH             As Long = 7425
    <b>Declare a variable at module level</b>
    Dim mblnCardLookup as Boolean
    <b>Create validation routine (cut down sample included)</b>
    Sub ValidateCustomer(sboApp As SAPbouiCOM.Application, sboCompany As SAbobsCOM.Company, BubbleEvent As Boolean)
        On Error GoTo ErrorHandler
        Const AZU_PROCEDURENAME     As String = "ValidateCustomer"
        Dim sboRecordset            As SAPbobsCOM.Recordset
        Dim sboForm                 As SAPbouiCOM.Form
        Dim sboDSCard               As SAPbouiCOM.UserDataSource
        Dim sboDSName               As SAPbouiCOM.UserDataSource
        Set sboForm = sboApp.Forms(strUID)
        Set sboDSCard = sboForm.DataSources.UserDataSources("UCARD")
        Set sboDSName = sboForm.DataSources.UserDataSources("UNAME")
        If sboDSCard.value <> "" Then
            Set sboRecordset = sboCompany.GetBusinessObject(BoRecordset)
            sboRecordset.DoQuery "Select CardCode, CardName, Currency From OCRD where CardCode Like '" & sboDSCard.value & "%'"
            If sboRecordset.RecordCount < 1 Then
                If sboDSName.value <> "" Then
                    sboDSName.value = ""
                    sboForm.Items("edtName").Update
                End If
                If Not mblnCardLookup Then
                    LookupCustomer sboApp
                End If
                BubbleEvent = False
                Exit Sub
            End If
            sboRecordset.MoveFirst
            sboDSCard.value = sboRecordset.Fields(0).value
            sboDSName.value = sboRecordset.Fields(1).value
            mstrCurrency = sboRecordset.Fields(2).value
            sboForm.Items("edtName").Update
        Else
            sboDSName.value = ""
            sboForm.Items("edtName").Update
            BubbleEvent = False
        End If
        Set sboDSName = Nothing
        Set sboDSCard = Nothing
        Set sboForm = Nothing
        Set sboRecordset = Nothing
        Exit Sub
    ErrorHandler:
        Call AZU_STD_ERROR_MSGBOX(AZU_MODULENAME, AZU_PROCEDURENAME)
    End Sub
    <b>Create lookup routine (cut down sample included)</b>
    Private Sub LookupCustomer(sboApp As SAPbouiCOM.Application)
        On Error GoTo ErrorHandler
        Const AZU_PROCEDURENAME     As String = "LookupCustomer"
        Dim sboForm                 As SAPbouiCOM.Form
        Set sboForm = sboApp.Forms(strUID)
        mblnCardLookup = True
        sboApp.ActivateMenuItem AZU_MNU_SEARCH
        Set sboForm = Nothing
        Exit Sub
    ErrorHandler:
        Call AZU_STD_ERROR_MSGBOX(AZU_MODULENAME, AZU_PROCEDURENAME)
    End Sub
    <b>Add the following code to the ITEMEVENT handler</b>
        'Validate Customer Code
        If pVal.EventType = et_VALIDATE And pVal.ItemUID = "edtCard" And pVal.Before_Action = False Then
            Call ValidateCustomer(sboApp, sboCompany, BubbleEvent)
        End If
        'Customer Code Lookup on TAB Key
        If pVal.EventType = et_KEY_DOWN And pVal.ItemUID = "edtCard" And pVal.Before_Action = True And pVal.CharPressed = 9 Then
            Set sboDSCard = sboApp.Forms(strUID).DataSources.UserDataSources("UCARD")
            If sboDSCard.value = "" Then
                LookupCustomer sboApp
                BubbleEvent = False
            End If
        End If
        'Force Validation on Return from Lookup
        If pVal.EventType = et_FORM_ACTIVATE And mblnCardLookup = True Then
            sboApp.Forms(strUID).Items("edtRef").Click
            mblnCardLookup = False
        End If

  • Excluding a character from "Change to" box that is in "Find what" box in GREP search

    Hello all! I am a first time poster but have been lurking around the forums for a few months. I'm trying to produce an InDesign document for a book I'm putting out, and there is a section where I have the following text:
    |  TAB  |1.|  TAB  |Lorem ipsum dolor etc.
    The text doesn't literally say tab, I jsut wanted to highlight that there is a tab of white-space on either side of the number for the line. This occurs numerous times in numerous chapters in the endnotes section. I want to remove the tabs so that the result is:
    1. Lorem ipsum dolor etc
    2. Lorem ipsum dolor etc
    3. etc etc
    I have identified that the way to find these sections is to use the GREP search function with \t\d+.\t. The + is there because the numbers go into the double digits in most chapters for the references. However, I do not want to remove the numbers, just the tabs. Is there any way to add an exclude feature to the "Change to" window of the search function? I've tried just leaving it as \d., but that literally changes the text to
    \d. Lorem ipsum dolor etc
    That's not good. I'm trying to avoid having to do all of this by hand, and of course by the time I get a resolution I'll probably have been better off doing it manually, but I'm looking toward the future and trying to ascertain the best way of streamlining such a process short of not having that kind of format in the first place when receiving the file from my employer
    Many thanks for your advice,
    David

    Peter,
       Just to affirm your assistance, this worked for me. I still don't understand the advanced search features perfectly, but I got the formatting fixed without having to sift through it manually. I found that replacing with "$2. " (minus the quotes) worked well. However, I noticed that searching for (\d). would turn up a digit followed by ANY kind of punctuation, not just a period. I assume therefore that . must mean something different in GREP than I'm thinking it does. I just wanted to find any digit before a full-stop. At any rate, that is something I can find a table of GREP search terms for. I didn't understand the $2 thing until I monkeyed with it. I'm typing now for future generations of newbies that might stumble upon my post. The $2 ignores the second character in your "Find what" field. So for example, if instead you had two tabs then a digit then a tab, you could search:
    Find what: (^\t)(\t)(\d)(\t)
    Change to: $3.
    This would take any occurrence of two tabs, a number, and a tab and replace with a period, ignoring and therefore not changing at all the number. The $3 is saying "ignore the third search term", in this case, the \d.
    A better approach would be to use +. This means "any time you see one or more occurrences of the searched-for character". This would look something like:
    Find what: (^\t+)(\d+)(\t+)
    Change to: $2.
    Here you are saying "Any time you see one or more tabs followed by one or more numbers and then followed by one or more tabs, ignore the digit, delete the tabs before and after, and add a full stop after the number. This is a very powerful search feature, once you understand what you're doing anyway. Hope that is helpful to someone at some point.

  • How to hide the dropdown box in my search screen

    hi,
    I am new to jsf. Here , i am posting the question first time.
    I am developing a search screen. I want to hide one dropdown box in that. can anybody help me on that?
    This is the code :
    <h:panelGrid rendered="true" width="100%" border="0" cellpadding="10" cellspacing="10" columns="2" styleClass="tabletext" style="vertical-align: top">
    <h:panelGrid rendered="true" border="0" columns="1" style="vertical-align: top;">
         <h:outputLabel rendered="true" value="Ranger District:"> </h:outputLabel>
         <h:panelGroup id="regionDropdown">
                                  <h:selectOneMenu rendered="true" id="rangerDistrict" value="#{energySearchBean.district}">                    
                                  <f:selectItems value="#{energySearchBean.districts}"/>
                   </h:selectOneMenu>     
                   </h:panelGroup>
              </h:panelGrid>
    </h:panelGrid>
    Thanks in advance.

    If you want to hide it at the server side, use the 'rendered' attribue and let its value evaluate to 'false'. If you want to hide it at the client side, use the CSS 'display' property and set it to 'none'.
    By the way, having 'rendered="true"' hardcoded in all components is superfluous. It is just the default value.

  • How to create paragraph box type format in screen painter?

    Hi Experts,
    I am designing a screen and stuck where, I have to create a field name "REMARKS" which will show the input/output text box in Paragraph format.
    I want a textbox which can show the input values write by user as remarks upto 250 characters.
    Thanks,
    Deepanshu

    Hi,
    This is called a textedit control, which is one of the controls that are part of the control framework .
    To embed it in a screen, you may for instance define a custom container in your dynpro,
    See demo programs SAPTEXTEDIT_TEST_*. And [SAP Library: SAP Textedit|http://help.sap.com/saphelp_nw70/helpdata/en/f1/549e36cf0ecb7de10000009b38f889/frameset.htm ]
    Note that dynpro fields allow to enter up to 255 characters, but it's only in one line, and you can't see everything at a time, you need to "scroll" (i.e. moving the text cursor) inside the field.
    You may also use EDIT_TEXT_INLINE function module.
    Sandra

  • Search Formatted Search

    Hi, I was trying to delete a query. However, it prompted that there is a formatted search for it.
    So I can't delete it.
    But I can't find where the search is.
    Do you know where I can find the list of formatted search I have?
    Thanks.
    Raymond

    The table where the query definitions are stored is  OUQR
    so try SELECT * FROM OUQR
    Suda

  • Formatted Search Help

    Hi,
    Kinda new to this formatted search. Can anyone help me with this question.
    I want to make a formatted search to make a column in sales order 'U_ItemType' so that if it is not null/if it is gift or sample, it will enter the value 'Y' in U_FOC. How do i do this?
    Also can anyone point me to any resource to learn up on formatted search.
    Thanks

    You will need to create a query something like:-
    [code]SELECT CASE $[$38.U_ItemType.0] WHEN 'Gift' THEN 'Y' ELSE 'N' END[/code]
    This will need to compare the value of the U_ItemType in the current row to any conditions you want (eg. = 'Gift'), and return appropriate Y/N value.
    Next you need to define the FS on the U_FOC field.  When defining it you probably want to set:-
    -Search By Saved Query (select query created above)
    -Auto Refresh = "Y"
    -When existing column altered
    -Column = "U_ItemType"
    -Display Saved Values
    You can find out more about formatted searches in some of the online training courses available on the service marketplace (http://service.sap.com/smb).  The training courses are available in the Education section under the heading "Learning Maps / Development Consultants".
    Regards,
    John.

  • Formatted search based on screen entry

    Hi,
    I need help to create a formatted search based on a field that the user entered on the screen. For example, I want a formatted search on the Purchase Order screen where the item search will only show the items where the vendor entered in the Default Vendor field of the master record is the same as the vendor specified in the Vendor field of the purchase order.  Please advise on the correct sql statement.
    Thanks,
    Jane

    Thanks Sudah! That worked!
    However, I do not understand the syntax.  What does [dbo] mean?
    I am trying to duplicate the query for the following scenario.
    I have a user defined field U_Freight in the Business Partner Master Data (OCRD) and also in the sales order screen. I want to create a formatted search for the freight field in the sales order to automatically find the freight from the business partner master data screen based on the customer entered in the sales order.
    I have tried the following as a formatted search on the sales order screen, but it does NOT work.
    SELECT T0.U_FREIGHT FROM [dbo].[OCRD] T0
    WHERE T0.CardCode = $[$4.0.0]
    Please advise.
    Thanks!

  • FORMATTED SEARCH USING SCREEN ENTRIES

    Hi ,
        i want use formatted search to do the following without using variable entry ( without the define survey variables window opening when i execute the query):
    Example: When you enter a purchase order, the item search should propose only those items where the vendor entered in the Default Vendor field of the master record is the same as the vendor specified in the Vendor field of the purchase order.
    i found the following explaination in the SAP B1 training material which is not all clear enough.
    "To do this, you define a query that contains the Vendor field from the purchase order as the condition for the Default Vendor field. You then define this query as a formatted search for the Item no. field in the purchase order entry screen. "
    i wrote a query which pretty much does what i want but , after i enter the vendor code in the purchase order header data  and go to the item field and press shift+F2, instead of just proposing only those items which the  above vendor  sells , a "define survey variables"  window opens and i will have to again choose the same vendor i just choose in the "vendor field in the header data" of the purchase order.
        can anyone plz help me out with this ???

    Hi adrian,
                 thank for ur reply, and plz pardon me for my ignorance..
             i tried using the query u gave me in a query generator and the wizard, but i am getting a couple of syntax errors..and not only the query u gave but any query i have used from this forum ... so i was wondering if i am doing anything wrong..so i ll explain to you how i used your your query so may be u can tell me where i am going wrong..
    i went to the query generator selected the table OITM  and choose the item code and description from that table for the SELECT field and then put the cursor on the WHERE field and typed the condition in the query you gave me for the WHERE field .. and then executed it.. didnt work ..
    Then in the result window of the query generator(and wizard) i went to the write mode of the SOL statments field  and copied and pasted the query you sent me... and then executed it... still doesnt work... and like i said this happens to all the queries i find here in the forum ..  
    can u help??

  • Why is it that when I go to the search screen to find a particular message in a conversation it comes up with the message but when I click on it it takes me to the conversation where the most recent message was sent and not the message I wanted

    Why is it that when I go to the search screen and type in a particular message I want to view, my iPhone finds it but when I click on it it only takes me to the conversation at the most recently thing texted and not the particular message I clicked on?

    Never occurred to me you can search messages that way, thanks.
    Another way to do it is to scroll from the most recent message to the top of the screen and tap load more messages, repeatedly till you reach the one you want.
      I like your method better, but with both methods it refreshes to the most recent message.

  • PS Elements 6 moved editing box off screen

    I was adjusting brightness and moved the brightness editing box off the screen. Now I can't get it back to close and all the menu items are greyed out so I can't save or close anything. Anyone have any ideas. I don't want to lose 2 hrs. editing.

    Try changing the resolution of your screen to a higher setting. That should make every thing on the screen smaller but it may also allow you to see the 'lost' pallette.

  • Formated serch value in edit box

    hello expert
       i have two edit box on actvity form ie ID and Name.i take formated serch of employee liwst in ID edit text box .i am also make code for this but when i open the formated serch it put only id in ID edit text box but i want name also in Name edit box .how can i do it pls give me sample for it.pls help for it

    Hello,
    On Name Edit Box: you can select the value code from ID when id changes. Use refresh always, and bind the FMS into when the id field is changing
    Regards
    J

  • Failed to find out the source table of query in the formated search

    Dear All,
    I am trying to find out how to know the table that it is the source of a formatted search query. In the query manager --> formatted search --> select one of query --> double click to see the query. I see the query but I can't find out what table it will be used if the query like this :
    SELECT $[$13.87.NUMBER] - ($[$13.9.NUMBER] + $[$13.88.NUMBER])
    If I go to receipt from production form, the column no relate to the above query are mixture of IGE1 and OWOR, so what actually the table must I choose if I redesign the above query from query generator. I need your help to solve this question. I appreciate your answer. TIA
    Rgds,
    Steve

    Hi Steve,
    Assuming the FS is currently assigned to a form field you could try the following:
    - Look in OUQR for the query and get it's id (OUQR.IntrnalKey).
    - Look for this id value in CSHS.QueryID and check the FormID value of any records listed. It's not the table name you're looking for but the FormID might help e.g. 139 = Sales Order = ORDR/RDR1 etc.
    Hope this helps.
    Regards,
    Andrew.

  • Find Format Search

    It's possible make a query o some tool of SAP BO to find where and how many format searches i have??
    A mean where if it is in a invoce, payment,etc

    You may go through this: Re: How to find out where a query is used in a FMS and or Form?
    Thanks,
    Gordon

  • The find/change box keeps popping up off the screen. Rebooted and screen is fine, box is not

    the find/change box keeps popping up off the screen. Rebooted and screen is fine, box is not

    Is it visible at all? If so, drag it to a new location, hit the "Done" button to close, close your document and launch InDesign again. By the way, are you on OSX or Windows? I'm on OSX and that works for me. My InDesign version is CS6. Hope this helps.
    Cheers!
    -Mikey

Maybe you are looking for

  • In ff 36 when siging out of a website another tab opens instead of closing the current tab

    When I updated to V.36 this action started . With certain websites when I try to sign out instead of the webpage closing, a new tab opens and the home page of the same website opens. The original tab is still open with my account information still lo

  • Post safe boot ALL emails from third party URL hosting appeared

    I host a half dozen websites on Hostgator. I design those websites using RapidWeaver from RealMac Software. Yosemite has disenabled several of my sites from opening, so I can't migrate to RWv6.0.1. I've been working with their HELP Team for last week

  • ACE "sh conn serverfarm" does display connections

    I have placed 8 rservers inservice behind my ACE. When I do "sh conn serverfarm video-download.domain.com" I see no connections, but I am tailing my apache access.logs and I see that the web servers are serving pages. Is this a bug? Software loader:

  • Aperture 3's weird behaviour

    Hi, Ever since upgrading to Ap3 from Ap2, Aperture is consistently losing track of files that have been imported, even though I am able to go into the archive and find them there. The entire project just disappears after import. Usually when I import

  • My Iphone 4 with iOS 5 changes without touching the glass the windows!

    Since a few days my Iphone changes the windows forward and backward without touching the glass. It's very annoying because writing a new sms is very diffucult because the content is deleted an i have start again several times. What can I do? I still