0% found this document useful (0 votes)
332 views27 pages

Refresh ALV Grid Output in OOPs

Uploaded by

heavy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
332 views27 pages

Refresh ALV Grid Output in OOPs

Uploaded by

heavy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Refresh ALV Grid Output in OOPs

Former Member

‎02-20-2009 4:53 AM

0 Kudos

Hi all..

To refresh the ALV Grid, i have used REFRESH_TABLE_DISPLAY. The Grid is alone refreshed but not the actual
output.

I have searched all the threads, but dint find any methods to refresh the output.

I am refreshing the container, FieldCatalog and actual internal table before

grid->set_table_for_first_display.

Could anyone suggest, How to refresh the ALV Grid Output?

Thanks in advance.

SAP Managed Tags:


ABAP Development

Reply 10 REPLIES

Former Member

‎02-20-2009 5:01 AM

0 Kudos

Hi,

Check with this link.

Thanks,

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 1/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Neelima.
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 5:03 AM

0 Kudos

HI

Just try this code.

Here on double click ,the grid will be refreshed and the correspondung data will be displayed on

the same grid.

REPORT zalv.

TYPES : BEGIN OF stu,


carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
fldate TYPE sflight-fldate,
w_check,
END OF stu.
DATA:
fs_itab TYPE stu,
t_itab LIKE TABLE OF fs_itab.
DATA:
es_row_no TYPE lvc_s_roid,
r_grid TYPE REF TO cl_gui_alv_grid,
r_container TYPE REF TO cl_gui_custom_container.
DATA:
t_fcat TYPE lvc_t_fcat,
wa_fcat TYPE lvc_s_fcat.
DATA:
w_check.
DATA:
stbl TYPE lvc_s_stbl,
soft TYPE char01.

SELECT carrid connid fldate FROM


sflight INTO CORRESPONDING FIELDS OF TABLE t_itab.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 2/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

CALL SCREEN 100.

*----------------------------------------------------------------------*
* CLASS lcl_event_handler DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS on_double_click FOR EVENT double_click
OF cl_gui_alv_grid
IMPORTING es_row_no.
ENDCLASS. "lcl_event_handler DEFINITION

*----------------------------------------------------------------------*
* CLASS lcl_event_handler IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS lcl_event_handler IMPLEMENTATION.
METHOD on_double_click.
w_check = 'X'.

READ TABLE t_itab INTO fs_itab INDEX es_row_no-row_id.


SELECT carrid connid fldate FROM sflight INTO CORRESPONDING FIELDS OF
TABLE t_itab WHERE carrid EQ fs_itab-carrid AND connid EQ fs_itab-connid.
CALL SCREEN 100.

ENDMETHOD. " on_double_click


ENDCLASS. " lcl_event_handler IMPLEMENTATION
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'TEST'.
SET TITLEBAR 'TEST1'.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module SET_HANDLER OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE set_handler OUTPUT.
https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 3/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

IF w_check = 'X'.
CALL METHOD r_grid->refresh_table_display
EXPORTING
is_stable = stbl.
* i_soft_refresh = soft.
ENDIF.
CREATE OBJECT r_container
EXPORTING
container_name = 'CONTAINER'.
CREATE OBJECT r_grid
EXPORTING
i_parent = r_container.

wa_fcat-fieldname = 'W_CHECK'.
wa_fcat-coltext = 'CHECK'.
wa_fcat-checkbox = 'X'.
wa_fcat-edit = 'X'.
wa_fcat-col_pos = 1.
APPEND wa_fcat TO t_fcat.
CLEAR wa_fcat.

wa_fcat-fieldname = 'CARRID'.
wa_fcat-ref_table = 'SFLIGHT'.
wa_fcat-ref_field = 'CARRID'.
wa_fcat-col_pos = 2.
APPEND wa_fcat TO t_fcat.
CLEAR wa_fcat.

wa_fcat-fieldname = 'CONNID'.
wa_fcat-ref_table = 'SFLIGHT'.
wa_fcat-ref_field = 'CONNID'.
wa_fcat-col_pos = 3.
APPEND wa_fcat TO t_fcat.
CLEAR wa_fcat.

CALL METHOD r_grid->set_table_for_first_display

* EXPORTING
* i_structure_name = 'SFLIGHT'
*
* is_layout = wa
CHANGING
it_fieldcatalog = t_fcat
it_outtab = t_itab.

SET HANDLER lcl_event_handler=>on_double_click FOR r_grid.


ENDMODULE. " SET_HANDLER OUTPUT

Regards

Hareesh.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 4/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Edited by: Hareesh Menon on Feb 20, 2009 6:03 AM


SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 5:04 AM

1 Kudo

Hi Tharani,

while u set the table for display check whether the grid' is initial' ..if true thn display orelse refresh the grid..this way..it
works.....

in pbo..

if container is initial.

create object container


exporting
container_name = 'CCONTAINER'.

create object grid


exporting
i_parent = container.

call method grid->set_table_for_first_display


exporting
* i_buffer_active =
* i_bypassing_buffer =
* i_consistency_check =
i_structure_name = ' '
* is_variant =
* i_save =
* i_default = 'X'
* is_layout =
* is_print =
* it_special_groups =
* it_toolbar_excluding =
* it_hyperlink =
* it_alv_graphics =
* it_except_qinfo =
* ir_salv_adapter =

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 5/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

changing
it_outtab = <output table>
* it_fieldcatalog =
* it_sort =
* it_filter =
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.

else.
call method grid->refresh_table_display
* EXPORTING
* is_stable = is_stable
* i_soft_refresh =
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.
endif.

Regards,

Mdi.Deeba
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 5:05 AM

1 Kudo

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 6/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Hi,

IF gv_grid IS INITIAL.
CREATE OBJECT gv_custom_container
EXPORTING
container_name = gc_container.
CREATE OBJECT gv_grid
EXPORTING
i_parent = gv_custom_container.

* Creating ALV field catalog


PERFORM prepare_field_catalog.
* Define the layout
PERFORM prepare_layout.

* For refreshing ALV display


ELSE.
gv_set = gc_x.
ENDIF.

IF gv_set IS INITIAL.
CALL METHOD gv_grid->set_table_for_first_display
ELSE.
CALL METHOD gv_grid->refresh_table_display
EXCEPTIONS
finished = 1
others = 2.
ENDIF.

Refer the above code for refreshing alv grid.Hope it will be helpful to you.

Thanks,

Srilakshmi.
SAP Managed Tags:
ABAP Development

Reply

I355602
Advisor

‎02-20-2009 5:07 AM

0 Kudos

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 7/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Hi,

Try using:-

* to reflect the data changed into internal table


DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new

IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.

IF NOT ref_grid IS INITIAL.


CALL METHOD ref_grid->check_changed_data.
ENDIF.

Hope this helps you.

Thanks & Regards,

Tarun Gambhir
SAP Managed Tags:
ABAP Development

Reply

dev_parbutteea
Active Contributor

‎02-20-2009 5:07 AM

0 Kudos

Hi,

Modify your final internal table which you are displaying in your output first then call method:

modify i_alv_data from wa_alv_data index e_row-index.

wa_stable-row = e_row-index.

call method grid1->refresh_table_display

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 8/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

exporting

is_stable = wa_stable.
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 6:38 AM

0 Kudos

Hi,

Thanks a lot for your replies.

I have used all the methos you all specified, but it refreshing only the grid not the output.

In debugging, I am getting a new data into the internal table before grid display

Anyother suggestions??
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 11:03 AM

0 Kudos

Hi,

Check the below Link

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 9/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

Hope this helps you.

Regards,

Anki Reddy
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎02-20-2009 11:04 AM

0 Kudos

Also Check the below code

TYPE-POOLS : SLIS.

----

Tables *

----

TABLES:

VBRK,

VBRP.

----

Parameters and select options OR SELECTION SCREEN

----

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 10/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS:

S_VBELN FOR VBRK-VBELN.

SELECTION-SCREEN END OF BLOCK B1.

----

Internal Tables *

----

work areas

DATA: BEGIN OF IT_VBRP OCCURS 0,

VBELN LIKE VBRK-VBELN,

POSNR LIKE VBRP-POSNR,

UEPOS LIKE VBRP-UEPOS,

FKIMG LIKE VBRP-FKIMG,

NETWR LIKE VBRP-NETWR,

MEINS LIKE VBRP-MEINS.

DATA : END OF IT_VBRP.

----

Variables *

----

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 11/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

DATA : GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID,

GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC_ALV',

GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,

GT_FIELDCAT TYPE LVC_T_FCAT,

GS_LAYOUT TYPE LVC_S_LAYO,

V_FLAG VALUE 'X'.

***********************************************************************

Start of Program *

***********************************************************************

----

INITIALIZATION. *

----

INITIALIZATION.

----

S_VBELN-LOW = 1.

S_VBELN-HIGH = 1000000000.

S_VBELN-OPTION = 'EQ'.

S_VBELN-SIGN = 'I'.

APPEND S_VBELN.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 12/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

----

SELECTION-SCREEN *

----

AT SELECTION-SCREEN.

----

PERFORM VALIDATION.

----

START-OF-SELECTION *

----

START-OF-SELECTION.

----

PERFORM GET_DATA.

CALL SCREEN 0100.

----

END-OF-SELECTION *

----

END-OF-SELECTION.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 13/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

----

----

TOP-OF-PAGE *

----

TOP-OF-PAGE.

----

----

END-OF-PAGE *

----

END-OF-PAGE.

----

----

AT USER-COMMAND *

&----

*& Form VALIDATION

&----

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 14/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

text

----

--> p1 text

<-- p2 text

----

FORM VALIDATION .

SELECT SINGLE VBELN

FROM VBRK

INTO VBRK-VBELN

WHERE VBELN IN S_VBELN.

IF SY-SUBRC <> 0.

MESSAGE E000 WITH 'no billing documents found'.

ENDIF.

ENDFORM. " VALIDATION

&----

*& Form GET_DATA

&----

text

----

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 15/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

--> p1 text

<-- p2 text

----

FORM GET_DATA .

SELECT VBELN

POSNR

UEPOS

FKIMG

NETWR

MEINS

FROM VBRP

INTO TABLE IT_VBRP

WHERE VBELN IN S_VBELN.

ENDFORM. " GET_DATA

&----

*& Module DISPLAY_ALV OUTPUT

&----

text

----

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 16/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

MODULE DISPLAY_ALV OUTPUT.

IF V_FLAG = 'X'.

PERFORM DISPLAY_ALV.

PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT.

PERFORM PREPARE_LAYOUT CHANGING GS_LAYOUT.

CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

I_BUFFER_ACTIVE =

I_BYPASSING_BUFFER =

I_CONSISTENCY_CHECK =

I_STRUCTURE_NAME = 'VBRP'

IS_VARIANT =

I_SAVE =

I_DEFAULT = 'X'

IS_LAYOUT = GS_LAYOUT

IS_PRINT =

IT_SPECIAL_GROUPS =

IT_TOOLBAR_EXCLUDING =

IT_HYPERLINK =

IT_ALV_GRAPHICS =

IT_EXCEPT_QINFO =

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 17/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

CHANGING

IT_OUTTAB = IT_VBRP[]

IT_FIELDCATALOG = GT_FIELDCAT

IT_SORT =

IT_FILTER =

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.

CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT

EXPORTING

I_READY_FOR_INPUT = 1.

ELSE.

<b>CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY

EXPORTING

IS_STABLE =

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 18/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

I_SOFT_REFRESH =

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.</b>

ENDIF.

CLEAR V_FLAG.

ENDIF.

ENDMODULE. " DISPLAY_ALV OUTPUT

&----

*& Form DISPLAY_ALV

&----

text

----

--> p1 text

<-- p2 text
https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 19/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

----

FORM DISPLAY_ALV .

IF GR_ALVGRID IS INITIAL.

CREATE OBJECT GR_ALVGRID

EXPORTING

I_SHELLSTYLE = 0

I_LIFETIME =

I_PARENT = GR_CCONTAINER

I_APPL_EVENTS = space

I_PARENTDBG =

I_APPLOGPARENT =

I_GRAPHICSPARENT =

I_NAME =

EXCEPTIONS

ERROR_CNTL_CREATE = 1

ERROR_CNTL_INIT = 2

ERROR_CNTL_LINK = 3

ERROR_DP_CREATE = 4

OTHERS = 5

IF SY-SUBRC 0.
https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 20/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

ENDFORM. " DISPLAY_ALV

&----

*& Form PREPARE_FIELD_CATALOG

&----

text

----

<--P_GT_FIELDCAT text

----

FORM PREPARE_FIELD_CATALOG CHANGING P_GT_FIELDCAT TYPE LVC_T_FCAT.

DATA : LS_FCAT TYPE LVC_S_FCAT,

L_POS TYPE I.

L_POS = L_POS + 1.

LS_FCAT-FIELDNAME = 'VBELN'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 21/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

LS_FCAT-SCRTEXT_M = 'Billing Document'.

LS_FCAT-OUTPUTLEN = '10'.

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

LS_FCAT-FIELDNAME = 'POSNR'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

LS_FCAT-SCRTEXT_M = 'Billing Item'.

LS_FCAT-OUTPUTLEN = '6'.

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

LS_FCAT-FIELDNAME = 'UEPOS'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

LS_FCAT-SCRTEXT_M = 'Higher Level Item'.

LS_FCAT-OUTPUTLEN = '6'.

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 22/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

LS_FCAT-FIELDNAME = 'FKIMG'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

LS_FCAT-SCRTEXT_M = 'Invoice Quantity'.

LS_FCAT-OUTPUTLEN = '13'.

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

LS_FCAT-FIELDNAME = 'NETWR'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

LS_FCAT-SCRTEXT_M = 'Net Value'.

LS_FCAT-OUTPUTLEN = '15'.

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

LS_FCAT-FIELDNAME = 'MEINS'.

LS_FCAT-TABNAME = 'IT_VBRP'.

LS_FCAT-COL_POS = L_POS.

LS_FCAT-SCRTEXT_M = 'Unit of Measure'.

LS_FCAT-OUTPUTLEN = '3'.

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 23/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

APPEND LS_FCAT TO P_GT_FIELDCAT.

CLEAR LS_FCAT.

L_POS = L_POS + 1.

ENDFORM. " PREPARE_FIELD_CATALOG

&----

*& Form PREPARE_LAYOUT

&----

text

----

<--P_GS_LAYOUT text

----

FORM PREPARE_LAYOUT CHANGING P_GS_LAYOUT TYPE LVC_S_LAYO.

P_GS_LAYOUT-ZEBRA = 'X'.

P_GS_LAYOUT-GRID_TITLE = 'INVOICE DETAILS'.

P_GS_LAYOUT-SMALLTITLE = 'X'.

P_GS_LAYOUT-EDIT = 'X'.

ENDFORM. " PREPARE_LAYOUT

&----

*& Module STATUS_0100 OUTPUT


https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 24/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

&----

text

----

MODULE STATUS_0100 OUTPUT.

SET PF-STATUS 'CANCEL'.

SET TITLEBAR 'xxx'.

ENDMODULE. " STATUS_0100 OUTPUT

&----

*& Module USER_COMMAND_0100 INPUT

&----

text

----

MODULE USER_COMMAND_0100 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE TO SCREEN 0.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

WHEN 'EXIT'.
https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 25/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community

CALL TRANSACTION 'SE38'.

WHEN 'CHANGE'.

IF GR_ALVGRID->IS_READY_FOR_INPUT( ) = 0.

CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT

EXPORTING

I_READY_FOR_INPUT = 1.

ELSE.

CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT

EXPORTING

I_READY_FOR_INPUT = 0.

ENDIF.

ENDCASE.
SAP Managed Tags:
ABAP Development

Reply

Former Member

‎06-30-2009 11:24 AM

0 Kudos

HI,

It got solved. The Refresh Table Display is checked only if the Grid as value.

Where else i have called Refresh Table Display even before the grid is filled.
SAP Managed Tags:

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 26/27
10/6/24, 18:28 Refresh ALV Grid Output in OOPs - SAP Community
ABAP Development

Reply

https://community.sap.com/t5/application-development-discussions/refresh-alv-grid-output-in-oops/td-p/5239913 27/27

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy