cancel
Showing results for 
Search instead for 
Did you mean: 

Selectc Single-Statement doesn't work in Function Module of Web-Services

Former Member
0 Kudos

After I practiced my Webservice with an easy funtion module I wanted to do more dann only sum two parameters.

In my fm I want to select this:

SELECTmatnr FROM afpo INTO lv_matnr WHERE aufnr = iv_aufnr AND posnr = '0001'.

My fm has one importparameter: iv_aufnr type aufnr and two exportparameters: ev_aufnr TYPE aufnr and ev_matnr TYPE matnr.

That I get my two exportparameters I do this:

DATA: lv_matnr TYPE matnr.

ev_aufnr = iv_aufnr.

SELECT SINGLE matnr FROM afpo INTO lv_matnr WHERE aufnr = iv_aufnr AND posnr = '0001'.

ev_matnr = lv_matnr.

When I test my fm in my ECC everything works fine. But when I want to test it with soapUI I only get the ev_aufnr. ev_matnr is nothing because my Select Single-Statement doesn't work. After the Select the local variable is initail. In ECC it's not initial. But why?

Has somebody an idea?

Thank you and have a nice Day!

Marcel

View Entire Topic
former_member184681
Active Contributor
0 Kudos

Hi Marcel,

It's me again When testing function modules and web services based on them, and comparing results, you should be aware that ECC performs some formatting called "conversion exits" after you type your values, when testing in se37. However, this is not performed when using web services. So for instance you will probably have to type leading zeros on your own for the iv_aufnr input parameter.

Hope this helps,
Greg

Former Member
0 Kudos

Everyday I learn more! Thanks a lot Greg!

Only leading zero and it works