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

Extended programme check

Former Member
0 Likes
1,478

Hi Gurus,

I have a requirement. Its simple.. I need to check EXTENDED PROGRAM CHECK for 2500 programs... For that i have written a BDC program . In that program i passed the file(containing all the program names) , then i downloaded the output and i manually checked the output whether it contains any error....

But it is tedious task to manually check..

What i want is that i want only the erroneous program as the output.... Is there any way in which i can pass the erroneous program as the output.. this will help me not to check every program manually whether it contains error or not.. Plsss help

1 ACCEPTED SOLUTION
Read only

_IvanFemia_
Active Contributor
0 Likes
1,434

Hi,

why you don't use the standard transaction SAMT? It's what you want!

Regards,

Ivan

13 REPLIES 13
Read only

Former Member
0 Likes
1,434

Hi,

Have a look at the function module EXTENDED_PROGRAM_CHECK

The output table IT_SLIN_RESULT_STAT-SET contains the count of errors warnings etc.

You can build a logic with this data

TYPE-POOLS SLIN.

DATA : IT_SLIN_RESULT TYPE SLIN_RESULT,
       IT_SLIN_RESULT_STAT TYPE SLIN_RESULT_STAT.

CALL FUNCTION 'EXTENDED_PROGRAM_CHECK'
  EXPORTING
    COMMENT_FLAG       = SLIN_TRUE
*   LOAD_CHECK         = SLIN_FALSE
*   CALL_CNTX          = 'S'
*   CACHE_USE          = SLIN_CACHE_USE-ALL
    PROGRAM            = 'ZRR_TEST_04'
*   TEST_FLAGS         =
    TEST_ALL           = SLIN_TRUE
*   TEST_BRE           = SLIN_FALSE
*   TEST_CAL           = SLIN_FALSE
*   TEST_DAT           = SLIN_FALSE
*   TEST_DYC           = SLIN_FALSE
*   TEST_GES           = SLIN_FALSE
*   TEST_MES           = SLIN_FALSE
*   TEST_OPF           = SLIN_FALSE
*   TEST_PER           = SLIN_FALSE
*   TEST_PFS           = SLIN_FALSE
*   TEST_UNR           = SLIN_FALSE
*   TEST_STE           = SLIN_FALSE
*   TEST_WRN           = SLIN_FALSE
*   TEST_TXT           = SLIN_FALSE
*   TEST_SUB           = SLIN_FALSE
*   TEST_AUT           = SLIN_FALSE
*   TEST_LOA           = SLIN_FALSE
*   TEST_MLS           = SLIN_FALSE
*   TEST_PAC           = SLIN_FALSE
  IMPORTING
    RESULT             = IT_SLIN_RESULT
    RESULT_STAT        = IT_SLIN_RESULT_STAT
* CHANGING
*   DEPENDENCIES       =
* EXCEPTIONS
*   FATAL_ERROR        = 1
*   OTHERS             = 2
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Edited by: Rajvansh Ravi on Apr 7, 2009 8:01 AM

Read only

0 Likes
1,434

Many Thanks a lot.. i understand your logic.. but i have lost the touch of ABAP programming.. it has been one year now.. can u please help me in gving more information to complete this task

Read only

0 Likes
1,434

Hi,

Just check if this works.

I have done it for 1 program. So Loop through your program list and the variable ERROR_CNT should contain the number of errors for each program. If ERROR_CNT > 0 then you can download the program else ignore the program.

I checked for one of my programs with 2 errors related to OO context and the field WOO of table IT_SLIN_RESULT_STAT-SET contained 2. So error count ERROR_CNT was 2 in my case.

TYPE-POOLS SLIN.

DATA : IT_SLIN_RESULT      TYPE SLIN_RESULT,
       IT_SLIN_RESULT_STAT TYPE SLIN_RESULT_STAT,
       WA_SET              LIKE LINE OF IT_SLIN_RESULT_STAT-SET,
       ERROR_CNT           TYPE I.

CALL FUNCTION 'EXTENDED_PROGRAM_CHECK'
  EXPORTING
    COMMENT_FLAG       = SLIN_TRUE
*   LOAD_CHECK         = SLIN_FALSE
*   CALL_CNTX          = 'S'
*   CACHE_USE          = SLIN_CACHE_USE-ALL
    PROGRAM            = 'ZRR_TEST_04'
*   TEST_FLAGS         =
    TEST_ALL           = SLIN_TRUE
*   TEST_BRE           = SLIN_FALSE
*   TEST_CAL           = SLIN_FALSE
*   TEST_DAT           = SLIN_FALSE
*   TEST_DYC           = SLIN_FALSE
*   TEST_GES           = SLIN_FALSE
*   TEST_MES           = SLIN_FALSE
*   TEST_OPF           = SLIN_FALSE
*   TEST_PER           = SLIN_FALSE
*   TEST_PFS           = SLIN_FALSE
*   TEST_UNR           = SLIN_FALSE
*   TEST_STE           = SLIN_FALSE
*   TEST_WRN           = SLIN_FALSE
*   TEST_TXT           = SLIN_FALSE
*   TEST_SUB           = SLIN_FALSE
*   TEST_AUT           = SLIN_FALSE
*   TEST_LOA           = SLIN_FALSE
*   TEST_MLS           = SLIN_FALSE
*   TEST_PAC           = SLIN_FALSE
  IMPORTING
    RESULT             = IT_SLIN_RESULT
    RESULT_STAT        = IT_SLIN_RESULT_STAT
* CHANGING
*   DEPENDENCIES       =
* EXCEPTIONS
*   FATAL_ERROR        = 1
*   OTHERS             = 2
          .
IF SY-SUBRC EQ 0.

  CLEAR ERROR_CNT.

  LOOP AT IT_SLIN_RESULT_STAT-SET INTO WA_SET.

    ERROR_CNT = ERROR_CNT + WA_SET-ECNT.
  ENDLOOP.

ENDIF.

Read only

0 Likes
1,434

Hi ,

Once again thanks... i checked the program.. I want only error programs but our program will download even if there is warning.. it is counting the warning too.. how do we exclude the warning .. i want only error one.. This program is perfect to find non erroneous and non warning programs.. Plssss help....

Read only

0 Likes
1,434

Hi,

I am counting only the values in the field ECNT which is error count and warnings are populated in WCNT.

Have you excluded the programs where the error count = 0 so that they are not downloaded.

Can you paste the code extract ?

Regards

Read only

0 Likes
1,434

Yes i did that.... i know its counting warning programs too... But is there any way in which we can download only error programs ( No warning programs).. In our case its downloading both Error and warning... I have used your code only wit an additional loop for download...

Read only

0 Likes
1,434

Hi,

Can you give me the code extract for the program were the warnings are also considered(i.e the code for which you are running the check), so that i can check in my system how the table is populated.

Regards

Read only

0 Likes
1,434

Hi,

just modify this piece of code in above program..

Data: wa_result like line of IT_SLIN_RESULT.

IF SY-SUBRC EQ 0.

DELETE IT_SLIN_RESULT WHERE KIND NE 'A'. " errors

CLEAR ERROR_CNT.

loop at IT_SLIN_RESULT into wa_result.

LOOP AT IT_SLIN_RESULT_STAT-SET INTO WA_SET where tid eq wa_result-tid.

ERROR_CNT = ERROR_CNT + WA_SET-ECNT.

ENDLOOP.

endloop.

ENDIF.

Edited by: Rammohan Nagam on Apr 7, 2009 9:37 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,434

Hello Sanu,

I just checked the trxn. SAMT. Did u try using it? Here you can create program sets (which will contain all your programs) & then execute the trxn.

Does this not fulfill your requirement?

BR,

Suhas

Read only

0 Likes
1,434

Hi,

Instead of adding the error count you can also check the field IT_SLIN_RESULT_STAT-RES_ECNT.

Check if this count is correct

Just checked SAMT .There is option to filter out only errors. Seems like a better option to use this

Regards

Edited by: Rajvansh Ravi on Apr 7, 2009 9:44 AM

Read only

0 Likes
1,434

Yeah thats rite... its solved.. thanks a lot for helping me.. One more thing.. Is there any difference between Extended program check and Standard Extended program check

Read only

0 Likes
1,434

Hi,

You mean "Perform Std Check" in SLIN transaction.?

There are differences "Perform Std Check" does not pick out all the errors by only critical ones.

For example in the below code the TABLES parameter is actually DATA_TAB but misspelt as DATA_TA. This does not cause any syntax errors but at runtime causes dump. Try Perform Std Check for the below code in SLIN transaction

DATA : ITAB TYPE TABLE OF STRING.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    FILENAME                        = 'C:\'
  TABLES
    DATA_TA                         = ITAB
*   FIELDNAMES                      =
* EXCEPTIONS
*   FILE_WRITE_ERROR                = 1
*   NO_BATCH                        = 2
*   GUI_REFUSE_FILETRANSFER         = 3
*   INVALID_TYPE                    = 4
*   NO_AUTHORITY                    = 5
*   UNKNOWN_ERROR                   = 6
*   HEADER_NOT_ALLOWED              = 7
*   SEPARATOR_NOT_ALLOWED           = 8
*   FILESIZE_NOT_ALLOWED            = 9
*   HEADER_TOO_LONG                 = 10
*   DP_ERROR_CREATE                 = 11
*   DP_ERROR_SEND                   = 12
*   DP_ERROR_WRITE                  = 13
*   UNKNOWN_DP_ERROR                = 14
*   ACCESS_DENIED                   = 15
*   DP_OUT_OF_MEMORY                = 16
*   DISK_FULL                       = 17
*   DP_TIMEOUT                      = 18
*   FILE_NOT_FOUND                  = 19
*   DATAPROVIDER_EXCEPTION          = 20
*   CONTROL_FLUSH_ERROR             = 21
*   OTHERS                          = 22
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read only

_IvanFemia_
Active Contributor
0 Likes
1,435

Hi,

why you don't use the standard transaction SAMT? It's what you want!

Regards,

Ivan