Skip to Content

Custom SAP Script Source code scanning

May 11, 2017 at 07:45 AM


avatar image


Can someone help me as I need some way to read the entire source code written in an SAP Script and take all that code in an internal table?

Basically, we are working on the automation of code remediation for HANA Migration process. We have built a tool which involve eclipse environment as well, where in we find the violations in the custom code written in: Custom Program, Custom Classes, Web-Dynpro, Forms, basically anywhere the custom code is written, in accordance to HANA migration rules of Custom code. And then we do the auto code remediation in the eclipse environment of the custom code and in the SAP gui as well. So, we have successfully achieved this automation for other objects except Adobe forms and SAP Script. For doing this we fetch all the custom code written in a particular object in an internal table and then proceed further. Thats why we need help in fetching all the custom code written in adobe forms in an internal table.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Rajkumar Narasimman May 16, 2017 at 06:50 AM

Hi Ankita,

Can you check FM READ_FORM.

Pass the following values in FM READ_FORM and the program lines are populated in table FORM_LINES

  • CLIENT - <Client ID>
  • FORM - <Form_name>
  • LANGUAGE - <Language ID>


Rajkumar Narasimman

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Rajkumar,

I was able to get all code from the custom SAP Script to an internal table as the FM worked fine.

Thank you.

Horst Keller
May 11, 2017 at 07:53 AM

The function module to read SAPScript text into an internal table is DOCU_GET.

Additionally you might need TEXT_INCLUDE_REPLACE, TEXT_SYMBOL_REPLACE, ...

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Horst,

DOCU_GET is used to get the documentation and we want to take all the code written in custom SAP Script into an internal table. TEXT_INCLUDE_REPLACE replaces the text with the lines of the text which is to be included, but we don't need to replace the code. Our objective is to just take all the existing custom code into an internal table.