cancel
Showing results for 
Search instead for 
Did you mean: 

xstep: validation function uses "old" parameters

VXLozano
Active Contributor
0 Kudos

Hi all.

I'm facing a problem with xsteps I wish someone can lend me a hand with.

I'm trying to store the value of a parameter into a Z-table through the validation functions. It works pretty fine, but I noticed the values passed to the function module are obsoletes. I mean: if I change the value from "a" to "b", the function receives "a" and not "b". It makes my Z-table to become obsolete at its own creation

Any hint? How can I pass the proposed value to the function module and not the saved one?

At the moment, my first though has been to tell the user "press Enter twice each time you must change this value", but sounds cheap and dirty

Thanks in advance,

Vic

Accepted Solutions (1)

Accepted Solutions (1)

VXLozano
Active Contributor
0 Kudos

Got the answer from SAP support.

The parameter to give to the function module must be X

I mean: if the XStep's field is called "field" and it's evaluated as the variable "value", when you call the validation function like:

Function: VALIDATE_VALUE

Parameter: I_VALUE Importing PARAMETER value

You must use

Function: VALIDATE_VALUE

Parameter: I_VALUE Importing PARAMETER X

X seems to be an internal SAP's variable to store the input value.

It seems I'm doomed to answer my own threads...

Answers (1)

Answers (1)

VXLozano
Active Contributor
0 Kudos

I'm trying to test a "workaround": I will deny the parameter input and use a function module to ask for the value through a popup. The FM will do the validation, and return the value entered if correct.

But I'm still looking for a way to validate the input "online".