Getting the displayed data from an ALV Grid.

ABAP, Java, BSP, etc.

Getting the displayed data from an ALV Grid.

Postby Amin3126 » Tue Nov 22, 2005 4:55 am

The situation is as follows:

I'm doing work in APO, specifically with regards to ?Display Characteristic Combinations? (transaction /SAPAPO/MC62). I must allow a user to delete selected lines for an ALV report and in turn delete the entries from the database.

To display the report a standard program /SAPAPO/TS_PSTRU_SE16 provides the container for the ALV Grid and also initialises a few parameters. The program calls a generated program which actually builds the displayed data table. The generated program also does the SET_TABLE_FOR_FIRST_DISPLAY. The reason a generated program is called is because the structure of the internal table is dynamic based on InfoCubes in APO.

I?ve copy the standard program and can get the copied program to call the correct generated programs. I can manipulate the layout, field catalogue. However the problem is that I cannot get to the data displayed as it does not get passed back to the calling program. I?ve tried copy the ALV grid class, adding a method to it that would provide the data. Then casting the object based on the standard class to an object based on the copied class (MOVE CLASS1 ?TO CLASS2). However this does not work. I get a casting error which in turn causes short dump. I know that the error can be caught but that does fix the problem.

Any help will be most appreciated.
Thanks.
Amin3126
.
.
 
Posts: 1
Joined: Tue Nov 22, 2005 4:55 am

Postby Manuela981 » Tue Nov 22, 2005 11:13 am

Hello Meurant.

Here is something that perhaps can help you.

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1.     WHEN
  2.     'SAVE' OR 'SAVE1'.
  3.  
  4.       CALL METHOD g_1->check_changed_data.
  5.  
  6.       PERFORM update.
  7.  
  8. MODIFY t9citi FROM TABLE t_1.
GeSHi ©


This method say your internel table to take the values you edit in your grid.

Regards Dörk.
Manuela981
..
..
 
Posts: 76
Joined: Wed Nov 09, 2005 1:33 pm


Return to Development Related

Who is online

Users browsing this forum: No registered users and 1 guest

cron