Skip to Content
author's profile photo Former Member
Former Member

Automation of SCI or SCII

I am trying to automate code inspector results of SCI or SCII by passing the output of the transactions(SCI, or SCII) to a PDF. Here the challenge is to get the output in a tabular column. I tried running SCI in background(using a BDC program) using a batch job so that the table SCIINS_INF will be updated. But the problem is the execution of the transaction is not getting recorded and so that table SCIINS_INF is not updated for the field " Executed on". If this is field is filled I can use the FM "SCI_GET_INSPECTION_PLAIN_LIST" to get the results.

If that field is not updated, after execution of the FM, getting an error as " Inspection not carried".

Can you please let me know if there is any other way to get this achieved by using classes, FM or reports, etc.

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Mar 02, 2016 at 07:01 PM

    use method cl_ci_inspection=>create to create an inspection, this will give a reference to an inspection object.

    on this object the methods SET, SAVE, RUN can be called.

    Method PLAIN_TEXT will provide the results in tabular form(make sure SAP note 2043027 is installed in the system).

    You can try setting breakpoints in the above methods when testing via SCI and SCII to see how the things work together.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2016 at 06:05 PM

    The end result is to get the results in a tabular form by passing the transport number and this should be automated as I need to use this in another tool.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 09, 2016 at 02:05 PM

    Dear Santosh,

    first of all, thanks for asking this question and for providing the code of the FM!

    I'm also trying to implement something like what you did so I already tried making use of your code. Unfortunately, I'm not able to get it to work properly. I'm somewhat confused with what exactly I need to provide in the input parameters.

    Does VALUE(P_OBJECTS) TYPE SCIT_OBJS need to be filled and if yes, could you please give an example?

    What needs to be provided in VALUE(P_NAME) TYPE SCI_NAME? From the field-definition it looks as if this can be a check variant, an object set or an inspection where the latter seems to be the most logical (but I may very well be wrong).

    Why is cl_ci_checkvariant=>get_ref( ... exporting hard-coded value "DEFAULT" for p_name when it's first called instead of what got passed in via the parameter of the same name?

    What I'm eventually trying to do is to provide some transport-IDs and to then have SCI run for any ABAP-objects included to do some checks for critical issues. Ideally, I get a table with the findings back which I can then either list or send out via email.

    Thanks much and cheers


    P.S.: in case it's relevant, we are on SAP_BASIS 740 0011 SAPKB74011 and EHP7 FOR SAP ERP 6.0

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks, Lars!

      I'll have to look at this more closely which will take a while as ABAP OO isn't really my strong suit, I'm afraid.

      What I already have available and could feed into a routine is the list of objects to check as I have a program to get all the objects for a transport (or multiple transports). The "only" thing I'd like to figure out is how to get this variable list of objects checked by an existing inspection or check variant and to then feed the results back as an internal table so that I can further process that in my calling program.

      Bottom line: I know what I'd like to have but don't have much of a clue of how to get it! 🤣

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.