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

PROVIDE Statement

former_member50022
Discoverer
0 Likes
810

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

5 REPLIES 5
Read only

Former Member
0 Likes
787

Hi Stephen,

I think PROVIDE is an obsolete statement...

Regards,

Sathish

Read only

0 Likes
787

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

Read only

Former Member
0 Likes
787

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

Read only

nivaskumar2
Explorer
0 Likes
787

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.

Read only

gaursri
Active Contributor
0 Likes
787

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.