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]

Similar Messages

  • Screen Painter how to, manual or flash book

    Is there a screen painter manual, how to or flash book?
    I started using it but the help is to simple, for now I want to create a form that will ask for an inventory code and bring in description and barcode field.  Then the last field will ask for a quantity, that I will read with my add on to print barcode labels.
    Regards,
    William Burgos

    Hi William Burgos
    Screen painter is very basic. It only creates a screen. So all you do is make a new form, drop things on it like a text box, combo box, matrix and so on. But screen painter itself has no logic and you can't set it to do certain actions.
    Screen painter only creates the form. Then you through code must load the form that screen painter created, this form is actually a XML form. Through code you must also apply all the logic.
    Hope this helps

  • Multiple select option in the screen painter

    Hi all,
    I want to give multiple select option for a particular field in the screen painter.
    how to provide it.
    Nitin

    Hi,
    Refer to this link..[Select-Option in Dialog programming   |Re: Select-Option in Dialog programming]
    [How to make select option in module pool   |how to make select option in module pool]

  • 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

  • Graphical screen painter activate 46B

    hi
    i work in SAP 46B version; i don't find graphical screen painter
    how  can i  active graphical painter instead  of alphanumeric screen painter ?
    thinks

    Go to the menu Utilities->Settings in se51 and check the settings and check the checkbox for Graphical Layout Editor.
    Regards,
    Ravi Kanth Talagana

  • How to create a drop down box and text box in screen painter?

    Hi i am totally new to this concept of screen painter..please can any tell me
    how to create drop down box in screen painter?
    How to create or display default date and time values?
    How to create text box for giving comments?
    How to store the records that we are entering in a table?
    Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.

    Hi,
    Check all these.
    1.how to create drop down box in screen painter?
    To get Drop Drown Box on screen .
    Follow these steps.
    1.
    Go to T.Code SE51 and Select Laypout for the Screen.
    2.
    Double click on the field for which u want Dropdown box.
    3.
    Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
    4.
    Save and Activate ur screen .
    5.
    Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
    6.
    The following code should be written under PROCESS BEFORE EVENT in the MODULE.
    TYPE-POOLS :vrm.
    DATA:
      i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
      w_natio LIKE LINE OF i_natio.
    DATA:
    BEGIN OF i_t005t OCCURS 0,
        land1 TYPE t005t-land1,
        natio TYPE t005t-natio,
    END OF i_t005t.
    IF i_t005t[] IS INITIAL.
      SELECT land1 natio
         FROM t005t
           INTO TABLE i_t005t
       WHERE spras = sy-langu.
      IF sy-subrc = 0.
      LOOP AT i_t005t .
          w_natio-key = i_t005t-land1.
          w_natio-text = i_t005t-natio.
          APPEND w_natio TO i_natio.
          CLEAR w_natio.
      ENDLOOP.
      ENDIF.
    ENDIF.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
                          id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
                    values = i_natio
    EXCEPTIONS
       id_illegal_name = 1
                OTHERS = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2.1.How to create or display default date and time values?
    1.
    create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
    2.
    Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
    3.How to create text box for giving comments?
    1.
    Define one variable in the TOP include with type STRING means Global variable.
    2.
    Create one input field by giving screen field name which u have defined in the above step.
    4.How to store the records that we are entering in a table?
    For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
    Check the following steps to handle Table control.
    1).
    U should take one variable in your internal table or in structure which
    is used for table control fields
    ex :
    data :
    begin of itab occurs 0 ,
        mark type c , "This is to select the record.
        matnr like mara-matnr ,
        matkl like mara-matkl,
        maktx like makt-maktx,
    end of itab .
    Controls: TABC types TABLEVIEW using screen 100.
    2).
    This mark variable should be given in Table control properties.
    follow the path
    double click on the table control-->attributes .->select
    w/SelColumn and in that itab-mark. Check in the figure.
    [Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
    3).
    After that. Take this example.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL tabc
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    LOOP AT ITAB.
       Module read_table_control.
    ENDLOOP.
    module user_command_0100.
    In this Module read_table_control, You should write the following code
    MODULE read_table_control INPUT.
    MODIFY itab INDEX tabc-current_line."( This will update the
    "ITAB table MARK field with 'X ' whatever we have selected
    "on table control.)
    ENDMODULE.
    4)
    If you want to Delete some of the records from Table control
    follow this code …Create one pushbutton and give Fucnction code to that
    and write below code
    CASE OKCODE.
    WHEN 'CREATE'.
    LOOP AT itab WHERE mark = 'X'.
    "Use UPDATE statement to create new record.
    ENDLOOP.
    ENDCASE.
    I hope that you will get something.
    Regards,
    Venkat.O

  • How to show screen design in .srf (from Screen Painter) using SDK?

    How to show screen design in .srf (from Screen Painter) using SDK?

    You need to use the LoadBatchActions method of the Application object to load .SRF files.
    John.

  • How to insert tabstrip control in module pool screen painter

    Hi all!
    plz tell e how to use tabstrip control in module pool screen painter.Also plz give me an example program using tabstrip control.

    To insert tabstrip just open layout of screen and press on the tabstrip button there .
    Use this souce code further to activate it .
    CONTROLS tabstrip TYPE TABSTRIP.
    DATA: okcode TYPE sy-ucomm,
    dynnr TYPE sy-dynnr,
    flag type flag,
    active like tabstrip-activetab .
    call SCREEN 100.
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    data: lv_okcode type syucomm.
    lv_okcode = okcode.
    clear okcode.
    case lv_okcode.
    WHEN 'TAB1'.
    dynnr = '0110'.
    WHEN 'TAB2'.
    dynnr = '0120'.
    WHEN 'TAB3'.
    dynnr = '0130'.
    WHEN 'TAB4'.
    dynnr = '0140'.
    WHEN 'TAB5'.
    "check authorization, if authorization fails
    flag = 'X'. "set the global flag
    active = 'TAB1'. "store active tab in global variable
    dynnr = '0110'. "set the screen number
    WHEN 'BACK' or 'EXIT'.
    leave program.
    ENDCASE.
    IF lv_okcode(3) = 'TAB'.
    tabstrip-activetab = lv_okcode.
    ENDIF.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'MAIN'.
    SET TITLEBAR 'xxx'.
    IF tabstrip-activetab IS INITIAL OR
    dynnr IS INITIAL.
    tabstrip-activetab = 'TAB1'.
    dynnr = '0110'.
    ENDIF.
    "set the activetab explicilty here
    if flag eq 'X'. "from authorization failure
    tabstrip-activetab = active. "'TAB1'
    clear flag.
    endif.
    ENDMODULE. " STATUS_0100 OUTPUT

  • How to read the contents of Input Field created via Screen Painter?

    Hi All,
    I have a module program / dialog program, on my second screen, I created an input/outbox field via screen painter of course,
    now in my PAI, how can I read the contents of the input/outbox field?
    Let's say the name of my input/outbox field is: P_WEKRS.  Note: Get Parameter and Set Parameter is ticked.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL TC_DATA.
        MODULE MODIFY_DATA.
      ENDLOOP.
    I want to get the value of the input/outbox field before my loop in table control?  I thought that it will work like normal parameter in non-dialog programs.
    Any helpful inputs will be appreciated/rewarded.
    Thanks.
    Jaime

    Hi, Jaime
    Do the following Change in you Follow Logic
    PROCESS AFTER INPUT.
    MODULE read_or_change_value. " Add this
    LOOP WITH CONTROL TC_DATA.
      MODULE MODIFY_DATA.
    ENDLOOP.
    Add the Bellow Module code in you Driver Program.
    MODULE read_or_change_value.
    DATA: P_WEKRS like " the Field on Screen. Must be the same name as on SCREEN. and Type must be same too.
    " Here you will find the Value in that Variable or if you will change the Value here you will find it change on Screen
    END MODULE.
    Please Reply if any Issue..
    Best Regards,
    Faisal

  • How to swap fields in screen painter.

    hello gurus,,
    how to swap fields in screen painter.

    Hi
    Go through the link given below :
    http://www.standardware.com/pdf/stdwsp.pdf
    With Regards
    Nikunj Shah

  • How to enter values in ztable from screen painter

    Hi guys,
    I have a scenario,where i have to enter values in ztable for the values entered in  screen painter.The screen painter is supposedly having 10 columns. i enter the value in the grid(table) and when i save, the records have to be inserted into ztable created by me. how to go through the problem. kindly help in  giving a flow for the problem .If anybody has gone through this scenario please help out.
    Thankx in advance
    Regards
    Navin

    if ur entering one record at a time from sreen to table then
    u have to use ,
    in pai module of the screen u have to code,
    case sy-ucomm.
    when 'SAVE'.
    ztable-roll = ztable-roll.
    ztable-name = ztable-name.
    insert ztable/modify ztable.
    ENDCASE.
    if ur screen is having a table control
    then u have to create a loop inside a module.
    like
    loop at tabcontrol_name
    module insert_data.
    endloop.
    and in the doubleclked module,
    move-corresponding ztable to ztable.
    insert ztable.
    Note : in both cases u have selected input fields as from
    table/dictionary in the screen.
    Regards

  • How to run the query in  screen painter

    i am using the patch 36 in business one so pls give information  about 
       how to run the query in  screen painter 
    regard
      sandip adhav

    Hope u have reached Screen painter interface,
    1. Click 'Add Grid' from tool bar.
    2. Go to 'Collections' tab in 'Properties' window.
    3. Choose 'Data Tables' from the Drop down list.
    4. Click 'New' found at the bottom of the Properties Window(same window)
    5. U'll find the place to insert ur query.
    6. U can rename the table name from 'DT_0'
    7. Choose type as 'Query'
    8. Clear content from box 'Query'
    9. Enter ur query there. Dont forget to Click 'SET'
    10. Go to Preview option from tool bar.
    now ur query will be displayed as table format.
    Note: First try with simple query b4 going for linking option.
    Regards,
    Dhana.

  • Report Painter: How to change the order of lines in selection screen

    Dear Gurus on Report Painter,
    how can I change the order of the lines (where the values for the variable selection of my cost center report are entered) in the selection screen of a report painter report? The Selection screen looks awful.
    Is there also a possibility to add another description to each line of the selection screen?
    Thank you very much for your advice.
    Best regards Timo

    I am afraid you have much choice in choosing the order of the selection parameters. However, with the developer's access you may.
    This is how!
    Step 1: If it is a standard report, copy to your own report. and assign it to a report group. and execute.
    Step 2: When you execute, and the selection appears, go to systems>status and here , copy the program name (it may look something like GP46LP6VEDORBSA2IHWYSR4TL58020)
    Step3: Go to SE38 and enter the above derived program name with a view to re-arrange the line withing the program, with reference to selection parameters. 
    For example: I have a selection screen in the following order:
      Controlling area            
      Fiscal Year                 
      From period                 
      To period                   
      Plan version                                                                               
    Cost center group           
      Or value(s)                 
      Cost element group          
      Or value(s)                 
    The corresponding program that drives this order is in the program and would look like this,
    SELECTION-SCREEN BEGIN OF BLOCK VALUE_SELECTION
                     WITH FRAME TITLE TEXT-003.
    <b> PARAMETERS: $1KOKRE  LIKE CCR1S-KOKRS .
      PARAMETERS: %1KOKRE  LIKE CCR1S-KOKRS MODIF ID IN4.</b>
    <b><i> for controlling area</i></b>
      PARAMETERS: $1GJAHR  LIKE COSP-GJAHR .
      PARAMETERS: %1GJAHR  LIKE COSP-GJAHR MODIF ID IN4.
    <b><i> for fiscal year</i></b>
      PARAMETERS: $1PERIV  LIKE COSP-PERBL .
      PARAMETERS: %1PERIV  LIKE COSP-PERBL MODIF ID IN4.
    <b><i> for period from</i></b>
      PARAMETERS: $1PERIB  LIKE COSP-PERBL .
      PARAMETERS: %1PERIB  LIKE COSP-PERBL MODIF ID IN4.
    <b><i> for period to</i></b>
    etc.
      PARAMETERS: $1VERP   LIKE COSP-VERSN .
      PARAMETERS: %1VERP   LIKE COSP-VERSN MODIF ID IN4.
      PARAMETERS: $1VALUTP LIKE CCR1S-VALUTYP MODIF ID IN4 .
      PARAMETERS: %1VALUTP LIKE CCR1S-VALUTYP MODIF ID IN4.
    SELECTION-SCREEN END OF BLOCK VALUE_SELECTION.
    ......... set variables ..............................................
    SELECTION-SCREEN BEGIN OF BLOCK SET_SELECTION
                     WITH FRAME TITLE TEXT-004.
      PARAMETERS: $1KOSET  LIKE RKSB1-KSGRU.
      PARAMETERS: %1KOSET  LIKE RGSBS-SETNR MODIF ID IN5.
      SELECT-OPTIONS _1KOSET  FOR CCR1S-KOSTL .
      PARAMETERS: $1KSTAR  LIKE RKSB1-KAGRU.
      PARAMETERS: %1KSTAR  LIKE RGSBS-SETNR MODIF ID IN5.
      SELECT-OPTIONS _1KSTAR  FOR CCR1Z-KSTAR .
    SELECTION-SCREEN END OF BLOCK SET_SELECTION.<i></i><b></b>
    If you want fiscal year to appear first, you try just copying the coding relating to fiscal year just above the coding for Controlling area.
    Extend the same logic for what you may want to get.

  • How to set Function Code for Radion Buttons in Screen painter

    Hi,
    I have faced problem of grouping 3 radio buttons in screen painter (no graphical editor). How to do it?
    I have checked similiar threads in SDN, but those are for graphical editor.
    Radio Buttons in custom screeen
    http://****************/Tutorials/ABAP/Checkbox/page1.htm
    http://****************/Tutorials/ABAP/Checkbox/page2.htm
    Regards,
    Sukhbold

    Hi,
    U want to create radio button in the selection screen  then u can create like this
    PARAMETERS : c1 AS CHECKBOX USER-COMMAND cd,
    r1 RADIOBUTTON GROUP rad,
    r2 RADIOBUTTON GROUP rad.
    AT SELECTION-SCREEN OUTPUT.
    IF c1 = 'X'.
    LOOP AT SCREEN.
    IF screen-name = 'R1'.
    screen-input = '0'.
    screen-active = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ELSE.
    LOOP AT SCREEN.
    IF screen-name = 'R1'.
    screen-input = '1'.
    screen-active = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Thanks,

  • How to continue the screen in Screen -painter?

    Hi friends can anybody help me out in knowing how to continue the fields in screen painter. For clear explanation i have got 20 fields to be entered in my form, but when i am going to layout of screen painter i have been able to accomadate only 12 the rest 8 i want to be in continuation.
    hope you can under stand.
    suppose if this is the layout
                                     Registration
    01. ......
    02. ,,,,,,
    12. ,,,,,,,,
    i have accomadated in one single screen
    i want to accomadate the rest 8 in continuation can i know how?
    please its urgent for me.

    hi
    increase the window size.
    regards
    sreelatha gullapalli

  • How can i make the radiobutton use screen painter?

    hey experts,
    i paint 3 radiobuttons in group1 use screen painter,
    but when i execute the screen,all of the radiobutton are black, it means radio1='x',radio2 = 'x',radio3 = 'x'.
    i only want radio1 = 'x',radio2 = ' ', radio3 = ' '.
    how to do that?
    and i can't do it in screen 1000.
    thank you.

    Hi,
    Select the three radio buttons in the screen painter,
    Edit->Grouping->Radiobutton group-> define.
    In this case all the radio buttons will be under one group and at a time only one will be active.
    Thanks,
    rajinikanth

Maybe you are looking for

  • Lightroom 4.4 Tethering does not work with Nikon D7100

    A week ago i bought my new Nikon D7100. Yesterday i wanted to try the thetering of Lightroom 4.4. It worked with my Nikon D5100 but it does not work with the new camera. Is it a problem with my camera or with Lightroom? Another question does tetherin

  • MOVED: MSI Live Update not working Windows XP Professional 64bit Edition!!!

    This topic has been moved to Operating Systems. MSI Live Update not working Windows XP Professional 64bit Edition!!!

  • LAYERS AUTOMATIACALLY MULTIPLY IN THE HINDREDS

      Using CS-4.  The layers automatically multiply them selves in the hundreds.  It is impossible to delete them.  Therefore, I am unable to use Photoshop.  Please, please, what is the problem?    If a reinstall is the answer,  I have done that and the

  • Weblogic installation fatal error

    this is my first time so i don't know anything about weblogic so pls bear with me. i downloaded wls1032_win32.exe (i hope this is the correct one to get), but during installation a fatal error occurs, 49% of installation, and when i checked the insta

  • "Photoshop Elements Editor has stopped working"...message

    I am very very very new to this...and have had so much trouble I'm ready to ask for a refund!  After installing and watching tutorials and not being able to load any pictures to the 'organizer'...(my autoplay does not show the "Organize and Edit Phot