OOABAP - CL_GUI_TOOLBAR functions in a split container

Hi, I have created one custom split container and split it to 2 rows.I'm adding push buttons in both rows(containers) using CREATE OBJECT toolbar_object & CALL METHOD toolbar_object->add_button
Could any one please help me out with:
(1) when I add push buttons in conainer, buttons are appearing without any gap. how do we have buttons with some space.
(2) how do we have header/title to identify the corresponsing containers/rows as I have created one custom split container and split it to 2 rows.
Thanks in advance.

To achieve that you will have to split custom container into 4 parts (with cl_gui_splitter_container ). Now top row would be for heading, second for toolbar, next for heading, 4th for toolbar.
In each heading you can place dynamic document to display your header/title
DATA: r_dd_document TYPE REF TO cl_dd_document,   "dynamic document ref.variable
      r_custom_container TYPE REF TO cl_gui_custom_container.
CALL SCREEN 900.
MODULE pbo OUTPUT.
   "first your initial custom container
  CREATE OBJECT r_custom_container
    EXPORTING
      container_name    = 'CUSTOM_CONTROL'.
   "here you need to split cutom container in 4 parts
  "now create dd document
  CREATE OBJECT r_dd_document
    EXPORTING
       no_margins = 'X'.
  "add header text
  CALL METHOD r_dd_document->add_text
    EXPORTING
      text             = 'Some heading'
      sap_style        = cl_dd_area=>HEADING.
  "dispaly it in one of the containers
  CALL METHOD r_dd_document->display_document
    EXPORTING
      parent    = "here give reference to one of the containers you have
ENDMODULE.
Regards
Marcin

Similar Messages

  • Cannot perform an aggregate function on an expression containing an aggregate or a subquery.

    I am getting "Cannot perform an aggregate function on an expression containing an aggregate or a subquery." error by executing below query, I need to calculate the percentage. Can you please help me on this by modifying the query.
    select oe2.OrdSourceID,Count(oe2.OrdSourceID) as TotalOrders,
    Percentage = Count(oe2.OrdSourceID) * 100.0 / SUM(Count(oe2.OrdSourceID))
      from OeOrders Oe 
      iNNER JOIN OeOrders2 AS oe2
           ON Oe.OrderID = oe2.OrderID
    where
    Oe.ProviderID = 'JOHN' and Oe.OrderDateTime between '10/07/2014' and '10/15/2014' and oe2.OrdSourceID is not null
      AND Oe.[Status] NOT IN ( 'CANCEL', 'CANC', 'CNC', 'UNVER', 'UNV' )
    Group by oe2.OrdSourceID
    Thanks..
    Diddi

    Hi,
    please check this general solution using CTE. If you need a specific query help then pls post your DDL+DML :-) I hope you can get the idea from this example.
    /************************************************ DDL+DML */
    -- DDL
    create table T (Num int, Name nvarchar(10))
    -- DML
    insert T values (1,'a'),(2,'a'),(3,'s'),(22,'s')
    GO
    /************************************************ Testing and solution */
    select SUM(count(*))
    from T
    GO
    --Msg 130, Level 15, State 1, Line 7
    --Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
    ;with MyCTE as (select count(*) C, Name from T group by Name)
    --select * from MyCTE
    select SUM(C), Name
    from MyCTE
    group by Name
    GO
    /************************************************ Clean */
    drop table T
    GO
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • Background colour of splitting container

    is it possible to change the background colour of the splitting container?

    All that you can do for a splitter container can be seen in the class
    CL_GUI_SPLITTER_CONTAINER
    I dont think there is any provision for background color..
    There are other things that you can play with like height,width etc..
    Regards,
    Prashant

  • How to fix the size of split container.

    Hi All,
    I have a requirement to display 5 alv report grid report .For this requirement i split the container into 5 rows and display the report sucessfully.
    Now i need to fix size of split container's acoording to number of rows comes in alv report.Could you please let me know
    how to achieve that.
    Regards,
    Mohit

    hi,
    Try this article..
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f1786c-a627-2e10-07b9-fefe548376ad
    Regards
    Rajashiva Ramalingam

  • Function module to split integer portion and decimal portion

    Hi friends,
    Could anyone tell me the function module to split the price variable into two portions one with integer portion and another with decimal portion.....without using the Splitr command....because with this command i have to specify the split delimiter which may be changed with the user profile settings in the production.

    Hi
    Use Functions:
    <b>TRUNC</b>  Interger part of x
    <b>FRAC</b>    Decimal part of x
    Regards
    Raj

  • Inheritence functionality in document splitting

    hi friends,
    i am not clear with the inheritence functionality in document splitting. kindly explain me the inheritence functionality with an example in detail.
    thanks in advance
    khk

    Hi,
    this example can be found when ticking F1 for the field "inheritance" in the customizing step "activate document splitting".
    Example
         Documents in entry view:
         Document type AB: Derived business transaction variant 0000 (unspecified
         posting)
         Bank 113100             Segment A      -  EUR 1000
         Bank 113110                               EUR 1000
         The rule of the business transaction variant (unspecified posting) does
         not split account 113110.
         Account assignment for segment A in the document is unique. In this way,
         if inheritance is active, segment A is inherited by account 113110:
         Bank 113100                               Segment A      -  EUR 1000
         Bank 113110                               Segment A EUR 1000
    Best regards, Christian

  • How to access a function in a tabnavigator container?

    I have a tabNavigator container that I create the tabs using
    the following code:
    var tabFieldsBase1:Canvas = new Canvas();
    var _userFields:userFields = new userFields;
    tabFieldsBase1.label = "User Fields";
    _userFields.id = "userFields";
    tabFieldsBase1.addChild(_userFields);
    tabHolder.addChild(tabFieldsBase1);
    inside the tabed document/class I have a function/method
    named: startMeUp(). How can I call this function in the currently
    active tabed class using AS3 in my app?
    I've tried many ways including: var testTemp:Object =
    tabHolder.selectedChild.getChildAt(0);
    testTemp.startMeUp();
    userFields.startMeUp();
    Thanks for the help;
    Carlos

    Thanks Tracy for your input, I think my problem is
    understanding Flex 2 scopes properly.
    I'm under the impression that when you create an mxml file
    compoenent that Flex 2 converts that into an AS2 class, but I guess
    not.
    I solved this situation by using Actionscript 3 classes to
    build my tabs. Now when my main form changes I'm able to
    automatically synchronize the displayed tab by calling a method in
    the class.
    Thanks!!
    Carlos

  • Function Module for splitting(field) in CO02 t-code

    Function Module or enhancement for splitting(field) in CO02 t-code Need function module for inserting a value in field(Max No of splits) in Transaction CO02
    Message was edited by:
            Mohan Kumar

    You can use this SAP enhancement PPCO0012 to display your own additional
    information on a separate tab page in the production order header. You
    can also make user fields avaialble for input, change them, and return
    the changes to the order header.

  • Need help in this code snippet for split container

    Hi,
    I am using the following code to display two tables in report output.
    using cl_salv_table.
    =============================================================================================
    START-OF-SELECTION.
    DATA: lo_report TYPE REF TO lcl_test_class.
    * create report object
    CREATE OBJECT lo_report.
    * call methods
    lo_report->get_data( ).
    lo_report->process_data( ).
    lo_report->generate_output( ).
    METHOD generate_output.
    data: g_custom_container TYPE REF TO cl_gui_custom_container, "custom container
    g_splitter_container TYPE REF TO cl_gui_splitter_container, "splitter container
    g_top_container TYPE REF TO cl_gui_container, "top container
    g_bottom_container TYPE REF TO cl_gui_container, "bottom one
    g_display TYPE REF TO cl_salv_display_settings, " set display pattern
    g_slav_table TYPE REF TO cl_salv_table,
    g_table TYPE REF TO cl_salv_table.
    "create custom container placed in CUSTOM AREA defined on screen
    CREATE OBJECT g_custom_container
    EXPORTING
    container_name = 'CUSTOM_AREA'
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    "now split the container into two independent containers
    CREATE OBJECT g_splitter_container
    EXPORTING
    parent = g_custom_container
    rows = 2
    columns = 1
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    "get top container
    CALL METHOD g_splitter_container->get_container
    EXPORTING
    row = 1
    column = 1
    RECEIVING
    container = g_top_container.
    TRY.
    CALL METHOD cl_salv_table=>factory
    EXPORTING
    r_container = g_top_container
    IMPORTING
    r_salv_table = lr_table
    CHANGING
    t_table = gt_itab_header. "gt_itab_header is populated with required output columns in process_data( ) method
    CATCH cx_salv_msg.
    ENDTRY.
    g_display = g_table->get_display_settings( ).
    g_display->set_striped_pattern( cl_salv_display_settings=>true ).
    g_display->set_striped_pattern( cl_salv_display_settings=>true ).
    *... Display table
    g_table->display( ).
    ENDMETHOD.
    =============================================================================================
    <Added code tags>
    when I Execute the code, it still stay on selection screen does not display output table. If I comment out the lines
    EXPORTING
    r_container = g_top_container
    from the Method "cl_salv_table=>factory" the output is displayed with table in required format.
    Could someone help me out identifying what am I doing wrong.
    Thanks,
    Abhiram.
    Edited by: Suhas Saha on Jan 31, 2012 9:14 PM

    when I Execute the code, it still stay on selection screen does not display output table.
    You need to call the screen in which you have defined the custom container 'CUSTOM_AREA'. And you need to call the method generate_output( ) in the PBO of the screen.
    If I comment out the lines
    EXPORTING
    r_container = g_top_container
    from the Method "cl_salv_table=>factory" the output is displayed with table in required format.
    If you're removing the R_CONTAINER parameter, SALV framework displays the data in full-screen grid. Actually it uses REUSE_ALV_GRID_DISPLAY to display the data. Hence you are getting the data.
    To be honest i'll be surprised if you are getting the splitter container, can you confirm if you are getting it?
    BR,
    Suhas

  • Height of the containers in split container

    Hi, I'm trying to split the container into 3 containers i.e. cont1, cont2, cont3. code is as follows.
    Could anyone please help me how to set the height for the containers cont1, cont2, cont3. Thanks in advance.
    DATA: split_cont_ob   TYPE REF TO cl_gui_splitter_container, " Splitter Object
                cont1           TYPE REF TO cl_gui_container,          " Container Object
                cont2           TYPE REF TO cl_gui_container,          " Container Object
                cont3           TYPE REF TO cl_gui_container,          " Container Object
               cust_cont_ob        TYPE REF TO cl_gui_custom_container.
      IF cust_cont_ob IS INITIAL.
        CREATE OBJECT cust_cont_ob
          EXPORTING
            container_name              = 'CUST_CONT'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CREATE OBJECT split_cont_ob
          EXPORTING
            parent            = cust_cont_ob
            rows              = 3
            columns           = 1
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
        IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL METHOD split_cont_ob->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = cont1.
        CALL METHOD split_cont_ob->get_container
          EXPORTING
            row       = 2
            column    = 1
          RECEIVING
            container = cont2.
        CALL METHOD split_cont_ob->get_container
          EXPORTING
            row       = 3
            column    = 1
          RECEIVING
            container = cont3.
    ENDIF.

    Sorry I was not precise enought. For height of particular container you should be using this
    "first set type of splitter bar
        CALL METHOD SPLIT_CONT_OB->SET_ROW_SASH
          EXPORTING
            ID    = 1                                    "first conatiner (actually splitter bar)
            type  = cl_gui_splitter_container=>type_movable
            value = cl_gui_splitter_container=>false.
    "now set its value in % of entire costum control (so here first container will occupy 80% of enitre custom control space).
        SPLIT_CONT_OB->set_row_height( id = 1 height = 80 ).
    As for the second question with toolbar: I believe this is not possible. All buttons in SAP are of size directly used. So only the size needed for fitting icon + text will be used. There is no option to widen this.
    Regards
    Marcin

  • IDOC : Message Function 003: Delete Object contains message to be deleted.

    Hi,
    I am trying to process a Customer master Icreation DOC (OILDEB06) which has a Message function 003: with the description Delete Object contains message to be deleted.
    I am testing my IDOC, when should I be using this message function.
    If you can detail with the example,
    it does not mark the customer for deletion for sure. when it is recommended to use this message function.
    Thanks
    Regards

    yes   your object was  locked  in the  another session ... please  close  all the  remaining sessions  ...
    and for cross check  in  SM12   tcode   ....see the  lock list  ...delete  all the list  ...
    now you can  delete the object from the  list ..
    it happens  some  times  for all   ... when you work  with multiple sessions.
    reward points  if is is usefull .
    Girish

  • Function module to split strings

    Hi,
    I have a string value ' DBTABLE-FIELDNAME'. I need to split this into 2 strings - The first one is the database table name and the second one is the fieldname. So, the character '-' is the point where the split needs to be done. How can this be achieved. Any FM that I could use?
    Thanks for your help!
    Regards,
    Divyaman Singh Rawat

    Use FM 'STRING_SPLIT'
    REPORT ZEXAMPLE.
    DATA: V_HEAD(10), V_TAIL(10).
    PARAMETERS: P_STR(20),
                P_DEM.
    CALL FUNCTION 'STRING_SPLIT'
         EXPORTING
              DELIMITER = P_DEM
              STRING    = P_STR
         IMPORTING
              HEAD      = V_HEAD
              TAIL      = V_TAIL
         EXCEPTIONS
              NOT_FOUND = 1
              NOT_VALID = 2
              TOO_LONG  = 3
              TOO_SMALL = 4
              OTHERS    = 5.
    IF SY-SUBRC EQ 0.
      WRITE:/ 'HEAD:', V_HEAD,
            / 'TAIL:', V_TAIL.
    ELSE.
      WRITE:/ 'ERROR SPLITTING STRING'.
    ENDIF.
    Regards,
    Joy.

  • Callling Transaction in Split Container

    Dear All,
    I have created one module pool program for splitting the container by using the following classes
                             -  cl_gui_docking_container
                             -  cl_gui_easy_splitter_container
                             -  cl_gui_container
    after executing my program it's showing the splitting screen.Up to now it's fine.But What my requirement is,in left side container i have to display vf03 transaction.how to display the transaction in that screen?please help me out.
    with Regards

    i got a solution for you
    just copy this report 'DEMO_ABAP_OBJECTS_DIALOG_BOX'.
    and in line number 187. comment out the code
    *    select single URL
    *    from   SCARR
    *    into   L_URL
    *    where  CARRID = I_CARRID.
    and insert this code.
    l_URL = 'http://<host>:<port number>/sap/bc/gui/sap/its/webgui/?~TRANSACTION=VA02'.
    you can get this host and port easily by launching any of the webservice from your server(like goto SICF, give service name webgui,execute, then on next screen right on the code sap/bc/gui/its/webgui and click test service.) from here you can pick the host and port or just ask your basis team,
    after doing this.. execute the program and click on any main node(not the child node.. and bingo )

  • Functions window does not contain "Change Gain" feature

    I recently purchased Logic Pro X I have used Logic since it's inception and in this most recent upgrade I am unable to locate the :Change Gain: function.
    It is not showing up in my Functions drop down menu
    Thanks

    You probably need to enable some if not all advanced features. Logic Pro>Preferences>Advanced Tools

  • How to access function from Top Class to Function of class that contain the the member variable of TopClass

    Dear All,
    is there any way that i can access function or member variable of aggregate class.
    i am working in Visual Studio 2010 
    and making win32 dll with mfc Support. i am new in dll system. just learning and doing.
    previously all in exe and i am working this like
    CTestDoc*pDoc = (CTestDoc*)GetTestDocument();
    somevar = pDoc->xDoc.mVar.GetValue (); 
    now i am trying to put all in dll. so getting problem 
    will i get help on this. thanks in advance.
    below code is just an example.
    for example
    // dll 1
    class aaa : public BaseClass
    public:
    int Index;
    char *cName;
    void doSometing()
    if (GetCurBColor() == 125) // how to access GetCurBColor function of the
    color = GetCurBColor();
    long color;
    // dll 2
    class bbb :public BaseClass
    public:
    int Index;
    long lSize;
    long color;
    void doSometing();
    // dll 3
    class DDD
    public:
    vector <aaa> va;
    vector <bbb> vb;
    int cura;
    int curb;
    long GetCurBColor ()
    return vb[curb].color;
    };// MFC doc/view support
    /// in exe in document
    class inExe
    public:
    DDD d;
    void addB()
    { bbb bb;
    bb.color = 152;
    d.vb.push_back(bb);
    bb.color = 122;
    d.vb.push_back(bb);
    bb.color = 1232;
    d.vb.push_back(bb);
    d.curb = 1;
    void addA()
    { aaa aa;
    aa.color = 152;
    d.va.push_back(aa);
    aa.color = 1232;
    d.va.push_back(aa);
    aa.color = 1542;
    d.va.push_back(aa);
    aa.color = 15;
    d.va.push_back(aa);
    d.cura = 2;
    d.va [1].doSometing ();

    Dear All,
    is there any way that i can access function or member variable of aggregate class.
    i am working in Visual Studio 2010
    and making win32 dll with mfc Support. i am new in dll system. just learning and doing.
    previously all in exe and i am working this like
    CTestDoc*pDoc = (CTestDoc*)GetTestDocument();
    somevar = pDoc->xDoc.mVar.GetValue ();
    now i am trying to put all in dll. so getting problem
    What problem?
    The rules of C++ do not change because some of the code ins in a DLL. But the classes in a DLL need to be exported. See for example
    https://msdn.microsoft.com/en-us/library/81h27t8c.aspx
    You should also supply a macro so that the class header can be used in both the DLL and the client. See for example
    http://stackoverflow.com/questions/14980649/macro-for-dllexport-dllimport-switch
    If  you exchange memory between the DLL and the client (as your example will do, because of the std::vector content), you should also be sure to use the same version of the compiler for each module, and to dynamically link to the CRT.
    I would also advise you to start with a less complicated scenario, with just one DLL.
    David Wilkinson | Visual C++ MVP

Maybe you are looking for

  • ORA-29829: implementation type does not exist

    Hello, I get ORA-29829: implementation type does not exist when creating an external table in Oracle 10g 10.2.0.3.0. Anyone knows why this happens? Wrote file afiedt.buf 1 CREATE TABLE tim 2 ORGANIZATION EXTERNAL 3 ( 4 TYPE ORACLE_DATA_PUMP 5 DEFAULT

  • Ovi email error. DESPERATE!

    Hi guys,   I'm Aaron and I'm having a very annoying problem with  my email. For some strange reason I can log on to my account however I cannot seem to view my email. The loading symbol just keeps going on and on, this applies for my inbox and all my

  • OpenSPARCT1 on Virtex-7

    Hi, I am trying to implement OpenSPARCT1 on Xilinx Virtex-7(VC707 XC7VX485T-2FFG1761CES Evaluation Board), single core and multi core. I first tried the EDK project on Virtex-5 and now I want to check feasibility of implementation of the same on Virt

  • Create and sign PDF with IAC?

    Hello, does anybody know, how to create simple PDF and sign it with X509Certificate from .NET managed application? It seems to me, that it is not possible with Acrobat Interapplication Communication API. Do I really need LiveCycle for this operation?

  • Missing "Connect to Outlook" in action menu.

    I have an issue with at some Windows XP SP2, IE 7 systems. The "Connect to Outlook" doesn't shows up in the action menu. As far as I can see this is not an issue with the MOSS server but a client problem. Any ideas? Thanks in advance.