Hey, guys, I don't know if any of you out there are SAP consultants, but
what I'm doing isn't anything out of the ordinary conceptually. I'm just
consuming a Web Service using one of SAP's standard BAPI's called
BAPI_SALESORDER_GETLIST. 

When I debug it, I can see that everything goes fine and it returns the
data requested in the debugging console. However, nothing is binding in
my datagrid. I assume this is because I haven't set the properties
correctly according to the XML data received. Here's the XML (I've
replaced customer sensitive data with "blah" and removed most of the
columns for brevity):

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>

      <SOAP-ENV:Body>

            <ns0:BAPI_SALESORDER_GETLIST.Response
xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

                  <RETURN>

                        <TYPE/>

                        <CODE/>

                        <MESSAGE/>

                        <LOG_NO/>

                        <LOG_MSG_NO>000000</LOG_MSG_NO>

                        <MESSAGE_V1/>

                        <MESSAGE_V2/>

                        <MESSAGE_V3/>

                        <MESSAGE_V4/>

                  </RETURN>

                  <SALES_ORDERS>

                        <item>

                              <SD_DOC>blah</SD_DOC>

                              <ITM_NUMBER>blah</ITM_NUMBER>

                        </item>

                  </SALES_ORDERS>

            </ns0:BAPI_SALESORDER_GETLIST.Response>

      </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Here's my Flex code to consume that:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 

    layout="absolute"

    creationComplete="wsBAPI.BAPI_SALESORDER_GETLIST.send()">

    <mx:WebService id="wsBAPI" 

 
wsdl="http://ouxs06vp.fender.com:8000/sap/bc/soap/wsdl11?services=BAPI_S
ALESORDER_GETLIST"

        useProxy="false">

        <mx:operation name="BAPI_SALESORDER_GETLIST">

            <mx:request>

                        <CUSTOMER_NUMBER>

                              0001000050

                        </CUSTOMER_NUMBER>

                        <SALES_ORGANIZATION>

                              1000

                        </SALES_ORGANIZATION>

                        <DOCUMENT_DATE>

                              20070227

                        </DOCUMENT_DATE>

                        <SALES_ORDER/>

            </mx:request>

        </mx:operation>

    </mx:WebService>

    <mx:Panel x="10" y="10" width="475" height="400" layout="absolute"

        title="Sales Orders">

 

            <mx:DataGrid x="30" y="75" id="dgTopPosts" width="400"
dataProvider="{wsBAPI.BAPI_SALESORDER_GETLIST.Response}">

            <mx:columns>

                <mx:DataGridColumn headerText="SD_DOC"
dataField="SD_DOC"/>

                <mx:DataGridColumn headerText="ITM_NUMBER"
dataField="ITM_NUMBER" width="75"/>

            </mx:columns>

        </mx:DataGrid>

    </mx:Panel>

</mx:Application>

P.S. I know that Visual Composer uses Flex, but I want to build my apps
in Flex Builder instead of VC.

Another weird thing that is happening is that on my laptop Adobe Flex 2
debugger console window shows me everything in progress. However, on my
desktop it juts says 

[SWF] C:\Documents and Settings\Me\My Documents\Flex Builder
2\Lessons\bin\Services-debug.swf - 982,015 bytes after decompression

Any tips would be greatly appreciated. Thanks! --SBZ

Reply via email to