cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP OOP Syntax help

jeff_broodwar
Active Participant
0 Likes
880

Hi Experts,

I'm having a problem accessing a table inside a method. I'm hoping someone can help formulate the correct syntax to accomplish this.

The scenario takes place after clicking on delete button of a custom class ALV. Through debug, I found only 1 variable (layout) accessible inside the method "Process_delete_records". I'd like to process the content of the table inside the method "Process_delete_records".

Here's the complete path of the table:

 

LAYOUT->FALV->CL_GUI_ALV_GRID_BASE->M_SELECTED_ROWS-ROW_ID

 

I attached some photos for your reference:

 

Debug screen1.jpgDebug screen2.jpgDebug screen3.jpgDebug screen4.jpg

Hope someone can help me with this.

Thank you,

Geoff

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Class CL_GUI_ALV_GRID_BASE has a method GET_SELECTED_ROWS_ID_BASE which will return the table ROW_TABLE which should contain all the selected rows. ROW_TABLE contains the ROW_ID you are looking for. Use the instance of CL_GUI_ALV_GRID_BASE to call this method to get the ROW_ID. Hope it helps. 

jeff_broodwar
Active Participant
0 Likes
@Sandra, thanks for your time, I can do oop, I just haven't explored the available methods, when I saw the GET_SELECTED_ROWS_ID_BASE Raghavendran already posted it here. Appreciate the time.
jeff_broodwar
Active Participant
@Raghavendran_Mohandoss spot on ! this is what I need, I was checking how to access the data from the path I provided when I checked other methods from this class and found it. I haven't tested it but when I saw your answer to this thread then you have confirmed my thoughts. Thank you sir.

Answers (0)