Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Finding line no. within code present in internal table

akil_syed1
Explorer
0 Kudos

Hi all,

Consider the following scenario ,

I have 2 codes.

1. My first code has the name ZTEST_CODE and has the following set of lines say..100 lines

   1.

    :

    :

   :

    5. CALL transaction .....

    :

    :

    :

  

  100.

  

2. My second code has the following scenario...

     READ REPORT 'ZTEST_CODE' INTO lt_source.

     here lt_source is the internal table

My query was, in my second code i need to get the line no. of CALL transaction from code which is now present in lt_source.

please provide me the appropriate syntax to write in second code.....i searched it on google but unable to find it...

Thanks in advance,

Akil.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

FIND FIRST OCCURRENCE OF 'CALL TRANSACTION' IN TABLE lt_source MATCH LINE DATA(lv_line_count).

3 REPLIES 3

Former Member
0 Kudos

FIND FIRST OCCURRENCE OF 'CALL TRANSACTION' IN TABLE lt_source MATCH LINE DATA(lv_line_count).

0 Kudos

Hi,

if there is statement like this

*CALL TRANSACTION....

then find occurence will work inspite of the comment...

is there is any syntax to ignore the entire line if comment is present

0 Kudos

This is exaclty what you need


  FIND FIRST OCCURRENCE OF REGEX '[^*].(CALL TRANSACTION).*$' IN TABLE lt_source MATCH LINE DATA(lv_line_count).