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

AT NEW command in ABAP Objects

Former Member
0 Likes
2,132

Hi everyone!

Is there an equivalent of the AT NEW command in abap oo? When I try to use this command inside a BAdi, I get an error message.

Best Regards,

Luís.

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,428

Hi,

In OO ABAP there is no special syntax , its normal abap abap syntax only. While posting here please be more specific.

What is the error ?

4 REPLIES 4
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,429

Hi,

In OO ABAP there is no special syntax , its normal abap abap syntax only. While posting here please be more specific.

What is the error ?

Read only

0 Likes
1,428

Hi,

Thank you for your response

Sample code:

LOOP AT c_t_data ASSIGNING variants are no longer supported in the OO context. Use dynamic variants instead.

Regards,

Luís.

Read only

0 Likes
1,428

You should try "AT NEW pernr" instead of "AT NEW <l_s_data>-pernr", as only the component is required.

If that's not it, please read ABAP online help, where everything and more is explained in detail.

http://help.sap.com/abapdocu_70/en/ABAPAT_ITAB.htm

Thomas

Read only

0 Likes
1,428

Thanks!