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: 

Understanding Problem

Former Member
0 Kudos

Hello Guys,

What is the Best WAY to develop an ABAP PROGRAM with global classes , that can connnect with a Flex Apllication?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi altayeb,

you can develop your program in the way you want. After develop it, you must create an RFC, BAPI or something that you can publish on Internet Connection Framework (SICF transaction).

The most common way of work is with WebServices (you can publish an RFC via WebService), consuming the WSDL from FLEX.

Regards

Fran

14 REPLIES 14

Former Member
0 Kudos

Hi altayeb,

you can develop your program in the way you want. After develop it, you must create an RFC, BAPI or something that you can publish on Internet Connection Framework (SICF transaction).

The most common way of work is with WebServices (you can publish an RFC via WebService), consuming the WSDL from FLEX.

Regards

Fran

Former Member
0 Kudos

Hi Altayeb,

Flex Application mainly communicate with one of following RPC concepts :

1. Web Service

2. HTTP Service

3. Remote Object

Now if you want to integrate your ABAP stack with Flex Apllication, You can simply create any Function Module making it as Remote Enabled i.e. RFC.

Using Web Service tag in Flex you can communicate with your RFC i.e. internally your ABAP stack.

For any help using example you can refer to thread on SDN.

There is one more method which is known as Web Service Introspection or Proxy class generation to import web service.

Hope this will help you.

Regards,

Vivek

Former Member
0 Kudos

Many thanks to u all,

I try to redesign an ABAP program , which was developed only as a report, to make it connectable with Flex.

So when I decide to develop it with global classes instate of the procedural report, is it still able to make the connection with flex through the RFC? do anyone have example of SAP-Application whith global classes , which work with flex ?

My regards,

ALTAYEB

0 Kudos

Hi, Altayeb

I don't understand what do you mean with "global classes", but i think the concept is more easy.

For example, you can create an Function Module, which calls to another program (a job, transaction, report,...) and this Function Module is where Flex calls (via RFC, WebService,...)

I think you don't have to worry with "what kind of program", only in "which is the form to call/run it via function module, BAPI,..."

Sorry if i can't explain well, my english is not very good

Regards

Fran

0 Kudos

Hallo again,

so, the report program is now existing, but I didn't find the way how can the RFC call the Report???, to make it accessable bye Flex

So far I understand the RFC has to be the Interface between my Report Program and the FLEX!!

Have I to create the RFC within my Report Program , or on BSP ? do I need XML?

the RFC will return Itab as result, how can Flex read the entries of this table came from rfc ?

My Regards

Edited by: altayeb musa on Aug 28, 2009 2:20 AM

0 Kudos

Are you trying to build a flex application, which can connect to your ABAP stack to read data and present it in flex?

if yes all you need is RFC on the back end, which you can expose as WS.

another approach would be write a simple BSP to do all the data fetching/manipulation and render the results as XML which flex can consume using HTTPService

0 Kudos

hallo,

thanks for ur Answer. My Problem now is, that I have an existing Report Program, which I need to reprisent its result on Flex. I guess the best way to do this is the RFC.

the RFC will return Itab as result, how can Flex read the entries of this table came from rfc ?

0 Kudos

Yes, the best way is the RFC, but first you must expose it as WebService to use it.

With the WS, you have 2 methods to work:

- Use the WebService class of Flex Framework, call the WSDL, and manage the itab result as a ArrayCollection.

- Use the Flex-Sap plugin to auto-generate proxy classes to manage the WebService communication. In this case, the plugin create a class of type (your itab type), so you can manage it without problems

Regards

Fran.

0 Kudos

You could convert the internal table from the RFC call to a XML string, like in the following code snippet:

DATA: xmlstr    TYPE xstring,
        ret_value   TYPE string,
        lcl_conv  TYPE REF TO cl_abap_conv_in_ce,
        lt_your_table   TYPE z_your_table_type.


  " Transform the result table using the ID transformation.
  CALL TRANSFORMATION id
    SOURCE  table = lt_your_table
    RESULT XML xmlstr.

  " Create a conversion instance using UTF-8.
  lcl_conv = cl_abap_conv_in_ce=>create(
    encoding = cl_xms_message_security=>co_encoding_utf8
    input = xmlstr ).

  " Perform the conversion.
  lcl_conv->read( IMPORTING data = ret_value ).

Former Member
0 Kudos

thanks for the helpfull answer.

I saw this example on this link http://www.saphelp.dkhaitan.com/index.php?option=com_content&view=article&id=67%3Ahow-to-consume-sap...

it show that I need J2EE Server to create the Web Service , is this true ?

0 Kudos

I think is not mandatory to create the WS. Your service is located under your default_host of SCIF transaction, so i think you attack to the ABAP stack.

J2EE server is needed to run SOAMANAGER transaction (here is where WS can be managed), but i can't understand why, so only is used to test the WS (or i haven't seen his utility yet...)

Regards

Fran

0 Kudos

Hi Altayeb,

It's NOT mandetory to have J2EE server to create web service.

If you are using any RFC then 'RFC' itself is a protocol which allows you create wsdl and expose your code as web service.

Now as you are refering the link posted by you, In that you can skip Step 11 to step 14.

Just remember that by this method you will be getting wsdl as:

http://<HOST>:<PORT>/sap/bc/srt/rfc/sap/<WEB SERVICE NAME>?sap-client=800"

Use above wsdl and follow the same tutorial.

I have successfully tried that so you can also succeed.

Regards,

Vivek

0 Kudos

Many thanks , I will keep trying

thanks guys

Former Member
0 Kudos

???

Edited by: altayeb musa on Aug 28, 2009 7:16 PM