Quantcast
Viewing all articles
Browse latest Browse all 8526

Re: To get a set of values just before a 'selected' row in a table

Hi Alice,

 

Try this.

 

READ TABLE itab1 WITH KEY colname = '123' TRANSPORTING NO FIELDS.

 

IF sy-subrc EQ 0.

  l_index2 = sy-tabix -1.

  l_index1 = l_index2 - 5.

 

  APPEND LINES OF itab1 FROM l_index1 TO l_index2 INTO itab2.

ENDIF.

 

Regards,

Jovee


Viewing all articles
Browse latest Browse all 8526

Trending Articles