Application Development 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: 

Problem in passing a value to FM

Former Member
0 Kudos

Dear Gurus,

I am using a SAP EWM FM ( /SCWM/LAGP_READ_RANGE ) and need to pass STACK value in it. In database table, the datatype of field 'STACK' is 18 Characters long. The problem is that FM is not accepting it's value as a normal string. For Example, if user enters a stack value of 20 in selection parameter, in the database table it is '000000000000000020'. If i use Fm 'CONVERSION_EXIT_ALPHA_INPUT' to convert this 20 in to desired format, the FM still does not accept it. I have checked it in debug mode and Fm is accepting this value only in this format , means first 15 characters as SPACES, 16th character as 0, and then the actual value 20 and position of value is on right side. Can anyone tell how can I convert this value in desired format?

Thanks very much.

4 REPLIES 4

Jelena
Active Contributor
0 Kudos

We don't have this FM but does checking the respective definitions in the data dictionary not solve this issue? Are you not using the same data type as in the FM definition?

Not sure I understand what exactly is the predicament...

Former Member
0 Kudos

Thanks for your reply. I am using the exact datatype as in table, but don't know why it is not accepting it.

Sandra_Rossi
Active Contributor
0 Kudos

Is your question simply how to convert the characters 0000000000000000020 into 020 right aligned ?

matt
Active Contributor

Show your code snippet then, with just the relevant details