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

Webservice returns null values (Flex)

bilen_cekic
Explorer
0 Likes
859

Hi all,

I created a webservice in abap,

(a RFC and a Function Web Service).

It exports a table type and contains data from a Ztable.

When i request it from Flex, it returns rows, but they contain NULL values, why ?

I can request and display bapi webservices that comes with in SapNetweaver trial 7.1 but i cant display my own webservice.

Result like this;

result	generated.webservices.ZCUSTOMERS_TT (@2205981)	
	[inherited]	
	[0]	generated.webservices.ZCUSTOMERS (@2362c91)	
		CLIENT	null	
		ID	null	
		NAME	null	
	[1]	generated.webservices.ZCUSTOMERS (@23a4129)	
	[2]	generated.webservices.ZCUSTOMERS (@23a42e1)	
	[3]	generated.webservices.ZCUSTOMERS (@23a41c9)	

it is true that there are 4 rows in table, but all client, id and name is null

why ?

5 REPLIES 5
Read only

Former Member
0 Likes
709

Hi bilen,

As your application is running without any error that implies you might have kept all syntax fine.

Now what i'll suggest you after looking at your post plz check following things:

1. Test your RFC with some proper data for which it get's executed with success and gives output.

2. Pass input parameters correctly to Flex application which are acceptable to RFC also.

e.g. If you are passing DATE as input then pass it correct fashion YYYYMMDD which is expected from RFC as an input. In Flex application DateChooser might give you date with some different format like MM/DD/YYYY.

3. For more clearity keep sy-subrc check and populate corresponding Error Msg/Exception to get indication what went wrong.

I hope this will help you surely.

For further clarification revert with some more details about your issue.

Regards,

Vivek

Read only

0 Likes
709

thanks for answer but my problem didint solved.

My webservice can return normal values like integer or decimal and i can read it from flex.

but when i try to view tables, i always get null values BUT item count is true :=) i have 4 item in z table and 4 rows returns in array from webservice but NULL values :=).

I can't return structure as well.

result	mx.utils.ObjectProxy (@211af29)	
	DEGER	1	
	GS_CUSTOMER	generated.webservices.ZCUSTOMERS (@22ce719)	
		CLIENT	null	
		ID	null	
		NAME	null	
	GT_CUSTOMER	mx.collections.ArrayCollection (@210cd01)	
		[inherited]	
		[0]	generated.webservices.ZCUSTOMERS (@22cef61)	
			CLIENT	null	
			ID	null	
			NAME	null	
		[1]	generated.webservices.ZCUSTOMERS (@22ced31)	
		[2]	generated.webservices.ZCUSTOMERS (@22cedd1)	
		[3]	generated.webservices.ZCUSTOMERS (@22cea11)	
		source	Array (@22687e9)	
	object	Object (@22ce8a9)	
	type	null	
	uid	"723117ED-66EC-C93B-9E66-C0FD4F01246C"	
	ZCUSTOMER_TT	generated.webservices.ZCUSTOMERS_TT (@22eb941)	

What do you use, when declaring variables ?

Like or type or ref to ? Can it be a problem ?

here is my function export inteface.

http://img241.imageshack.us/img241/9258/screenhunter01jun082052.gif

Edited by: bilen cekic on Jun 8, 2009 8:26 PM

Read only

0 Likes
709

Hi bilen,

Problem is with your RFC only.

You should maintain 'table parameters' in "Tables" tab, not in "Export".

e.g. if associated type for ZCUSTOMER_TT and GS_CUSTOMER are structure or table then move them to "Tables" tab.

I think this is the only issue now to rectify.

If you need further help on how to populate tables in flex datagrid then you can revert to me.

Regards,

Vivek

Read only

0 Likes
709

hi,

my GT_CUSTOMER is defined in tables section but it is referenced to a table , not a table type

but i will try other alternatevies :=) all possiblities on table section.

I will inform later :=)

Read only

Former Member
0 Likes
709

Hi Bilen ;

Did you find the solution? I have the same problem in Flex..How did you overcome this problem?

Teşekkürler.