2016 Apr 11 5:13 AM
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.
2016 Apr 11 6:20 AM
FIND FIRST OCCURRENCE OF 'CALL TRANSACTION' IN TABLE lt_source MATCH LINE DATA(lv_line_count).
2016 Apr 11 6:20 AM
FIND FIRST OCCURRENCE OF 'CALL TRANSACTION' IN TABLE lt_source MATCH LINE DATA(lv_line_count).
2016 Apr 11 7:04 AM
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
2016 Apr 11 7:44 AM
This is exaclty what you need
FIND FIRST OCCURRENCE OF REGEX '[^*].(CALL TRANSACTION).*$' IN TABLE lt_source MATCH LINE DATA(lv_line_count).