‎2009 Feb 19 12:43 PM
Hello Folks,
I have a question concerning the usage of the PROVIDE statement... I wrote a function module, in which I used the statement PROVIDE to easily get the intervalls of internal tables, 3 of them...
But during the code check I get the following error message:
Old and new exceptions may not be used simultaniously... (just a try of translation from german to english...)
Do you have a solution for me...
Stefan
‎2009 Feb 19 12:47 PM
Hi Stephen,
I think PROVIDE is an obsolete statement...
Regards,
Sathish
‎2009 Feb 19 12:53 PM
Hello Sathish,
there are 2 versions of the PROVIDE Statement... the short und the extended form of usage...
The extended form can still be used, what I read in the ABAP documentation...
So, I think, it can be used, but in what way...?
Probably the error occurs because of the usage in a function module context...?
Regards,
Stefan
Edited by: Stephan Huschke on Feb 19, 2009 1:53 PM
‎2009 Feb 19 12:52 PM
HI,
There are two form of PROVIDE statement available.
May be you are using Obsolete version of PROVIDE STATEMENT.
Press F1 on the Provide statement on the Editor.
It will give you two version ( Absolete/New version).
So i think due to the obsolete version you are getting error.
Hope this resolves your query.
Note: Obsolete Statement will always give ECP Error.
Regards,
Gurpreet
‎2009 Feb 19 12:53 PM
Hi Mate,
Provide statement is used with predefined Macros, if we use macros it is assured that will work properly, the data has been retrived based on structures tables. and it cant be used without logical data base or GETPERNR Statement.
But Moreover i think Provide statement is obselete.
‎2009 Feb 19 1:01 PM
Hi Stephan,
This forbidden form of the provide statement is a short form of the permitted variant.The compiler distinguishes the long and short forms by the addition fields to be specified explicitly before the component specification.In principle the short form of the provide statement works like the permitted variant.Unlike the permitted variant, however fewer additions are allowed here.In short form you cannot specify a table several times.The internal tables must have headers and the runtime environment as described below.For the PROVIDE loop to function correctly , the same conditions apply as in the long form.However now exceptions are raised if one of the involved tables is not sorted or there are overlapping intervals.
Hope it gives you some information.Hoping your query resolves soon.
For nmore information you may go to ABAP obsolete section of Library.
Have a best day ahead.