Is it possible to make certain rows mandatory in ALV custom Grid display?

Hi experts,
                Is it possible to make certain columns mandatory in the ALV custom grid control just as we give in a selection screen ?
Thanks in advance
regards,
Ashwin

fieldcat-key = 'X'.
Regards,
Amit

Similar Messages

  • How to make Certain rows in the structure to be displayed as bold

    I have two structures in the query. There is a requirement that all values in Certain rows should be bold  I am talking about values and not the headers. The users are going to use the query through BEx Analyzer.
    I tried the Highlighted Display but it makes it only that row values BLUE. (this change makes them bold only on web).
    Please let me know if there is any way to display perticular row values in a structure in Bold.
    We have both versions 3.5 and 7.0 of BEx analyzer. The Query is on 7.0
    Thanks in Advance.
    2. I also have a requirement that all values from a perticular selection from column structure to be displayed as bold.
    ........................................Company Code1 Company Code 2 Comapany Code 3
    No Of Male Employees..................10.....................200........................30
    No Of Female Employees...........500.................70........................77
    So here All values in the row Female Employees should be bold and All values under Company Code 3 should be bold
    Edited by: Abhijit N on Dec 23, 2008 11:54 PM

    Hi Abhjit,
                 Please check formating option in bex analyzer for this.
    Plz check here......
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55d2e09411d2acb90000e829fbfe/content.htm
    Regards,
    Vijay.

  • Is it possible to make department field mandatory in T.code KS01

    Hi all,
    I need to make Department field mandatroy in Transaction 'KS01' Create cost center
    Is it possible to make department field mandatory.
    Pls suggest me if any possibilities.
    Thanks & Regards
    Bhaskar

    Hi,
    To add to above, Just check this point:
    SAP does not support implementation of new fields exits from ECC 6.0. It will still support the existing field exits in the system
    Also check if you can create the field exits from program RSMODPRF..
    Regards
    Shiva

  • How to make some fields mandatory for a custom screen we have added

    Hi All,
    Please let me know how can I make some fields mandatory through coding in PBO for only some fields of a screen.
    Say if I have 4 fields in my screen(module pool not selection screen) i want to make mandatory 2 fields based on some conditions how to do this? I tried using screen-group but this will make mandatory all the fields of that screen mandatory.
    I want only specific fields based on condition in run time.
    Regards
    Mahesh

    Hi Mahesh,
             Try this ..
      Assign the same group to those fields , say GRP
           in  PAI
             IF <CONDITION>
                Loop at screen.
                   if screen-group1 = 'GRP'.
                      screen-required = '1'.
                      modify screen.
                   endif.
                 endloop.
              ENDIF.

  • How to exclude certain rows in the ALV display from the total?

    Hi,
    May I know is there a way to exclude certain rows that are shown in the ALV control from the calculation of grand total?
    Thanks much.

    See, if
    function module REUSE_ALV_TRANSFER_DATA 's
    IT_EXCLUDING   .... param
    works for you.

  • Is it possible to make Supplier field Mandatory in Shopping Cart (SRM7.0)?

    Hi Experts,
    We are configuring SRM7.0 with ECC6 ( Ehp4) having Classic Scenario.
    We are only using Shopping Cart  functionality and most of the  Material and services will have Contract & Pur. Info Records in ECC B/E system.
    in SRM, if any Product don't have any SoS , then user can assign Supplier code and Price manually in S/C and Classic PO creates automatically. But if User missed to enter Supplier code then, in that case we neither want to sent the S/C to the Sourcing Cockpit nor want to create ECC PR from it.
    If there is NO any SoS ( ECC Contract or Pur Info Record) exist , then  user MUST have to enter Supplier code & price  manually and so we want to set the fields SUPPLIER & PRICE  MANDATORY.
    Is it Possible ? if yes , then how this can be done ?
    Thanks
    NAP

    >
    NarendraPatil wrote:
    > Hi Experts,
    >
    > We are configuring SRM7.0 with ECC6 ( Ehp4) having Classic Scenario.
    >
    > We are only using Shopping Cart  functionality and most of the  Material and services will have Contract & Pur. Info Records in ECC B/E system.
    >
    > in SRM, if any Product don't have any SoS , then user can assign Supplier code and Price manually in S/C and Classic PO creates automatically. But if User missed to enter Supplier code then, in that case we neither want to sent the S/C to the Sourcing Cockpit nor want to create ECC PR from it. - If the REQUESTIONER enter prefered vendor - it can create only PR IF NO SOURCING . if REQUESTIOTIONER selected fixed vendor - Then PO created .
    here you are giving more control to REQUISITIONER department than Purchasing department.
    >
    > If there is NO any SoS ( ECC Contract or Pur Info Record) exist , then  user MUST have to enter Supplier code & price  manually and so we want to set the fields SUPPLIER & PRICE  MANDATORY.
    you can validate any field to make mandatory...and spit error by doc check BADI.
    >
    > Is it Possible ? if yes , then how this can be done ?
    >
    > Thanks
    > NAP
    Though business allows REQUISITIONER wants to create  PO directly from the shopping cart without BUYER intervention and WITHOUT Fixed vendor . no issues . Asimple logic to change preferred vendor 39 to fixed vendor 19 logic by doc change badi
    so whenever REQUESTIONER assign a preffered vendor it can create a Purchase order.
    Assigning source of supply decision is very critical to business . Business wants always it should be competetive best price.
    Hope you understand ..

  • Is it possible to make a row in a table control as output only row?

    Hi SDN,
    I have created a table control with wizard.I want to make a particular row as non-editable for a condition from my program.Is it possible?

    yeah , make use of table SCREEN.
    loop at screen.
    screen-output = 'X'.
    modify screen.
    endloop.

  • How to make certain rows editable in hierachy alv

    HI,
    i have called one alv function module where i have done certain fields editable by making fieldcatalog-edit = 'X' and fieldcatalog-input = 'X'.But i have to make the selected rows (based on checkbox in the output list) editable.any idea?

    Hello Priya,
    1) If u want to make fields of an ALV to be editable based on certain conditons then see the following code.
    First create an extra field in ur internal table.
            celltab TYPE lvc_t_styl,
    After that pass this field to the layout.
      gw_layout-stylefname = 'CELLTAB'.
    Here the layout structure is defined as
    gw_layout TYPE lvc_s_layo
    now based on the condition u can set the fields editable or non editable.U can check the following code.
      DATA: ls_celltab TYPE lvc_s_styl.
      ls_celltab-fieldname = 'CHK'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
      MODIFY gw_final-celltab FROM ls_celltab
      TRANSPORTING style
      WHERE fieldname = ls_celltab-fieldname.
      IF sy-subrc NE 0.
        INSERT ls_celltab INTO TABLE gw_final-celltab.
      ENDIF.
    Now if ur using OO-ALV then pass the layout to the method.
    If ur going by Function modules then u need to call the following function module.
      gw_layout-stylefname = 'CELLTAB'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout_lvc            = gw_layout
          it_fieldcat_lvc          = gi_fieldcat
        TABLES
          t_outtab                 = gi_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.
    2) If u want to read the changed contents from ALV grid back to ur program then use the following function modules.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = l_ref1.
          CALL METHOD l_ref1->check_changed_data
            IMPORTING
              e_valid = lv_valid.
    Shafi

  • I want to make certain rows of a JTable unclicktable

    I am woring with a JTable that I have placed on a JPanel. The JPanel that the table is in is big enought to display a table with 8 rows. The tables are dynamic and fill up according to the users actions when they click on another table.
    The problem is, is that sometimes the table will only be someway full (e.g. only 3 rows of the table will have content.) In order to make my GUI appear more professional I set it so that the table will always have 8 rows (sometimes the bottom few will be blank). What I want to do is to set it so that the blank rows are either unclickable by the user or else that clicking on the blank rows will not cause an event.
    Any ideas?
    Thanks in advance,
    Wallace

    When I try to find out how many real rows there are in the JTable I keep on getting the wrong answer back.
    For example:
    In my custom Table model I have set it so that there will always be at least 8 rows in the table. Therefore when there are 3 rows of real content, I want rows 3 - 7 to be unclickable.
    So to try and do this I have written this piece of code in my custom Table class that extends JTable:
    public void changeSelection( int row, int column, boolean toggle, boolean extend)
    {  if (row >= ((PerfTableModel)getModel()).getDataVector().size())
    {  return;
    else
    {  super.changeSelection( row, column, toggle, extend );
    However this does not work. When I replace the right-hand side of the if statement with getRowCount() this again returns 8 and the method is not effective.
    Any ideas as to what I can do?
    Thanks again
    Wallace

  • Can you make certain social network applications available in all countries?

    I've recently been hearing a lot about the application Yik Yak, and I wanted to download it. However, when I went to download it, I found out it wasn't available for Singapore users, but only for United States users. This I find rather unfair because there are a lot of people all around the world who are unable to download certain applications or even purchase certain items from the itunes store, simply because they do not live in the United States. Is it possible, to make certain applications and even items accessible to the whole world rather than just the US?

    Contact the developer.
    http://www.yikyakapp.com

  • Make Select rows and columns as read only in Table Control

    Hi All,
    I would like to know how to make certain cells in a Table Control as display only.
    Table control should look like-(Those in bold are read only or in display mode)
    <b>Name1            Idno1 </b>         Address1
    <b>Name2            Idno2</b>          Address2
    <b>Name3            Idno3  </b>        Address3
    <b>Name4            Idno4</b>          Address4
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    My table control should display all the above fields the way it is above of which first two colums and 4 rows should be read only,and the rest of the empty rows in the TC should be in change mode.i.e it must have provision to add new rows but not change the first two columns of existing rows.
    In short I am looking at solution to hide particular no of rows and columns and <b>not the entire column.</b>

    In the PBO of the table control loop. just write these statements
    NAME and IDNO considering the fields on the screen.
    and WA_TAB is the table work area being passed to the table control to display the rows.
    if not WA_TAB-NAME is initial and not WA_TAB-IDNO is initial.
    loop at screen.
    if screen-name = 'NAME' or
       screen-name = 'IDNO'.
    screen-input = <b>0</b>.
    modify screen.
    endif.
    endloop.
    endif.
    which means that the fields are disabled only if NAME and IDNO are not initial.
    Regards
    - Gopi

  • ALV: how to disable editable cell and F4 in certain rows only.

    I am building a table maintenance front-end with an ALV grid using OOP concept.  Certain fields are editable and also have customised search helps assigned to them in the ALV structure defined for the grid. What I want is where I have identified an entry in my database table as being locked by another user, I want to grey the line out on the ALV grid so that the entry cannot be edited and not have f4 input whilst this entry is locked by another user.
    I can grey the line out or disable F4 but not both at the same time.  If I disable the cells of the row concerned using MC_STYLE_DISABLED, the F4 is still active and will change the contents of the cell concerned via the data_changed event method in CL_GUI_ALV_GRID.
    I have used MC_STYLE_DISABLED where I have declared  a layout in my table similiar to this:
    DATA: BEGIN OF OUTPUT OCCURS 0,
    FIELD1,
    FIELD2,
    STYLE TYPE LVC_T_STYL,
    LOCK TYPE C.
    END OF OUTPUT.
    DATA: ls_celltab TYPE lvc_s_styl.
    * Where lock identified, field LOCK set to 'X'.
    LOOP AT OUTPUT where lock = 'X'.
    ls_celltab-fieldname = 'FIELD1'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ls_celltab-fieldname = 'FIELD2'.
    ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
    APPEND ls_celltab TO OUTPUT-STYLE.
    ENDIF.
    append OUTPUT.
    I have tried adding MC_STYLE_F4_NO to field LS_CELLTAB-STYLE2 but this does not do both actions atthe same time.
    Can anyone suggest what I might be doing wrong or an alternative way around this?
    Many thanks
    Regards
    Larissa

    As I have explained, I have fields that are editable AND are F4 enabled.  What I want is for certain rows of the ALV that I do not want any procesing to occur to make all fields in that row not available for input AND not f4 enabled.  I read a lock using a lock object.  If the entry in my ALV matches the key locked in the lock object, I want that line to be in display mode only in the ALV with no F4 help being able to be called.  It happens on the grid frontend when I press enter and have checked if any of my entries in my ALV are already locked by another user. The code is too long to post here. I can disbale the editable fields using MC_STYLE_DISABLED as described above but then the little drop down to enable F4 input is still visible against the field. 
    I have got round it by calling the f4 in event HANDLE_ON_F4 to not go via the search help and set er_event_data->m_event_handled = c_yes so that the F4 hit list does not appear, but I want to get rid of the drop down marker in that field in that instance.
    Hope this is a little clearer now.
    Larissa

  • How to make some rows not selectable in AdvancedDataGrid

    Hi there,
    I have an advanced data grid which allows to select multiple rows. I need to make certain rows not selectable dependent on the row data. How can this be done?
    Help is greatly appreciated. Thanks in advance.
    --Charmaine

    Hi, You can view same demo here
    Thanks and Best regards,
    Pallavi Joshi | [email protected] | www.infocepts.com

  • Hide cell in alv-grid on certain rows

    Hi all,
    I wonder if it is possible to hide certain cells in an ALV-grid ?
    e.g the data in cell1 row1 is visible, but the data in cell1 on row2 has to be invisible...

    Hi
    I don't believe it can do it for only certain cells and I don't believe it's possible to hide anything in alv-grid.
    Your program decides what  can be displayed so if something data doesn't has to be shown it shouldn't be loaded in output table.
    Max

  • Is it possible to highlight a row in ALVLIST

    Hi,
      Is it possible to highlight a row in an ALV List ...If so how to do it?
    Kindly help.
    Thanks.

    hi ,
    u can colour a perticular row...
    like,
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = it_ekko
        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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    *Populate field with color attributes
      LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL

Maybe you are looking for

  • How ot duplicate layer to the new document?

    This code provide duplicate the layer in the current document. It must some keyTo param. but what arguments is? Auto_Ref docRefs; Auto_Desc docDescs; Auto_Desc results(false); error = sPSActionReference->PutIdentifier(docRefs.get(), classLayer, Layer

  • How many computers can I stall the program on?

    Good afternoon.  I recently purchased the Adobe Photoshop Lightroom 5 Student and Teacher Edition.  Can I install this on more than one computer at home?  We have a desktop and a laptop that I would like to install it on. Thanks, Jeff

  • DBCA hangs after clicking finish

    Hi can anyone help me please. dbca hange after clicking finish.oracle 10.2.0.1 dbca log below [TaskScheduler timer] [18:3:23:529] [SQLEngine.initialize:-3] Starting Reader Thread... [TaskScheduler timer] [18:3:23:550] [SQLEngine.initialize:-3] Waitin

  • Register Interop.SAPbobsCOM

    Hi, I want to connect to SBO via DIAPI and there comes following error:"Object reference not set to an instance of an object" I guess, that the issue is, that I had diff version of DI API install on my system and the SBO is using. So I installed the

  • Purchased Zen Micro without Installation

    I just bought a used Zen Micro 5gb from a friend who didn't have the original installation CD or instructions. I believe I can download everything from Creative's website, but can someone please tell me what the latest and best driver, firmware, and