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 END

Former Member
0 Likes
1,241

hi to all,

help me in this issue.

IF MAIL= 'X'.

PERFORM SEND_MAIL.

ENDIF.

the above one i need to send after collecting all error files.presently it is going for each error file. my internal table is it_itab.in this there will be no of batches i want to send after all batches r checked .

thanks in advance

kiran kumar

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,215

U can use like

AT END OF batches.
IF MAIL = 'X'.
Perdorm send_mail.
ENDIF.
END AT.

hi to all,

help me in this issue.

IF MAIL= 'X'.

PERFORM SEND_MAIL.

ENDIF.

the above one i need to send after collecting all error files.presently it is going for each error file. my internal table is it_itab.in this there will be no of batches i want to send after all batches r checked .

thanks in advance

kiran kumar

10 REPLIES 10
Read only

Former Member
0 Likes
1,216

U can use like

AT END OF batches.
IF MAIL = 'X'.
Perdorm send_mail.
ENDIF.
END AT.

Read only

0 Likes
1,215

hi in table i am having field kt_s for batch .but i dont need mail for every bactch i need after all the batches r performed.

for exp

batch 1

batch 2

batch 3

i need mail after all the 3 batches r compled not after first batch

thanks in advance

kiran reddy

Read only

0 Likes
1,215
loop at itab.
 AT LAST.
  *perform send mail
 ENDAT.
endloop.

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

alex_m
Active Contributor
0 Likes
1,215

Whats your internal table entries. explain me some more details

Read only

Former Member
0 Likes
1,215

Hi,

You need to use AT LAST instead of AT END. Pls try using this.

Regards,

Jayaram...

Read only

Former Member
0 Likes
1,215

you have to use at last.

regards

shiba dutta

Read only

Former Member
0 Likes
1,215

HI,

I am Assuming that your Error reocrds will be stored in the internal table <b> it_itab</b>, so do not delete any record before the AT LAST statment, and put the X for MAIL field for error records and move those records in to a same internal table structure <b>it_itab</b>. at the lat use this one.

AT LAST.

PERFORM SEND_MAIL.

ENDAT.

in the perform you use the new internal table which is having only the error records, so the mail will go only once with all the error records

Regards

Sudheer

Read only

Former Member
0 Likes
1,215

use at last batch...

write ur code here...

Read only

0 Likes
1,215

HI,

Use AT Last, before the loop sort the table by batches and this field should first place in table.

Reward if useful.

Read only

Former Member
0 Likes
1,215

Hi Kiran,

Insted of AT END go for AT LAST.

when you are writing these events it should be in <b>LOOP.....ENDLOOP</b>

Syntax :

<b>AT LAST.</b>

IF MAIL= 'X'.

PERFORM SEND_MAIL.

ENDIF.

<b>ENDAT.</b>

Difference Between AT END & AT LAST

<b>AT END</b>

The beginning or end of a group of lines with the same content in the component field and in the component links of field. The component field must be part of the field group header. Components whose content is hexadecimal 0 are not included as a control break criterion.

<b>AT LAST</b>

The last line of the extraction dataset.

Thanks

Vikranth khimavath

Message was edited by:

Khimavath Vikranth