Application Development 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: 

Help Me Automate Code Inspector Via BDC Or FM

0 Kudos

Hello Gurus,

Due to some requirement, I am trying to run Code Inspector (SCI) from within an abap program in the background. The idea is to pass object set, name and variant from the program and get it executed. BDC is not working as clicking execute throws control back to SHDB. I have not found any FM yet that can do this. So I ask, has anyone worked on this before? Can you point me in the right direction? It will be of much help if you can

1 ACCEPTED SOLUTION

0 Kudos

I have successfully solved my problem and found a way to automatically generate inspections via program.

Follow this link and use the code snippet there and it should work perfectly:

http://scn.sap.com/people/christian.drumm/blog/2009/12/30/continuous-integration-using-code-inspecto...

9 REPLIES 9

Jelena
Active Contributor
0 Kudos

Google -> 'automate Code Inspector site:sap.com' is not helping?

0 Kudos

I have tried that already but could find no useful solution. That is why I posted the question here. If anyone has an idea, kindly share with me.

0 Kudos

If you didn't find any FM (how did you search?) look for class and method...

Hint: look at package or use search tool.

Regards,

Raymond

0 Kudos

Hi Raymond,

I have been going through the package. Here are the things that have taken place so far:

1) BDC does not work as it does not capture the Execute step.

From the package:

2) Program RS_CI_INSPECTOR can create new inspection but you have to pass an existing Object Set. That defeats the purpose if you have to go to SCI and create object set.

3) I have been tinkering with the methods in class CL_CI_OBJECTSET but do not seem to find anything that can create an object set for packages. All the create methods need some reference of an existing object set or a transport or something like that. Nothing to create one from scratch.

So at the moment, if there is a way to create an object set from the report, that will do as well since we can just pass it to RS_CI_INSPECTOR.

Basically the whole report is a tool that is run for any new system once and it presents a bunch of data. There are many steps that are done one by one and one of the steps is the code inspector step. We do not want to go out of the report and run SCI manually as this lessens the effectiveness of the tool. Everything should work step by step from the report itself.

Any help will be extremely useful. I would like to reiterate that I have gone through a number of possible options before posting a question here. So request everyone not to post replies like "Bahahahaha, use Google you N00B".

0 Kudos

try:

  • From SE80 double-click on a class like CL_CI_CHECK and test a static method like SINGLE (to test a single object)
  • Create a list of object, look (again?) at method SAVE_FROM_LIST of class CL_CI_OBJECTSET you already tried or FM SCI_INSPECT_LIST (just a wrapper)
    You can easily get package object list from TADIR or the multiple FM and class that read it...

Now choice you prefered method/class and start coding


Regards,

Raymond

Jelena
Active Contributor
0 Kudos

Soumyajit Dasmazumdar wrote:

I would like to reiterate that I have gone through a number of possible options before posting a question here. So request everyone not to post replies like "Bahahahaha, use Google you N00B".

We can only know what you have communicated to us. The first post didn't show any evidence of research done before posting. It's helpful not to wait to be asked whether you've searched (and how) and just put all the information in the original post.

You might want to check this blog: http://scn.sap.com/community/getting-started/blog/2010/05/12/asking-good-questions-in-the-forums-to-...

0 Kudos

Jelena that comment was more in jest and less in contempt. That's why I even put a smiley in there

By the way, I have found a suitable solution. I am testing it out. If it works will post it here.

Thanks for all the help.

0 Kudos

I have successfully solved my problem and found a way to automatically generate inspections via program.

Follow this link and use the code snippet there and it should work perfectly:

http://scn.sap.com/people/christian.drumm/blog/2009/12/30/continuous-integration-using-code-inspecto...

0 Kudos

Thank you so much 🙂