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 program check error

Former Member
0 Likes
1,497

Hi ,

I'm getting errors(Obsolete statements) when checking for extended program check for a report program.

When I'm going for "UCCHECK" i'm not getting any errors & in code inspector also it is not showing the errors.

Here what is the reason for this?why it showing error in one transaction & not showing the same in other transaction..

Here I'm pasting the code..


REPORT  ZHCM_OBSOLETE.
infotypes : 0000.
DATA: BEGIN OF itab1 OCCURS 0,
        col1 TYPE i,
        col2 TYPE i,
        col3 TYPE string,
      END OF itab1 VALID BETWEEN col1 AND col2.

DATA: BEGIN OF itab2 OCCURS 0,
        col1 TYPE i,
        col2 TYPE i,
        col3 TYPE string,
      END OF itab2 VALID BETWEEN col1 AND col2.

itab1-col1 = 1.
itab1-col2 = 6.
itab1-col3 = 'Itab1 Int1'.
APPEND itab1 TO itab1.

itab1-col1 = 9.
itab1-col2 = 12.
itab1-col3 = 'Itab1 Int2'.
APPEND itab1 TO itab1.

itab2-col1 = 4.
itab2-col2 = 11.
itab2-col3 = 'Itab2 Int1'.
APPEND itab2 TO itab2.

provide col3 FROM itab1
        col3 FROM itab2
             BETWEEN 2 AND 14.

  WRITE: / itab1-col1.
*  \, itab1-col2, itab1-col3, itab1_valid.
  WRITE: / itab2-col1.
*  , itab2-col2, itab2-col3, itab2_valid.
  SKIP.
ENDPROVIDE.

Thanks in advance..

Pradeepa

Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PM

14 REPLIES 14
Read only

Former Member
0 Likes
1,459

Hi

In your program PROVIDE is the absolute statement. That's why it is throwing error.

Regards

Akshay

Read only

0 Likes
1,459

Hi Akshay,

Can you tell me the replacement statement for this PROVIDE ... ENDPROVIDE statement?

Thank you,

Pradeepa

Read only

Former Member
0 Likes
1,459

hi,

provide and end provide are Obsolete statements .instead use select or macros.

thanks

Read only

Former Member
0 Likes
1,459

Hi,

You are probably getting obsolete statements on the declaration of internal tables. Avoid using begin of itab occurs 0, this statement is not used as it automatically creates a header line. Use types statement to define a type and then use it to create an internal table and workarea, this will remove the obsolete statements in extended program check.


types : begin of t_itab,
            col1 type i,
            col2 type i,
            col3 type string,
          end of t_itab.
data itab type table of t_itab
data wa_type t_itab.

Use these to populate your internal table.

begin of itab occurs 0 was a statement which was used in prior versions (<4.0) and now are considered obsolete, but still functional due to backward compatibility.

Hope this helps you.

Regards,

Sachin Dargan.

Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:22 PM

Read only

Former Member
0 Likes
1,459

Hi,

Obsolete stataments error you chech extended program check only is displays.

Regards

Md.MahaboobKhan

Read only

0 Likes
1,459

Hi,

Use Oops based declaratipon for internal table.

E.g. :

data: itab type standard table of <dtab>,

wa_tab type <dtab>.

Try this and also use type in place of like.

Read only

Former Member
0 Likes
1,459

Hi,

Each TCODE has its own functionality.

UCCHECK is for Unocode compatibility.

Obsolete statements can be shown in code Inspector

In Code inspector press (CTRL + F1)

Expand the folder "Syntax check/ Generation"

Under "Extended program Check" Click on attribute and use the check box for "Obsolete statements" (This is unchecked by default).

Note : "Specific Tests" Radio button must be checked in the Extended program check screen

Run the code inspector again to see the changes

Regards

Read only

0 Likes
1,459

Hi Ravi,

I did both checking s., but getting obsolete statements in Extended program check & in UCCHECK it is not showing any errors.

My client need a code which is unicode compatible.can we omit those errors which we got in extended program check or have to find the solution for this?if there is a way can you explain me the solution for that?

Read only

0 Likes
1,459

Hi Pradeep,

Are you doing a upgrade ? Here we usually follow a scope which tells which obsolete statements to be handled in Extended program check and Unicode check. This scope may be given by the client.

If your client only needs unicode compatibility, then your code is fine.

Regards

Read only

Former Member
0 Likes
1,459

Hi,

Use a read table statement instead of PROVIDE.

provide col3 FROM itab1

col3 FROM itab2

BETWEEN 2 AND 14.

Best regards,

Prashant

Read only

0 Likes
1,459

Prashant,

I hope read table statement is also obsolete ..

Is there any other statement in place of this?

Read only

0 Likes
1,459
Read only

Former Member
0 Likes
1,459

Hi,

i think you could replace PROVIDE with the SELECT statement, along with APPENDING CORRESPONDING FIELDS OF TABLE internal_table.

and then yes, loop the internal_table

example:

loop at internal_table where...(optional)

...

endloop.

Regards,

Anki Reddy.

Read only

Former Member
0 Likes
1,459

Hi,

problem with provide..... endprovide,use the select incase of provide.

Madhu