Recording on ALV GRID

Hi All,
I have a requirement to update a custom field in customer (xd02) screen from a file. Xd01/xd02 are extended with custom screens. One of these screens holds a ALV grid. I have to change one of the record value. when i select a record and click on change button on Alv grid, a modal dialog box apprears, which allows me to change the value of it. Here is my concern, was not able to capture actions made on ALV grid in recording. Any suggestions...
Thanks,
Priya.

Is the custom field in a custom table or has it been appended to a sttandard SAP table?
Rob

Similar Messages

  • Push Button in Every record in ALV grid output

    Dear Experts,
    I need to print a push button in first column of every record in ALV grid output. How ?
    No OOPS concepts please.
    Thanks,
    Siva.

    For this requirement, you have to copy the standard PF status of the ALV output. Do as below :-
    1) Go to SE41
    2) Enter the program name as SAPLKKBL
    3) In the field status enter STANDARD_FULLSCREEN
    4) Click on STATUS button on the application toolbar.
    5) Enter the name of your Program & a new status name.
    6) Click on COPY.
    This way the standard status will be copied to the custom status & call the same status in your program using SET PF STATUS statement. Then double click on the custom status name & you will be navigated to SE41, there you can add you new button on the application tool bar & assign a function code, which you can program by enabling the export parameter I_CALLBACK_USER_COMMAND of the Function module REUSE_ALV_GRID_DISPLAY.
    Just a sample code snippet for your reference :-
    FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
    LS_SELFIELD TYPE SLIS_SELFIELD.
    CASE L_UCOMM.
    WHEN 'your function code goes here'.
    Do further processing.
    This way you will have the standard PF status alongwith your button as well.
    Edited by: Kumar Manas Mishra on Jan 29, 2010 1:03 PM

  • How to insert new record in ALV GRID?

    Hi all,
       I am displaying ztable data into grid format using method  SET_TABLE_FOR_FIRST_DISPLAY of Class CL_GUI_ALV_GRID using OOPS concept.now i want to insert a new record into ALV grid?
    If anyone has tried then please tell me?
    Thanks and Regards,
    Arpita

    Hi Avinash,
    Thanks for replay.
    My problem is solved.i did it as follows.
    HANDLE_DATA_CHANGED
          FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
               IMPORTING ER_DATA_CHANGED
                           E_UCOMM.
    METHOD HANDLE_DATA_CHANGED.
    LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO WA_GOOD_CELLS.
    CASE WA_GOOD_CELLS-FIELDNAME.
      WHEN 'ZCARRID'.
          CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE
              EXPORTING
                I_ROW_ID = WA_GOOD_CELLS-ROW_ID
                I_FIELDNAME = WA_GOOD_CELLS-FIELDNAME
              IMPORTING
                E_VALUE = ZCARRID1.
         WA_FLI-ZCARRID = ZCARRID1.
    ENDMETHOD.
    Using method CALL METHOD ER_DATA_CHANGED->GET_CELL_VALUE,
    i am reading individual values and assinning it to WA and then insert into ZTBALE.
    Thanks,
    Arpita

  • Deleting the record in AlV grid

    Hi frineds,
    In alv grid am displaying the records with sub total headings but the problem is, finally want display the
    subtotal value under that one blank line and next want display the total .but it is showing the total value in blank line and in total value field.can any if possible give the code..
    Thanks in advance.

    Hi,
    Sort your ALV report by workdate, or do sub total on the workdate,
    hope you will get teh desired out put.
    Cheers
    Manju

  • BDC Recording for ALV Grid in containers

    Hi All,
    I have to record for BDC on an ALV Grid (OOABAP). I am not able to record selection of rows in ALV grid.How do i select rows in the grid dynamically that is while recording.
    Thanks n Regards,
    Santosh Kotra.

    Usually it is not a good idea to do recording over a transaction which includes frontend gui controls, such as, tree controls and ALV controls, for this exact reason, among others.  Try to use a older version of the transactoin if possible or a BAPI.  For example, if you are trying to do a recording over say  ME21N, it is recommended to do the recording over the non-enjoy transaction,  ME21,  or simply use the BAPI.
    Regards,
    Rich Heilman

  • Display different record in ALV Grid after provide different selection

    Hi All,
    I am a newbie.
    This is my situation:
    Firstly, on dropdown list, I select 'Annual'. Then, the alv grid display all records for 'Annual'.
    Then, I select 'Sick', I'd like to use the same ALV Grid to display all records for 'Sick'.
    I'd like to know if this is doable. If yes, can you show me some sample of coding which I can use as references.
    If it is not possible, I'd like to ask for y'all opinion whether it is efficient to use different ALV Grid for different selection?
    Hope to hear from you soon. Thank you very much.

    This is the snippet of the code:
    if l_rbtlvreqlvid = 'X'.
            "search based on leave id
            select *
            into gw_leave
            from zabmd_leave
            where lv_id = l_lvreqlvid.
              append gw_leave to gt_leave.
            endselect.
            if g_lvreq_cus_cont is initial.
            create object g_lvreq_cus_cont
                exporting
                  container_name = 'L_LVREQCONT2'.
              create object g_lvreq_alv_grid
                exporting
                  i_parent = g_lvreq_cus_cont.
              g_lvreq_alv_grid->set_table_for_first_display(
              exporting
                  i_structure_name              = 'zabmd_leave'
              changing
                  it_outtab                     = gt_leave
              exceptions
                  invalid_parameter_combination = 1
                  program_error                 = 2
                  too_many_lines                = 3
                  others                        = 4
              if sy-subrc <> 0.
                message id sy-msgid type sy-msgty number sy-msgno
                           with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              endif.
              call screen 222.
        else.
            g_lvreq_alv_grid->refresh_table_display(
               exceptions
                 finished       = 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.
              call screen 222.
    endif.

  • Spliting of record in alv grid

    Hi all,
    I am using CATSDB table
    In that "laeda " is one of the field which means date of entry of the record.
    using this field i am getting the records.
    they my enter records of 3 months in one month.
    "workdate" is the field which means on which date he worked
    "catshours" means how many hours he worked.
    in my database table i am having 3 months records entered in the same month.
    so i am getting the 3 months hours added and i am getting single record as output.
    but what i want is 3 months records as 3 records in the alv grid.
    in the selection screen i will give month and year as input.
    i will get that months records.
    to split that single record into 3 individual records what i have to do.
    thanking u.
    regards,
    giri.

    Hi,
    Sort your ALV report by workdate, or do sub total on the workdate,
    hope you will get teh desired out put.
    Cheers
    Manju

  • Edit new record in ALV grid

    Hi experts,
    I have developed <b>normal</b> ALV. There is an option( Insert row) to add new row in the grid.Now, i wanted to enter values in the new row.
    If i make EDIT = 'X' in the fieldcatalog it opens up all of the existing records , which I don't want. I want to enter values in new row only.
    if i use something like
      data: wa_stg like gt_stage occurs 0 with header line,
      lt_celltab type lvc_t_styl,
      ls_celltab type lvc_s_styl.
      loop at gt_stage into wa_stg.
        ls_celltab-fieldname = 'FISTL'.
        ls_celltab-style = cl_gui_alv_grid=>mc_style_enabled.
        insert ls_celltab into table lt_celltab.
        wa_stg-celltab[] = lt_celltab[].
        modify gt_stage from wa_stg transporting celltab.
        clear: ls_celltab, lt_celltab.
      endloop.
    i cant use
      call method gv_grid->set_table_for_first_display
        exporting
          is_layout       = gs_layout
        changing
          it_outtab       = gt_stage[]
          it_fieldcatalog = i_fieldcat.
    because it is for OO.
    Is there anyway to do this?
    reward guaranteed,
    Thanks

    Hi kaki,
    From your code, it looks like Your ARE using OOPS for your ALV.
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/0a/b55312d30911d2b467006094192fe3/content.htm
    Check this sample program:
    http://sapabap.iespana.es/sapabap/sap/reports/alv_grid.htm
    Regards,
    Ravi
    Message was edited by:
            Ravi Kanth Talagana

  • Getting present display records  or Row Id's information in ALV grid?

    Hi,
    I am using REUSE_ALV_GRID_DISPLAY for ALV display.
    I need to get the row id's when user filter the records with any conditions  - or any other ways if he selected particular records - I need to process my logic only for those present displaying records in ALV grid.
    So How do I can get preset display records in ALV grid or Present display records row id's ?
    Please let me know .
    And also I  am using 
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_repid = i_repid
          e_grid  = lt_grid
    In lt_grid there is a table MT_ROID  this table is having selected row id's information but I could not read this table. I think this will work only OO ABAP and also method - get_selected_rows is also not working.
    I highly appreciate your answers.
    Thanks
    Kevin

    Hallo,
    Any ideas?
    Thanks.

  • ALV grid display in a particular format

    Hi,
    Could you please tell me how do i display the alv grid in this particular format :
    col1           |         col2               |           col3          |       col4             |
    abc1          |         def1               | -
    |----
    |           
    abc1           |         def2              | -
    |----

    abc1          |-----|            ghi1           |-----|
    abc1          |-----|            ghi2           |-----|
    abc2          |         def3               | -
    |----
    |           
    abc2           |         def4              | -
    |----

    abc2          |-----|            ghi3           |-----|
    abc2          |-----|            ghi4           |-----|
    1. For a single site (col1), there are multiple values in col2 and col3.
    2. col2 and col3 are not related.
    3. col2 and col3 individually is rlated to col1.
    Any help would be highly appreciated.

    Hi,
    All you need to do is to sort the records while displaying in ALV Grid.
    Refer the below code snippet:-
    *SORTING
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT INFO
      wa_sort-spos = 1. "<--sort preference
      wa_sort-fieldname = 'COL1'. "<--column which needs to be sorted
      wa_sort-tabname = 'IT_FINAL'. "<--internal table
      wa_sort-up = 'X'. "<--ascending order
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
      wa_sort-spos = 2. "<--sort preference
      wa_sort-fieldname = 'COL3'. "<--column which needs to be sorted
      wa_sort-tabname = 'IT_FINAL'. "<--internal table
      wa_sort-up = 'X'. "<--ascending order
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
      wa_sort-spos = 3. "<--sort preference
      wa_sort-fieldname = 'COL2'. "<--column which needs to be sorted
      wa_sort-tabname = 'IT_FINAL'. "<--internal table
      wa_sort-up = 'X'. "<--ascending order
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    *          DISPLAY RECORDS IN ALV GRID
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program                = sy-repid
          it_fieldcat                       = it_field
          it_sort                           = it_sort  "<--sort info
        TABLES
          t_outtab                          = it_final
    Hope this helps you.
    Regards,
    Tarun

  • Suppress Decimals for CURR field in ALV Grid based on condition

    Hello All,
    I am displaying records in ALV Grid. For a Company Code, I get the Currency Code from table T001.
    If the Currency is JPY, I want to display the value of CURR field without decimals.
    For example: if the value is 200.00, I want to display only 200
    But if the Currency is other than JPY, I want to display value with decimals.
    For example: if the value is 200.00, I want to display only 200.00
    Also I want the summation function to work on this column, so can't take the field as char field.
    Waiting for useful pointers.
    Thanks in advance,
    Regards,
    Tarun Gambhir

    Hi Keshav,
    Thanks for the reply.
    I have only one CompCode on the selection screen and for that CoCd I will have only one Currency.
    So either all records will be displayed with decimals or all records will be displayed without decimals.
    Can DECIMALS_OUT property of field catalog be helpful in this case.
    For reference you can check: http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649a6f17411d2b486006094192fe3/content.htm
    I am confused over the use of DECIMALS_OUT.
    Please suggest.
    Regards,
    Tarun

  • How to detect a selected row in ALV GRID

    Hi,
    Can anyone tell me how to detect and catch an event when a row is selected in an ALV GRID?
    I would like to catch such event when the end user presses Ctrl + Shif + Space bar.
    Thank you and best regards.
    Hassane.

    Hi,
    Use this wiki link, to have a checkbox with all the records in ALV Grid and to process those selected records at a user command, as per the requirement.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Conversion of Unit of Measure in ALV Grid

    Hi all,
    I am using function 'REUSE_ALV_GRID_DISPLAY' to display some records in ALV grid. The record displays material, the quantity of the material consumed and the unit of measure (UoM) of the quantity. I am fetching the data from the table AUFM and the field I am using for UoM is ERFME.
    The problem is that when the UoM is displayed in the ALV, it is displayed as KAR but when i print the report or check the print preview, the UoM is displayed as CAR. I want to display CAR also in the ALV.
    I have tried using the function 'CONVERSION_EXIT_CUNIT_OUTPUT' which converts the KAR to CAR in the ALV, but when I print it or check the print preivew ,  it shows asterisks (*) in the UoM field.
    Can anyone tell me why this is happening and how I can solve this problem? Any help will be greatly appreciated.
    Regards,
    Hamza

    Hi Ozkar,
    I tried the function 'CONVERSION_EXIT_CUNIT_OUTPUT', it worked fine when displaying the UoM in the ALV, meaning it displayed CAR instead of KAR, but when I printed the list or chicked the print preview, it displayed stars (***) in the UoM field.
    Anyway, I tried something else and now it is working fine. I am writing below what I did so that if anyone else has this problem, they can also do what I did.
    As I said before, the UoM field was showing KAR instead of CAR in the ALV. So after passing the data to an internal table which would be used to display the data in the ALV, I called the function 'CONVERSION_EXIT_CUNIT_OUTPUT' and converted KAR to CAR. this displayed CAR in the ALV.
    Now, to also get CAR in the print out and print preview,I declared variables gt_event_exit and lt_event_exit.
    DATA: gt_event_exit TYPE  STANDARD TABLE OF slis_event_exit,
               lt_event_exit TYPE slis_event_exit.
    The variable will 'lt_event_exit' will contain the function codes of the Print(&RNT) and Print Preview (&RNT_PREV) buttons on the ALV. In the form where I am calling the function 'REUSE_ALV_GRID_DISPLAY', I pass the function codes to lt_event_exit and append it to the internal table gt_event_exit.
      lt_event_exit-ucomm = '&RNT'.
      lt_event_exit-before = 'X'.
      APPEND lt_event_exit TO gt_event_exit.
      lt_event_exit-ucomm = '&RNT_PREV'.
      lt_event_exit-before = 'X'.
      APPEND lt_event_exit TO gt_event_exit.
    Next I pass this table to the parameter 'IT_EVENT_EXIT' of 'REUSE_ALV_GRID_DISPLAY'. I also create a form USER_COMMAND and pass this form to the parameter 'I_CALLBACK_USER_COMMAND' of 'REUSE_ALV_GRID_DISPLAY' as shown below.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
                 I_CALLBACK_USER_COMMAND = 'USER_COMMAND '
                 IT_EVENT_EXIT                          = gt_event_exit
    What the above does is that, when a user clicks on the print or print preview button, the system instead of printing the list, it passes the control to the form USER_COMMAND. After the form is processed, it prints the list.
    In the form, I placed a loop on the internal table containing the data to be shown and simply converted the CAR back to KAR. The code is given below.
      FORM user_command USING  r_ucomm LIKE sy-ucomm
                              rs_selfield TYPE slis_selfield .
        CASE r_ucomm .
          WHEN '&RNT' OR '&RNT_PREV'.
            LOOP AT i_final .
              CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
                 EXPORTING
                   input = i_final-erfme
                   language = sy-langu
                 IMPORTING
                   output = i_final-erfme
                 EXCEPTIONS
                   unit_not_found = .
              MODIFY i_final.
            ENDLOOP.
       WHEN .
       WHEN OTHERS.
        ENDCASE.
    I hope this is helpful to anyone who has the same problem as I did. Now what I cant figure out is why the system automatically converts KAR to CAR when displaying print preview or when printing the list.
    Well, thanks anyway for the suggestion Ozkar.
    Regards,
    Hamza

  • Requirement on ALV Grid

    Hi I am displaying an output on ALV Grid.
    My requirement is, If i select one record on Alv Grid,with Corresponding fields from ALV i have to populate one screen.
    So I should go Interactive ALV ?..
    I never worked on Interactive ALV.
    Can any one plz help on this...........

    Hi,
    U have to use the Events.
    Register the Events or Simply
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = it_events
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc = 0.
        SORT it_events BY name.
      ENDIF.
    FORM user_command USING rucomm       TYPE sy-ucomm          "#EC CALLED
                            rs_selfield  TYPE slis_selfield   .
      IF rucomm = '&IC1'.
    Endif.
    EndForm.
    Please let me know for any more solutions.
    Affable
    Arbind

  • How to keep track of the changes done in ALV GRID Report

    Hi Experts,
    how to keep track of the changed record in ALV GRID Report. how to set the field to be editable even for the entire row also. Can anybody guide along with code also?...
    Valuable answers will be rewarded.
    Thanks,
    Satish.

    Hi,
    Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
    01 O 1001 B002 Activate box checked
    01 O 1001 B003 Activate box checked
    Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
    If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
    Similarly, you can set up this table for other object types.
    For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
    Hope this helps.
    Donnie

Maybe you are looking for