Modifying Table View

Hello All,
The requirement is to modify an existing BSP application, I need to modify a table view being displayed in a view in the response of a search operation, the requirement is to make the table view read only for some role, for others it should remain the same (it has some editable columns).
So, I need some help as how to make the whole table view read-only or some columns read only, I tried to change the view by modifying it as follows:
            <htmlb:tableViewColumn columnName          = "qty"
                                   horizontalAlignment = "right"
                                   title                              = "Quantity"
                                   edit                             = "true"
                                   type                            = "input"
                                   unitColumnKey       = "unit">
            </htmlb:tableViewColumn>
First I tried to change the edit parameter as  edit = "false" it did not work then I removed both parameters for edit & type altogather but still it did not have any effect, this field is still showing as editable with some asteric '*' in red color with it in the result view.  So, I'll appriciate if anyone can help as where and how to control this field behvior?
Regards,
Edited by: Athar Ullah Khan on Nov 21, 2011 12:24 PM

Hello All,
I am closing this thread as I have found out the solution by modifying the code in the iterator. Sometimes we skip things when we are in a hurry ))
Regards,
Athar

Similar Messages

  • Modify a Table View Header

    I need to modify the header of a tableview and I've tried this:
    .table-view {
        -fx-background-color: rgb(70,70,70);
        -fx-text-fill: white;
        -fx-border-style: solid;
        -fx-border-color: transparent;
    /*    -fx-border-insets: 0 1 1 0, 0 0 0 0;*/
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header{
        -fx-border-style: solid;
        -fx-border-color: rgb(130, 130, 130);
        -fx-border-radius: 5px;
        -fx-background-radius: 5px;
        -fx-border-insets: 0 1 1 0, 0 0 0 0;
        -fx-border-width: 0.083333em, 0.083333em;
    .table-view .column-header .label{
        -fx-font-size: 12px;
        -fx-text-fill: white;
    .table-view .column-header-background {
        -fx-background-radius: 5px;
        -fx-font-family: "Calibri";
        -fx-background-color:  rgb(50,50,50);
    }However, I can not edit any table header but only the headers of each column.
    Sorry for the English and grammatical errors. I am Spanish speaking
    I put an image to make it more clear
    http://img823.imageshack.us/img823/49/tableexample.png
    Edited by: biochemistry43 on 30-oct-2012 13:17

    It is there in the CSS documentation, though it's not really very easy to pick out. See http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#tableview and look at the section called "Substructure".
    I'm not claiming that I get everything I need to know from the CSS docs, though. I often need to look at the default stylesheet, caspian.css, which you can extract from the jfxrt.jar file (it's at com/sun/javafx/scene/control/skin/caspian/caspian.css).
    Edited by: James_D on Nov 5, 2012 6:10 AM (fixed path for caspian.css)

  • Table view modify

    Hai guys,
              I want to modify the table values in tableview.But my modify operation not working.Could u guys help me.
    Layout
    <htmlb:tableView id = "tv1"
    headerVisible = "true"
    footerVisible = "false"
    design = "ALTERNATING"
    visibleRowCount = "5"
    onRowSelection = "MyEventRowSelection"
    selectionMode = "LINEEDIT"
    table = "<%= itab %>" >
    </htmlb:tableView>
    <htmlb:button id = "button1"
    design = "emphasized"
    text = "Update"
    onClick = "myClickHandler"
    />
    oninput processing
    DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,
    ind type i,
    wa type yprojects.
    DATA: event TYPE REF TO CL_HTMLB_EVENT.
    event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
    IF event->name = 'button1' AND event->event_type = 'click'.
    DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
    button_event ?= event.
    tv ?= CL_HTMLB_MANAGER=>GET_DATA(
    request = runtime->server->request
    name = 'tableView'
    id = 'tv2' ).
    IF tv IS NOT INITIAL.
    DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
    tv_data = tv->data.
    ind = tv_data->selectedrowindex.
    IF ind IS NOT INITIAL.
    READ TABLE itab INDEX ind into wa.
    modify yprojects from wa .
    endif.
    ENDIF.
    ENDIF.

    Hi,
    The below code updates the internal table from the table view when ever the user changes the data in table view and presses update button. And the below code should be written in onInputprocesing event,
    DATA: TABLE_EVENT TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW,
    TABLE TYPE REF TO CL_HTMLB_TABLEVIEW .
    TABLE ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
    NAME = 'tableView'
    ID = 'tview' ).
    TABLE_EVENT ?= TABLE->DATA.
    DATA: EVT TYPE REF TO IF_HTMLB_DATA.
    EVT = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    IF EVT IS NOT INITIAL AND EVT->EVENT_NAME = 'button' AND
    EVT->EVENT_TYPE = 'click'.
    DATA: COLUMNNAME TYPE STRING .
    DATA: COLNO TYPE C.
    DATA: ROWNO TYPE C .
    DATA : CELL_VALUE TYPE STRING.
    DATA : VAR_TV TYPE STRING.
    VAR_TV = 'tview'.
    ROWNO = '1'.
    LOOP AT IT_TAB INTO WA_TAB.
    COLNO = '1' .
    DO 2 TIMES .
    CLEAR COLUMNNAME .
    CONCATENATE VAR_TV '_' ROWNO '_' COLNO INTO COLUMNNAME .
    CELL_VALUE = REQUEST->GET_FORM_FIELD( NAME = COLUMNNAME ).
    IF CELL_VALUE IS NOT INITIAL.
      WA_TAB6-NAME = CELL_VALUE.
      WA_TAB6-LASTNAME = WA_TAB-LASTNAME.
      MODIFY IT_TAB FROM WA_TAB6.
      CLEAR CELL_VALUE.
    ENDIF.
    COLNO = COLNO + 1.
    ENDDO .
    ROWNO = ROWNO + 1.
    ENDLOOP.
    ENDIF.
    Regards,
    Azaz Ali.

  • Read & Modify the table view data

    Dear Experts,
    CRM 7.0
    I've added few extra custom fields to the table view through Workbench enhancment as AET does not work for my object type. Now, I would like to read the current table entries and accordingly i should fill the other columns. I am not sure how can I proceed. Please advise me asap.
    Many thanks in advance.

    Hi,
    Yes I guess you can do it in DO_PREPARE_OUTPUT.
    Use below code to read values from table:
    DATA:      lv_wrapper         TYPE REF TO cl_bsp_wd_collection_wrapper,
            lr_entity          TYPE REF TO cl_crm_bol_entity,
         lv_attribute         type string,
         LV_ATTRIBUTE_VALUE type string
      TRY.
          lv_wrapper = me->typed_context->ZCONTEXTNODENAME->get_collection_wrapper( ). " Here you will get all values from table into lv_wrapper
          CHECK lv_wrapper IS BOUND.
          lr_entity  ?= lv_wrapper->get_first( ). " Loop at table
          WHILE lr_entity IS BOUND.
            lv_attribute  ?= lr_entity->get_property_as_string( 'ATTRIBUTE NAME' ). " TO read perticular attribute
    *OR as per your requirement you can change the value. Here you can write your logic...
         lr_entity->set_property_as_string( iv_attr_name = 'ATTRIBUTE NAME' iv_value = LV_ATTRIBUTE_VALUE ).  " Change attribute property
          lr_entity  ?= lv_wrapper->get_next( ).
         ENDWHILE.
        CATCH cx_root.
          RETURN.
      ENDTRY.
    Please let me know if it helps.
    Regards,
    Bhushan

  • Is it possible to modify a view at run time?

    Hi,
    I am relatively new to using SQL Server, so sorry if this is impossible or very easy and I missed the solution.
    I am working on an enterprise SQL Server 2008 R2.  Because of the size of the company, we do not want to create new Views as they need to be maintained.  With that said, I need to use Views and not tables because of DB traffic issues.
    HERE IS MY QUESTION:
    Is it possible to Alter a view at run time; in this specific instance I want to change a constraint in the WHERE clause to include one more value in an IN() constraint.  Specifically I want the modified SQL to go from WHERE column IN('A', 'B', 'C')
    to 
    WHERE column IN('A', 'B', 'C', 'L').  I do not want to permanently modify the View, I just want the View to change when it is run for this report.  I need to do this in order to fix a dynamic report.  I am sure that there is another way to
    accomplish this; however, a solution of this manner would also have many other uses, so I am curious if this is possible. 
    Feel free to tell me that it can be done. 
    Thanks for your ideas!!

    Right, I understand those fundamentals.  We outsource a lot of out view creation and do not have permission to create views for Business reasons; these are beyond my control.  However, I can see the source code to many Views.  We have also
    been told that we should not use tables in our queries.  Therefore, I need to use existing Views.  Specifically, I would like to add an additional value to an IN() constraint.  This would change the constraint as showed below: 
    IN('A', 'B', 'C') ---> IN('A',
    'B', 'C', 'L')
    I am wondering if this change can be made when the view runs and only for this one report, with the change being made from the report.  This would be very easy if the constraint was removing a value.  Obviously I could change the constraint from
    IN('A', 'B', 'C') to IN('A','B') very easily with out modifying the View. This would be done by writing a query against the view and in the WHERE clause adding the new IN('A', 'B') statement.  However, I want to do the opposite and add a value...

  • Query and update a table/view

    What is the best & fastest way to do this?
    1) Put up a query input region for users to enter parameters.
    2) Run a query on a table/view using those parameters.
    3) Allow the output in (2) to be modified by user (multiple rows at a time) and then Submit the updates back to update th table/view
    I can do (1) and (2) easily. How can I do (3)?
    Thanks

    Make a report on the table. Go to the definition of
    the report column and change the "Display As" type to
    text field or select list or whcih ever is
    applicable. Write a process on submit to insert these
    values back to the table. You will have control over
    which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
    for rec in (....)
    loop
    update my_table set
    end loop;
    Help? Thanks

  • Update a table view field calling a service

    Hi all,
    is there a way in a table view to calculate the value of a field calling a data service, using as calling arguments other fields from the same row?
    For example I have line items of a sales order in a table view. In one field the user enters the quantity in the desired unit of measure. I would like to have the quantity transformed in KGs in the same row.
    Is this possible?
    Points will be awarded for usefull suggestions.
    Regards,
    Panos

    Make a report on the table. Go to the definition of
    the report column and change the "Display As" type to
    text field or select list or whcih ever is
    applicable. Write a process on submit to insert these
    values back to the table. You will have control over
    which columns the user can modify.Thats a good idea and I was able to start on it. But how can my after submit process tell which rows to modify? i.e. what will my after submit process look like?
    for rec in (....)
    loop
    update my_table set
    end loop;
    Help? Thanks

  • SWI5 transaction - is there a table view ?

    Hi
    I am trying to pull a report of outstanding approval inbox items (TS1230097 - for leave requests) that I see when I go to tcode SWI5 for managers. If I run a report it does not give me the manager id in it which I need.
    Is there a table view for SWI5 information possibly or can anyone suggest another transaction that can be used to see the current manager associated with outstanding leave request items (when I use various SWI* or PTARQ reports they do not show me the current manager in situations in which leave request items have been forwarded to new managers and so are unreliable. I'm just wondering if there's any other report/transaction I can use therefore.
    Thanks for your help
    Nicola

    Hi,
    Nicola paste this code in se38 and execute it.
    TYPE-POOLS : slis.
    TABLES : swwuserwi,swwwihead,bseg,bkpf.
      TYPE DECLARATION   *************************************
    TYPES : BEGIN OF TY_SWWUSERWI,
            USER_ID      TYPE SWWUSERWI-USER_ID,
            WI_ID        TYPE SWWUSERWI-WI_ID,
            TASK_OBJ     TYPE SWWUSERWI-TASK_OBJ,
            END OF TY_SWWUSERWI.
    TYPES : BEGIN OF TY_SWWWIHEAD,
            WI_ID        TYPE SWWWIHEAD-WI_ID,
            WI_LANG      TYPE SWWWIHEAD-WI_LANG,
            WI_TEXT      TYPE SWWWIHEAD-WI_TEXT,
            WI_RHTEXT    TYPE SWWWIHEAD-WI_RHTEXT,
            WI_STAT      TYPE SWWWIHEAD-WI_STAT,
           WI_CD        TYPE SWWWIHEAD-WI_CD,
           WI_CT        TYPE SWWWIHEAD-WI_CT,
            END OF TY_SWWWIHEAD.
    TYPES : BEGIN OF TY_TEMP,
            BUKRS TYPE BUKRS,
            BELNR TYPE BELNR_D,
            GJAHR TYPE GJAHR,
            END OF TY_TEMP.
    TYPES : BEGIN OF TY_BSEG,
            BUKRS TYPE BSEG-BUKRS,
            BELNR TYPE BSEG-BELNR,
            GJAHR TYPE BSEG-GJAHR,
            WRBTR TYPE BSEG-WRBTR,
            LIFNR TYPE BSEG-LIFNR,
            ZUONR TYPE CHAR10,
            END OF TY_BSEG.
    TYPES : BEGIN OF TY_CEPC,
            PRCTR TYPE CEPC-PRCTR,
            ABTEI TYPE CEPC-ABTEI,
            END OF TY_CEPC.
    TYPES : BEGIN OF TY_BKPF,
            BUKRS TYPE BKPF-BUKRS,
            BELNR TYPE BKPF-BELNR,
            GJAHR TYPE BKPF-GJAHR,
            BLDAT TYPE BKPF-BLDAT,
            BUDAT TYPE BKPF-BUDAT,
            XBLNR TYPE BKPF-XBLNR,
            END OF TY_BKPF.
    TYPES : BEGIN OF TY_LFA1,
            LIFNR TYPE LFA1-LIFNR,
            NAME1 TYPE LFA1-NAME1,
            END OF TY_LFA1.
    TYPES : BEGIN OF TY_FINAL,
            USER_ID     TYPE SWWUSERWI-USER_ID,
            WI_ID        TYPE SWWUSERWI-WI_ID,
            BUKRS       TYPE BSEG-BUKRS,
           WI_TEXT     TYPE SWWWIHEAD-WI_TEXT,
            WRBTR       TYPE BSEG-WRBTR,
            BELNR       TYPE BELNR_D,
            LIFNR       TYPE LFA1-LIFNR,
            NAME1       TYPE LFA1-NAME1,
            BLDAT       TYPE BKPF-BLDAT,
            XBLNR       TYPE BKPF-XBLNR,
            GJAHR       TYPE GJAHR,
            ABTEI       TYPE CEPC-ABTEI,
            BUDAT       TYPE BKPF-BUDAT,
            END OF TY_FINAL.
      DATA TYPE DECLARATION   *************************************
    DATA : it_swwuserwi TYPE STANDARD TABLE OF ty_swwuserwi,
           it_swwwihead TYPE STANDARD TABLE OF ty_swwwihead,
           it_final TYPE STANDARD TABLE OF ty_final,
           it_temp TYPE STANDARD TABLE OF ty_temp,
           it_bseg TYPE STANDARD TABLE OF ty_bseg,
           it_cepc TYPE STANDARD TABLE OF ty_cepc,
           it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
           it_lfa1 TYPE STANDARD TABLE OF ty_lfa1,
           wa_swwuserwi TYPE ty_swwuserwi,
           wa_swwwihead TYPE ty_swwwihead,
           wa_final TYPE ty_final,
           wa_bseg TYPE ty_bseg,
           wa_cepc TYPE ty_cepc,
           wa_bkpf TYPE ty_bkpf,
           wa_lfa1 TYPE ty_lfa1,
           wa_temp TYPE ty_temp.
    DATA: wa_sort TYPE LINE OF slis_t_sortinfo_alv,
          it_sort TYPE slis_t_sortinfo_alv.
    DATA: it_field_cat TYPE slis_t_fieldcat_alv,
          ws_sort TYPE slis_t_sortinfo_alv,
          g_variant TYPE disvariant,
          ws_layout TYPE slis_layout_alv."slis_t_fieldcat_alv.
    DATA: IT_EVT_TAB         TYPE SLIS_T_EVENT,
          IS_LS_EVENT        TYPE SLIS_ALV_EVENT.
    DATA: C_TOP            TYPE SLIS_FORMNAME          VALUE 'TOP_OF_PAGE',
          IS_EVT             TYPE SLIS_ALV_EVENT     .
    DATA: REC_LAYOUT         TYPE SLIS_LAYOUT_ALV.
    *rec_layout TYPE lvc_s_layo.
    DATA: IS_LS_LINE         TYPE SLIS_LISTHEADER,
          IT_TOP             TYPE SLIS_T_LISTHEADER.
    DATA: TEXT(60) TYPE C,
          text1 TYPE char10,
          text2 TYPE char20,
          text3 TYPE char20,
          ebeln TYPE char10,
          year  TYPE char4.
    DATA: user TYPE SY-uname.
    DATA: lang  TYPE sww_lang VALUE 'EN',
          c_x TYPE char1 VALUE 'X',
          C_FLAG TYPE CHAR1 VALUE IS INITIAL,
               status1 TYPE sww_wistat VALUE 'READY',
          status2 TYPE sww_wistat VALUE 'STARTED'.
      INPUT OPTIONS   ***********************************************
    INITIALIZATION.
    DATA: C_PF_STAT        TYPE SLIS_FORMNAME          VALUE 'PF_STAT',
          C_USERC          TYPE SLIS_FORMNAME          VALUE 'PURVESH',
          C_TOP_OF_PAGE    TYPE SLIS_FORMNAME          VALUE 'TOP_OF_PAGE'.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001 .
      PARAMETERS     : USERID LIKE USREFUS-BNAME MODIF ID 001.
      SELECT-OPTIONS : COMP   FOR BSEG-BUKRS NO INTERVALS.
      SELECT-OPTIONS : YEAR1  FOR BSEG-GJAHR NO INTERVALS.
      SELECT-OPTIONS : DOC    FOR BSEG-BELNR.
      SELECT-OPTIONS : VEND   FOR BSEG-LIFNR NO INTERVALS.
      SELECT-OPTIONS : DAT    FOR BKPF-BUDAT.
      SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR userid.
      PERFORM f4_help_fname.
    *&      Form  F4_HELP_FNAME
          text
    -->  p1        text
    <--  p2        text
    FORM F4_HELP_FNAME .
    data: begin of itab occurs 0,
    BNAME like USREFUS-BNAME,
    USERALIAS like USREFUS-USERALIAS,
    end of itab .
    select BNAME
    USERALIAS
    from USREFUS into corresponding fields of table itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'BNAME'
    dynpprog = SY-repid
    dynpnr = SY-dynnr
    dynprofield = 'USERID'
    value_org = 'S'
    TABLES
    value_tab = ITAB.
    *IF sy-subrc 0.
    *ENDIF.
    ENDFORM.                    " F4_HELP_FNAME
    **********************************************START - OF - SELECTION*******************************************
    START-OF-SELECTION.
      PERFORM init.
      PERFORM buildfieldcat.
      PERFORM displayalv.
    END-OF-SELECTION.
    *&      Form  INIT
          text
    -->  p1        text
    <--  p2        text
    FORM INIT .
      IF USERID IS NOT INITIAL.
        SELECT USER_ID
                 WI_ID
                 TASK_OBJ
                 INTO TABLE IT_SWWUSERWI
                 FROM SWWUSERWI
                 WHERE USER_ID = USERID AND NO_SEL NE c_x.
    endif.
      IF IT_SWWUSERWI IS NOT INITIAL.
        SELECT WI_ID
               WI_LANG
               WI_TEXT
               WI_RHTEXT
               WI_STAT
              WI_CD
              WI_CT
               INTO TABLE IT_SWWWIHEAD
               FROM SWWWIHEAD
               FOR ALL ENTRIES IN IT_SWWUSERWI
               WHERE WI_ID = IT_SWWUSERWI-WI_ID AND WI_LANG = lang.
        IF IT_SWWWIHEAD IS NOT INITIAL.
          LOOP AT IT_SWWWIHEAD INTO WA_SWWWIHEAD.
            SPLIT WA_SWWWIHEAD-WI_TEXT AT SPACE INTO TEXT TEXT1 TEXT2.
            WA_TEMP-BUKRS = TEXT2+0(4).
            WA_TEMP-BELNR = TEXT2+4(10).
            WA_TEMP-GJAHR = TEXT2+14(4).
            APPEND WA_TEMP TO IT_TEMP.
            CLEAR : WA_TEMP.
          ENDLOOP.
            LOOP AT IT_SWWUSERWI INTO WA_SWWUSERWI.
              READ TABLE IT_SWWWIHEAD INTO WA_SWWWIHEAD WITH KEY  WI_ID = WA_SWWUSERWI-WI_ID WI_LANG = lang.
                  WA_FINAL-USER_ID      = WA_SWWUSERWI-USER_ID.
                  WA_FINAL-WI_ID        = WA_SWWUSERWI-WI_ID.
             WA_FINAL-WI_TEXT      = WA_SWWWIHEAD-WI_TEXT.
                  APPEND WA_FINAL TO IT_FINAL.
                  CLEAR : WA_FINAL,WA_SWWWIHEAD,WA_SWWUSERWI,WA_TEMP,WA_BSEG,WA_BKPF,WA_LFA1,WA_CEPC.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
        DELETE ADJACENT DUPLICATES FROM it_final.
      ENDIF.
    ENDFORM.                    " INIT
    *&      Form  DISPLAYALV
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAYALV .
      REC_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      REC_LAYOUT-ZEBRA             = 'X'.
      REC_LAYOUT-F2CODE            = SY-REPID.
      REC_LAYOUT-WINDOW_TITLEBAR   = 'Workitem summery'.        "#EC NOTEXT
      REC_LAYOUT-COLTAB_FIELDNAME  = 'COLOR'.
      REC_LAYOUT-DETAIL_TITLEBAR   = 'Workitem Summery'.        "#EC NOTEXT
    WS_LAYOUT-ColWIDTH_OPTimize = 'X'.
    WS_LAYOUT-ZEBRA             = 'X'.
      wa_sort-tabname = 'IT_FINAL'.
      wa_sort-fieldname = 'USER_ID'.
    wa_sort-spos = 9.
    wa_sort-subtot = 'X'.
      APPEND wa_sort to it_sort.
      CLEAR wa_sort.
       PERFORM GET_EVT_UP.
    PERFORM alv_text.
    PERFORM top_of_page.
    *rec_layout-grid_title   = 'Report for WI Analysis'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
         i_callback_pf_status_set = c_pf_stat
          I_CALLBACK_USER_COMMAND  = C_USERC
         I_CALLBACK_TOP_OF_PAGE   = C_TOP_OF_PAGE
          i_grid_title             = text-024
          is_layout                = rec_layout
          it_fieldcat              = it_field_cat
          it_sort                  = it_sort
          I_DEFAULT                = 'X'  "allow default variant
          i_save                   = 'A'
          is_variant               = g_variant
         IT_EVENTS                = IT_EVT_TAB
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 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.
    ENDFORM.                    " DISPLAYALV
    *&      Form  build_catalog
          text
         -->P_TABNAME    text
         -->P_FIELDNAME  text
         -->P_DO_SUM     text
         -->P_SELTEXT    text
         -->P_X          text
         -->P_Y          text
    FORM build_catalog  USING  p_tabname   TYPE slis_fieldcat_alv-tabname
                               p_fieldname TYPE slis_fieldcat_alv-fieldname
                               p_do_sum     TYPE slis_fieldcat_alv-do_sum
                               p_seltext   TYPE slis_fieldcat_alv-seltext_l
                               p_x         TYPE c
                               p_y         TYPE c.
      DATA : wa_fieldcat TYPE slis_fieldcat_alv,
             pos TYPE i VALUE 0.
      pos = pos + 1.
      wa_fieldcat-col_pos     = pos.
      wa_fieldcat-tabname     = p_tabname.
      wa_fieldcat-fieldname   = p_fieldname.
      wa_fieldcat-do_sum      = p_do_sum .
      wa_fieldcat-seltext_l   = p_seltext.
      wa_fieldcat-HOTSPOT      = p_x.
      wa_fieldcat-fix_column  = p_y.
      APPEND wa_fieldcat TO it_field_cat .
      CLEAR wa_fieldcat.
    ENDFORM.                    "build_catalog
    *&      Form  PURVESH
          text
         -->L_UCOMM    text
         -->W_SELFIELD text
    FORM PURVESH USING L_UCOMM  TYPE SY-UCOMM   W_SELFIELD  TYPE SLIS_SELFIELD ."#EC CALLED
    BREAK AAB_PURVESH.
      CASE L_UCOMM.
        IF  USERID IS NOT INITIAL.
          user = userid.
        ELSE.
          user = sy-uname.
        ENDIF.
        WHEN '&IC1' or 'ZWORK_LOAD'.
          READ TABLE IT_FINAL INTO WA_FINAL INDEX W_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            IF user NE SY-UNAME.
              CALL FUNCTION 'SAP_WAPI_FORWARD_WORKITEM'
              EXPORTING
                WORKITEM_ID  = WA_FINAL-WI_ID
                USER_ID      = SY-UNAME
                LANGUAGE     = SY-LANGU
                DO_COMMIT    = 'X'
                CURRENT_USER = user.
              IMPORTING
                RETURN_CODE          =
                NEW_STATUS           =
              TABLES
                MESSAGE_LINES        =
                MESSAGE_STRUCT       =
                USER_IDS             =
            ENDIF.
            CALL FUNCTION 'SAP_WAPI_EXECUTE_WORKITEM'
              EXPORTING
                WORKITEM_ID          =  WA_FINAL-WI_ID
                LANGUAGE             = SY-LANGU
              IMPORTING
                NEW_STATUS           =
                RETURN_CODE          =
              TABLES
                MESSAGE_LINES        =
                MESSAGE_STRUCT       =
           DELETE IT_FINAL WHERE WI_ID = WA_FINAL-WI_ID.
           PERFORM displayalv.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "PURVESH
    *&      Form  GET_EVT_UP
          text
    -->  p1        text
    <--  p2        text
    FORM GET_EVT_UP .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          I_LIST_TYPE     = 0
        IMPORTING
          ET_EVENTS       = IT_EVT_TAB
        EXCEPTIONS
          LIST_TYPE_WRONG = 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.
      ELSE.
        SORT IT_EVT_TAB   BY NAME.
        READ TABLE IT_EVT_TAB WITH KEY NAME = SLIS_EV_TOP_OF_PAGE INTO IS_LS_EVENT BINARY SEARCH.
        IF SY-SUBRC = 0.
          MOVE C_TOP TO IS_LS_EVENT-FORM.
          MODIFY IT_EVT_TAB FROM IS_LS_EVENT INDEX SY-TABIX TRANSPORTING FORM.
        ENDIF.
        READ TABLE IT_EVT_TAB  INTO IS_EVT WITH KEY NAME = SLIS_EV_USER_COMMAND BINARY SEARCH.
        IF SY-SUBRC EQ 0.
          IS_EVT-FORM = 'PURVESH'.
          MODIFY IT_EVT_TAB  FROM IS_EVT TRANSPORTING FORM WHERE NAME = IS_EVT-NAME.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_EVT_UP
    *&      Form  ALV_TEXT
          text
    -->  p1        text
    <--  p2        text
    FORM ALV_TEXT .
      CLEAR IS_LS_LINE.
      IS_LS_LINE-TYP = 'H'.
      IS_LS_LINE-INFO = 'Workload Analysis Report'.             "#EC NOTEXT
      APPEND IS_LS_LINE TO IT_TOP.
      WRITE: 'RunDate:' TO TEXT,
             SY-DATUM TO TEXT+10,
             ', Time :' TO TEXT+20,                             "#EC NOTEXT
             SY-UZEIT TO TEXT+27,
             ', User :' TO TEXT+38,                             "#EC NOTEXT
             SY-UNAME TO TEXT+46.
      IS_LS_LINE-TYP = 'S'.
      IS_LS_LINE-INFO = TEXT.
      APPEND IS_LS_LINE TO IT_TOP.
      CLEAR TEXT.
    ENDFORM.                    " ALV_TEXT
    *&      Form  TOP_OF_PAGE
          text
    -->  p1        text
    <--  p2        text
    FORM TOP_OF_PAGE .
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_TOP.
    using this code specify only buildfieldcatalog and there is a custom inbox ready for you
    here you can specify userid and from alv report you can execute workitem of any user.
    Hope magic Works!
    Regards,
    Purvesh.

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • Set a colour to a row in a table view which does not use an iterator

    Hi ,
      I have an application , which displays data using a table view.
    How can i set colour to a row based on the value of one of its coloums.
    The table view does not use an itertator.
    Thanks
    Arun

    you can use the following code in the ONMANIPULATION event to modify the color of the row. but be aware that if SAP changes rendering ot htmlb:tableview it may not work.
    this code sample set the bgcolor of row 2 to blue.
    DATA: httpbody TYPE string .
    CALL METHOD response->if_http_entity~get_cdata
      RECEIVING
        data = httpbody.
    REPLACE ALL OCCURRENCES OF '<tr rr="2"' IN httpbody WITH '<tr rr="2" bgcolor="blue"' IGNORING CASE .
    CALL METHOD response->if_http_entity~set_cdata
      EXPORTING
        data = httpbody.
    Regards
    Raja

  • Limit No of Rows in Table View

    Hi All,
    I have a requirement like in a table view report i need to limit the no of rows to 100. If the no of rows in report exceeds 100 then the end sure should get message like " No of rows exceeded the limit, Please modify the seach criteria".
    If any one has done this kind of requirement please let me know.
    Thanks in advance
    Regards,
    Shanx

    Set the <ResultRowLimit> to 100 in the instanceconfig:
    <ResultRowLimit>100</ResultRowLimit>
    this ia a system wide config, else play around with the COUNT function.
    regards John
    http://obiee101.blogspot.com/

  • Problem with maintain table views SM30 Transaction

    Hello All,
    i have a problem with the table maintenance view SM30, it doesn't permit me to modify the rows in the table.
    we have added a field into the table and when i tried to change the table view from menu: Utilities ==> table maintenance generator==> change the system propose me a message that the screen 0001 will be deleted and recreated...but the system has deleted the screen and doesn't recreate it...in somewehere on internet we find that we should use the transaction SE55 menu:
    Environment==> modification ==> Maintenance screen ==> button Layout which open the tool Screen Painter and from that we have created our screen with 4 fields of our table...our result that the screen is created and i can see it from the SM30 transaction but i can't insert rows in the table...when i try to go to maintain table: menu: Utilities ==> Table maintenance generator to try if i can modify something the system give me a message: "set the compare flag dialog ZIV_DP_PLCHAR_LA"
    the ZIV_DP_PLCHAR_LA is the name of my table...
    can you give me some advices please how should i do to fix this problem to insert rows in table throughout the transaction
    SM30 "maintain table views: initial screen"
    if i want to delete the screen from the SE55 transaction to recreate it newly what should i do to take care about some options
    to have a new screen?
    thanks for all
    Bilal

    Hi
    First delete the old table maintainence generator.
    Now Recreate the screen and your table is good to go..
    These error messages come when we add new fields and different version of the table maintainence generator in database.

  • Check box in tabel view?when to use itereator and when to use table view

    hi,
    I want to have a check box along with the other 7fields  in the table view.
    when the checkbox is checked and the merge complete push button is clicked, the respective code for merge is to be executed.
    how can I do this?
    could anyone tell me hw to get a check boz in table view
    when to use a  iterator in BSP, how table view n iterator in comparision ae used or function/work.
    Regards,
    Pavan P.

    Hi Pavan,
    Table View is an BSP element used to display mass data in a layout similar to a table (table view).
    <b>Iterator</b>is an attribute to modify rendering row-by-row, and make it dependent on the clicked row. In this way, you define an action from a particular line. This action is defined in columnDefinitions or overWriteDefinitions.
    <htmlb:tableView id = "tvX"
                     headerText          = "Department List"
                     design              = "standard"
                     headerVisible       = "true"
                     width               = "30%"
         selectedRowKeyTable = "<%= selectedrowindextable %>"
         onRowSelection      = "MyEventRowSelection"
         sort                = "server"
         keepSelectedRow     = "TRUE"
         selectionMode       = "MULTISELECT"
         table               = "<%= i_dept %>" >
    </htmlb:tableview>
    In your <b> OnInputProcessing </b>, Use this Iterator table to get the data of selected records.
    IF selectedrowindextable[] IS NOT INITIAL.
    DESCRIBE TABLE selectedrowindextable LINES no .
    Rgds,
    Jothi.
    Pls do close the thread if ur problem is solved.

  • What is the Table/View name for getting the Database Object Dependencies

    I am running the Database Object Dependencies report to get the reference of Database Object and their respective Application Component.
    Applications xxxx -> Application Reports -> Shared Components -> Database Object Dependencies -> Compute Dependencies
    I want to develop a report for the same purpose, Just want to know what is the APEX Tables / Views they are using to run this report, so that I can use the same Tables to create my own report.
    Thanks,
    Deepak

    Hi Andy,
    when I am using the following query...I am not getting any result...
    select name, type, owner
    from all_dependencies
    where referenced_owner = 'APEX_030200'
    and referenced_name = 'WWV_FLOW_PATCHES'
    AND OWNER= 'XXXXXXX' --- (addeed this to the where clause)
    I modified the query.....I am getting the result.....
    select name, type, owner
    from all_dependencies
    AND OWNER= 'XXXXXXX'
    - But I am not getting which database object(table/view) is using which Application Page/Component like we have in Database Object Dependencies.
    - Also what is this REFERENCE OWNER & REFERENCE_NAME ----
    referenced_owner = 'APEX_030200'
    and referenced_name = 'WWV_FLOW_PATCHES'
    I am little bit confused, Can you pl expalin me in details......
    Thanks,
    Deepak

  • 'add row' in Modify Table greyed out?

    I've got a table (35 rows, two columns each with pics) in my
    web page that when I update it- I generally (in Layout view) go to
    Modify&gt;Table&gt;add row -- but now all the choices in
    this dropdown submenu have been greyed out, except the top one
    'Select Table'-- Have I reached a row limit or something?

    > Have I reached a row limit or something?
    Does your table contain colspans or rowspans (hint - look at
    the code)? If
    so, then that's the reason.
    If you want to know more about colspans/rowspans, read this -
    http://apptools.com/rants/spans.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "victory-girl" <[email protected]> wrote in
    message
    news:fod9gs$csa$[email protected]..
    > I've got a table (35 rows, two columns each with pics)
    in my web page that
    > when
    > I update it- I generally (in Layout view) go to
    Modify>Table>add row --
    > but now
    > all the choices in this dropdown submenu have been
    greyed out, except the
    > top
    > one 'Select Table'-- Have I reached a row limit or
    something?
    >

Maybe you are looking for

  • How can i use safari without it crashing on me everytime i open it?

    when i open the safari browser it only stays up for a few minutes until a window pops up and says "safari has stopped working" and "windows is checking for a solution to the problem" and then the browser completely closes. this happens everytime i op

  • How do I unsync a device from all libraries?

    We have purchased a new computer and have relocated our entire music collection onto it, however we can no longer drag and drop music onto our iPhones at will. Two phones were used with the library and we've previously had no issued with dragging and

  • Clearing a open item with two bank accounts at a time

    anybody answer the below question please how can clear the vendor line item using two bank accounts at a time

  • "Evaluate vendor" button inactive in vendor list

    Hi friends, While trying to call questionnaire in vendor list, I find "evaluate vendor" icon inactive. Following two settings are done: 1. Created questionnaire and assignmed to survey. Assigned an agent to the survey with valid email address 2. Main

  • I only see Web Forms & Email in Site Manager

    Why do I only see Web Forms & Email settings in the Site Manager for a WebMarketing Site? Where did everything else go? I'm trying to upload a pdf file and that function is gone in BC.