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

Former Member
0 Likes
468

After doing extended program check, I get the error

The current ABAP command is obsolete and problematic, Tables with headers are no longer supported in OO context

on this part of my code

DATA: BEGIN OF i_itab1 OCCURS 0,

How do I fix this

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
447

Hi,

Please try this instead.


Types: Begin of structure,
         field1 type c,
         field2 type c,
         field3 type c,
       end of structure.
 
Data: itab type table of structure.
Data: wa   type structure.

Regards,

Ferry Lianto

3 REPLIES 3
Read only

ferry_lianto
Active Contributor
0 Likes
448

Hi,

Please try this instead.


Types: Begin of structure,
         field1 type c,
         field2 type c,
         field3 type c,
       end of structure.
 
Data: itab type table of structure.
Data: wa   type structure.

Regards,

Ferry Lianto

Read only

Former Member
0 Likes
447

You have to define explicit work area of the same structure as Ferry pointed out and then change your loop statements to

LOOP AT i_itab1 INTO wa_itab1. or READ TABLE i_itab1 INTO wa_itab1...

Read only

Former Member
0 Likes
447

Hi,

In ABAP object context "occurs 0' is not allowed. Instead define like this.

TYPES: BEGIN OF i_itab ,
        f1 TYPE c,
END OF i_itab .

DATA i_itab1  TYPE TABLE OF i_itab.

Regards,

RS