‎2019 Sep 18 7:47 AM
Hi,
I hope everyone is doing great today.
I have a program that requires to ignore or skip or just retain lines of codes that are commented out. Does anyone know the syntax to retain the codes.
Sample:
*Case 1: This is to change all c to mara (--->this is just a Comment)
Data: lv_matnr(18) type c.
The result should be that only the 'c' inside the Data Declaration will be changed. The syntax shouldn't change the 'c' in
*Case 1: This is to change all c to mara (--->this is just a Comment) .
Thanks.
‎2019 Sep 18 7:53 AM
Hi,
Are you trying to do 'Find and replace' and there want to ignore some lines?
If yes, you can find 'Type c' and then replace with 'Type Matnr'. There are no rules that you can set in 'find and replace' to ignore commented lines.
Regards
GK
‎2019 Sep 18 12:23 PM
hi,
I do not understand what is your exact requirement. I am assuming that you are scanning codes of a program lines in another program. If you are storing all lines in a table, you just have to ignore lines starting with '*'.
‎2019 Sep 18 12:48 PM
Hi,
Could you please rephrase your requirement,we're having trouble understanding it.
For retaining lines of code (if this is the requirement) but skipping them without commenting it I always use:
If 1 = 2.
<code>
endif. "if 1 = 2
Kind regards, Rob Dielemans