Application Development 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: 

Data handling between FLEX and SAP WDA

Former Member
0 Kudos

Hi folks,

I am actually looking for a best practice for data handling between FLEX and SAP WebDynpro 4 ABAP. For now I read some topics here in the forum. Referencing to the following [topic |; some of you recommend to use the RFC/WS approach.

But I am asking myself if this couldn't be handled via Context connection. As I can access all data in the Context and manipulate it. So my approach would be:

1. Create Context in WDA.

2. Bind the Context to Flex.

3. Feed context with data on SAP side.

4. Create/manipulate/copy/delete/etc data in Flex

5. Push the data to the ArrayCollection (Context binding)

6. Fire WDA event in Flex

7. Catch event on WDA side, which calls method to read the Context and do some handling or s.e. with the data from the Context.

8. Exception handling

9. React on result on Flex side

10. done

As you can create any Context models, the possibilities should be nearly unlimited. You could create a Source Context, which holds data from SAP. And you could create a Target Context, which holds the modified SAP data from FLEX. Why working with the context, because of the binding and the benefit of event driven data handling.

This is just a draft out of my mind and not proven. Feel free to comment.

Regards

Antoni

2 REPLIES 2

Former Member
0 Kudos

Hi again,

my investigation so far to this topic shows some limits of RichIsland in SAP. My information about the data handling reaches also some limits as SAP tutorials only describe "flat" data structures. But see what I found out or better what I still don't know.

1. storeProperty()

This function allows to "write" Flex field values to SAP Context attributes.

But - I couldn't realize to write a value to a attribute within a node. Is this because the storeProperty() function is not capable of writing into hierarchical structures? Or is my syntax wrong, accessing the context binding? Check yourself:


FlashIsland.storeProperty(this,"myContextBind.myField", myObject.myValue);

2. ArrayCollection

The Flex ArrayCollection class is "recommended" by SAP for binding between SAP and Flex. As I tried to create a new class ehich extends the ArrayCollection class, and bind it to the WD Context, Flash throws an Error that the type of my class and the WD Context Node Collection are not compatible. Why this restriction?

Then, working with the ArrayCollection, when bound to the Context, is also limited as it is not possible to work with the addItem() functions. Maybe my approach is wrong, but this is what I know from Flex how to work with ArrayCollections.

3. Documentation

Is there somewhere out there a documentation for the SAP libraries which are used in Flex? Couldn't find any so far. And it's not possible to access the SAP package or any class or even a function. eg. to check what the storeProperty function works like.

Finally I'm still looking for a smooth solution to handle data from Flex to SAP. While writing this I started to think about the possibility to pass hierarchical data via fireEvent function parameter... hope the length limitation for this field is not so bad, so I can put some serious XML formated data.

Sorry for my bad English and the tons of text, and if your still reading, maybe you are looking also for a data handling solution and you want to participate.

Regards

Antoni

Former Member
0 Kudos

Yes,

I am facing the same issue. Can i ask how can we populate data in Flex ArrayCollection object without using the additem method and still have this available in my Datasource delared in WDA ?

Thanks in advance

ksQ