Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Setting a Global Variable in Record Selection

I would like to declare and initialize a Global variable in the Record Selection section. This code is inserted into the record selection formula:

.....
Global x As Number
x = 10
.....

But when I try to use x in one of the report sections, I get nothing, as in ....

Global x As Number
Formula = x         'returns nothing

Is it not possible to declare and initialize a Global variable in the Record Selection section?

Thank you,

Art

replied

Hi

Please use "While Reading Records" as the first line in the formula where you are using this variable.

If there is no change then assign the value of x to some other variable in the record selection (say y) and then use 'y' in the desired formula along with "While Readig Records".

Pleas elet me know the results.

Thanks

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question