Sub fields under main field in ALV GRID

Hi folks,
In my ALV, i need to display a field called Days. this field is again sub divided into 4 different fields as diffeerent interval levels(1 to 7, 7 to 50,etc). Depend on the number of days, it should fall in that particular bucket. I need to display these these sub fields under the Mian fiedld 'Days' in the ALV GRID output.Could any body suggest me how to do this. Can we divide the main field into different sub fields in ALV? if so how can it possible ?
Thanks,
Ram.

In the final internal table collect the data for different ranges.Take 4 separate fields.Move the to the data corresponding fields.Display it normally in ALV.

Similar Messages

  • Set a field to blank in an ALV grid control

    Hi,
    Does anyone know how to set a field to blank using an ALV grid control?
    Currently, my program displays 0.000 in a field patterned after EKPO-MENGE, but i want it to just display a blank field.
    Thanks!

    HI
    GOOD
    HOW CAN YOU KNOW THAT WHICH FILED VALUE IS 0.000 ,IF YOU CAN KNOW THIS THAN STORE THAT VALUE INTO A BLANK STRING AND PASS THROUGH THE FIELD CATALOG.I HOPE IT WILL WORK.
    THANKS
    MRUTYUN

  • To have a list in a field of a row in ALV Grid

    Dear Colleagues,
    My question is that in an ALV Grid we have a number of rows.
    Now in the row suppose i want one field as a drop down list with definite values is it possible..??
    If so is there a function module to do this..??
    Thanks and Regards
    Varun

    That was very helpful, But unfortunately that only allows only a pre defined list to be displayed....
    I want a new drop down list for each record..??
    Would that be possible..???
    Is there any module for that...????

  • ICON with field contents in case of ALV GRID

    please have a look at the program. the output of the program display ICONS with the field contents.
    I wanted the same functionality in case of GRID layout.
    But in case of GRID layout I am only getting ICON without field contents.
    In this Example
    if I use ALV LIST the ouput will be STACk ICON with X
    IF I use ALV GRID the output will be STACK ICON.
    REPORT ZTEST_SO1 .
    type-pools : slis.
    data : result(25).
    types : BEGIN OF Ty_MARA,
            gv_flag type char25,
            end of ty_mara.
    data : gt_mara type standard table of ty_mara,
           wa_mara type ty_mara.
    DATA : gt_fieldcat type slis_t_fieldcat_alv,
           wa_fieldcat type slis_fieldcat_alv.
    wa_fieldcat-fieldname = 'GV_FLAG'.
    APPEND WA_FIELDCAT TO GT_FIELDCAT.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
       name                        = '@3B@'
       TEXT                        = 'X'
       INFO                        = 'YY'
       ADD_STDINF                  = 'X'
    IMPORTING
       RESULT                      = wa_mara-gv_flag.
    IF sy-subrc EQ 0.
    APPEND WA_MARA TO GT_MARA.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = 'ZTEST_SO1'
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
       IT_FIELDCAT                    = GT_FIELDCAT
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = GT_MARA
    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.

    Read the documentation of FM ICON_CREATE, the purpose of the Function module is entirely different from what you are using it for.
    To print Icons in ALV (Using FMs ) all you need to do is to send the Icon name in the field.
    Also parameters TEXT and INFO of FM ICON_CREATE seem to be flags, that are appended to the icon name so that when you set it on the screen the appropriate info or Text is shown.

  • F4 field is called first in ALV Grid

    Hello All,
    I have a strange issue where in I have 4 fields in alv grid.
    Last field is having the F4 help facility.
    When clicking on creating new row in the grid, automatically the control is going on to the last field (f4 field) and is getting called first and showing an error to fill in the values.
    I want the control to go from first field to the last field.
    Can you please help me out from this situation?
    Thanks and Regards,
    Kumar.

    Hi ,
       Try to pass the column position via Fieldcatalog table.Please find the below code for reference.
    Perform build_fieldcatalog.
    *-ALV Funtion module
       CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = v_repid
          is_layout                = it_layout
          it_fieldcat               =  st_fieldcat2[]
          it_events                = it_events[]
        TABLES
          t_outtab                 = it_disp[].
    Form build_fieldcatalog.
      data: l_fieldcat type slis_fieldcat_alv.
      data: l_numc type i.
      clear l_fieldcat.
      l_fieldcat-fieldname     = 'VBELN'.
      l_fieldcat-ref_fieldname = 'VBELN'.
      l_fieldcat-seltext_m     = text-t01.
      l_numc = l_numc + 1.                       " This will be used for generating Position Number
      l_fieldcat-col_pos       =  l_numc.       "ALV Column Position Number ( i.e Col_pos = '1'.)
      append l_fieldcat to st_fieldcat2.
      clear l_fieldcat.
      l_fieldcat-fieldname     = 'POSNR'.
      l_fieldcat-ref_fieldname = 'POSNR'.
      l_fieldcat-seltext_m     = text-t02.
      l_numc = l_numc + 1.
      l_fieldcat-col_pos       =  l_numc.        "ALV Column Position Number ( i.e Col_pos = '2'.)
      append l_fieldcat to st_fieldcat2.
      clear l_fieldcat.
    endform.                    " BUILD_FIELDCATALOG
    Hope this will be helpful.
    Regards,
      Srinivas

  • Adding custom fields to notifications-approval tab alv grid

    Transaction IW21 - Create PM Notifications.
    on the Approval Tab - there is an ALV grid that contains lots of fields. I know that i can click on the upper right hand corner and modifiy the layout by hidding fields. I want to add some custom fields to this grid.
    I added my fields to view QMSM and now when I look at the database table using SE16 - i can see my new fields.
    But how do I add them to this ALV grid?
    Please and Thank you,
    Julia Ramos
    Orange County Public Schools.

    I have read SAP OSS NOTE:  586523 Customer-defined fields in list editing. This note helped me add these same fields to many of the standard reporting transactions. IQS8, IW28, IW29, IW38, IW39
    I added my fields to
    QMEL - Quality Notification
    RIHQMEL_LIST - Display structure reporting for QMEL
    RQMQMEL - Quality notification - header data
    RQMQMSM - Quality notification - measures (reporting)
    Then i ran SAP program BALVBUFDEL. This program refreshs the alv buffer. This was very cool in that it allows us to access and report on all of my custom fields thru the standard reporting transactions!
    I thought this same logic might work for transaction IW21. I found the structure used by the approval tab alv program, QMSM,  and created an append structure, ZAQMSM with my fields - ran the balvbufdel program to refresh the alv buffers - but i still can not see my fields in the approval tab. I believe that there must be a way to do this - i will keep trying different things and read thru move OSS notes. If you have any sugestions or ideas - they would be greatly appreciated.
    Thanks

  • Display concatenad fields under one column in alv.

    How can I concatenate three or four fields(Taken from different tables) and can display under one column in ALV report?
    I want to display:
    final_column = production orderStatusmaterial type+maintenance status (concatenation of four fields).
    production order: caufvd-aufnr
    status: tj02t-txt04
    material type: mara-mtart
    maintenance status:mara-pstat
    I want to display only final_column in my alv output screen.
    Kindly guide.
    Thanks and regards.
    Thanks and regards.
    Message was edited by:
            cinthia nazneen

    Please  go through the below   code and  do the same   for appearing  the   four fields  of different table into  One Field catalog at   Display  by Concatenating .
    DATA  :v_tmp  type  string .
    Loop at  itab1.
    Read table  itab2  key field1 = itab1-field1 .
    Read table  itab3  key field1 = itab1-field1 .
    Read table  itab4  key field1 = itab1-field1 .
    Concatenate  itab1-field1 itab2-field1 itab3-field1 itab4-field1 into v_tmp.
      fieldcatalog-fieldname   = 'V_TMP'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endloop.
    Reward points if it is usefull .....
    Girish

  • Sub:Filtering is not working in ALV Grid

    Hi All,
    I developed a new ALV report,where in the out put i can set filtering for other columns(ex:Date,Number),but i can'nt able to set Filtering for one of the column which is CHAR type.
    But when we went to table for this field filtering is working,but not in the ALV Grid  of our report.
    Regards,
    Seshadri G

    hi,
    1) for filtering, we create an internak table of type <b>LVC_T_FILT</b>,
    U can assign fields to the above created internal as per u requirements.
    2) passing the above internal table to CHANGING parameter of method SET_TABLE FORFIRST_DISPLAY in ALV GRID.
    <b>IT_FILTER = < internal table TYPE LVC_T_FLIT>.</b>
    <u><b>OR call this method for setting filter criteria as per u r requirement.</b></u>
    Set current filter settings. A row of the table describes the selection conditions for column entries that are not to be displayed.
    You should never manually set up the internal table with the filter settings. Use this method only to set filter criteria that you got using get_filter_criteria or a layout.
    Features
    CALL METHOD <ref. var. to CL_GUI_ALV_GRID > ->set_filter_criteria
       EXPORTING
          IT_FILTER  =   <internal table of type LVC_T_FILT > .
    Parameter
    Meaning
    IT_FILTER
    Table with filter settings
    regards,
    AshokReddy.
    Message was edited by:
            Ashok Reddy
    Message was edited by:
            Ashok Reddy

  • Populate a field on TAB press in ALV Grid (OOPs)

    Hi Experts,
    I have an ALV(oops) with cl_gui_alv_grid. I have a field MATNR as empty and when i input a value and i press TAB key d anit should go to next field (next coulmn) to fill the  old material# which can be got from MARA.
    I am not able to get the sy-ucomm or e_ucomm for TAB press.
    Q) WHERE should i write my query logic to fill the OLD MAtnr field.
    code sample : I have data change event as below.
    class lcl_event_handler definition
    PUBLIC SECTION .
        METHODS:
      changed_data for event data_changed of cl_gui_alv_grid importing er_data_changed
                                                                               e_ucomm sender,
    ENDCLASS.
    in Implemntation class...
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    METHOD changed_data.
        clear:      ls_stable-row, ls_stable-col.
       loop at er_data_changed->mt_mod_cells into ls_modified.
        clear wa_outdisp.
        READ TABLE gt_outdisp INTO wa_outdisp INDEX ls_modified-row_id.
        CHECK sy-subrc EQ 0.
        lv_field =  ls_modified-fieldname.
        if lv_field = 'MATNR'.
          wa_outdisp-MATNR = ls_modified-value.
          wa_outdisp-bismt = '123'.
        endif.
        MODIFY gt_outdisp FROM wa_outdisp INDEX ls_modified-row_id.
        ls_stable-row = 'X'.
        ls_stable-col = 'X'.
        grid->refresh_table_display( exporting is_stable = ls_stable  ).
        endloop.
      ENDMETHOD.                    "changed_data
    ENDCLASS.
    How can i do this?
    Thanks
    Dan

    Max,
    Yes i am using that event. I am using it before grid -> set_first_display method.
    The debugger is not stopping inside the data change method when i placed a break point.
    I am using refresh method also.
    My code for  sy-ucomm is as below.
    when'NEWROW '
        when others.
          CALL METHOD cl_gui_cfw=>dispatch
            IMPORTING
              return_code = w_return_code.
          CALL METHOD grid->register_edit_event
            EXPORTING
              i_event_id = cl_gui_alv_grid=>mc_evt_modified.

  • Dump when changing the value for a field (of 13 decimals) in alv grid.

    Hi Group,
    Its giving a dump when user is trying to change the value.
    dump description: Unable to interpret "70,000 " as a number.
    what is happening here is, the original value is 50,000 and he is deleting 5 and replacing it with 7, here its throwing the dump.
    If he removes the complete number 50,000 and then gives 70000 its  taking the value.
    I tried to use, the decimals options in alv field catalog but to no joy.
    Please can you give me an advice on this.
    Many Thanks.

    the problem is the comma in the 70,000....that's an alpha character.... Normally, we expect SAP to display numeric fields in a appropriate format, based upon their numeric type, but trying to forcibly insert '70,000' into a true numeric-type field can generate an 'unable to interpret xxx,xxxx  as number' error.
    You could experiment with changing your ALV column to a char17 (or appropriate width) and putting your numeric value into that to display, then converting back to type P, or other field type in the table, in a column that is not displayed, when the user changes the value....  essentially two columns, one not displayed with a routine to copy/convert the numeric field into the alpha field and the reverse when the field is changed.
    But, the better solution is probably for the user to understand that they're seeing a formatted numeric field, and that they need to replace the entire value with the only possible punctuation being a decimal and (if necessary) a negative sign.

  • Reg displaying a Field as Drop Down in ALV Grid Display

    Hi All,
    I have developed an ALV report program with one editable field using FM "REUSE_ALV_GRID_DISPLAY_LVC". My requirement is to make that editable field as dropdown box so that user can choose from the options. If i press SAVE all those will gets saved in a Ztable. Everything is working fine. But no values are getting populated in dropdown box.
    Kindly do the needful.
    Thanks in advance.

    Hi,
    Check out follwing subroutines in below programs.
    perform build_fieldcat changing pt_fieldcat.
    perform set_drdn_table.
    BCALV_EDIT_06
    BCALV_EDIT_07

  • How to fill field with test data in alv grid display

    hi all,
    i m adding field TEXT to the structure for displaying grid.
    i m modifying program like this
    DATA: ALV_OUTPUT  LIKE HRPDV_EXPIRED_Q OCCURS 0 WITH HEADER LINE.
    TYPES : BEGIN OF FS_OUTPUT .
          TEXT(20) TYPE C.
            INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
    TYPES       TEXT(20) TYPE C.
    TYPES    END OF FS_OUTPUT.
    DATA: fs_output like table of alv_output.
    CLEAR WA_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'TEXT'.
      WA_FIELDCAT-seltext_l = 'Abteilungs Struktur'.
      wa_fieldcat-tabname   = 'ALV_OUTPUT'.
      WA_FIELDCAT-COL_POS  = '13'.
      APPEND WA_FIELDCAT TO P_GT_FIELDCAT.
    this is what i have write for diapalying field. but my question is how to fill test data with field TEXT.I m writing like this but not executed in the aboove grid dispaly statement.
    loop at alv_output.
    *alv_output-text(20)  = 'abcdefgh'.
    *modify alv_output.
    *endloop.
    plz tell me how to fill test data

    hI..,
    Your table declaration has to be like this..
    TYPES : BEGIN OF FS_OUTPUT .
    INCLUDE STRUCTURE HRPDV_EXPIRED_Q.
    TYPES TEXT(20) TYPE C.
    TYPES END OF FS_OUTPUT.
    DATA: ALV_OUTPUT LIKE standard table of fs_output initial size 0.
    loop at alv_output <b>into fs_output</b>.
    <b>fs</b>_output-text(20) = 'abcdefgh'.
    <b>modify alv_output index sy-tabix from fs_output transporting text.</b>
    endloop.
    Now give this table alv_output to the GRID_DISPLAY function module..
    you will get the required output !!
    Plz do remember to close the thread when ur problem is solved !!
    reward all helpful answers !!
    regards,
    sai ramesh

  • New field in ME28 output in ALV grid

    Dear All,
    In ME28 - PO release transection code, when we run in ALV gird, we have a TAX code field but not the tax code description.
    Can we have this, if yes let me know the procedure.
    Thanks,
    SAmir Bhatt

    Hi,
    As per my knowledge, system will not allow to add the " Description of Tax Code". Plz check in customization for Reporting.
    Regards,
    Raghunath

  • Color change of a field  in ALV Grid Control

    Hi,
    One small help needed....
    My req is explained below:
    I have 3 fields empno, ename and deptno. and the records of these fields would be displayed in ALV grid control.
    When I hover the mouse on ename field, the color of the complete field should change to other color, say "RED".
    How do I get this. Are there any Mouse events in SAP?
    Kalyan

    Hi,
    Once i changed the color of a field in a alv (not grid alv), i suspose that the same in alv grid. Also i used an mouse event.
    To manage the color:
    TYPE-POOLS : SLIS, and check this type:  SLIS_T_SPECIALCOL_ALV.
    when you call the function to display the alv, there is a parameter in which you should pass an internal table that references the type  SLIS_T_SPECIALCOL_ALV.
    To manage the mouse:
    1.- You should add the event user command:
    for example:
    DATA: I_EVENT TYPE SLIS_ALV_EVENT.
    Llamo al la función que obtiene los eventos validos para el ALV
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE     = 0
           IMPORTING
                ET_EVENTS       = P_EVENTS
           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.
      agrega evento user command
        READ TABLE P_EVENTS INTO I_EVENT
          WITH KEY NAME = SLIS_EV_USER_COMMAND.
        IF SY-SUBRC EQ 0.
          I_EVENT-FORM  = SLIS_EV_USER_COMMAND.
          MODIFY P_EVENTS FROM I_EVENT INDEX SY-TABIX.
        ENDIF.
      ENDIF.
    2.- you work with the user command event:
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            RS_SELFIELD TYPE SLIS_SELFIELD .
      CASE R_UCOMM.
        WHEN C_DOBLE_CLICK.
        here you do the things that you need when the mouse *     bottom it's pressed
          PERFORM xxxxxxx.
      ENDCASE.
    ENDFORM.
    3.- you can change the form of the mouse, but i don't remember exactly how to do that... try to check that, it's helpfull in order to display the fields that can execute a funtion in your alv.
    I hope this help you, and sorry for my english.
    Albio.-

  • Display value and description of one field in alv grid

    Hi Folks,
       I want to display value and description of one field as one column in alv grid.
    for example iam having Xfield = 01,02,03.
    and 01 iam having text value as xxx,
    01 xxx
    02 yyy
    03 zzz
    Im report display the values are displaying as 01,02,03..
    but i want to display it as 01 xxx,02 yyy, 03 zzz.
    Please do needful.
    Thx.

    Hi, swetha
    You can do this with "concatenate".
    example:
    In you code check where you final internal table is getting filled up before that do this concatenate and then append it.
    data t_text type string.
    t_text = textfield
    CONCATENATE 'Xfield'
                     t_text
                      INTO wa_workarea SEPARATED BY space.
    cheers,
    Bhavana

Maybe you are looking for

  • Is there a way to "see" what font you're using?

    Hi, I'm a bit new to PAGES. I thought when you turn "Show Invisibles" you would see things like what font you're using . . . if it's bold or underlined or italicized - things like that - you would see these characteristics in the body of the document

  • How do I restore the App Store icon on my MacBook Pro?

    I wanted to use a custom icon but since doing so, all I see is a blank PNG icon instead of its image. How can I revert it back to the original icon file? I've deleted the custom icon image files and folders already. Thanks for your time and assistanc

  • Can't use my Creative in Design CS6 suite or Acrobat xi error 16

    Hello, cant use my CS6 Suite or any adobe product (Own all products not on cloud) since upgrading to Maverics. Tried Fix http://helpx.adobe.com/x-productkb/policy-pricing/configuration-error-cs5.html Does nothing as all the other posters stated. Trie

  • MRP Exception Messages

    Hi Gurus , i need your help A summary of exception messages can be viewed in MD07, butit is only by MRP controller.  Is it possible to view all exception messages for a plant?  Are there any plant level metrics that can show the performance of our SA

  • Can you link buttons to labels in a separate movieclip?

    I'm fairly new to flash so please excuse my lack of knowledge...using AS3 basically I had a situation arranged where when a button was clicked and flash would then display a certain image by jumping to a label on the timeline, and by clicking a diffe