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

Control Break statement

Former Member
0 Likes
638

Can v use at new statement with 2 fields

for example : at new iblnr gjahr.

endat.

Please reply me

\urgent

1 ACCEPTED SOLUTION
Read only

former_member194669
Active Contributor
0 Likes
622

No,

You need to use like that


loop at itab.
  at new iblnr
    move 'Y' to v_flg
  endat.
  at new gjahr.
    move 'Y' to v_flg.
  endat.
  if v_flg eq 'Y'.
     <<<< do your coding
  clear v_flg.
  endif,
endloop.

aRs

Points are always welcome

Message was edited by:

6 REPLIES 6
Read only

Former Member
0 Likes
622

<b>only 1 should be used in a single statement!</b> you can use looping for more fields.

regards,

srinivas

<b>*reward for useful answers*</b>

Message was edited by:

XI_Novice

Read only

Former Member
0 Likes
622

Hi ram,

You mean to say with two feild ..

neone of them changes it shud trigger.

then do like this.

sort itab by fld1 fld2.

at new fld2.

endat.

it will work for both the fields.

reward if helpful.

Regards

Azad.

Read only

former_member194669
Active Contributor
0 Likes
623

No,

You need to use like that


loop at itab.
  at new iblnr
    move 'Y' to v_flg
  endat.
  at new gjahr.
    move 'Y' to v_flg.
  endat.
  if v_flg eq 'Y'.
     <<<< do your coding
  clear v_flg.
  endif,
endloop.

aRs

Points are always welcome

Message was edited by:

Read only

Former Member
0 Likes
622

u can use only one fields with AT NEW statement.

loop at itab.

at new itab-field1.

endat.

endloop.

if u want to do for 2 fields u can do this way...

loop at itab.

at new itab-field1.

endat.

at new itab-field2.

endat.

endloop.

Reward Points..

Read only

vikram_maduri2
Explorer
0 Likes
622

Hi Ramesh,

We cannot Use At New statement for multiple fields in a single command.

Read only

Former Member
0 Likes
622

HI,

We can not sue the 2 fields with a Single AT NEW Statment,

But we can use 2 AT NEW statments with in a LOOP

Regards

Sudheer