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: 

****** error

Former Member
0 Kudos
51

why does the ****** error occur when "AT NEW" keyword is used?

1 ACCEPTED SOLUTION

rajasekhar_matukumalli3
Active Participant
0 Kudos
33

Hi Sashi,

Assume you have your internal table(ITAB) as

Field1

Field2

Field3

Field4

Field5

Field6

Field7

Now when you say AT NEW FIELD1 then all the remaining fields will show as '*'. This is because the control statement AT NEW <fieldname> will consider values only upto <fieldname> and ignores the rest of the fields.

Thats why when ever you want to use control statements then you always move the value from you workarea to another work are

SORT ITAB.

LOOP AT ITAB INTO WA_ITAB1.

WA_ITAB2 = WA_ITAB1.

AT NEW FIELD1.

BREAK-POINT. ---> Here you will be able to ONLY see values of fields FIELD1 and FIELD2 of WA_ITAB1.

But you will be able to see all the Field values from WA_ITAB2

ENDAT.

ENDLOOP.

Hope this solves your problem.

Reward points of useful.

Enjoy SAP.

Rajasekhar

1 REPLY 1

rajasekhar_matukumalli3
Active Participant
0 Kudos
34

Hi Sashi,

Assume you have your internal table(ITAB) as

Field1

Field2

Field3

Field4

Field5

Field6

Field7

Now when you say AT NEW FIELD1 then all the remaining fields will show as '*'. This is because the control statement AT NEW <fieldname> will consider values only upto <fieldname> and ignores the rest of the fields.

Thats why when ever you want to use control statements then you always move the value from you workarea to another work are

SORT ITAB.

LOOP AT ITAB INTO WA_ITAB1.

WA_ITAB2 = WA_ITAB1.

AT NEW FIELD1.

BREAK-POINT. ---> Here you will be able to ONLY see values of fields FIELD1 and FIELD2 of WA_ITAB1.

But you will be able to see all the Field values from WA_ITAB2

ENDAT.

ENDLOOP.

Hope this solves your problem.

Reward points of useful.

Enjoy SAP.

Rajasekhar