Udf form reference

hello everybody
i wanted to get a reference of the used defined field form which is associated with the active system form
can someone suggest me what the best way to do it???

I wrap a try block around the attempt to retrieve the udf form & if that
fails I activate the UDF form.
try
Form UFForm = B1Connections.theAppl.Forms.GetForm("-" + form.TypeEx, form.TypeCount);
catch
B1App.ActivateMenuItem("6913") 'display udf screen
Form UFForm = B1Connections.theAppl.Forms.GetForm("-" + form.TypeEx, form.TypeCount);
end try
I think I mixed C# & VB code in there, but I'm sure you get the idea.

Similar Messages

  • UDF Form UID

    Hi all.
    Anybody knows how to get the UDF Form UID corresponding to any form???
    UDF Form Type is "-" & FormUID but, is there corresponding between UIDs?
    Really, i need it to reference an item in UDF Form by code, and I think this is the unique way
    Thnk all
    Ñ: Hola a todos¿Alguien sabe como averiguar el UID del UDF Form correspondiente a uno dado?
    Es decir, de la misma manera que el tipo es el tipo del formulario con "-" delante, ¿como puedo saber el UID del UDF Form?
    Realmente lo quiero para referenciar un Item del UDF Form por codigo, y pienso que esta es la unica manera
    Gracias

    Hi
    if you want to read some data of a userfield try this
    put this  on itemevent, this code is only for reading, isn't permitted to use setvalue in a system form
    If pVal.FormTypeEx = "nnn" Then
        'nnn must be the number of your system form i.e 140 delivery
        'SBO_App is your application object
            Dim datos As DBDataSource
            Set datos = SBO_App.Forms.ActiveForm.DataSources.DBDataSources.Item("XXXX") 'puede ser OINV, ORDR o lo que sea
            Dim valor As String
             valor = datos.GetValue("U_YourUserField", 0)
        End If
    Ñ:Hola
    si quieres leer de la ventana de campos de usuario pon el codigo que te he puesto arriba en el itemevent y con eso conseguiras acceder al campo de usuario del documento que tengas activo en ese momento, no se puede asignar valor de este modo si el form principal es del sistema , esperemos que en el 2005 si se pueda.
    Kind regards
    Salvador Biot

  • Updating UDFs in the UDF form of a sales order

    I got the UDF form of a corresponding main sales order form.
    I am trying to set a value for one of the UDFs there, but I get a 'General Failure' exception (Simply trying to set the edittext's UDFItem.Value or UDFItem.String properties)
    I know I have the right form and item, since I can change the item's BackColor.
    The DBDataSource.GetValue works, so I can read the existing values.
    The DBDataSource.SetValue doesn't work, but I'm used to it
    Any ideas?

    Avi,
        We cant use Setvalue directly in Predefined for u better to use
    Frm.items.item("").Specific.Value= ""
    Regards,
    Anitha

  • Crystal report open instead of PLD with same form reference.

    Dear All,
    I configured crystel reports  to open in preview insted of PLD for documents,
    but it is asking parameters of the documents to be opened coz i have created parameteries crystal report,
    Means it is open whatever i have created in crystal report.
    But i want to open my crystel reports on preview directly insted of PLD
    with the same form reference.
    Means like PLD is opening preview directly whatever number form is open.
    Suppose in Sales Oreder form is open in that 5 no's Sales Order is there and then
    when i click on Preview that time only 5 no's PLD Preview is open.
    Like that i want to open Crystal Report.
    How to get that no's reference to crystal report ?
    Thnks
    Harish

    Close this thread as 2 same threads are opened with the same topic..

  • How to get the form reference in .js page from .jsp page

    hi
    i have written one form in jsp page omething like:-
    <html:form action="/shopping" onsubmit="return false;">
    can anybody tell me,how to get the form reference in .js page from .jsp page ,
    i have tried:-
    var formRef = document.forms[0];
    butits not working.
    Thanks.

    Its very simple......y cant u prefer google...Bad
    c this example...
    function submit()
    alert("textbox"+ document.forms[0].name.value);//to get textbox value in js
    document.forms[0].submit();//to submit jsp page using js
    <html:html>
    <html:form action="/shopping" onsubmit="submit()">
    <html:text property=name>
    learn to search in google..
    </html:form>
    </html:html>

  • Opening a UDF form

    Hi all
    i wish to open the Side form which shows the UDF fields for a given system form. question is how can i open the form through code?
    once i've opened the form i wish to set the visibility of the UDF fields appearing in the UDF form.
    question is how do i obtain the from's object in order to set the appearance of the UDF items within it?
    appreciate the help
    Yoav
    Message was edited by:
            YECHIEL SCHUSSEIM

    Hi Yoav,
    If Not SBO_Application.Menus.item("6913").Checked Then 
         SBO_Application.SendKeys "^+U"
    End If
    6913 is user defined field menu item id.
    you can see user defined form is opened everytime you open a certain form with that code samples in form_load event.
    hope this can help you.
    Regards,
    Hyunil.

  • Check Weather UDF Form Exist or Not ?

    hi,
    I have to work on UDF Fields and problem is that i have to check weather UDF Form (right hand side form which is visible only when we click VIEW>User Defined Field)
    is visible or not.
    Do any one know such method/varible by which i would be able to know that UDF form is visible / not visible....
    Regards ,
    Ganesh

    Hi Ganesh,
    You can check the status of the menu visible and/or checked to see if the UDF form is visible.
    Regards
    Ad

  • How to know if a UDF form is opened else then using a TRY CATCH ?

    I'm looking for any way to find out if the UDF form is visible
    else then trying to open it in a try catch and if it's not sending a key.  This if very ugly, slow and not really my kind.
    I tried to iterate through all the forms in SBO_Application.Forms but it's not there.  All I see is the main form
    I just need to make sure the UDF form is visible when Inventory form is loaded so I can put a value in one of the UDF
    If there's a better way I'm buying it

    Hi Marc,
    Rather than putting your data in the UDF in the UDF side form, you can add a control to the main form (during the load event of the form) and bind this to the UDF through the DBDataSource that is already available on the main form. This means that you don't need to worry about whether the UDF form is open or not because you can always read or write to your UDF data from the main form.
    Alternatively, the UDF form TypeEx property is always the same as the main form but with a minus sign in front. Therefore, if you know the TypeEx and FormTypeCount of the main form then you can use the GetForm method of the Application object to get the UDF form.
    oForm = _sboApp.Forms.GetForm("-" + oMainForm.TypeEx, oMainForm.TypeCount);
    You'd still need a try/catch around this and if it raises an error then activate the 6913 menu to open the UDF form.
    Kind Regards,
    Owen

  • Handling TackOn form or UDF Form

    HI all,
    Can we make any single field disable in Tack-On form (UDF form with -ve form id) for system forms. So that users can able to see but can't change.
    Is there any way found without using categories.
    regards:
    sandy

    Hello
    On Form You may press CTRLSHIFTB which is the UDF form settings ,then uncheck the editable flag.
    You can also you the columnpreferences object to set it visible and disabled. Please note, the column preferences is saved when B1 is exiting.
    Regards
    János

  • JDAPI change form reference within menus

    Hello selfless helpers of Oracle,
    We are trying to migrate our web forms from a windows 2003 server to a linux server.
    I posted a similar issue sometime back , but that was with regards to getting the JDAPI to start working. The JDAPI has started working , i was able to successfully convert the form-references to lowercase from uppercase within a form , using the sample code ChangeCase from "Note 403582.1 Sample Code JDAPI: switch Case For FormName in OPEN_FORM /CALL_FORM /NEW_FORM " .
    But i also have numerous references to other forms within my Menu files i.e my mmb. I did the basic changes like search and replace all Form with menu etc etc.. i got my code compiled and running.
    Problem is :-
    If i have the CALL_FORM made within the Menu item code, it doesn't seem to pick it up. However i had another menu file where the CALL_FORM was made within a program unit ( i.e a procedure) and it picked up the reference and even converted it to lower case.
    I wanted to know how to manipulate the code , to pick up form-references when made from menu item code as well... I am posting the code i used for changing the case of menus ...
    thanks in advance.....
    K

    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import oracle.forms.jdapi.MenuModule;
    import oracle.forms.jdapi.Jdapi;
    import oracle.forms.jdapi.JdapiIterator;
    import oracle.forms.jdapi.JdapiMetaObject;
    import oracle.forms.jdapi.JdapiMetaProperty;
    import oracle.forms.jdapi.JdapiObject;
    import oracle.forms.jdapi.JdapiTypes;
    import oracle.forms.jdapi.ProgramUnit;
    import oracle.forms.jdapi.Trigger;
    import oracle.forms.jdapi.MenuItem;
    public class ChangeCase_Menu {
    private static boolean uppercase =
    false; /* change this boolean to what is required (for uppercase set true)*/
    private static int changed =
    0; /*variable indicating if any changes were accepted in the menu*/
    public static void setInteger(int value) {
    changed = value;
    public static int getInteger() {
    return changed;
    private static int resetIter = 0; /*iterator for looping through objects*/
    public ChangeCase_Menu() {
    public static void main(String[] args) {
    String text;
    MenuModule mmd;
    // Open the Menu
    if (args.length < 1) {
    System.out.println("Usage java ChangeCase_Menu Menuname.mmb");
    System.exit(0);
    else if (!args[0].toUpperCase().endsWith("MMB")) {
    System.out.println("Works Only For Menus i.e only MMB ");
    System.out.println("Usage java ChangeCase_Menu Menuname.mmb");
    System.exit(0);
    try {
    mmd = MenuModule.open(args[0]); /*open the Menu*/
    System.out.println("Open Menu " + mmd.getName());
    loopObjects(mmd);
    if (getInteger() ==
    1) { /*save the menu only if something is changed in the triggers*/
    System.out.println("Saving the menu to " +
    mmd.getAbsolutePath());
    mmd.save(mmd.getAbsolutePath());
    System.out.println("Menu saved");
    mmd.destroy();
    } catch (Exception e) {
    if (e.toString().endsWith("not found"))
    System.out.println("Menu Does not exist");
    Jdapi.shutdown();
    private static void loopString(JdapiObject obj, String Text,
    String finalText) {
    boolean beenthere = false, setX = false, setZ = false;
    int x = -1, y = -1, z = -1;
    int t = -1;
    String tempText = Text;
    t = Text.indexOf("CALL_FORM"); /* search in trigger for a call_form **/
    if (t == -1) {
    x = Text.indexOf("OPEN_FORM");
    t = x;
    if (x != -1)
    setX = true;
    /* if call_frm is not found, then search for open_form*/
    if (t == -1) {
    z = Text.indexOf("NEW_FORM");
    t = z;
    if (z != -1)
    setZ = true;
    if (t != -1) {
    System.out.println("\nThis is the current code for " +
    obj.getName());
    System.out.println("-------------------------------------------------------");
    System.out.println(Text);
    while (t !=
    -1) /* loop if there are multiple call_form/open_form/new_form*/
    beenthere = true;
    finalText = changeText(obj, finalText, t);
    y = t + 10;
    tempText = finalText.substring(y, Text.length());
    if (setX == false && setZ == false) {
    t = tempText.indexOf("CALL_FORM");
    } /* search in trigger for a call_form **/
    if (t == -1 || setX == true || setZ == true) {
    if (x == -1 && setZ == false) {
    tempText = finalText;
    y = 0;
    setX = true;
    if (setZ == false) {
    x = tempText.indexOf("OPEN_FORM");
    t = x;
    /* if call_form is not found, then search for open_form*/
    if (x == -1 || setZ == true) {
    if (z == -1) {
    tempText = finalText;
    y = 0;
    setZ = true;
    z = tempText.indexOf("NEW_FORM");
    t = z;
    if (t != -1) {
    t = y + t;
    setX = false;
    setZ = false;
    if (beenthere == true) {
    System.out.println("\nProposed change of code " + obj.getName() +
    " to");
    System.out.println("-------------------------------------------------------");
    System.out.println(finalText);
    System.out.println("\nDo you want to change this Text? (Y/N) ");
    /* In this codepart I first question if you would like to make the change
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         Hard coding for batch process , uncomment if you want user interaction
    try {
    //String answer = br.readLine();
    String answer = "Y";
    while (answer.toUpperCase().compareTo("Y") != 0 &
    answer.toUpperCase().compareTo("N") != 0) {
    //answer = br.readLine();
    answer = "Y";
    if (answer.toUpperCase().compareTo("Y") == 0) {
    System.out.println("changing the code");
    if (obj instanceof Trigger) {
    Trigger obj3 = (Trigger)obj;
    obj3.setTriggerText(finalText);
    } else if (obj instanceof ProgramUnit) {
    ProgramUnit obj3 = (ProgramUnit)obj;
    obj3.setProgramUnitText(finalText);
    }else if (obj instanceof MenuItem) {
    MenuItem obj3 = (MenuItem)obj;
    obj3.setMenuItemCode(finalText);
    setInteger(1);
    System.out.println("changed the code");
    if (answer.toUpperCase().compareTo("N") == 0) {
    System.out.println("not changed");
    } catch (Exception e) {
    System.out.println(e);
    private static String changeText(JdapiObject obj, String Text, int t) { /*In this code I search first for the substring of CALL_FORM or OPEN_FORM
    *When this is found I search first for the first quote, then for the second quote
    *This string returned I will put in uppercase, if you need lowercase, then
    *change here Text2.substring(firstquote,secondquote).toUpperCase() to
    *Text2.substring(firstquote,secondquote).toLowerCase()
    String Text1 = Text.substring(0, t);
    String Text2 = Text.substring(t, Text.length());
    String finalText = Text;
    int firstquote = Text2.indexOf("'", 0);
    int secondquote = Text2.indexOf("'", firstquote + 1);
    if (uppercase == true) {
    finalText =
    Text1 + Text2.substring(0, firstquote) + Text2.substring(firstquote,
    secondquote).toUpperCase() +
    Text2.substring(secondquote, Text2.length());
    } else {
    finalText =
    Text1 + Text2.substring(0, firstquote) + Text2.substring(firstquote,
    secondquote).toLowerCase() +
    Text2.substring(secondquote, Text2.length());
    return (finalText);
    private static void loopObjects(JdapiObject obj) { /*this function will loop through all objects in the menu*/
    JdapiMetaObject meta = obj.getJdapiMetaObject();
    JdapiIterator iter = meta.getChildObjectMetaProperties();
    while (iter.hasNext()) {
    JdapiMetaProperty cprop = (JdapiMetaProperty)iter.next();
    JdapiIterator kids =
    obj.getChildObjectProperty(cprop.getPropertyId());
    while (kids != null && kids.hasNext()) {
    if (resetIter > 0) {
    kids = obj.getChildObjectProperty(cprop.getPropertyId());
    loopObjects((JdapiObject)kids.next());
    resetIter = 0;
    } else {
    loopObjects((JdapiObject)kids.next());
    if (obj instanceof Trigger) {
    if (!(obj.isSubclassed())) {
    // Get the trigger text make sure it exists.
    String theText =
    obj.getStringProperty(JdapiTypes.TRIGGER_TEXT_PTID);
    if (theText != null) {
    Trigger obj3 = (Trigger)obj;
    String Text = obj3.getTriggerText();
    String finalText = Text;
    loopString(obj3, Text, finalText);
    } else {
    System.out.println("Error: This object " + obj.getName() +
    "doesn't have any trigger text");
    if (obj instanceof ProgramUnit) {
    System.out.println("Found PU" + obj.getOwner().getName() + "." +
    obj.getName());
    if (!(obj.isSubclassed())) {
    String theText =
    obj.getStringProperty(JdapiTypes.PROGRAMUNIT_TEXT_PTID);
    if (theText != null) {
    ProgramUnit obj3 = (ProgramUnit)obj;
    String Text = obj3.getProgramUnitText();
    String finalText = Text;
    loopString(obj3, Text, finalText);
    } else {
    System.out.println("Error: This object " + obj.getName() +
    "doesn't have any PU text");
    if (obj instanceof MenuItem) {
    System.out.println("Found Menu Item Code " + obj.getOwner().getName() + "." +
    obj.getName());
    if (!(obj.isSubclassed())) {
    String theText =
    obj.getStringProperty(JdapiTypes.MENU_ITEM_CODE_PTID);
    if (theText != null) {
    MenuItem obj3 = (MenuItem)obj;
    String Text = obj3.getMenuItemCode();
    String finalText = Text;
    loopString(obj3, Text, finalText);
    } else {
    System.out.println("Error: This object " + obj.getName() +
    "doesn't have any Menu item code text");
    }

  • To disable close button of the UDF form

    Hi,
    I need to disable the close button of a UDF form. Can anyone help me pls.
    Manu.

    Hi Manu,
    Herewith a code example... This would disable the close button on the Sales Order window (and only the first window)
      Dim oform As SAPbouiCOM.Form
      <i>'loop through all the forms here if you need</i>
      <i>'i am using "-FormType" here as the UDF window has the same UID as the normal form, but with negative sign</i>
      oform = oApplication.Forms.GetForm("-139", 0)
      Dim oItem As SAPbouiCOM.Item
      <i>'Close button is 4</i>
      oItem = oform.Items.Item("4")
      <i>'Disable button</i>
      oItem.Enabled = False
    Hope it helps,
    Adele

  • UDF  form flickering problem

    Hi  All,
    We have observed a strange behaviour in SAP UDF , ie; whenever the control goes to any of the UDF field the main form and the UDF form are getting refreshed many times. or in more acurate terms, the FORM_ACTIVATE  and FORM_DEACTIVATE events are triggerred at least 30 -40 times on both the forms.
    The problem is that , the same is very much visible if the UDF is a edit text field and not a combo field and there is a formatted search obn that field . If the user selects the values from the formatted search screen ( from a list of valus) , after the value is selected the field flicker many times...
    Is there any way to get aroud this problem  . Our clients are not accepting this behaviour of SAP.
    Regards,

    No. Even if no SDK is running also the same problem happens. Is it the normal SAP behavour.? Can this be changed?
    Regards,

  • Display UDF Form?

    Hi all,
    Do you know where in the database is the information about whether or not to display the UDF form for a given standard form and a given user?
    Thanks in advance,

    Hi Cyril,
    I think it is stored in the OUSR table, in the UserPrefs field. But the field is binary and you can´t get understandable data from there.
    Sorry,
    Ibai Peñ

  • Obtaining UDF form type and ID

    Hi all
    i want to obtain the ID and Type of a UDF form which opens as a side form for a given SBO form. question is how can i obtain the ID and Type of the UDF form thourgh code?
    appreciate the help
    Yoav

    Hi Yechiel
    Trying with the following code:
    Get ID of Item    : pVal.ItemUID
    Get Type of Item: oForm.Items.Item(pVal.ItemUID).Type.ToString
    I hope useful for you!!
    Regards

  • UDF Form et_KEY_DOWN event.

    Hi all,
    Has anyone had problems with the above event? I cannot seem to trap it on a UDF form, it works fine on a standard form. Using SBO 6.5 SP1 P7. For example:
    - This code works fine.
    Set oFilter = oFilters.Add(et_CLICK)
    oFilter.Add -139     'Sales Order UDF form.
    If pVal.FormType = -139 And pVal.EventType = et_CLICK Then
            oApp.MessageBox "hello"
    End If
    - This doesn't work.
    Set oFilter = oFilters.Add(et_KEY_DOWN)
    oFilter.Add -139     'Sales Order UDF form.
    If pVal.FormType = -139 And pVal.EventType = et_KEY_DOWN Then
            oApp.MessageBox "hello"
    End If
    Any suggestions?
    Regards,
    Andrew.

    Hi,
    SBO catches the KEY_DOWN event only if one of controls of the form has focus
    Regards,
    Mark
    Message was edited by: Mark Gulyansky

Maybe you are looking for

  • Use of Perspective Grid (One Point)

    I'm new to Illustrator and finding my way around. I found one of the tutorial examples referencing this article on the use of a perspective grid to create a graphic: http://www.intraligi.com/project/adobe-illustrator-cs5-pre-release-programm.html Loo

  • 4 hours and Security Wipe still continuing in Q5

    I set my phone on security wipe and its been 4 hours and its still not finished. I removed the media card...  Need urgent help. Hard reboot is alos not working Solved! Go to Solution.

  • Using JAAS in a BC4J Client

    Hello We are building a BC4J application. We would like to use JAAS on the client side (Swing Client), to do some authorization. I made a test, authentication a user trough JAAS on the client as follow: // Auhorization CallbackHandler handler = new I

  • Illustrator CC 2014 Won't Launch.

    Ok. so I uninstalled used the cleaner twice. made sure the Verdana fonts are in and the program still wont launch. I have Windows 7. Tried it in admin mode, and used compatibility mode. reset to original settings and nothing. I have Clients that need

  • Updated Software

    Hi, Me and my Finacee share our Itunes library. She has a Nano and i have a 3g 30GB Ipod. We are getting a message each time our Ipods are connected. Her's say to install the latest Nano software and mine says to install the latest Ipod software. Wil