Skip to Content
author's profile photo Former Member
Former Member

Data not getting fetched into Flex from SAP backend

Hello....

I have tried fetching data from SAP into Flex for simple BAPIs. For Ex; there would be 2 to 3 fields and we enter some values in it and these values are wrapped into an object and sent to SAP to fetch the details. This works fine.

But now, my problem is, I want to pass a list of data, as the one of the table parameter in the BAPI is mandatory to be passed. For this I created a arraycollection with same field names as in SAP:

<mx:ArrayCollection id="sel">

<mx:Array>

<mx:Object FIELD_NAME="RENTAL_OBJECT" SIGN="I" OPTION="EQ" FIELD_VALUE_LOW="1" FIELD_VALUE_HIGH="9999999"/>

</mx:Array>

</mx:ArrayCollection>

var inp:Object = new Object();

inp.SELOPTION = sel.source; //parameter name in SAP is SELOPTION

operation.arguments = inp;

operation.send();

I get the result back with this. But it will have only the table\structure names. It is not fetching any records, as it does in SAP when BAPI is executed.

You can have a look at the screen shot of it here:

This is the result that I'm getting in Flex:

http://img43.imageshack.us/img43/1477/screenshotgp.jpg

This is the result I get in SAP when I execute the BAPI directly:

http://img340.imageshack.us/img340/3796/screenshot2wa.jpg

Can someone who have come across this please help me out?

Thanx.

Deepak

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 12, 2009 at 12:16 PM

    Hi Deepak,

    To send multiple entries to a table your code should be like this only.

    var dateRangeRow:Object = new Object();

    input.DATE_RANGE = new Array();

    dateRangeRow.SIGN = "I";

    dateRangeRow.OPTION = "EQ";

    dateRangeRow.LOW = "2002-12-20";

    dateRangeRow.HIGH = "";

    input.DATE_RANGE.push(dateRangeRow);

    Check the below link for details.

    http://blog.danmcweeney.com/57

    Regards

    Basheer

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.