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

Similar Messages

  • 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

  • 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.

  • 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 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 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

  • 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 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

  • 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;

  • Screen Painter - Matrix CellHeight & TitleHeight

    Hi,
    In Screen Painter the Matrix CellHeight & TitleHeight change all the time when I open the Form in Screen Painter. It works when I run the Form, but when I change the Form I always have to change the CellHeight & TitleHeight before I close the fom...puh
    Any suggestion?
    Thank you,
    Rune

    Hai Rune,
              U r change the .srf file to .xml na. So i can able to modify the xml file. I also have the same issue. But i change in xml so its working fine.
    Here is the code
    <item uid="m_Dbond" type="127" left="15" tab_order="0" width="526" top="78" height="228" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="0" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1">
                  <AutoManagedAttribute />
                   <specific SelectionMode="0" layout="0" titleHeight="21" cellHeight="17">
                     <columns>
                       <action type="add">
                         <column uid="v" type="16" title="#" description="" visible="1" AffectsFormMode="1" width="20" disp_desc="0" editable="1" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1">
                          <databind databound="1" table="@DBOND_DETAIL" alias="LineId" />
                          <ExtendedObject />
                        </column>
    Regards,
    Anitha

  • Cannot load XML file in Screen Painter in SAPB1

    Hi All,
    i am creating an xml file of existing purchase order through the following code
    Public Sub getxml(ByVal FormUID As String)
            Dim f As SAPbouiCOM.Form
            f = sbo_application.Forms.Item(FormUID)
            Dim oXmlDoc As Xml.XmlDocument
            Dim sXmlString As String
            oXmlDoc = New Xml.XmlDocument
            '// get the form as an XML string
            sXmlString = f.GetAsXML
            oXmlDoc.LoadXml(sXmlString)
            Dim sPath As String
            sPath = IO.Directory.GetParent(Application.StartupPath).ToString
            oXmlDoc.Save((sPath & "\ChangedXml.xml"))
        End Sub
    i am calling this function getxml in pageload of this form as
    Private Sub B1_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles sbo_application.ItemEvent
            If pVal.FormType = "142" And pVal.BeforeAction = False Then
                Dim oItem As SAPbouiCOM.Item
                Dim oFolder As SAPbouiCOM.Folder
                Dim oform As SAPbouiCOM.Form
                Dim oStaticText As SAPbouiCOM.Button
                Dim oEditText As SAPbouiCOM.EditText
                Select Case pVal.EventType
                    Case SAPbouiCOM.BoEventTypes.et_FORM_LOAD
                        getxml(FormUID)
                End Select
            End If
    End Sub
    it will create the xml file ChangedXml.xml in the destination folder, then i will copy that one and paste it and change the extension to .srf.
    then i will open screen painter and try to acceess this one it will open the form but it will give an error as Error: Menu - Image Type Not Supported
    it will open the screen but it won't open the matrix, the space which consists of matrix in the original form will come as blank.
    Please any one help me, it's urjent.
    Thanks,
    Vaithy
    09886807576

    Hi Vaithy,
    Not all the items you have in B1 forms are supported by the UI API and/or the ScreenPainter.
    If you need to reproduce a B1 system form you will have to remove all items giving you an error in the ScreenPainter and then have a reduced form.
    Why do you need the xml of the Purchase Order form? Please take care if you are trying to reproduce the behavior of the Purchase Order form, there can be some Formatted Searches or other customizations in the B1 form if you are using other addons.
    Hope it helps
    Trinidad.

  • Grid in screen painter

    Hi Dear;
    where can i find explanation about the screen painter and specially for the grid, columns and matrix
    regards;

    Hi Satish;
    i want a document that explain screen painter in deep and not like SDK.
    where can i find these docs?
    regards

  • Screen Painter.  How to...

    How to use the Matrix with a complex query and beeing able to make some columns with a LinkButton to the document.
    Which control should I use.  A Matrix, or a Grid
    Which one let me get Data from a complex query and by the same time beeing able to set some columns as Link to a document
    To date I've been able to use the DBDataSource.Add("BUT IT NEEDS A TABLE") not a query and I face the challenge
    of adding all the conditions with the dbDataSource.Query(CONDITIONS) which doesn't work since I have to get
    data from other tables....

    Awesome.  Thank you. 
    Just a last question.  When I set the Query in the Screen Painter. Why do I have to provide it again by code ?
    I did create the Data Table in Screen Painter and called it dtORDR but in code
    but I have to do a ExecuteQuery and provide the query again ?
    Since I get it the way you explained, why do I have to ExecuteQuery with the same query again ?
    I also get a Table not found when running
    MyDataTable is called dtORDR made in the ScreenPainter with a simple SELECT
    and by code I do like you said, and the binding are on dtORDR but I get "Table not found..."
    Here's my actual code :
    string Query = "SELECT ORDR.DocEntry AS OrderEntry, ORDR.DocNum AS OrderNum, ORDR.NumAtCard, ORDR.DocDueDate, ORDR.DocTotal, " +
                   "ORDR.CardCode AS CustomerCode, ORDR.CardName AS CustomerName, OCRD.FatherCard, OCRD.CreditLine " +
                   "FROM ORDR INNER JOIN " +
                   "OCRD ON ORDR.CardCode = OCRD.CardCode";
    oApprobationsMatrix = oForm.Items.Item("mOrders").Specific as SAPbouiCOM.Matrix;
    SAPbouiCOM.DataTable DBDataTable = oForm.DataSources.DataTables.Item("dtORDR");
    DBDataTable.ExecuteQuery(Query);
    // Settings the columns...
    oApprobationsMatrix.Columns.Item("Indicator").Width = 20;
    oApprobationsMatrix.Columns.Item("cDocNum").DataBind.SetBound(true, "dtORDR", "OrderNum");
    oApprobationsMatrix.Columns.Item("cDocNum").Editable = false;
    oApprobationsMatrix.Columns.Item("cDocNum").Width = 107;
    oApprobationsMatrix.Columns.Item("cDocEntry").DataBind.SetBound(true, "dtORDR", "OrderEntry");
    oApprobationsMatrix.Columns.Item("cDocEntry").Visible = false;
    I also tried to remove the table from the Screen Painter and use the code instead like this
    oApprobationsMatrix = oForm.Items.Item("mOrders").Specific as SAPbouiCOM.Matrix;
    SAPbouiCOM.DataTable DBDataTable = oForm.DataSources.DataTables.Add("dtORDR");
    DBDataTable.ExecuteQuery(Query);
    and I stiil get "Table Not Found"
    but the table seems to be there all right. 
    [See this image...|http://pages.videotron.com/gear/problem.jpg]

Maybe you are looking for