‎2012 Feb 20 7:07 AM
Hi All,
I have a function module with import field named MATERIAL of type EKPO-MATNR which I want to test in SE37.
The value I want to pass for this field is 0555768710.
While debugging I can see the value 000000000555768710.
The same function module executed from the program shows the proper value 0555768710.
I think there is something wrong with passing screen fields values in SE37.
How can I solve it?
Regards,
Grzegorz Skorus
‎2012 Feb 20 7:10 AM
Hi,
everything is all right, value is automatically converted by the system conversion exit.
Please, check this:
[http://help.sap.com/saphelp_40b/helpdata/en/cf/21ee19446011d189700000e8322d00/content.htm]
Best regards,
George Shlyahov.
‎2012 Feb 20 7:14 AM
Yup, the leading 0's are just how SAP stores your material number internally.
‎2012 Feb 20 7:18 AM
‎2012 Feb 20 7:27 AM
Thanks for suggestions but i have one more doubt.
If there are two different material numbers
020
and
0020
The internal representation is the same
000000000000000220
000000000000000220
If so, I guess the conversion exit will be able to exctract for me proper values
020
and
0020
Correct?
‎2012 Feb 20 7:30 AM
Hi,
You will never get the same material no. so, no problems..
It will work..
‎2012 Feb 20 7:33 AM
I am afraid not, they would both represent the same material. SAP would not allow you to create that material i.e. after creating material '020' . If you try creating a material '0020' all you would get is a message (type E) stating material '20' already exists
On the other hand, if you were to create material '020' and '0200', you wouldn't have a problem.
the difference is in the leading and trailing (which the system would disregard) 0's
Hope that explains it.
Edited by: AJ Nayak on Feb 20, 2012 1:10 PM
‎2012 Feb 20 7:44 AM
I think the internal representation with leading zeroes is valid only for materials with internal numberring.
I have just opened my MARA and I can see that materials with external numberring do not have leading zeroes.
MARA-MATNR
000000000000700001
A85535426100
The problem is I pass to the function module material with external numberring and get it with leading zeroes.
‎2012 Feb 20 7:49 AM
In that case as soon as u get the materials with the leading 0's u can pass your material variable to the conversion exit for output as seen below.
Call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
Exporting
input = material
Importing
output = material.
This should resolve your issue with the leading zeros. But mind you this is purely for processing purposes, the leading 0's will still exist at the database level in your tables. There is a customizing procedure to get rid of this as well but i m not sure if that is what your requirement calls for.
Edited by: AJ Nayak on Feb 20, 2012 1:23 PM
‎2012 Feb 20 7:54 AM
> I have just opened my MARA and I can see that materials with external numberring do not have leading zeroes.
In SE11 transaction you see already converted values. That's why there are no zero.
‎2012 Feb 20 8:00 AM
Thanks, but it it doesn't work
for
0123A works because it contains A which is a letter and I get 0123A
but for
01234 doesn't work as the system thinks it is a number, and not a string
I do not have time to think about it as the FM itself works just fine executed from the other program and moreover I cannot change it contents.
The conclusion is for now - I am not able to test it with SE37.
Anyway, thanks for suggestions.
Edited by: Grzegorz Skorus on Feb 20, 2012 9:02 AM
‎2012 Feb 20 8:05 AM
HI ,
Please check in the se37 menu utilities>Function builder> Switch off conversion exit while testing
Hope this helps
Regards,
Madhukar Shetty
‎2012 Feb 20 8:30 AM
‎2012 Feb 20 8:35 AM
> Please check in the se37 menu utilities>Function builder> Switch off conversion exit while testing
SE37 --> menu --> utilities --> SETTINGS --> Function builder --> Switch off conversion exit while testing.
Best regards,
George Shlyahov.