GROUPING IN WEBDYNPRO

Dear All,
select * from yts_vw_ts into table itab_ts
where empcode like item_empcode
  and deptcode like item_deptcode
  and desgcode like item_desgcode
  and tsdate >= item_frmdate
  and tsdate <= item_todate
  GROUP BY TSDATE.
I wrIte this code for grouping.
Its showing this error "The addition "GROUP BY" only make sense with a field list".
Can anybody tell me how to correct this.
Regards,
Arun

Hi,
      The use of GROUP BY has the prerequisite that SELECT only individual columns, not all the columns, are specified using . Try replacing '' with required columns.
Regards,
Manne.

Similar Messages

  • Access Portal groups in webdynpro ABAP component

    Hi Experts,
    I have a requirement to access portal group in web dynpro ABAP application and based on whether user is assigned to particular group or not further processing for application will be done.
    Are there any UME API or some other API's available to access portal groups in Webdynpro ABAP component?
    Thanks in Advance..!!
    Regards,
    Shruti Shah

    This might be a question better suited to the portal forum. The WDA Portal APIs do not have such functionality.  You might be able to take the Java Portal APIs and wrap them in a web service so that they are callable from ABAP.

  • Re: How to create a User Group In EP through webdynpro coding

    Hi ,
    we have a requirement in which we want to create user group through webdynpro coding . and then we have to assign some user to this group .
    Pls Give step by step solution .
    Thanks in advance

    Hi Mayank,
    check the below blog to create group from webdynpro
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0eb5a9d-4256-2b10-79b9-bb0b797ccf73
    check 34th page for adding user to group.....
    have a try with 
    addUserToGroup (String uniqueIdOfUser, String uniqueIdOfGroup)
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3641e490-0201-0010-c68f-e51221925714
    Koti Reddy

  • New Portal Group

    Hi all,
    How to create a new Portal Group using WebDynpro java?
    Regards,
       Vinod V

    Hi Vinod,
    got through:
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0eb5a9d-4256-2b10-79b9-bb0b797ccf73]
    Regards,
    Khushboo

  • Srm 7.0 - Hide field in web dynpro using configurations

    Hello to all,
    I'm trying to hide some fields on PO web dynpro. In this example on web dynpro /SAPSRM/WDC_DODC_PO_I_BD I start the component configuration /SAPSRM/WDCC_DODC_PO_I_BD, I search for the fields I want to hide and put the visibility attribute to Invisible and I mark final check box.
    The fields don't dessapear from the web dynpro. Am I missing something?
    Best regards,
    Nacho

    Thanks for your reply.
    I have here two situations:
    SPRO. If I add the field on Configure Field Control at Header Level/Item Level it disapears but not all fields appear on this transaction. For example, I can't do that to tolerance group (TOL_GP)
    Webdynpro. Using Component Configuration of the dynpro. I guess that it is in two actions:
       - Change the value of visibility to Invisible on Web dynpro Built-In
       - Add field to context. I put for this example:
             Attributes of the Element usagesDefinition (ITEM_TOL.TOL_GP)
                     usageName ITEM_TOL.TOL_GP
                     componentName ITEM_TOL.TOL_GP
                     ConfigurationName /SAPSRM/WDCC_DODC_PO_I_BD
    The webdynpro way doesn't work, Am I missing something?
    Best regards,
    Nacho

  • How to disbale a group of checkboxes when i select one check box WEBDYNPRO

    Hi Friends,
    Can any body help me how to disbale a group of checkboxes when i select one check box WEBDYNPRO Abap
    Also can any body tell me how to handle chain endchain type of scenario in WEBDYNPRO Abap
    Thank you..
    Sai

    Hi
    In the context tab , create 2 context attributes ca_attr1 and ca_attr2   of type WDY_BOOLEAN under a context node cn_node
    now in ur Layout , bind the ENABLE property of CheckBoxGroup UI Element with this attribute ca_attr1
    bind the ENABLE property of CheckBox UI Element with this attribute ca_attr2
    create a action for ur Checkbox , for the OnToggle property of ur checkbox
    in OnactionToggle , check if ca_attr2 is 'X' , set ca_attr2 to ' ' ( for disable)
    this can be done by code wizard , press control +f7 and use read/set context attributes , use get_attribute and set_attribute methods
    // if ca_attr2 is 'X'
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr2.
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   get single attribute
        lo_el_cn_node->get_attribute(
          EXPORTING
            name =  `CA_ATTR2`
          IMPORTING
            value = lv_attr ).
    // if lv_attr2 is 'X' , use set_attribute method for ca_attr1
    IF lv_Attr EQ 'X' .
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR1`
            value = ' ').
    ENDIF.
    regards,
    amit

  • Regarding : How to add a user to portal group with the help of webdynpro .

    Hii ,
    I am working on an application in which with the help of an action( Button)  we r adding a user in Ztable in R/3 , as well as  group in portal.
    The user r successfully creating in Ztable but from portal side No user is assigned to Portal group.
    I need coding solution for " How to add a user to portal group with help of webdynpro"
    Any usefull link will also do.
    Pls anyone have any solution ??
    Thnks in advance.
    Rewards r waiting for u .

    Hi,
    Use UME api to add user to portal group.
    Using UME API:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40d562b7-1405-2a10-dfa3-b03148a9bd19
    Regards,
    Naga

  • How to fetch all the portal groups into dropdown through webdynpro Java App

    Hello All,
    I have a requirement where I have to fetch all  the groups available in user administrator in portal into a dropdown, so that the admin can select the group from the dropdown and after that when he executes a button u201CGet Detailsu201D he must be able to get the list of users who has been assigned that group .
    I need to achieve this through WebDynpro Java.
    Any pointers or documents on this is very very helpful.
    Thanks,
    Manasa.
    Edited by: Manasa Boyapati on Sep 12, 2011 7:25 AM

    Hi,
    Can you try using the below code ?
    IUser uid = UMFactory.getUserFactory().getUserByLogonID(Userid);
    Iterator groups =  uid.getParentGroups(false);
    while (groups.hasNext())     
      String str_grpname = (String)groups.next();
      IGroup Group = UMFactory.getGroupFactory().getGroup(str_grpname);
    ary_groups.add(Group.getUniqueName());
    Hope you can achieve you results by tweeking this..
    Regards,
    Vijay.

  • Get  Role,Group based on Username in webdynpro NOT Portal

    public static void wdDoModifyView(IPrivateFormView wdThis, IPrivateFormView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
        //@@begin wdDoModifyView
         try {
         IWDClientUser user = WDClientUser.getCurrentUser();
                String userinfo=user.getClientUserID();
                String userinfo1=user.getFirstName();
                String userinfo2=user.getLastName();
                      } catch (WDUMException e) {
                e.printStackTrace();
        //@@end
    It works fine for this code, but what i need is based on the current login name i am to check the associated userrole and group it belongs to
    do i able to do that ?
    this code is implemented in webdynpro not portals...
    when i place this code in webdynpro implementation section ,
    it is a big disaster for me showing error,
    i can used : request , response
    IUser user=request.getUser();
    Iterator roles=user.getRoles(true);     
    while(roles.hasNext()){
         String uniqueID=roles.next().toString();
         IRole userRole=UMFactory.getRoleFactory().getRole(uniqueID);
         response.write("Role is:" +userRole.getDisplayName());
         }catch(Exception e){
              response.write("" +e);
    where this code should implement actually.....i am a beginner...

    hi
      Check out this threads
    /thread/201169 [original link is broken]
    /message/1565111#1565111 [original link is broken]
    Get portal user details in WebDynpro
    When using the IUser API add the <b>security</b>  jar file to the project by righclick on project->properties->javabuildpath->addexternalJars
    Regards,
    Gopi

  • How to add reference to a type group from ABAP webdynpro?

    Hi,
    When I copied the webdynpro application from a system to another with SCWB, the referenced types in type groups are reported not defined, even the types from basic type group ABAP - the type groups are defined in both systems, the webdynpro app works well in the original system.
    And I didn't find the way to add type group references in webdynpro with "TYPE-POOLS:". Anybody knows how to handle this?
    Thanks and regards, Said

    OK I found it.
    Under my main program there is a global include. A co-worker called it somehting different.
    So it had:
    type-pools: rs, rsr, rro01, rrk, rro04.
    And I change it to:
    type-pools: rs, rsr, rro01, rrk, rrs0, rro04.
    Yes, Then when I r-click on the main program and select "Rebuild Object List" then it added the type group under "Type Group".
    Mike

  • Webdynpro IWDTable - Item table , grouped column and Column difference?

    I had added Column to Table in webdynpro java UI
    but , when I am getting the values for the same from BAPI was displayed but , when I am saving , it is not saving
    Is there any difference between GroupedColumn and Column?
    The other columns which were there in the table are all Grouped Column for the ItemTable.
    Also, when I deployed the code in the j2ee server, when I open my UWL , the columns are displayed in the bottom .. whether it is coming because I have not groupedcolumn?
    Thanks in advance...
    Kiran

    I had added Column to Table in webdynpro java UI
    but , when I am getting the values for the same from BAPI was displayed but , when I am saving , it is not saving
    Is there any difference between GroupedColumn and Column?
    The other columns which were there in the table are all Grouped Column for the ItemTable.
    Also, when I deployed the code in the j2ee server, when I open my UWL , the columns are displayed in the bottom .. whether it is coming because I have not groupedcolumn?
    Thanks in advance...
    Kiran

  • Webdynpro application group not visible in Portal

    Dear All,
    I have a webdynpro for java application in my portal and being used by nearly 70000 employees.
    Strange issue: 1 of the employee in the application cannot see the group UI element in the Bottom of the page, though I had not made it  invisible or anything. All others could perfectly see all parts of the UI.
    After much investigation and failure, I deleted the Userid and made his ID again, to my astonishment, the problem was solved.
    Did anyone experience this issue and can explain how and why did this happend???
    Ankur

    Hi Ankur,
    The user might have selected the "Remove from Page" option from the menu of the iview on the right hand side. We had the same problem and realised about this after a while. It mus have been the same issue.
    I hope this helps.
    Regards,
    Gopal.

  • Get inf. about user, rol and group, which shows and works on my webdynpro ?

    Hi everybody,
    Can someone help me? I need the information about rol and group of the user, who's show and work on my webdynpro?

    Hi,
    You can use the below code to get the information you need. You need to add the jar file com.sap.security.api.jar to your Web Dynpro project's build path.
           IRoleFactory roleFactory= UMFactory.getRoleFactory();
        IGroupFactory groupFactory = UMFactory.getGroupFactory();
        try
         IWDClientUser wdUser = WDClientUser.getCurrentUser();
         IUser user = wdUser.getSAPUser();
         Iterator assignedRoles = user.getRoles(true); // true means all the roles are searched recursively
         Iterator assignedGroups = user.getParentGroups(true); // true means all the groups are searched recursively
         while(assignedRoles.hasNext())
              String roleID = (String)assignedRoles.next();
              IRole role = roleFactory.getRole(roleID);
              String roleName = role.getUniqueName();
         // Fill your model node with the role
         while(assignedGroups.hasNext())
              String groupID = (String)assignedGroups.next();
              IGroup group = groupFactory.getGroup(groupID);
              String groupName = group.getUniqueName();
         // fill your model node with group.
        catch(Exception ex)
             messageManager.reportException(ex.getLocalizedMessage(),false);

  • Webdynpro Dynamic layout manipulation: error attaching elements to Group

    Hi Experts,
    I am trying to create dynamic layout during run time. Itu2019s working partially, but as soon as I add new u201CGroup elementu201D or new u201CTransparent elementu201D I am getting a null error. If I just use buttons, input field or text dynamically layout create it works fine. I want to group this fields in a groups or transparent container so that I can manipulate layout place containers where I need. As soon as I add other element (inputfield/button/text) to transparent element it errors. I have attached code below for more detail. Does anyone have similar issue? Lot of demo and example code show how to create elements (inputfield/button/text) none show how attach those element back to u201DGroupu201D or u201CTransparentu201D element.
    I am creating dynamic elements in u201CViewu201D method u201CWDDOMODIFYVIEWu201D. Any idea or clue much appreciated. Thanks in advance.
    Kind Regards,
    Trim
    method WDDOMODIFYVIEW .
      DATA lr_container  TYPE REF TO cl_wd_uielement_container.
      DATA lr_trans_cont TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
      DATA lr_input      TYPE REF TO cl_wd_input_field.
      DATA lr_table      TYPE REF TO cl_wd_table.
      DATA lo_nd_sflight TYPE REF TO if_wd_context_node.
      DATA lr_button     TYPE REF TO cl_wd_button.
      DATA lr_o_group     TYPE REF TO cl_wd_group.
      data: lr_text TYPE REF TO CL_WD_TEXT_VIEW.
      constants : gc_trs_cont type string value 'Trscont',
                  gc_text1 type string value 'ePDA goals and activity of the team',
                  gc_text2 type string value 'Complete all box and submit to manager'.
      DATA lo_el_context TYPE ref to if_wd_context_element.
    navigate from <CONTEXT> to <SFLIGHT> via lead selection
      lo_nd_sflight = wd_context->get_child_node( name = wd_this->wdctx_sflight ).
      IF first_time = abap_true.
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
        DATA lr_grid_data TYPE REF TO cl_wd_grid_data.
        DATA lr_flow_data TYPE REF TO cl_wd_flow_data.
        DATA lr_matrix    TYPE REF TO cl_wd_matrix_head_data.
        DATA lr_matrix_l    TYPE REF TO cl_wd_matrix_layout.
        DATA lr_matrix2    TYPE REF TO cl_wd_matrix_data.
       CALL METHOD CL_WD_TRANSPARENT_CONTAINER=>NEW_TRANSPARENT_CONTAINER
         EXPORTING
           ID      = '/0CUST/123'
           VIEW    = view
           WIDTH   = '100%'
         RECEIVING
           CONTROL = lr_trans_cont.
       lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_trans_cont ).
       lr_container->set_layout_data( lr_matrix ).
        data: lr_o_caption type ref to cl_wd_caption.
        CALL METHOD CL_WD_GROUP=>NEW_GROUP
          EXPORTING
            ID      = 'GRP1'
            design  = '03'
          RECEIVING
            CONTROL = lr_o_group.
       lr_o_caption = cl_wd_caption=>new_caption( text = 'Group1' ).
       lr_o_group->set_header( the_header = lr_o_caption ).
       cl_wd_flow_data=>new_flow_data( element = lr_o_group ).
       cl_wd_flow_layout=>new_flow_layout( container = lr_o_group ).
        lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_o_group ).
        lr_o_group->set_layout_data( lr_matrix ).
        CALL METHOD lr_container->add_child
          EXPORTING
            index     = 1
            the_child = lr_o_group.
        CALL METHOD cl_wd_button=>new_button
          EXPORTING
            enabled   = 'X'
            id        = 'B1'
            on_action = 'GET_FLIGHT'
            text      = 'Get Flight Data'
          RECEIVING
            control   = lr_button.
        lr_matrix2 = cl_wd_matrix_data=>new_matrix_data( lr_button ).
        lr_button->set_layout_data( lr_matrix2 ).
        CALL METHOD lr_o_group->add_child
          EXPORTING
           index     = 1
            the_child = lr_button.
        CALL METHOD cl_wd_input_field=>new_input_field
          EXPORTING
            bind_value = 'SFLIGHT.CARRID'
            id         = 'INPUT1'
          RECEIVING
            control    = lr_input.
        lr_matrix2 = cl_wd_matrix_data=>new_matrix_data( lr_input ).
       lr_input->set_layout_data( lr_matrix2 ).
        CALL METHOD lr_o_group->add_child
          EXPORTING
           index     = 2
            the_child = lr_input.
    endmethod.
    Edited by: Trim Chakrapani on Nov 15, 2011 5:01 PM

    Hi
    I suggest you  create a transparent container at design time and then use the below code in wddomodify to get a reference to the transparent container.
      DATA: lv_container TYPE string,
                  lo_container TYPE REF TO cl_wd_transparent_container.
            lv_container = 'TransparentContainer'.
            lo_container ?= view->get_element( lv_container ).
            lo_container->add_child( lo_button ).
    Hope this helps.

  • WebDynpro Table Simple Row Group

    Hello.
    How to create a table Grid with simple Row Group with this structure ?
    COMPANY   |   CONTACTS
        Cp1          John
                     Jimmy
                     Michael
        Cp2   |      Louis
                     Taylor
                     Michel
        Cp3   |      Dave
                     Kelly
                     Harry
    Is not a Tree view in Table ...I need only grouped rows expanded in a table.
    Thanks in Advance.
    Taylor
    Edited by: Taylor on Jul 29, 2010 10:56 AM

    Hi Taylor,
    Try This:
    1.Create a Context node with Following Structure:
       TableNode
    __Attr1
    __Attr2
        |__Attr3
    You'll have the number of attributes based on your requirement
    Fill the elements in the node.
    Here we want to group the rows based on Attr1 value
    2.Create a table with DataSource = TableNode
    3.Add a TableColumnGroup in the table Say TableColumnGroup1.
    4.Add 3 ( 3 in this example otherwise based on your requirement) columns say Colum1,Column2,Column3 in this Grouped column with TableCellEditors' values bound to the attributes in the TableNode respectively.
    5.Select the Column1 (column used for Attr1) and bind its groupingValue propety to TableNode->Attr1
    When you deploy, it will display the rows Grouped by the Value in Attr1.
    Regards,
    Ajay

Maybe you are looking for

  • Multiple websites on multiple user accounts. Want all websites in one user

    I have multiple websites in multiple user accounts. At the time I started this way iWeb 08' didn't allow more then one website per user. I now have three limited user accounts with three iweb sites. One in each account. I'd like to move two of them t

  • Sapscript FI - Printing cleared items

    Hello all. I am the program RFKORD00 to print payments with a sapscript. When i make partial payments i can print them without any problems. The problem is when i make the rest of the payment. From this moment on, i can only print the final payment.

  • Getting the New software 6.0 For blackberry curve

    I would like to get the new software for my curve but i dont know how to. i havent gotten an update and i keep checking. is there any way to put it on by going to a verizon store or off the website?

  • Markers on Line Chart

    Hi, Can anybody help me with adding markers (think that they are colled like that) to the Line Chart. Please refer to the attached example link Example Is there a Line Chart series option in styles to add those? Please help.

  • How to invoke COM DLL from Forte

    Is there a sample available for C wrapper for COM Methods ?