Application Development and Automation 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: 
Read only

Custom SAP Script Source code scanning

0 Kudos
1,453

Hi,

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.

Thanks,

Ankita

1 ACCEPTED SOLUTION
Read only

rajkumarnarasimman
Active Contributor
0 Kudos
1,130

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>

Regards

Rajkumar Narasimman

4 REPLIES 4
Read only

retired_member
Product and Topic Expert
Product and Topic Expert
0 Kudos
1,130

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

Additionally you might need TEXT_INCLUDE_REPLACE, TEXT_SYMBOL_REPLACE, ...

Read only

0 Kudos
1,130

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.

Thanks.

Read only

rajkumarnarasimman
Active Contributor
0 Kudos
1,131

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>

Regards

Rajkumar Narasimman

Read only

1,130

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.