Create Formatted  Search by code in a user form

Hi, I want to create a formated search in a user form but it doesnt work using my form id (STEC_EXTRAS) as the search.FormID.
I created the formatted search by SAP (Shift+F2) and in the table of formatted searches the formid appears as 2000001000
¿Where is the relation between my id and the id SAP uses?¿Any SAP table or conversion rule?
Thanks for the possible help.

Hello,
When You create a form, the id (Type) can be set up by  Add function, ..... it is staring form 2000000000 ...
Maybe Your "ID" STEC_EXTRAS is the Unique ID of the Form...... not the Type
Public Const WM_USERFORM As Integer = 2000000000 ' User defined forms minimum ID
Public Const YOURFORM As Integer= WM_USERFORM + 1 ' My form id will be  2000000001 
oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, YOURFORM - WM_USERFORM)
'this is the same as
oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, 1)
' or the same as
Dim creationPackage as SAPbouiCOM.FormCreationParams
creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.UniqueID = "MYFORM"
creationPackage.FormType = YOURFORM
creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
oForm = SBO_Application.Forms.AddEx(creationPackage)
If you use  STEC_EXTRAS as FormType, You will see in the CSHS table STEC_EXTRAS as the FormId
Dim creationPackage as SAPbouiCOM.FormCreationParams
creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
creationPackage.UniqueID = "MYFORM"
creationPackage.FormType = "STEC_EXTRAS"
creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
oForm = SBO_Application.Forms.AddEx(creationPackage)
Regards
J.

Similar Messages

  • Creating formatted search using DI API

    Dear All,
    Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
    Regards,
    Noor Hussain

    Yes, it is possible. Look for the FormattedSearches object in SDK.

  • HOW TO CREATE FORMATTED SEARCH ?????

    HOW TO CREATE FORMATTED SEARCH ??
    ANYONE KNOWS PLESE EXPLAIN????
    Regards,
    Vinayak

    hi Vinayak,
    Please no Caps...
    check this thread [Click here|http://forums.sdn.sap.com/thread.jspa?threadID=1579223]
    check the ff. Wiki Pages as well
    http://wiki.sdn.sap.com/wiki/display/B1/S-FSFormattedSearchesSQLPostedtoWiki
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=69763407
    regards,
    Fidel

  • Formatted Search error with a different user

    I created an add-on form and assigned formatted search to some of the fields.
    When I logged in with a different user(<b>test</b>) and tried to use the FS via Shift+F2, I received an error saying "You're not permitted to define recurring postings".
    I gave that user the authentication for recurring postings, but now I receive an unclear error when I try to use the FS on the same editbox:
    "<b>You are not permitted to perform this action</b>."
    <b>Any ideas</b> ? What may be the reason for that unclear error message ?
    <u><b>Note:</b></u>
    <i>After logging on with the same test user, when I try Shift+F2 on another editbox (which is normally not assigned a FS) it works normally and I can do all FS operations like assigning a new FS, etc.</i>

    Hi!
    sometimes there are strange things with user permissions.
    i had some troubles with 2 users which have the same permissions. i solved it by 'drag'n'dropping' permission of the 1st user (which works ok) to the 2nd.
    try to do the same - drop 'good'-user permissions to 'test'-user.
    if it'll not solved problem then try to create new user and test your addon under that user.
    probubly your problem has another motive, but i have such strange behaviour and i've described you my solution.
    hope it'll help.
    sorry for my poor EN, hope it'll be better in some centuries

  • Formatted search - how to get table or form name

    Hello,
    I'm trying to create a generic query for modifying "Journal Remark" on different documents (Goods receipt, invoices ...) thru a formatted search
    My problem is that I want to customize the "remark" according to the current document.
    is there a way to get the table name or the form number in a query ? or should I to create a different query for each document ?
    Regards

    Hi....
    If you activate the System Information from Menu Bar> View> System Information. Then when you move the cusrsor from any of the document you get some variable values which displays the ID of forms colums and rows.
    You can get this information for your FMS. There is no need to create no. of FMS for each Document. Just take the variables into the FMS and apply to the same ID documents.....
    Regards,
    Rahul

  • Formatted Search totaling several fields on unsaved form

    Hello Experts! I am trying to create a formatted search to total several UDF's, at the row level of a quote, without first having to save the record. HELP. I have tried everything except the correct syntax.
    $[38.U_COSTPLUS.1] * $[38.Quantity.1]     And I tried
    $[QUT1.U_COSTPLUS] * $[QUT1.Quantity]     And I tried
    $[$149.38.U_COSTPLUS] * $[$149.38.Quantity]  
    Any suggestions? How can I total several fields for a row, without first having to save the document?
    Thanks folks!

    Presuming that you are trying to use this formatted search on a row level field of a marketing document and U_COSTPLUS is a numeric field.
    The syntax would be $[$38.11]*$[$38.U_COSTPLUS]
    NOTE: Quantity field is column 11 - you may also spell quantity as $[$38.Quantity]. You were missing the '$' before 38.
    Good luck
    Suda

  • Formatted search on User Table

    Hi..,
          I need to set formatted search for user table which is @DCNR . My Requirement is that i need to  Pick CST NO from BP Master  . In my user screen i had taken CARDCODE value using CFL which is binded to the field U_ven in the table @DCNR.Using this CARDCODE value i need to pick CSTNO from BP master to the user screen which is binded to the table (@DCNR).My Query is as follows but it is not working,
    SELECT crd7.taxid1 from crd7 inner join @dcnr on crd7.cardcode  = @dcnr.u_ven where crd7.cardcode = $[@dcnr.u_ven]
    U_VEN field contains card code value.
    Do i need to follow some other terms in order to write formatted search on user table.
    Hope some one would help to fix this problem.
    thank u,
    -Ashok Krishnan

    Dear Mr Krishnan,
    As a starting poing I would suggest reading these documents regarding UDF and Formatted search:
    https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700004463532006E&_SCENARIO=01100035870000000183&
    https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700003625432006E&_SCENARIO=01100035870000000183&
    let us know if they were usefull.
    Kind Regards,
    Marcella Rivi
    SAP Business One Forums Team
    Edited by: Paul Finneran on Aug 14, 2008 1:15 PM

  • Formatted search with UDF and syntax question

    Can you explain the syntax with when to use the dollar sign and negative in writing a query for a formatted search based on user entry?
    I now want to create a formatted search to pull values based on the user's entry into a UDF on the item master screen.
    User entry into UDF U_Customer Code
    to create Formatted search for UDF U_Rep01
    I tried the following, but it does not work.
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $http://$OITM.U_CUSTOMERCODE
    Thanks.
    Please advise.

    The right syntax would be like this:
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $[OITM.U_CUSTOMERCODE\]
    However, the logic of query may not be correct.  Select something must be already in the system and Where should also be locatable.
    Thanks,
    Gordon

  • How to create a search with multiple criteria

    Hi
    I've a table that contain staff information. (name, dept. position, ext, email...etc)
    I've created a search page that allow the user to search any field. The result should appear in the same page
    first i've created the form:
    enter staff First_Name:
    enter Dept. :
    select position:
    submit button
    Then I've created the record set that select all the feilds from the table, now i need a help in the criteria, This is what I used:
    SELECT *
    FROM tblstaff
    WHERE First_Name LIKE %colname% AND Dept = coldept
    for both colname and coldept
    default = 1
    runtime value = $HTTP_POST_VARS['First_Name']    -    $HTTP_POST_VARS['Dept']
    It seems to work fine when i enter all the values in the search form. but what if i left some fields empty? In other word how can I add (All in the drop down menu and accept empty value for the text search)??
    can anyone help me?

    The simplest way to do this is to add a wildcard character to the end of coldept and make the field optional.
    SELECT *
    FROM tblstaff
    WHERE First_Name LIKE %colname% AND Dept LIKE coldept%
    If the department field is left empty, it will match all departments.
    By the way, you should not be using $HTTP_POST_VARS or $HTTP_GET_VARS. It's obsolete code, and will break on a modern installation of PHP. Use $_POST and $_GET instead.

  • Mandatory Input in Formatted Search Query Field

    I have created formatted search query. Which has only one field "Serial Number"?  I have to ensure that, the user has to enter the value in that field.  How to do that?
    I was thinking on implement in stored procedure SBO_TransactionNotification with Object_Type = "219". But I am not sure, how to enforce the validation only for this search query.  Because there are 50+ formatted search queries are available in the system.
    Please help

    Hi Suresh
    Check the below document
    How to SET a UDF field as Mandatory Does TNSP required for It?
    With Regards
    Balaji Sampath

  • Get matrix row data and put it into header field with formatted search ???

    Hi All,
    I ask your help concerning the following:
    On an invoice matrix I want to check all Itemgroup Codes of all items in the rows, if there are some rows' items with ItemGroupcode 101 and some others with anything else, then header field should be Y, otherwise N.
    My main problem is: how do I put a matrix row data to a header data with checking all rows in the matrix?
    A minor problem is that I can't get the formatted search to work on all rows when the formatted search is assigned to the user field in header.
    If I put the formatted search to a row field then the row field is filled with the proper value, but the same query assigned to the user field in header works only on the first row.
    What am I doing wrong?
    SELECT USEDPROD= CASE T0.ItmsGrpCod  WHEN 101 THEN Y ELSE N END FROM .[OITM] T0 WHERE T0.ItemCode = $[$38.1.0]
    (SBO 7.6)
    Any suggestions are welcome.
    Thanks.
    Bálint

    Dear Adele,
    Thanks for the answer. The major one cannot be solved. OK, I'll try to get a workaround.
    However I still do not understand why my query does not work in all selected rows, just in the first row, i.e. if I assign the query to a header field and I'm positioned in the first row it's OK, but when I add a new item to the second row or any of the next rows, the header field is not updated at all.
    Why is that so? Do you have any idea?
    Bálint

  • What is the best way to create a search help in wen dynpro java?

    Hi experts,
    In web dynpro java I want to create a search help which could guide user to search a job (also a position and a organizational unit) just like in transaction ppome. So which technique could be the best way to reach that quickly and simply?
    Thanks!

    HI,
    Refer the following links.
    EVS Valuehelp
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/391ee590-0201-0010-1c89-f1193a886421
    Web Dynpro Valuehelp
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e038cf90-0201-0010-0a9a-ec69262a1564
    sample application
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cf40cf90-0201-0010-4a85-e5a207b900d8

  • How to activate several Formatted Search Forms !!

    Hi Guys,
    I have a problem concerning the manipulation of formated Search Forms. Actually when using the ActivatMenuItem() method, one needs a UID of the items to be activated. And I would like to use this method to activate several formated Search Forms but I don't know how to get the UID of those formatted Search Forms.
    While searching on the Forum, I have seen that some developers used following command SBO_Application.ActivateMenuItem("7425");
    I tried that and it works, but it only activates the first formatted Search Form saved in the CSHS table. My problem is how to activate the other formatted Search Forms and how to access their UID.
    Thanks in advance for Responding
    Bop

    Formatted searches are tied to an individual field on the screen.
    They are not launched by individual UID's, there is only one formatted search menu UID - 7425.
    The actual screen that is called is based on which field the focus is currently in.  If you are in form UID "1", field UID "1" it will call the formatted search (defined in CSHS) for Form 1 / Item 1.  If the focus is currently in field UID "2", it will call a different search.  If there is no formatted search defined on CSHS for the current field, then it will display a dialog asking if you want to create one.
    If you want to open other formatted searches for different fields in your form, simply place the focus on them before calling ActivateMenuItem("7425").  You can do this using the Click method.
    John.

  • Include the "created by" field in formatted searches

    Hello
    Very stupid question : how do you include the "created by" (usersign) field in a formatted search for marketing document ? Where do you find the variable numbers since this field is not visible on screen ?
    Thanks for your help
    Fabrice

    HI Milton Rafael Mazzali ,
    $[USER] will display user number only.
    First decided where u want to display user name. Create a formatted search for that field with this Query  "SELECT T0.U_NAME FROM OUSR T0 WHERE T0.INTERNAL_K = $[USER]" and select auto refresh when customer code/name changes.
    This will work.
    Regards
    Ramesh Kumar

  • Formatted search in the User defined table

    Hi All..
    I created two user defined table one is for document row and other is for document master.So in the master table created one column named as Sales order no and through formatted search call the sales order no in that column.Now i want that in my child table i want to show the those items which belongs to the selected sales order no in the master table.So how can i do that through Formatted search.Is there any query of it then please forward it..
    Thanks

    Ya Sure..
    I need some quality check on the items after delivery so i am trying to manage it through the user defined tables.I created two tables first is document type ,Second is Document type rows.Now i created 5 user defined field in both the table.Now i want to call my sales order and its items in the UDT.so i created one fms and call the sales order in the Document table now when i double click on the first row after that i am able to see the new table which is the document row table .Now i need the item code and description of the selected sales order in the document rows table.So how the items and description can come in the row type table through FMS..
    I hope now u r able to get my scenario..

Maybe you are looking for

  • Setting JAVA_HOME environment variable?

    Sorry for such a trivial question, but in Windows 2000 Server with Microsoft Visual J++ 6 and the JRK 1.1.8, can somebody tell me what the environment variables should be so that I can use this jdk? If not can you tell me what your environment variab

  • Developing a code with multiple GET and POST requests

    hi all, i have a requirement to upload a video file to a server and i need your help to develop the code using java .Basically it has several steps like 1) A GET request should be made to the server with parameters like file name,size etc 2) The resp

  • Email button error works but gives Error message "10"

    I have "attach to email" buttons on my forms. I leave the email address blank for the person to fill in themselves. It works fine but on one form (and one form only) when clicking on the button an error message window comes up - with exclamation mark

  • Error when creating new XML-Form

    Hi everybody! We are using XML-Forms to create/edit/display FAQs out of the KM-Content. We have created our own XMLForms for that and it worked fine. After our last upgrade (NW 7.0 SP-Stack 16) we have the following problem: clicking the "new FAQ" li

  • Please put the Event Viewer More Information link back on technet.

    Hi The details of every Event Viewer item has a More Information link. This link points to http://technet.microsoft.com/en-us/library/ee958049.aspx Unfortunately that page is (no longer) available. Could someone put that page back or correct the code