ALV-Grid and update dynpro fields

Hi!
I've created a dynpro with an ALV-Grid for Data-Overview and fields on the dynpro to change additional data.
My ALV has one editable column, when this value change I calculate other value for  a field dynrpo, but I canu2019t see this change in my field dynpro.
How can I update my data filed dynpro when changing the selected row at the ALV.
I use the method handle_data_changed to obtain changes in ALV-Grid and it works fine, but I canu2019t update my fileds on the dynpro, when changing value in ALV.
Thanks for any hints!
Lili.

This error occurs becuase when you change anything on the ALV, control is not triggering the PAI and PBO of your dynpro. Hence your values are not getting updated in the dynpro field.
You should call the CL_GUI_CFW=>DISPATCH in PAI module to trigger the PAI also after the event has been triggered in the ALV.
  CALL METHOD CL_GUI_CFW=>DISPATCH
    importing return_code = return_code.
* a control event occured => exit PAI
  if return_code <> cl_gui_cfw=>rc_noevent.
    clear g_ok_code.
    exit.
  endif.
Regards,
Naimesh Patel

Similar Messages

  • Re: creating check boxes in ALV grid using web dynpro

    Hi Techies,
       I need to have a check box column in alv grid, and it should allow me to select the check box and the selected row has to be updated in the database.
      Kindly assist me with the steps to handle the above mentioned scenario
    Thanks in advance.

    Now to first make the last column of my ALV as a checkbox:
    method BUILD_ALV .
      data: l_ref_cmp_usage type ref to if_wd_component_usage.
    " Instantiate the ALV usage
      l_ref_cmp_usage =   wd_This->wd_CpUse_My_Alv( ).
      if l_ref_cmp_usage->has_active_component( ) is initial.
        l_ref_cmp_usage->create_component( ).
      endif.
    " Get reference to the model
      DATA: l_ref_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_My_Alv( ).
      data: lr_config type ref to Cl_Salv_Wd_Config_Table.
      lr_config = l_ref_INTERFACECONTROLLER->Get_Model( ).
    |" Set read only mode to false (and display edit toolbar)
      lr_config->if_salv_wd_table_settings~set_read_only( abap_false ).
      data: lr_table_settings type ref to if_salv_wd_table_settings.
      lr_table_settings ?= lr_config.
      lr_table_settings->set_read_only( abap_false ).
      data: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lt_columns         TYPE        salv_wd_t_column_ref,
            lr_checkbox1        TYPE REF TO cl_salv_wd_uie_checkbox,
            lr_checkbox2        TYPE REF TO cl_salv_wd_uie_checkbox.
      FIELD-SYMBOLS <fs_column> LIKE LINE OF lt_columns.
    "  Embed the UI elements within the ALV
      lr_column_settings ?= lr_config.
      lt_columns = lr_column_settings->get_columns( ).
    " Embed an checkbox within the column APPROVE
      LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'APPROVE'.
            CREATE OBJECT lr_checkbox1
              EXPORTING
                checked_fieldname = <fs_column>-id.
            <fs_column>-r_column->set_cell_editor( lr_checkbox1 ).
            FREE lr_checkbox1.
        ENDCASE.
      ENDLOOP.
    ENDMETHOD.                    "BUILD_ALV

  • Subtotal Text in ALV Grid and hiding empty row

    Hello,
    ive got a ALV-Grid with a few fields .. Total on one field subtotal on VKORG, category or some other fields .
    after subtotal of one of the 2 named fields i'm reading the literal to the given fields and writing them in the table which is displayed and do a refresh.
    i can show the field literal in the alv by adding it into the field cat but than its displayed even if its not filled.
    i just want to display that column after filling it - the subtotal of the 2 columns.
    and i want to add the text of  the literal to the subtotal line. so if the alv grid is closed to display the totals. i want to see what the subtotal is for.
    for displaying i use        
    CALL METHOD lcl_alv_grid->set_table_for_first_display
          EXPORTING
            is_layout            = gs_layout
            is_variant           = gs_variant
            it_toolbar_excluding = gt_exclude
            i_save               = x_save
            i_default            = 'X'
          CHANGING
            it_outtab            = it_alvlist[]
            it_fieldcatalog      = gt_field_cat.
    for refresh 
        lv_lvc_s_stbl-row = 'X'.
        lv_lvc_s_stbl-col = 'X'.
        lv_soft_refresh = 'X'.
        CALL METHOD lcl_alv_grid->refresh_table_display
          EXPORTING
            is_stable      = lv_lvc_s_stbl
            i_soft_refresh = lv_soft_refresh
          EXCEPTIONS
            finished       = 1
            OTHERS         = 2.
    get the selected column to read literal
    CALL METHOD lcl_alv_grid->get_selected_columns
        IMPORTING
          et_index_columns = it_col_tab
        EXCEPTIONS
          OTHERS           = 1.
    Hope you can help me and understand my problem

    Hi,
    Use the No_out from Reusable types of fieldcat..For example.
    IF it_final-field is initial.
            READ TABLE IT_FIELDCAT5 WITH KEY FIELDNAME = 'BCD'.
            IF SY-SUBRC EQ 0.
              IT_FIELDCAT5-NO_OUT = 'X'.
              MODIFY IT_FIELDCAT5 INDEX SY-TABIX TRANSPORTING NO_OUT.
            ENDIF.
    else.
            READ TABLE IT_FIELDCAT5 WITH KEY FIELDNAME = 'BCD'.
            IF SY-SUBRC EQ 0.
              IT_FIELDCAT5-NO_OUT = ' '.
              MODIFY IT_FIELDCAT5 INDEX SY-TABIX TRANSPORTING NO_OUT.
            ENDIF.
    ENDIf.
    Cheers,
    Syed Maheboob.

  • ALV GRID  and Integrated ITS 7 (SAP GUI for HTML) - dissapears on reload

    Hi All,
    We have a custom report that uses an ALV grid to display information to the user. Within this grid, there are fields that are display only and fields that are editable. Also, the grid is wider than the screen's width. It works fine in ECC. It also worked fine when we were using ITS 6.4.
    We have recently upgraded to ITS 7. Now when we run the report using a Transaction iView (in EP 7) or the Webgui service (SAP GUI for HTML), if a field that is editable has focus when an event is triggered that reloads the grid, the screen becomes blank. So, you can click the Save button and the screen goes blank, also, there are date fields in the grid and if you choose a new date, the grid reloads and the screen becomes blank.
    We have found that when the screen is blank, you can use the "Page Up" button on your keyboard and the last few columns of the grid will appear. As if the entire grid has moved off-screen to the left.
    If you click onto a non-editable field and refresh or save, the grid returns to its normal state.
    We are on Basis Patch level 15.
    Does anyone have any ideas on how to fix this?
    Also, does anyone know of a standard SAP transaction we can call from the Webgui that would have a similar setup...with an ALV grid containing editable and non-editable fields? We would like to rule out any errors in the report itself. Since it worked before we upgraded and it works fine in ECC. This would be a really big help too.
    Thank you so much!
    -Kevin

    Hi,
    Thanks Raymond, I have seen Note 314568. I could not get the second link to work but I have looked at just about every Note in reference to Integrated ITS 7 and Tables or ALV Grids and there are very many, so it would appear that SAP has had a hard time with implementing this control, but I have not seen any instance that matches the problem we are having.
    Unfortunately, SAP will not investigate this unless we can provide a standard Transaction that exhibits the same behavior.
    If anyone knows of a standard SAP Transaction that displays an ALV Grid that is wider than the screen (requiring a horizontal scroll bar) and with editable and non-editable fields, that would be fantastic. If we can test against that, then we would know for sure if this is a problem with ITS / SAP GUI for HTML, or if there is an issue with this specific report.
    Thanks!
    -Kevin

  • ALV Grid and Icon : Printing Problem

    Hi, i develop some reports using ALV Grid and Icon and i'm facing printing problem, all report that using ALV grid with the option icon = 'X' cannot print properly, all the character field showing improper icon instead of the text. While all the ALV grid report with the option icon = ' ' can print normally.
    Thanks.

    Hi,
    Check the Demo Program <b>BCALV_DEMO_TOOLTIP</b>, Here i am able to see the Output Properly, and also able to Print them.
    Regards
    vijay

  • ALV Grid and return to selection screen

    Hello
    I have an ALV Grid and when I push a buttom that I program appears another ALV Grid. In this second ALV I try to program different buttoms. When I program the BACK buttom I want to go to selection screen.
    I try with CALL SELECTION SCREEN but when I stay in selection screen and push the execute buttom the ALV that I see is the second, not the first. It seems that we don't catch the news selections.
    I put rs_selfied-refresh = 'X' after the CALL SELECTION SCREEN but is wrong again.
    What can I do????

    Hello Silvia
    There is a simple trick to return from the second ALV list directly back to the selection screen:
    *& Report  ZUS_SDN_REUSE_ALV_GRID_DISPLAY
    REPORT  zus_sdn_reuse_alv_grid_display.
    TYPE-POOLS: slis.
    DATA:
      gt_t001        TYPE STANDARD TABLE OF t001,
      gt_knb1        TYPE STANDARD TABLE OF knb1.
    DATA:
      gs_fcat        TYPE slis_fieldcat_alv,
      gt_fcat_t001   TYPE slis_t_fieldcat_alv,
      gt_fcat_knb1   TYPE slis_t_fieldcat_alv.
    PARAMETERS:
      p_bukrs        TYPE bukrs  DEFAULT '1000'.
    START-OF-SELECTION.
      SELECT * FROM  t001 INTO TABLE gt_t001.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_PROGRAM_NAME               =
    *     I_INTERNAL_TABNAME           =
          i_structure_name             = 'T001'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_INCLNAME                   =
    *     I_BYPASSING_BUFFER           =
    *     I_BUFFER_ACTIVE              =
        CHANGING
          ct_fieldcat                  = gt_fcat_t001
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      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 FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK                 = ' '
    *     I_BYPASSING_BUFFER                = ' '
    *     I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = syst-cprog
          i_callback_pf_status_set          = 'ALV_SET_PF_STATUS'
          i_callback_user_command           = 'ALV_USER_COMMAND'
    *     I_CALLBACK_TOP_OF_PAGE            = ' '
    *     I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *     I_CALLBACK_HTML_END_OF_LIST       = ' '
    *     I_STRUCTURE_NAME                  = ' '
    *     I_BACKGROUND_ID                   = ' '
    *     I_GRID_TITLE                      =
    *     I_GRID_SETTINGS                   =
    *     IS_LAYOUT                         =
          it_fieldcat                       = gt_fcat_t001
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER           =
    *     ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_t001
    *   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.
    END-OF-SELECTION.
    *&      Form  set_pf_status
    *       text
    *      -->RT_EXTAB   text
    FORM alv_set_pf_status USING rt_extab TYPE slis_t_extab.
    * NOTE: identical to STANDARD_FULLSCREEN with additional button
    *       for detail list ('DETAILLIST')
      SET PF-STATUS 'STANDARD_FULLSCREEN'.
    ENDFORM.                    "set_pf_status
    *&      Form  alv_user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM alv_user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    *   Display detail list: all customers for selected company code
        WHEN 'DETAILLIST'.
          IF ( rs_selfield-fieldname = 'BUKRS' ).
            SELECT        * FROM  knb1 INTO TABLE gt_knb1
                   WHERE  bukrs  = rs_selfield-value.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
    *         I_INTERFACE_CHECK                 = ' '
    *         I_BYPASSING_BUFFER                = ' '
    *         I_BUFFER_ACTIVE                   = ' '
                i_callback_program                = syst-cprog
                i_callback_pf_status_set          = 'ALV_SET_PF_STATUS'
                i_callback_user_command           = 'ALV_USER_COMMAND'
    *         I_CALLBACK_TOP_OF_PAGE            = ' '
    *         I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *         I_CALLBACK_HTML_END_OF_LIST       = ' '
                i_structure_name                  = 'KNB1'
    *       IMPORTING
    *         E_EXIT_CAUSED_BY_CALLER           =
    *         ES_EXIT_CAUSED_BY_USER            =
              TABLES
                t_outtab                          = gt_knb1
              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.
    <b>*       NOTE: when the program logic returns from the 2nd ALV list
    *             and exit = 'X' then the program leaves the
    *       1st ALV list, too, and returns to the selection screen.</b>
            rs_selfield-exit = 'X'.
          ENDIF.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "alv_user_command
    Regards
      Uwe

  • How to update Tr code FB02   and update the field reference key1 (bseg-xref

    Can any body
    help me how to update   Tr code   fb02
    and  update the field  reference  key1 (bseg-xref1)  with the interest amount
    calculated.
    Below i have  written My  program  flow logic
    The program should read the open items i.e debit items in the customer account,
    Based on the  invoice date and customer payment terms  calculate the due date and then the  interest should be  calculated on that item based on the due date.
    Use the  transaction  fb02  and update the field  reference  key 1 (BSEG-xref1)
    with the interest amount calculated
    Only  consider  customers whose  interest indicator  knb1-vzskz = 'vk'.
    Interest is to be  calculated for every  30  days
    at the rate of  1% .please see example below.
    Document date is 01.01.2007
    for amount  1000SGD   payment  term  7  days
    It becomes  due  on  08.01.2007
    until  06.02.2007 you should not  consider  for calculation of interest
    SGD  on   7.02.2007 run you can consider this  item for interest calculation

    Hi Robert,
    Thanks for answering.
    I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
    Ex: Billing document is created and accounted. Ref 2 is AB
    Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
    Thanks
    NNS.

  • Help me in alv grid and form printing

    hi experts,
    my requirement is
    i have a check box in the selection screen for  batch processing.
    if i  tick the check box,  the  data  which is in the  t_output  table  should be displayed in alv grid  and
    in turn if i select  one row  in alv o/p  and double click on it  the entire data shold be displayed in the form.
    if 2 rows are selected in alv  and double clicked on it then data in the two rows is dispalyed in the form.
    points  are rewarded .
    thanks in advance.

    Hi,
    Check the following link:
    http://sapdev.co.uk/reporting/alv/alvgrid_rowsel.htm
    Regards,
    bhaskar

  • ALV REPORT: read selected checkbox in alv grid and process the pushbutton

    my requirement is to check some rows from alv grid and the press the pushbutton. Thereby following things should process:
    select all checked rows into an itab and call the transaction code CJ01 for all
    entries......
    I am finding the problem that when I select the checkbox....the internal table doesnt recognize the boxes as checked ones......
    thanks in advance...
    Kartikey Singh,

    Data: ref1 type ref to cl_gui_alv_grid.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              E_GRID = ref1.
          call method ref1->check_changed_data.
          loop at t_output where Flag = 'X'.
            if t_output-VKUEGRU is initial.
              message e000 with text-110.
            endif.
    endloop.

  • FM : to call collective Search help and update two fields in SSCR

    Hi Experts,
         I have problem while using collective serach help.
        My scenario is using Collective Search help thru that i want to update 2 fields in my selection screen.
    Thru this function module F4IF_INT_TABLE_VALUE_REQUEST  i can mapping and update two fields using DYNP_VALUE_UPDATE but using this function module i can't able to call my Collective Search help
    in other way
    Thru F4IF_FIELD_VALUE_REQUEST  i can able to call the collective search help but _i can't mapping field and can't updated the
    selection screen field_
    Is any otherway to do it, Please help me ASAP.
    Regards,
    Florian.

    Hi Friends,
    I have the similar kind of requirement. Upon click on a Button on screen i need to call a search help, and collect one or more selected material numbers.
    The search help is working fine and i am getting the entries with the following code.
    The problem is i am finding extra popup on screen.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname         =  space
    fieldname       =  space
    SEARCHHELP      =  'MAT1'
    MULTIPLE_CHOICE =  'X'
    STEPL           =  0
    value           = 'MATNR'
    *dynpprog        =  progname
    *dynpnr          =  dynnum
    *dynprofield     = 'CARRIER'
    CALLBACK_PROGRAM          = 'ZTEST_1_PRA'
    CALLBACK_FORM             = 'F4CALLBACK'
    TABLES
    RETURN_TAB                = RETURN_TAB
    EXCEPTIONS
    FIELD_NOT_FOUND           = 1
    NO_HELP_FOR_FIELD         = 2
    INCONSISTENT_HELP         = 3
    NO_VALUES_FOUND           = 4
    OTHERS                    = 5.

  • Report with two ALV grids and a header

    Hi experts,
    I have a report with two ALV grids in the same screen, each one in a separated container. The information displays it correctly. The report has been implemented by using OO Programming.
    My real trouble is in the header. It must have a logo, a title with a specific font and other information.
    I'll attach a capture of my need:
    [Report with two ALV grids and a header|http://picasaweb.google.com/lh/photo/AcQD49QPmm-0L_jL2iMedA?feat=directlink]
    Then, I want to set up the header you can see, with logo, a font with specific features. Obviously, the header you see has taken from another report. But is the same idea.
    I've tried with a third container, using the CL_GUI_CONTAINER and CL_GUI_CONTAINER classes, but it doesn't work.
    Any idea? Would welcome any help you can provide.
    Thanks in advance,
    Jorge Rojas

    Hi, Jorge.
    Should the header be a"attached" to any of the ALV? Or it should be carried alone?
    If first applies, you've given the solution yourself: put the info & logo in first ALV's header and invoke it from the proper method.
    You could use CL_GUI_DOCKING_CONTAINER CLASS to divide screen in several containers and then, in the upper one, I would create another one docking container to divide the screen into two: the written info could be performed with an HTML viewer class and the logo with a CL_GUI_PICTURE element.
    Cheers.

  • ALV Grid and ALV List difference?

    Hello,
    Can you help me differentiate ALV List and ALV grid and the low-level definition or context of each?
    Also, can you give me a transaction code that outputs an ALV list as well as a tcode for ALV grid?
    Thanks,
    Jennah

    Hi Kirtish,
    Thanks but I  havent done any function module stuff as I am not an ABAPer but anyway can you guide me through thios?
    "I hope this might slove your query. For more please refer to documentation on ALV and also implement the ALV LIST and GRID reports. By using class Class CL_GUI_ALV_GRID, Function module REUSE_ALV_LIST_DISPLAY , REUSE_ALV_GRID_DISPLAY and some more functions like that only."
    I will give you some tcode can you please try tcode FBL1n? then execute the report. What is the output is it an ALV list?
    I wish to see an ALV list also an ALV grid to see difference.
    Tjhakns,
    Jennah

  • Alv Grid and Table Control

    What is the difference between Alv Grid and Table Control?Explain in detail..

    Table control is a screen table to display table data in a screen. You can add table control to a screen in the Screen Painter. The typical flow-logic to process table control is:
    LOOP AT <internal table> CURSOR <scroll-var>
    [WITH CONTROL <table-control> ]
    [FROM <line1> ] [TO <line2> ].
    ...<actions>...
    ENDLOOP.
    ALV Grid is a SAP Technology to display a set of data on the output screen. For example if you have selected some SAP tables and processed these data in a way you want to display, then you can pass the internal table to the ALV Grid and it will be displayed on the result screen as ALV Grid. See example in SE16 result.

  • ALV Grid and LIST?

    HI all,
    Diff between ALV GRID and ALV LIST?
    sachin.

    Hi,
    ckeck these differences.
    first one is for list display and second one is for grid display.
    For all practical purposes, they are the same.
    2. Some differences:
    a) from abap coding point of view,
    alv list is done with Function modules,
    alv gris can also be done with FM,
    but can also be done using OO concepts.
    b) Alv grid (using oo concept) requires
    designing the screen layout .
    Hence, in one screen, we can show more
    then one alv grid
    (we cannot show more than
    one alv list on one screen)
    c) ALV grid uses ActiveX controls
    present on the Presentation Server.
    Hence, it consumes More Memory
    on the presentation server.
    d) ALV LIST is Display Only.
    Whereas
    ALV Grid Can Be made EDITABLE for entry purpose.
    e) In alv grid, these options are possible,
    but not in alv list.
    without horizontal lines
    without vertical lines
    without cell merging during sorts
    display total lines above the entries
    ALV LIST Can be coded using only FMs
    ALV GRID Can be coded using FMs and object oriented concepts
    ALV LIST Can be displayed hieraicharlly
    ALV GRID cannot be displayed hierarichally.
    reward points if hlpful.

  • Display totals on the first line in ALV grid and ALV LIST

    Generally we wll display totals at the end..
    bu the requirement is to display it in the first line of the column.
    how to display the totals in the first line?
    I have used ALV GRID and ALV LIST (choice) using function modules.
    Plz help me
    .for example : Po qty : Should display total po qty on the first line of the Po line item.

    IN LAYOUT
    ILAYOUT-totals_before_items = 'X'.
    REGARDS
    SHIBA DUTTA

Maybe you are looking for

  • Problems with a manually created Classic BADI

    Hello. When Implementing note 1632640, we manually created a Classic BADI named HRPAYPT_CA_SURCHARG (instead of the correct name HRPAYPT_CA_SURCHARGE). When we realized this, we've deleted the implementation ZHRPAYPT_CA_SURCHARG and the BADI Definiti

  • End of support of Windows XP

    Hi Afetr 8th of April, what will happen with daylight saving time updates, and other updates? Is there going to be any updates at all? BR Shay Hanya

  • AD Provisioning - 11gR2

    I have the AD reconciliation working and it's importing users into OIM from AD. My AD connector is set as a trusted resource. I am trying to now provision users from OIM to AD, including updating users that were imported from AD. I create a user in O

  • Purchase song from another itunes store

    i want to purchase song from us itunes store unfortunately i can't purchase because my account only for malaysia purchasing.what should i do if i still want purchase this song?does itunes gifts works for this problem?please let me know how to solve t

  • I made an iMovie and I would like to have a DVD made.

    I made an iMovie and I would like to have a DVD made for my mother. How do I do this? Is there a website I use? When I press Share, my only option are to upload to Facebook, youtube etc.  I would like to have a DVD made so I can present as a gift and