1

I'd like to check hardcoded values in (a lot of) Smartforms and SAPScript forms.

I have found a way to read the source code of both of these, but it seems that i will have to go through a lot of parsing before I get anything reliable.

I've come across function module GET_LITERAL but that doesn't seem to help me much since i have to specify the offset of the value, if i got right what the function is doing in the first place.

I also found RS_LITERAL_LIST but that also doesn't do what i expect.

I also tried searching for reports and methods, but haven't found anything that seemed to help.

A backup plan would be to get some good parsing tool, so do you know of anything like that.

Anyway, any hints would be helpful and appreciated.

[EDIT] Forgot to mention, the version of my system is 4.6C

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
vlad-ardelean
  • 7,480
  • 15
  • 80
  • 124

1 Answers1

1

If you have a fairly recent version of ABAP, you can use a regex.

Follow the pattern of this example, but use your source as the text and create your own regex. Have it look for any single quotes on the end of a word separated by spaces or any integers with spaces on either side. That's just a start, you might need to work on a better pattern.

String functions count, find, and match

Eric
  • 1,511
  • 1
  • 15
  • 28
  • thank you for the answer, unfortunately my system is pretty ancient... 4.6C and i don't have a regular expression engine. The idea could have been very good though. – vlad-ardelean Sep 05 '13 at 08:17