ALV Grid -> set_function_code

Die Objektorientierung mit ABAP®: Vererbung, Dynamische Programmierung, GUI Controls (u.a. ALV im OO).

ALV Grid -> set_function_code

Postby Travis2969 » Fri Jul 25, 2003 11:25 am

Hallo,

ich habe ein ALV Grid implementiert, und einen Status angelegt, mit dem ich die Toolbar des ALV Grid ersetze.
Im ALV ist die Toolbar mit no_toolbar ausgeblendet.

Im
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. MODULE user_command_0100 INPUT
GeSHi ©

sende ich den Function Code mittels

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. call method grid_garn->set_function_code changing c_ucomm = ok_code
GeSHi ©

an das ALV Grid.

Die Funktion wird dann auch ausgeführt, jedoch verwschwindet das Ergebnis der Funktion sofort wieder. D.h. wenn ich eine Summe über eine
Spalte bilde, wird die Summe gebildet, eine halbe Sekunde später verschwindet die Summe aber wieder.
Wenn ich die Funktion 'Sortieren' (&OUP) an das Grid sende, wird zwar sortiert, doch das rote Dreieck, das die aktuell sortierte Spalte anzeigt,
verschwindet ebenfalls sofort wieder.

PBO:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. MODULE status_0100 OUTPUT.
  2.   SET PF-STATUS 'S101'.
  3.   SET TITLEBAR 'T100'.
  4. ENDMODULE.                 " STATUS_0100  OUTPUT
  5.  
  6.  
  7. MODULE create_objects OUTPUT.
  8.   IF g_custom_container IS INITIAL.
  9.     CREATE OBJECT g_custom_container
  10.       EXPORTING container_name = 'CCCONTAINER'.
  11.     CREATE OBJECT grid_garn
  12.       EXPORTING i_parent = g_custom_container.
  13.   ENDIF.
  14.  
  15.  
  16. MODULE transfer_data OUTPUT.
  17.   CALL METHOD grid_garn->set_table_for_first_display
  18.     EXPORTING  "i_structure_name = '?'
  19.                is_layout        = gt_layout
  20.     CHANGING   it_outtab        = it_garn "it_garn
  21.                it_fieldcatalog  = gt_fieldcat.
  22. ENDMODULE.              
GeSHi ©


PAI:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. MODULE user_command_0100 INPUT.
  2.   MOVE sy-ucomm TO save_ok_code.
  3. *  MOVE ok_code TO save_ok_code.
  4. *  CLEAR ok_code.
  5.   CASE save_ok_code.
  6.     WHEN 'BACK'.
  7. *      CALL METHOD g_custom_container->free.
  8. *      CALL SELECTION-SCREEN 1000.
  9.       LEAVE TO SCREEN 0.
  10.     WHEN 'CANC'.
  11. *      CALL METHOD g_custom_container->free.
  12. *      CALL SELECTION-SCREEN 1000.
  13.       LEAVE TO SCREEN 0.
  14.     WHEN 'EXIT'.
  15.       CALL METHOD g_custom_container->free.
  16.       LEAVE PROGRAM.
  17.     when others.
  18.       call method grid_garn->set_function_code changing c_ucomm =
  19.                                                           save_ok_code.
  20. *      call method grid_garn->set_user_command exporting i_ucomm =
  21. *                                                          save_ok_code.
  22. *
  23.  
GeSHi ©
Travis2969
.
.
 
Posts: 1
Joined: Fri Jul 25, 2003 11:25 am

Postby Emre397 » Fri Jul 25, 2003 12:10 pm

Hi,

ist leider schon etwas länger her, daß ich den guten alten ALV Grid verwendet hab. Aber so wie das Aussieht, rufst du die methode set_table_for_first_display im jeden Durchlauf des PBO´s auf. Dies initialsiert aber alles...
Solltest sicher gehen, daß
CALL METHOD grid_garn->refresh_table_display aufgerufen wird.

Gruß Azreal
Emre397
...
...
 
Posts: 141
Joined: Mon Dec 09, 2002 1:53 pm


Return to ABAP Objects®

Who is online

Users browsing this forum: No registered users and 11 guests