on 04-24-2009 4:50 PM
I have developed little application using Flex 3.0 and SAP BSP. When i click the button in Flex my BSP page is called correctly but my page attributes is not populated. I have check Flex in debug mode and the address look ok "http://dev.xxxxxxxx-indltd.com:8001/sap/bc/bsp/sap/appl/login.xml?persno=3999". In my BSP i have the same attribute name "persno" in my login page with auto checked. Any ideas why the parameter is not transferred.
Regards,
Daniel Cantin
I was able to debug in Flex not in SAP. I am not able to debug in SAP, I have set my external breakpoint in the code and i have activated debug for my SAP user but no result. I am going to investigate little more. Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dan,
Can I ask you again to refer to my original response and just try it? This works for me.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Script>
<![CDATA[
private function go():void
{
var parameters:Object = new Object;
parameters["sap-client"] = "200";
parameters.persno = "3999";
myhttpService.request = parameters;
myhttpService.send();
}
]]>
Cheers
Graham Robbo
Thanks for your advises. I am not able to set an external breakpoint in my BSP, so I tried to transfer the parameters table in a SAP table. When I test my BSP page in SAP, the table of parameters is transferred in my SAP table correctly. But when I call the page from Flex, nothing is transferred in my SAP table, but I know that the table contains some lines. So the page reacts differently if the call comes from inside SAP or outside SAP from Flex. My BSP user has full authorization.
Hope this help.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dan,
I am a bit confused how two messages ago you managed to use the debugger but now you can't! Are you calling the correct SAP Client? with the correct username?
It seems pretty apparent to me that when you manually call the BSP you receive the passed parameters, but when you call it from Flex you don't. Therefore something is wrong with the way you are calling the BSP from Flex.
My suggestion is to create a simple test Flex app - perhaps using the sample code I have already provided - and work on it until you find what is wrong.
Cheers
Graham Robbo
I have check in debug mode and my HTTP request is ok and my URL too. My page is called because the text message i receive in flex come from there. In my BSP page i receive the "persno" type String with initial value. So i receive the message 'No value BSP!' in the Flex application.
Here is the code;
DATA lwa_persno TYPE persno.
lwa_persno = persno.
IF NOT lwa_persno IS INITIAL.
CLEAR application->error_text.
CALL FUNCTION 'ZDZTB_LOGIN'
EXPORTING
pi_persno = lwa_persno
IMPORTING
pe_error_text = application->error_text.
ELSE.
application->error_text = 'No value BSP!'.
ENDIF.
BTW the SAP R3 version is ECC 5.0
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can retrieve the HTTP header fields from the request like this...
data: lt_fields type TIHTTPNVP.
request->get_header_fields( changing fields = lt_fields ).
...and the HTTP form fields like this...
request->get_form_fields( changing fields = lt_fields ).
Try this to see exactly what you are passing in the HTTP request.
Cheers
Graham Robbo
Here is my syntax to call the BSP page in flex.
<mx:HTTPService url="" id="login_data"
useProxy="false"
result=
"check_login(event.result.error_text)"/>
public function makeEvent():void {
g_pernr = ti_pernr.text;
g_url = g_base_url + "login.xml?persno=3999";
login_data.send();
}
I have try with your code but no parameter is send to the BSP. The page is called but no parameters is send to the BSP.
What is BTW.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It sort of depends how you are building your Flex HTTP request.
Something like this would probably work.
var urlLoader:URLLoader = new URLLoader;
var myURL:String = "login.xml?persno=3999";
var urlRequest:URLRequest = new URLRequest(myURL);
urlLoader.load(urlRequest);
If you have used mxml to create your HTTP request like this...
<mx:HTTPService id="myhttpService" url="login.xml" />
... then you can assign parameters and make the call like this...
var parameters:Object = new Object;
parameters.persno = "3999";
myhttpService.request = parameters;
myhttpService.send();
I guess there are probably heaps of other ways as well.
BTW there is a RIA forum that is more appropriate for this thread.
Cheers
Graham Robbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.