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

SE37 error ?

Former Member
0 Likes
2,005

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

13 REPLIES 13
Read only

Former Member
0 Likes
1,773

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.

Read only

Former Member
0 Likes
1,773

Yup, the leading 0's are just how SAP stores your material number internally.

Read only

Former Member
0 Likes
1,773

Hi

Correctly said Nayak

Karthik.R

Read only

0 Likes
1,773

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?

Read only

0 Likes
1,773

Hi,

You will never get the same material no. so, no problems..

It will work..

Read only

0 Likes
1,773

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

Read only

0 Likes
1,773

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.

Read only

0 Likes
1,773

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

Read only

0 Likes
1,773

> 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.

Read only

0 Likes
1,773

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

Read only

0 Likes
1,773

HI ,

Please check in the se37 menu utilities>Function builder> Switch off conversion exit while testing

Hope this helps

Regards,

Madhukar Shetty

Read only

0 Likes
1,773

Madhukar, this is what I needed.

Now it works.

Thanks!

Read only

0 Likes
1,773

> 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.