Regarding query generation to user defined forms

Hi all,
i had created user defined form with some fields and tables
tables in the sense matrix
i had entered the data in that table
and added that data
after that i came back to that form and used the fields that are below the table to calucalate the maximum and minimum from the columns of matrix
so to get the data of that particular form only i used the $ command to extract data depending on the report number
but iam unable to get the result
any one help me regarding this
it is required urgent
Thanks And Regards
sravanth.sm

Sravanth,
Let's see if I can help you.
Assume your form's title table is called @TITLE and the matrix table is called @ROWS. In the form's title you have the record key DocEntry. In the Matrix you have a column COLUMN from were you are going to get some value. ok?
Maximum of the column
SELECT Max(T0.COLUMN) FROM [dbo].[@ROWS] T0 WHERE T0.DocEntry=$[@TITLE.DocEntry]
To get the minimum, just use the Min() function.
Regards,
Vítor Vieira

Similar Messages

  • SQL Query for user defined form

    Hi experts,
    I want query to update some fields in my user defined form using stored procedure on clicking of ADD button.
    Explanation:
    I have User Defined form call "DC request" with Object 'DCLM'..On click of Add button, it is saving my record info into the form. But in one field if value in not entered then it is saving as 'Null'.
    Addon is already made, can not change in coding.
    I want to update this field with '0' value through query in stored procedure on click of Add Button. Can anyone help me out to achieve this.
    Thanks

    Hi Team Bone.
    Please try below Transaction Notification which will Restrict User to ADD if Field_Name is NULL and then User Need to Enter ZERO i.e. 0 for Adding.
    IF @OBJECT_TYPE = 'DCLM' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
    BEGIN
    If Exists (Select T0.DocEntry from [Table_Name] T0 Where ( T0.Field_Name is null  OR  T0.Field_Name = ' ' ) AND T0.DocEntry  = @lisT_of_cols_val_Tab_del )
    begin
    SET @error = -100000
    SET @error_message = 'Filed_Name is NULL then So, Please enter ZERO Value i.e. 0 in Filed_Name'
    End
    End
    Please change Table_Name and Field_Name with with UDO field.
    Hope this help
    Regards::::
    Atul Chakraborty

  • Opening a Crystal Report in B1 8.8 in a User Defined Form representing UDO

    Hi Experts,
    Is it possible to open a Crystal Report from a User Defined Form representing my UDO?
    I had developed a 'Vendor Quotation' UDO and its  User Defined Form
    I wanted to show the report while clicking the Preview menu in SAP B1 8.8 toolbar.
    I have created the Crystal report and used the record selection as {@OVQT.DocEntry} = {DocKey@}
    Please help
    Also, is it possible to add Print layout and assign a default Print layout to this User Defined Form?
    Thanks in advance
    Regards
    Arun

    Hi,
    I also face the same problem. I make a master type using UDO. But i want to print it.
    In my opinion ( i haven't tried this way ). If we make a UDO ( master or document type ) , we will find the docentry and object field in our UDT. Both of these will connect between SAP form and Crystal report. In crystal report we select the tmsp_doclinetypelayout. It is a store procedure which will connect between SAP form and CR. Before that try to modify this SP by adding the udo object.
    Fyi, if i'm not mistake dockey is connected to docentry SAP form.
    Thanks
    regards
    bodhi86

  • Give authorisation To User defined form

    How to give authorisation to User defined form
    Regards,
    Pravin

    hi,
    After you have created the additional Authorization in Additional Authorization Creator window you still need to define the authorization in the Authorization Window located at Administration -->> System Initialization -->> Authorizations -->> General Authorizations. then select your desired user and assign your desired Authorization.
    regards,
    Fidel

  • Base Document and Target Document Menu for User Defined Forms

    Hi Experts,
    I am facing a problem regarding enabling the menu "Base Document" Menu UID="5898" and "Target Document" Menu UID="5899" . Both of these menu Items are not enabled for User Defined Form .Actually I have developed a user Defined form for Purchase Requisition that targets Purchase Order . User can Copy Line Items From Purchase Requisition to Purchase Order and I am tracking the DocEntry and LineId of PR into PO Item's using UDS . I want to Open this PR Document upon Click of BaseDocument Menu .I have tried all the options. I have used Form.enableMenu() method also . But none of those options work for this menu . I ahve also searched about this problem i this forum also but there is no soultion so far posted regarding this.
    I really want to confirm whether it is possible or not using SDK for User Defined Forms . Is there any possiblity of implementing any WorkArounds and Having this feature implemented .
    I am Expecting a true solutions as this Forum has so many Experienced Experts .
    Thanks and Regards,
    Pooja Singh.

    Hello Poja,
    It is not possible, because the requested menus are depending on the forms, and the are not exists,
    WorkAround:
    add the menus to the User Defined forms, and use right click to activate them:
    oForm.Menu.Add("5898", "Base Document", BoMenuType.mt_STRING, oForm.Menu.Count)
    oForm.EnableMenu("5898", True)
    And hanle the menu event when you clicked them and the form is your custom form.
    Regards,
    János

  • Include the COPY TO Option in User Define form

    Hi Experts
    How can we include the COPY TO Option in User Define form
    Thanks In Advance
    A S VAMSI KRISHNA

    Hi,
    In SAP B1 i think there is no default functionality  for copy to in user defined form. As Parminder said you can use the control button combo and write your own method for populating  data.
    Regards
    Arun

  • Problem When Try to add Master data record for User define form

    Hi,
    I have made one user define form. And assign UDO and fields proerly in form.
    But when I try to add the record from the form it will give me error
    Invalid Code [Operation Master  -Code] [Message 173-36]
    I have already bind the code field of the table to one field in the screen painter.
    Please give me the reply.
    Regards,
    Gunjan Shukla.

    Dear Shukla
    Can you please try to do the binding in the code (after loading the from).
    Doing that, do you still have the problem?
    Best regards,
    Miki

  • User Defined Form problem...

    Hi,
    I have the Item Master Data form opened with the User Defined Form opened.
    Now the Form has the focus and I'm trying to get an User Defined Item control on the User Defined Form
    but it says Form not found and I did try to select it or to use the GetForm with the "-" + TypeEx of the current form but nothing seems to work.
    Any idea how I can switch from the form to the User Defined Form on which I need to get the control ?
    I havfe to mention that I'm trying it on a second opened Item Master Data form so the FormTypeCount = 2  Could it be a BUG ?
    Edited by: Marc Roussel on May 28, 2009 4:20 PM

    if (mo.ItemUID.IndexOf("U_") != -1)
        oCurrentForm.PaneLevel = 1; // I tought this could help since the UDF form has a pane level of 1 but it does nothing.
        oCurrentForm = _SBOApplication.Forms.GetForm("-" + FormType.ToString(), FormTypeCount);
        // I get a Form not found here............ HUH WHY ??????? It's there and visible.  I DON'T UNDERSTAND...
        // and FormType is really "150" which is the actual form opened......

  • Type property for user defined forms

    Hi,
    When creating a user defined form using Screen Painter,
    how can we assign Type property for the form so that we are sure it will not clash with system forms in the future?
    Thanks,
    Satish.

    Thanks Juli
    Just one last question. It it be alright to assign a text value(Partner namespace in front) for the form type property.Does it have any drawbacks?
    Thanks,
    Satish

  • Document Numbering Issue in user defined form

    Dear All,
    There is UDO with manageseries = true. Series and DocNum fileds are binded to database (Combobox And Edittext). I can easly get next number and assign to Docnum field while selecting series from Combobox. The problem is when i choose series diferent than default and add document i get warning message "The actual posted document number is :XXXXXXX". No matter which series i choose system always takes default one. I found other threads accourding to this issue but no solution found.
    Regards,
    Guru

    Hello,
    How guru. Is your problem solved? As i'm have a similar peroblem -
    I have created a user form using screen painter and want to save data to my user defined table -
    Document - U_OPCD
    Document Rows - U_OPCD1
    First i was using the SAPbobsCOM.UserTable object to save data to my usertable. But after registering it as a UDO (as i wanted document numbering series for it) i'm unable to save data using this SAPbobsCOM.UserTable object. As i'm uable to access the default fields (DocNum, DocDate, Series....)  added to the table by SAP.
    Can u help please?

  • Implements the progress bar in user defined form

    Hi Experts,
    As i am new to SAP B1 add on development field so i wants  to set the progress bar in user defined screen through sdk code. Can you guide me?
    Regards,
    silambu

    Rahul,
             It is really helped to me. But progress bar only showed.I need  Loading part  mention by some color or something..
    my coding...
    Dim progress As SAPbouiCOM.ProgressBar
    progress = oApplication.StatusBar.CreateProgressBar("Importing Data From Excel", oMatrixTml.VisualRowCount, True)
               progress.Value = 0
                For i As Integer = 0 To dataset.Tables(0).Rows.Count - 1
                    If i <> 0 Then
                        oGFun.SetNewLine(oMatrixTml, oDBDSDetail, 0, "")
                        oDBDSDetail.SetValue("U_Check", i - 1, "Y")
                        oDBDSDetail.SetValue("U_DelrCode", i - 1, dataset.Tables(0).Rows(i)("F3").ToString)
                        oDBDSDetail.SetValue("U_OrdrType", i - 1, dataset.Tables(0).Rows(i)("F4").ToString)
                        oDBDSDetail.SetValue("U_OrderNo", i - 1, dataset.Tables(0).Rows(i)("F6").ToString)
                        oMatrixTml.LoadFromDataSource()
                        progress.Value += 1
                    End If
                Next
               progress.Stop()   // stop the progress bar
                progress = Nothing
    Thanks,
    Silambu

  • Regarding Query/Where box in oracle forms

    Hi,
    I have a query regarding query/where box in oracle.
    When I enter ":" in one of the field query box pops up and when I enter some query and press F12 to execute query.
    The OK button has to be pressed twice to retrieve the result.
    Can anyone please let me know why this is happening, instead of retreiving results at one go by pressing OK once.
    When does query box pos up? I have to avoid hitting OK button on query box twice.
    Thanks for your advice in advance.
    Thanks,
    KLC
    Edited by: user5411765 on Nov 22, 2010 10:44 PM

    Hi,
    Were you able to get around this problem? I am facing the same and need help! :(
    Regards,
    Arun

  • Regarding creation of document number for user defined form

    Hi all,
    we had created a form , but we don't no how to generate document number as in sap
    we created but it is not creating automatically
    after adding only it is showing that number in series
    but i need that number at the time of opening only

    hi srvanth
    Use this code in a data binding of the form to load automatically the doc numbers
        ds = oform.DataSources.DBDataSources.Add("@TODACT")
            oform = oapp.Forms.ActiveForm
            Dim reset As SAPbobsCOM.Recordset
            Dim qsr As String
            reset = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            qsr = "SELECT max(T0.DocNum) as c  FROM [dbo].[@TODACT]  T0"
            reset.DoQuery(qsr)
            If reset.Fields.Item("c").Value <= 0 Then
                a = 1
            Else
                a = (reset.Fields.Item("c").Value) + 1
            End If
            oitem = oform.Items.Item("doct")
            oedit = oitem.Specific
            oedit.DataBind.SetBound(True, "@TODACT", "DocNum")
            oedit.Value = a
    this will load document number everytime you load the form at the edit box with unique id "doct"
    hope this helpful
    you have to bind this edit box with DocNum Userfield of the table.
    report back if there is any error
    Regards
    Cool Ice
    Edited by: Cool Ice on Aug 19, 2008 7:20 AM

  • User defined form usr disapperas from design console (OIM 9.1.0.2)

    Hi,
    I have imported usr.xml from one environment to another, and usr form disapperas from design console. Also getting an error message while importing xml.
    java.util.zip.ZipException: error in opening zip file
    DEBUG,16 Dec 2011 10:35:05,383,[XELLERATE.SERVER],Class/Method: tcDataObj:handleErr - Data: poError.isDetail - Value: com.thortech.xl.orb.dataaccess.tcDataAccessException: DB_WRITE_FAILEDDetail: SQL: ALTER TABLE USR MODIFY Description: ORA-00904: : invalid identifier SQL State: 42000Vendor Code: 904Additional Debug Info:com.thortech.xl.orb.dataaccess.tcDataAccessException
    ERROR,16 Dec 2011 10:35:05,385,[XELLERATE.DDM.IMPORT],Label in use. Please rename.
    ERROR,16 Dec 2011 10:35:05,385,[XELLERATE.DDM.IMPORT],Error Modifying a Column.
    ERROR,16 Dec 2011 10:35:05,385,[XELLERATE.DDM.IMPORT],Exception during import
    com.thortech.xl.ddm.exception.DDMException: Unable to save dataobject for SDC
    com.thortech.xl.ddm.exception.DDMException: Unable to save dataobject for SDC
    Regards,
    Sidharth

    (1) Run following query to verify if there exist entries for administrators for USR form in UDFD form level and provide results to support representative:
    select fug.sdk_key, fug.fug_write,fug.fug_delete, ugp.ugp_key, ugp.ugp_name, fug_rowver from ugp ugp, fug fug where ugp.ugp_key=fug.ugp_key and fug.sdk_key= (select sdk_key from sdk where sdk_name='USR');
    (2)In the case query mentioned above in step(1) does not return any rows then there is need to insert one entry for "system administrator" group and one can execute (please take backup of your database for sure before executing these queries) following queries (
    INSERT INTO FUG (SDK_KEY,UGP_KEY,FUG_WRITE,FUG_DELETE,FUG_DATA_LEVEL,FUG_CREATE,
    FUG_CREATEBY,FUG_UPDATE,FUG_UPDATEBY,FUG_NOTE,FUG_ROWVER)
    SELECT (SELECT SDK_KEY FROM SDK WHERE SDK_NAME='USR'),
    (SELECT UGP_KEY FROM UGP WHERE UGP_NAME='SYSTEM ADMINISTRATORS'),
    1,
    1,
    1,
    SYSDATE,
    (SELECT USR_KEY from USR where USR_LOGIN='XELSYSADM'),
    SYSDATE,
    (SELECT USR_KEY from USR where USR_LOGIN='XELSYSADM'),
    NULL,
    HEXTORAW('000000000000')
    FROM DUAL;

  • Working with user-defined forms in SBO

    Hi, newby here.
    What is the right way to work with userdefined-forms in SBO?
    My add-on adds a button to a system-form (when it is loaded).
    User presses the new button, and the following code is executed:
    - LoadFromXML("MyForm.xml")         ( like the sample code)
    - oForm = SBO_Application.Forms.Item("SBOFormEditor_11")
    - oForm.visible = true
    The user-form is displayed
    User presses the OK button on the new user-form, which triggers
    - oForm.close()
    This works. But a possible disadvantage may be that the form is loaded from XML, each time the user clicks the new button on the system-form.
    I would prefer to load the form once, upon starting the add-on. And then display or hide it, by simply turning the oForm.visible-switch on and off. So, when user clicks the OK button: oForm.visible = false.
    The problem here is that when the user clicks the close-form button (X), the new form seems to be gone/destroyed/removed.
    So, when the user clicks the new button, I need to know how the user exited the new form previously:
    If user clicked OK, then I can set the oForm.visible switch on,
    but if the user had closed the form, I need to re-load it from XML.
    In my experience, if a solution is not pretty, there is usually a better one. But then again...beauty is in the eye of the beholder.
    Any comments, or better alternatives, would be appreciated.
    Thanks
    Erwin

    Hi Erwin,
    Welcome to the forum.
    I don't think I've ever seen an addon which hides its forms until they are needed again but it's an interesting idea. Whereas I can see some advantages, I'd be inclined to always load the form from XML for a few reasons:
    1) Most of the time I tend to be working with multiple instances of the same user form (ie the user can open my form multiple times like a lot of the system forms). Keeping track of how many instances of my form are open and whether they are hidden or not is more of a pain than just closing and opening the form.
    2) Hidden forms still take up memory on the workstation, although that's probably a minor issue for one or two forms at a time.
    3) Unless the form is quite complex (ie large number of controls or lots of comboboxes to populate) the load speed is acceptable.
    If your form is quite complex and the user is likely to be opening and closing it regularly then I can see an advantage in hiding the form until it is needed again as this should speed up the response time.
    There are ways to stop the user closing your form unless they use the Ok or Cancel buttons:
    Re: Menu UID for Minimize/Maximize/Close buttons
    Kind Regards,
    Owen

Maybe you are looking for

  • Charging iPod with iPhone Charger

    Can I use my new iPhone car charger with my 7 year old iPod.  The connection fits but can I wreck it?

  • Can't eject network volume after extensive browsing

    Hi! I have a problem that seem to be related to Mac OS X itself. After browsing an AFP network volume for an extended time theres a quite big chance that the volume won't eject properly. What happens is that the volume icon vanishes from the desktop

  • Itunes 7.2 has Encountered a Problem and must close---HELPPP!!!!!

    I keep receving this since I downloaded Itunes 7.2 that "Itunes has encountered a problem and must close." I have tried to Delete Quick time but its not in my program files but its in the control panel under quick time. When I click on it says" an ex

  • Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.a

    So I am new to the forum and would like some helpful (non-snobbery) advice regarding my iMac. I am currently working on an iMac G5 - 1.8 GHz PowerPD G5, equipped with 1.5 GB DDR SDRAM. I've just cleaned up the hard disk and installed Leopard. Here is

  • Problem after updating software

    I updated my ipod touch with the new software download and now the screen is HUGE and I can't seem to make the icons smaller. I tried various things and finally tried RESTORE. Same problem.