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

Is REJECT statement obsolete?

Former Member
0 Likes
838

Dear All,

I am trying REJECT statement with LDB . but in Extended Program Check in ECC 6.0 it says REJECT is obsolete.

Can anybody plz suggest me what could be the Alternative for the same?

Thanks n Regards,

Atul.

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
658

Even the keyword CHECK is not supported by ABAP Objects.. BTW both REJECT & CHECK are not Obsolete but can be used only in event driven Reports tied to an LDB. As long as SAP supports an LDB, I don't see anything wrong in using the REJECT statement.

~Suresh

Dear All,

I am trying REJECT statement with LDB . but in Extended Program Check in ECC 6.0 it says REJECT is obsolete.

Can anybody plz suggest me what could be the Alternative for the same?

Thanks n Regards,

Atul.

3 REPLIES 3
Read only

Former Member
0 Likes
658

Use CHECK key word instead of reject.

Demo is as follows -

constants: c_1(1) type c value '1' .

Start-of-selection.

get pernr.

  • Read Infotype 0

rp-provide-from-last p0000 space pn-begda pn-endda.

check pnp-sw-found eq c_1. "it will check if record is there,if not it will go to next pernr

amit

Message was edited by:

Amit Tyagi

Read only

Former Member
0 Likes
658

Hi Atul

This is what i could find from the documentation:

Cannot Use REJECT

The REJECT statement is not allowed in ABAP Objects.

Error message in ABAP objects for:

REJECT [dbtab].

Reason:

The REJECT statement should only be used during the GET event while type 1 programs are being executed with logical databases. Editing of the current line of the node of the logical database is terminated with REJECT and the next line of the same or of a lower lying node dbtab is read. The old event concept of the ABAP runtime environment and the past way of processing logical databases is not supported by ABAP objects.

Regards

Eswar

Read only

suresh_datti
Active Contributor
0 Likes
659

Even the keyword CHECK is not supported by ABAP Objects.. BTW both REJECT & CHECK are not Obsolete but can be used only in event driven Reports tied to an LDB. As long as SAP supports an LDB, I don't see anything wrong in using the REJECT statement.

~Suresh