Screen Painter and existing forms

Hi all,
Is it possible to save one of the existing forms, for example, the item master form to an xml file that can be manipulated in the screen painter?  If it is possible, how would I do it?
TIA,
Steve

Hey Ram,
You will have to handle the click on the choose from list button (not sure of the item ID, use the debug information and mouse over to find it). You will also have to handle the key down tab event (CHAR = 9) and open your form as well.
To stop business one from handling these events you will have to do it on the before and set bubblevent = false

Similar Messages

  • Screen Painter and SDK

    Hi,
    I've developed a form in the screen painter. I want to add the business logic from SDK. Is it possible...it should be right?
    I have a very complex form with around 20-25 edit boxes and one grid. The issues
    I have designed the form in the screen painter and am trying to access the edit boxes from SDK. the code snippets is like
    oForm = SBO_Application.Forms.GetFormByTypeAndCount("60004", 0)
    When i try to access it says form not found. sbo_appl.forms.activeform worked, but when i used
    oEdit = oForm.Items.Item("9").Specific
    in the next line, it says 9 is not a valid feild.

    Yes - this is what SP is about. You design your screen
    from SP and save it as an XML file. At this point you
    load it in B1 from your addon using the LoadBatchAction.
    You just need to change the FormID before loading it, this
    is an easy task: if you want some sample you can see the
    samples here in SDN or check the code of B1DE here on SDN
    too.
    Once it is loaded you can use all the UI SDK methods and
    properties to handle events and items in this form.

  • Screen Painter and Menu Painter Translations

    Hello All,
    I want to translate the Screen painter and Menu Painter Objects .
    When I go to the SE41 and select the PF Status of my Program and press change Button I'm getting the following msg :
    Make repairs in foreign namespaces only if they are urgent .
    If I press Ok and select the Menu path : Goto --> Translation .
    The Translation options is in deactivated mode.
    How to do the Translation now ?
    Regards,
    Deepu.K

    Hi
    Run trx SE63, then go to: Translation->Short Texts->Screen Painter
    Choose:
    - Header to translate the title of attribute of the screen;
    - Texts   to translate the label of the input/ouput fields
    Translation->Short Texts->User interface to translate the menu
    Max

  • Screen Painter and tables

    I have created a Table Control in a Screen Painter and I need help to fill it.
    I assign to the Table Control a field of an internal table but when I try to activate it i receive the followin error:
    The field "XXXX-XXXX" is not assigned to a LOOP. "LOOP...ENDLOOP" must apper in PBO and PAI
    Can u help me?
    Thanx in advance

    Hi Jose,
    Refer the below code for clarification.
    Regards,
    Raj
    *& Module pool ZTESTRAJ_TABLECONTROL *
    PROGRAM ztestraj_tablecontrol .
    TABLES mara.
    CONTROLS : tc1 TYPE TABLEVIEW USING SCREEN 100.
    TYPES : BEGIN OF t_mara,
    matnr TYPE mara-matnr,
    mtart TYPE mara-mtart,
    mbrsh TYPE mara-mbrsh,
    meins TYPE mara-meins,
    lsel TYPE c,
    END OF t_mara.
    DATA : it_mara TYPE STANDARD TABLE OF t_mara WITH HEADER LINE,
    it_mara1 TYPE STANDARD TABLE OF t_mara WITH HEADER LINE,
    cols LIKE LINE OF tc1-cols.
    DATA : v_lines TYPE i,
    lsel,
    v_fill TYPE i,
    v_limit TYPE i.
    DATA : fg_set TYPE c VALUE ''.
    DATA : ok_code TYPE sy-ucomm,
    save_ok TYPE sy-ucomm.
    CONSTANTS : c_mtart(4) TYPE c VALUE 'FERT'.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'SCREEN_100'.
    SET TITLEBAR 'RAJ'.
    IF fg_set = ''.
    SELECT matnr
    mtart
    mbrsh
    meins
    FROM mara
    INTO TABLE it_mara
    WHERE mtart = c_mtart.
    DESCRIBE TABLE it_mara LINES v_fill.
    v_lines = v_fill.
    fg_set = 'X'.
    ENDIF.
    IF fg_set = 'X'.
    EXIT.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module fill_table_control OUTPUT
    text
    MODULE fill_table_control OUTPUT.
    READ TABLE it_mara INTO it_mara1 INDEX tc1-current_line.
    ENDMODULE. " fill_table_control OUTPUT
    *& Module cancel INPUT
    text
    MODULE cancel INPUT.
    LEAVE PROGRAM.
    ENDMODULE. " cancel INPUT
    *& Module read_table_control INPUT
    text
    MODULE read_table_control INPUT.
    v_lines = sy-loopc .
    it_mara1-lsel = lsel.
    MODIFY it_mara FROM it_mara1 INDEX tc1-current_line.
    ENDMODULE. " read_table_control INPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE user_command_0100 INPUT.
    ok_code = sy-ucomm.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'NEXT_LINE'.
    tc1-top_line = tc1-top_line + 1.
    v_limit = v_fill - v_lines + 1.
    IF tc1-top_line > v_limit.
    tc1-top_line = v_limit.
    ENDIF.
    WHEN 'PREV_LINE'.
    tc1-top_line = tc1-top_line - 1.
    IF tc1-top_line < 0.
    tc1-top_line = 0.
    ENDIF.
    WHEN 'NEXT_PAGE'.
    tc1-top_line = tc1-top_line + v_lines.
    v_limit = v_fill - v_lines + 1.
    IF tc1-top_line > v_limit.
    tc1-top_line = v_limit.
    ENDIF.
    WHEN 'PREV_PAGE'.
    tc1-top_line = tc1-top_line - v_lines.
    IF tc1-top_line < 0.
    tc1-top_line = 0.
    ENDIF.
    WHEN 'LAST_PAGE'.
    tc1-top_line = v_fill - v_lines + 1.
    WHEN 'FIRST_PAGE'.
    tc1-top_line = 0.
    WHEN 'DELETE'.
    READ TABLE tc1-cols INTO cols
    WITH KEY screen-input = '1'.
    IF sy-subrc = 0.
    LOOP AT it_mara INTO it_mara1 WHERE lsel = 'X'.
    DELETE it_mara.
    fg_set = 'X'.
    ENDLOOP.
    ELSE.
    fg_set = ''.
    ENDIF.
    WHEN 'INSERT'.
    LOOP AT it_mara INTO it_mara1 WHERE lsel = 'X'.
    INSERT INITIAL LINE INTO it_mara INDEX sy-tabix.
    ENDLOOP.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    WHEN 'JADOO'.
    READ TABLE tc1-cols INTO cols
    WITH KEY selected = 'X'.
    IF sy-subrc = 0.
    cols-invisible = '1'.
    MODIFY tc1-cols FROM cols INDEX sy-tabix.
    ENDIF.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT

  • Difference between screen painter and module pool

    Hi guys,
    what's the difference between SCREEN PAINTER and MODULE POOL ....
    can anyone plz give brief description ...
    regards
    venu

    hi ,
        As its said by many colleagues in SDN , there are not very major differences between Modulepools and screen painter .
    The few differences are :
    1) <b>Module pool is nothing but a pool ( series ) of screens . and Screen painter ( SE51 ) is a tool used for creating/designing  screens .</b>
    2) <u>While creating a modulepool you even need to create a transaction and assign this module pool program else the mpool program doesnt work . I think this is place we can say they are different .</u>
    3) <b>If at all you create a screen in screen painter ( SE51 ) , that doesnot function by its own , you need to assign it to any of the executable programs or modulepool programs .Here is again a difference .</b>
    Regards,
    Ranjita ..
    Message was edited by:
            Ranjita Kar

  • Screen Painter and Matrix

    In screen painter I am unable to attach the folder with the respective matrix. Please give the complete method to attach the above mentioned.

    Hi Manish,
    I am not too sure what you want to know, but if you want a matrix to be displayed only on a specific folder you should do the following. I am going to show you the code, but you can do parts of it in screenpainter as well. In screen painter you cannot display it like you would at runtime.
    On your matrix you would set the PaneFrom and PaneTo properties. To only set it visible on the first folder:
            Dim oItem As SAPbouiCOM.Item
            Dim oForm As SAPbouiCOM.Form
            oForm = oApplication.Forms.ActiveForm
            oItem = oForm.Items.Item("My_Matrix")
            oItem.FromPane = 1
            oItem.ToPane = 1
    To add the folder you'll have to remember to set the ValOn and ValOff properties:
            Dim oFolder As SAPbouiCOM.Folder
            oFolder = oForm.Items.Item("My_Folder").Specific
            oFolder.Caption = "MyFolder"
            oFolder.DataBind.SetBound(True, "", "UDS_1")
            oFolder.ValOff = 0
            oFolder.ValOn = 1
    To invoke the folder's click event you have to code it manually:
    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles oApplication.ItemEvent
            If pVal.FormTypeEx = "My_Form" Then
                If pVal.BeforeAction = True Then
                    If pVal.ItemUID = "My_Folder" Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                            Dim oForm As SAPbouiCOM.Form
                            oForm = oApplication.Forms.ActiveForm
                            oForm.PaneLevel = 1
                        End If
                    End If
                End If
            End If
        End Sub
    Hope it helps,
    Adele

  • Screen Painter and FMS

    Hi all,
    I have developed a form with Screen Painter. In a field I attached an FMS. Although the FMS works perfect when I choose the value it is not paste in the specific field.
    Any Idea,
    Thanks in advance,
    Vangelis

    Hi Vangelis,
    If there is I don't know about it, but I also never tried it.
    Is some cases I've emulated the CFL behavior with the following steps.
    1. Catch the Validate event ;
    2. If the Key Pressed to exit the field is the TAB key, open a form - lets call it CFLForm - with the possible values;
    3. Catch the double-click event or the "Select" button pressed event
    4. Write the value if the base form's field and close the CFLForm form.
    Regards,
    Vítor Viera

  • Screen Painter and RFC connection issue

    Hello,
    I get the following error when I try to start screen painter:
    EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
    I have installed all sapgui components and when I test the rfc connection it
    starts the program but then sends the same error.
    I think it's got something to do with the fact that I'm trying to start this
    program through a saprouter because when I start it locally (within my LAN)
    the program starts without problems.
    I have already applied latest kernel patch.
    Could you suggest what could I do to complete my RFC connection? Should I
    put something under gateway host or gateway service?
    Thanks in advance

    The issue here is that I don't know how to establish de gateway option
    considering I'm using saprouter to connect to sap system.
    Well... If you are asking how to "enable" gateway option then...
    You go to SM59 > Open EU_SCRP_WN32 > Go to "Technical Setting" tab
    Click on change option.
    Put the Gateway host IP address or Host name (SAP Server)  > Save
    Check the connection by "Connection Test" option.
    If any error... pls post here.

  • Screen painter and database connectivity

    hi friends where i can found the complete tutorial for the screen painter , coding part and all stuf that is required for designing screen and then using it.
    i have searched a lot but stil not getting proper links.

    [http://abaplovers.blogspot.com/2008/03/sap-abap-module-pool-programming.html]

  • Screen Painter and pf status

    hi experts...
    I want to create my own screen for my program...please guide me how to create and what is pf status and its use...

    Hi Sugumar
    For creating your own screen.. Just follow the under mentioned steps
    Just write
    <b>CALL SCREEN XXX   ( in SE38 Editor)</b>
    then double click on the XXX ( screen number which you have specified )
    It'll take you to the next screen where you you will see the following set of statements
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    YOu just have to de comment the above mentioned statements.
    Then  double click on
    MODULE STATUS_0100
    MODULE USER_COMMAND_0100  respectively.
    It will generate a code in se38 editor like this
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Then you just have to punch in the logic as desired.
    <b>Regarding  *  SET PF-STATUS 'xxxxxxxx'</b>
    The purpose of this statemnt is to provide icons/ functions on application toolbar and menu toolbar at the o/p screen.
    This is how we do it :
    just provide a name to XXXX by decommenting it
    for example   SET PF-STATUS 'ZITP_GV_ALV_GRID'.
    Then double click on "'ZITP_GV_ALV_GRID'"
    it will take you to the next screen.
    On that screen  you just ahve to provide the
    icons / functions which you want on your application and menu toolbar respectively..
    so that you can use them while you are seeing the O/P of your program.
    one eg :
    MODULE USER_COMMAND_0100 INPUT.
    IF SY-UCOMM = 'EXIT'.
      LEAVE PROGRAM.
    ENDIF.
    ENDMODULE. 
    This exit button is there on menu toolbar
    SO when you will press exit on the menu toolbar ( ^^^ the code wil be executed and it'll take you bac to se38 editor)
    I hope this information helps !!
    Regards
    Gaurav
    Message was edited by:
            Gaurav Verma

  • Setting Folder Pane in Screen Painter

    Hi All,
    I have a question about setting a value of pane - folder's property. When I set this property in Screen Painter and choose form preview form's pane level changes, but when I save this form in xml file and load in my add on I have to add code that changes pane level after clicking on folder. Also SAPbouiCOM doesn't contain such property like Pane. What is this property for? Why it works in SP and doesn't when load from xml? Is this just for Screen Painter?
    Regards
    Szymon

    Form.PaneLevel is a property for form and it changes form panelevel.
    I think that comparable property for for Folder.Pane (in Screen Painter) would be val off and val on.
    The most important thing for me was to be sure that I have to handle changing of panelevel by myself. I thought that maybe this property wasn't handle by SAP SDK correctly.
    Regards
    Szymon

  • Screen painter, ChooseFromList and et_EDIT

    Hi,
    I'm in Screen Painter and I did set a it_EDIT with a ChooseFromList Business Partner.
    When I hit PREVIEW, it works fine,  the list of Business Partners appear and I choose one but the choosen one do not go in the et_EDIT textbox.
    I don't understand the Aliases because the help do not let me understand what it is and there's no way to see by a demo or anything else so I can understand clearly. 
    First is this all possible just by the Screen Painter or I do need to code something else ?  Any video tutorials ? Anything could help understand how to make it work.
    I beg anyone to give me a working solution.
    Thank you
    Edited by: Marc Roussel on Dec 20, 2010 3:16 PM

    Just a mall thing.  Everything seems to work except that when I did choose the BP, a message pop saying :
    "Item - Can't set value on item because the item can't get focus. [66000-153]"
    However once I clicked OK of that message, I see my choosen BP in my EditText and everything is fine so I don't understand why I receive this message.  Here's the code I use
    if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE && pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
        if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = null;
            oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal));
            string sCFL_ID = null;
            sCFL_ID = oCFLEvento.ChooseFromListUID;
            SAPbouiCOM.Form oForm = null;
            oForm = SBO_Application.Forms.Item(FormUID);
            SAPbouiCOM.ChooseFromList oCFL = null;
            oCFL = oForm.ChooseFromLists.Item(sCFL_ID);
            if (oCFLEvento.BeforeAction == false)
                SAPbouiCOM.DataTable oDataTable = null;
                oDataTable = oCFLEvento.SelectedObjects;
                string val = System.Convert.ToString(oDataTable.GetValue(0, 0));
                if ((pVal.ItemUID == "it_BPCode") && pVal.ActionSuccess)
                    ((SAPbouiCOM.EditText)oForm.Items.Item("it_BPCode").Specific).Value = val;

  • Coding in form created in screen painter

    I have created a form in screen painter.How can I do coding in this form.I have added a save button in the form.How can I fire the click event on this button.The file created has extension srf and it can not be opened in asp.net.

    Hi Dilip,
    Although the file has a srf file extension it is actually an XML file. You can use this file to create an instance of your form through code. In the UI API there is a Application object. This object has a method called LoadBatchActions which takes one parameter which is your srf file (ie the path and filename). Calling this method will create a form in the active UI based on your srf file. You can then create an instance of the Form object in the UI API and use this to manipulate your form through code.
    I also recommend you look at the SDK learning material here on the SDN and also look at the samples that come with the SDK.
    Kind Regards,
    Owen
    P.S. Please note that you've posted your question in the application forum for SAP Business One. This forum is for discussions on the application functionality of SBO and not the SDK. Instead, please post queries about screen painter and other development questions here:
    SAP Business One SDK
    Thanks

  • Adding images in background in forms in screen painter

    Hi,
    My thought is it not possible to add images in the background of the forms in the screen painter and also have add colours and other attributes to the texts in the screen painter. pls share your idea and it is very important. pls convey me....

    Hello,
    Please go through this thread:
    about displaying background image.
    Vasanth

  • UI: Event Handling of forms created with the Screen Painter

    Hi,
    I created a form with the Screen Painter and saved it as XML document. After that, I loaded this form with the following code:
    <i>Dim oXMLdoc As MSXML2.DOMDocument
    oXMLdoc = New MSXML2.DOMDocument
    oXMLdoc.load("C:\form1.xml")
    SBO_Application.LoadBatchActions(oXMLdoc.xml)</i>
    Then the loaded form appears in the SBO application with all added items.
    Now, I would like to know how I could handle an ITEM_PRESSED event for a button of this imported form.
    It would be great if someone could help me with this problem and post some example code.
    Regards,
    Dennis

    Dennis,
    you have to create a function that will handle all the event receive from B1
    <i>    Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If (pVal.FormUid = "YourUIDForm") Then
                If ((pVal.itemUID = "YourItemUID") And _
                    (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
                    (pVal.Before_Action = False)) Then
                    ' Here write the coe you need....
                End If
            End If
        End Sub</i>
    Off course, you need your variable SBO_Appliation declared as follow :
    Private WithEvents SBO_Application As SAPbouiCOM.Application

Maybe you are looking for