2007 Jan 03 6:52 AM
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.
2007 Jan 04 2:33 AM
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
2007 Jan 03 6:54 AM
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
2007 Jan 03 6:55 AM
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
2007 Jan 04 2:33 AM
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