How to save the data to sap abap using Adobe Flex
Hi Everybody......
I am new to Adobe flex with sap abap.
How to save the data in sap abap using Adobe Flex coding is Action Script and using RFC web service.
Please give me any suggisions on that.
Thank you
Venkatesh V
Hi Venkatesh,
Try with folowing coding...
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
initialize="initApp()">
<mx:Label x="10" y="23" text="Airline" width="90" id="lblAirline"/>
<mx:TextInput x="108" y="21" id="txtAirline"/>
<mx:Button x="10" y="49" label="Get Data" id="btnGetData" enabled="false" click="getData()"/>
<mx:DataGrid x="10" y="97" id="dgFlightData" dataProvider="">
</mx:DataGrid>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.AbstractOperation;
import mx.rpc.events.FaultEvent;
import mx.rpc.soap.LoadEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.WebService;
[Bindable] public var flightData:ArrayCollection;
private var flightWS:WebService;
private function initApp():void{
flightWS = new WebService();
flightWS.wsdl = "http://uscib20.wdf.sap.corp:50021/sap/bc/soap/wsdl11?services=ZGTEST&sap-client=000";
flightWS.addEventListener(FaultEvent.FAULT,onWSError);
flightWS.addEventListener(LoadEvent.LOAD,onWSDLLoaded);
flightWS.addEventListener(ResultEvent.RESULT,onFlightWSGotResult);
flightWS.loadWSDL();
private function getData():void{
var operation:AbstractOperation = flightWS.getOperation("ZGTEST");
var input:Object = new Object();
input.Airline = txtAirline.text.toUpperCase();
operation.arguments = input;
operation.send();
private function onWSError (event:FaultEvent):void{
private function onWSDLLoaded(event:LoadEvent):void{
btnGetData.enabled = true;
private function onFlightWSGotResult(event:ResultEvent):void{
flightData = event.result.SFLIGHT;
]]>
</mx:Script>
</mx:Application>
Regards,
Vinoth
Similar Messages
-
How to retrieve the data from SAP-BAPI by using VB Code
Hi ,
I am new to BAPI.
V have created an application in Visual Basic with the following fields
EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
We have written the code for SAVING the data into SAP. Already we have
constructed a table with the respective fields in SAP.
For that we ourself created our own BAPI Structure / Function Group /
Function Module/ Business Object - RELEASED related elements.
1)Established the connection successfully.
2)Stored the data into SAP Successfully and v r in need of
3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
Following is the code :
'BAPI Structure : ZBAPIEMP
'Function Group : ZBAPIEMP
'Function Module : ZBAPI_EMP_CREATEFROMDATA
'Business Object : ZBAPIEMP
'Function Module : ZBAPI_EMP_GETLIST
Dim bapictrl As Object
Dim oconnection As Object
Dim boEmp As Object
Dim oZEmp_Header As Object
Dim oImpStruct As Object
Dim oExpStruct As Object
Dim oreturn As Object
Dim x As String
Private Sub Form_Load()
Set bapictrl = CreateObject("SAP.BAPI.1")
Set oconnection = bapictrl.Connection
oconnection.logon
Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
End Sub
Private Sub cmdSave_Click()
oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
oZEmp_Header.Value("ADDR1") = txtAddr1.Text
oZEmp_Header.Value("ADDR2") = txtAddr2.Text
oZEmp_Header.Value("CITY") = txtCity.Text
oZEmp_Header.Value("PHONE") = txtPhone.Text
boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
x = oreturn.Value("Message")
If x = "" Then
MsgBox "Transaction Completed!..."
Else
MsgBox x
End If
End Sub
Private Sub cmdView_Click()
End Sub
COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
-Tim
Option Compare Database
Dim SAPLOGIN As Boolean
Dim FunctionCtrl As Object
Dim SapConnection As Object
Sub SAPLOGOUT()
On Error GoTo LogoutFehler
SapConnection.logoff
SAPLOGIN = False
Exit Sub
LogoutFehler:
If Err.Number = 91 Then
Exit Sub
Else
MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
End If
End Sub
Function SAPLOG() As Boolean
'Verbindungsobjekt setzen (Property von FunctionCtrl)
Set FunctionCtrl = CreateObject("SAP.Functions")
Set SapConnection = FunctionCtrl.Connection
'Logon mit Initialwerten
SapConnection.Client = "010"
SapConnection.Language = "EN"
SapConnection.System = "PR1"
SapConnection.SystemNumber = "00"
'SapConnection.Password = ""
SapConnection.GroupName = "PR1"
SapConnection.HostName = "168.9.25.120"
SapConnection.MessageServer = "168.9.25.120"
If SapConnection.Logon(0, False) <> True Then 'Logon mit Dialog
Set SapConnection = Nothing
DoCmd.Hourglass False
MsgBox "No connection to SAP R/3 !"
SAPLOGIN = False
SAPLOG = False
Exit Function
End If
SAPLOG = True
End Function
Function MatDescr(MatNr As String)
Dim func1 As Object
Dim row As Object, X As Integer, ErsteNr As String
Dim DatensatzZähler As Long
Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
If Not SAPLOGIN Then
If Not SAPLOG() Then
MsgBox "No connection to SAP !", 16
SAPLOGOUT
Exit Function
End If
End If
' Instanziieren des Function-Objektes
Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
' Export-Paramter definieren
func1.exports("MATNR") = MatNr
func1.exports("SPRAS") = "EN"
DoEvents
If Not func1.call Then
If func1.exception <> "" Then
MsgBox "Communication Error with RFC " & func1.exception
End If
DoCmd.Hourglass False
SAPLOGOUT
Exit Function
Else
MatDescr = func1.imports("MAKTX")
End If
If MatDescr = "" Then
MatDescr = "PART NO. NOT FOUND"
End If
End Function -
How to save hr data in Active directory using abap
Hi all
can any one please help me out how to save hr data in Active directory using LDAP connector
please help as this is very urgent requirement
thanks in advance
Thanks
ChantiWhat form do you have the user's name in ?
ANTIPODES\alberteString searchFilter = "(&(objectClass=user)(samAccountName=alberte))";[email protected] searchFilter = "(&(objectClass=user)(userPrincipalName=[email protected]))";Albert EinsteinString searchFilter = (&(objectClass=user)(givenName=Albert)(sn=Einstein))";or using Ambiguous Name Resolution (anr)String searchFilter = "(&(objectClass=user)(anr=Albert Einstein))";or it's even clever enough to useString searchFilter = "(&(objectClass=user)(anr=Einstein Albert))"; -
How to save the output of sap script to pdf document in sap
hi abapers
how to save the output of sap script in sap so that can retrieve the saved document later.
i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
how to use dmsHi deepika,
This thread will solve ur problem OTF -> PDF
Regards,
Pravin -
How to upload the data to SAP-DMS(Document Management System)
Dear sir,
How to upload the data to SAP-DMS (Document Management System) please give me the code for this .ex for (excel format or tab deliminated) to sap system through BAPI i have to pass.
regards
R M PatilHi,
May be following link may help you.
/thread/315373 [original link is broken]
/message/205534#205534 [original link is broken]
Thanks,
Sree. -
How to save the output of sap script in sap so that can be retrieved later
hi abapers
how to save the output of sap script in sap so that can retrieve the saved document later.
i have to save the rcia output from sap script in pdf document in sap so that it can be retrieved later
how to use dms
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Dec 26, 2008 11:01 AMHi Deepika,
Look into this link https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401cca81-b861-2910-ada2-f416dfb3b3fe
Regards,
Pravin -
How to save the data present in TEXT BOX?
Hi friends i am able to create a text editor in one of my screen but i want to know how to save the data when the text is entered in that text box and retrive when they open the screen?
Hi ,
Please check the format below since it is based on a working code
first you need to create a text in s010 function module...
there should be some key based on which you plan to save the text..imagine it is Purchase order then..PO+item numner is always unique.eg:0090010(900PO/item10).so in the code you can append these two and they will be unique..so you can always retrieve them,overwrite,save them anytime you need
**************data declarations
TYPES: BEGIN OF TY_EDITOR,
EDIT(254) TYPE C,
END OF TY_EDITOR.
data: int_line type table of tline with header line.
data: gw_thead like thead.
data: int_table type standard table of ty_editor.
****************fill header..from SO10 t-code..when you save you need the unique key..youfill it here and pass it in save_text function module
GW_THEAD-TDNAME = loc_nam. " unique key for the text -> our unique key to identify the text
GW_THEAD-TDID = 'ST'. " Text ID from SO10
GW_THEAD-TDSPRAS = SY-LANGU. "current language
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created in SO10
*To Read from Container and get data to int_table
CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = int_table
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop data from int_table and save to int_line-tdline appending it.
*save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = GW_THEAD
TABLES
LINES = InT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC 0.
ENDIF.
*To pass to Container
CALL METHOD EDITOR ->SET_TEXT
hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju -
Dynamically built query on execution How to save the data in Object Type
Hi,
In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
output of the query in it. Here is the Object Type I have
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
pkid NUMBER,
pkname VARCHAR2(100);
pkcity VARCHAR2(100);
pkcounty VARCHAR2(100)
CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
--I initialize my Object Type*
data := new FIRST_RECORDTYPETAB();
FOR some_cursor IN c_get_ids (username)
LOOP
x_context_count := x_context_count + 1;
-- here I build the query dynamically and the same query generated is
sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
-- and now I need to execute the above query but need to store the output
EXECUTE IMMEDIATE sql_query
INTO *<I need to save the out put in the Type I defined>*
END LOOP;
How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
Any help is appreciated.
Thankshai ,
solution for Dynamically built query on execution How to save the data in Object Type.
Step 1:(Object creation)
SQL> ED
Wrote file afiedt.buf
1 Create Or Replace Type contract_details As Object(
2 contract_number Varchar2(15),
3 contrcat_branch Varchar2(15)
4* );
SQL> /
Type created.
Step 2:(table creation with object)
SQL> Create Table contract_dtls(Id Number,contract contract_details)
2 /
Table created.
Step 3:(execution Of procedure to insert the dynamic ouput into object types):
Declare
LV_V_SQL_QUERY Varchar2(4000);
LV_N_CURSOR Integer;
LV_N_EXECUTE_CURSOR Integer;
LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
OV_V_CONTRACT_NUMBER Varchar2(15);
LV_V_CONTRACT_BRANCH Varchar2(15);
Begin
LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
LV_N_CURSOR := Dbms_Sql.open_Cursor;
Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
Loop
Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
End Loop;
Dbms_Sql.close_Cursor (LV_N_CURSOR);
COMMIT;
Exception
When Others Then
Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
End;
step 4:check the values are inseted in the object included table
SELECT * FROM contract_dtls;
Regards
C.karukkuvel -
How to save the data on the database
Please tells me how to save the data on the database as soon as posible.
Thank!!
MichaelMichael,
What database? Citadel, or something that has an SQL?
If the latter, use the SQL toolkit. You can get it from NI.
Please elaborate if this is not your situation.
Thank you -
How to save HR data in Active Directory using ABAP i.e thru LDAP Connector
Hi All,
Can any one please help me out how
to save HR data in Active directory
using LDAP Connector ?
Please help ASAP as it is very urgent .
Thanks
JitendraThere are 100 of such scripts are there online.
here are few tips and codes. you will get more.
https://gallery.technet.microsoft.com/scriptcenter/Feeding-data-to-Active-0227d15c
http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/31/use-powershell-to-modify-existing-user-accounts-in-active-directory.aspx
http://powershell.org/wp/forums/topic/ad-import-csv-update-attributes-script/
Please mark this as answer if it helps -
How to update the data in sqlserver table using procedure in biztalkserver
Hi,
Please can any one answer this below question
how to update the data in sqlserver table using procedure in biztalkserver
while am using executescalar,typedprocedure getting some warning
Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
Please send me asap....
Thanks...Hi Messip,
A detailed error would have helped us to answer you more appropriately but
You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
2013: Inserting RawXML (Whole Incoming XML Message) in SQL database -
How to save the data of ABAP report into a notepad in desktop location???
HI all,
Can any one tell me how to transfer the data of ABAP report into a Notepad.
Actually I have to schedule a ABAP report in background on daily basis and I want to transfer the
whole record into Notepad.
If any program is available for this..please clearify the relevent code for transferring.
Thanks
Rajeevdeclare a character type internal table.
now move your data from it_data ( internal table with data ) into table itab.
since you are running this report in background, you cannot save it to the desktop. Instead give any app server location
data: itab(400) occurs 0 with header line.
field-symbols: <fs1> type any.
data: gv_file type rlgrap-filename default 'TEST.TXT'.
data: gv_filepath type rlgrap-filename default <path>.
LOOP AT it_data.
DO 100 TIMES.
ASSIGN COMPONENT sy-index OF STRUCTURE it_data TO <fs1>.
IF sy-subrc = 0.
CONCATENATE itab <fs1> INTO itab SEPARATED BY ' '.
ELSE.
EXIT.
ENDIF.
ENDDO.
SHIFT itab LEFT DELETING LEADING ' '.
APPEND itab.
CLEAR itab.
ENDLOOP.
concatenate gv_filepath '/' gv_file into gv_file.
OPEN DATASET gv_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
LOOP AT itab.
TRANSFER itab TO gv_file.
ENDLOOP.
CLOSE DATASET gv_file.
ENDIF. -
How to save the data in form before submit to sap backend
Hi experts,
i have to create one form . In this form i have to save the data and that form should sent to another person to submit it in to sap back end. is there any possiblities to create form like this...
Please any one help me...Hi Himanshu
I already searched but no use... can you recollect once and help me..
Regards
Sharada -
How to retrieve the data from SAP database.
Hi Pals,
How to retrieve data from SAP R/3 System to my third party software. I will make my query little bit more clear. There is a list of assets entered and stored in the SAP system. For example 3 mobile phones.
1) Mobile 1- Nokia
2) Mobile 2 - Samsung
3) Mobile 3 u2013 Sony
Now think I do not know what all assets is there. I have to retrieve the data and get it on my third party software. Just display the list of assets. Lets say SAP XI is also there. Now how will I map it and get the details.
Please give me step by step method.
N.B: Just to read the data from SAP database.
Please make the flow clear step by step.
Thanking you
AKHi,
You can use RFC or ABAP Proxy to make synchronous call with SAP.
Under RFC or ABAP Proxy Program you can get the data from SAP tables. Direct access to SAP Database is not preferrable even if its possible.
The better way to go for RFC or PROXY.
You will send the request from Third party system and the it will be as input parameters from RFC/ Proxy it will response based on it.
This got it all..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
HTTP to RFC - A Starter Kit
/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit
Refer
Thanks
Swarup
Edited by: Swarup Sawant on Jun 4, 2008 9:32 AM -
How to save the data from AI Read.vi?
Hi,
The main target is that testing the strength of a object which is extended by a force. The desired results are
1. The strength of object under the force(main target, I am trying now);
2. Displacement of object being extended(I have mimicly done);
3. Images of deformation of the object extended(I have mimicly done).
4. The sub procedure will stop when the object under testing is broken. I intend to use the big pulse from force sensor by analizing the data acquired.( it is more difficult if using machine vision).
What I am mainly trying to do now is implementation of a sub vi to collect the data which is acquired from channel 0 of PCI-6052E which is connected to a force sensor. I have tried to use an existing exam
ple as attached with some modifications. I have tested the data from the sensor by comparing to measurement by multimeter and it takes sense. But
1. I still don't know how to save data displayed by AI Read.vi? And use what kind data type could save more memory?
2. I think that memory management is very important because each points of the result includes its strength, image and displacement. How can I acquire enough significant points for the final results being reliable and save these data down to an array or cluster synchronously? (each sub procedure has no time limited)
3.Because I think that a continuous data acquisition would occupy ALL CPU TIME and their related images and displacements would have no chance to be taken down by CPU at the same moment. Am I right?--I am sure that it is not very difficult problem but my mind is still in caose and the time is quite limited to me now.
I am looking for your sugguestion or solution or control philosophy too. You can modify the fi
le attached if you can. I will learn from your idea.
Thank you very much for your time and energy!
Your
Swedlin
Attachments:
Acquire_N_Scans_1_10.vi 75 KBHello;
Regarding your question on the data type that would use less storage space, the answer is binary type. Actually, you can use another shipping example as start point of your application. The example I'm mentioning is a data logger, that saves binary data to a file on your hard drive. You can find that example at Search Examples->I/O Interfaces->Data Acquisition->Data Logger->High Speed Data Logger.
Regarding your question about the CPU time, the statement is valid. In case you use a synchronous AI task, the CPU execution will get stuck inside the AI Read.vi untill the buffer is ready to be read. One thing you can do about that is to change the acquisition task to be asynchronous. There is a good example in Labview showing how you can accomplish that.
You can find the example at Search Examples->I/O Interfaces->Data Acquisition->Analog Input->DAQ Occurrences.
You can combine both examples to accomplish the task you need.
Hope this helps.
Filipe A.
Applications Engineer
National Instruments
Maybe you are looking for
-
How to get the detailed version of ORACLE?
hi, the version of Oracle Enterprise Version is 9.2.0.2.0, recently I patched it to 9.2.0.6.0, and wanted to get the detailed version by using MetaData in OCCI, but what I got is still 9.2.0.2.0. how can I get the "9.2.0.6.0"? thanks for your help! s
-
Hello guys, I need your help. I'm having a strange symptom. I have created a simple DTP to transfer data fom one Cube to another. If I execute the DTP with delta upload it works fine and transfer all data, but if I change it to full upload it says th
-
How can I remove a small amount of iTunes credit?
I have on my account 64 cents. I need to know how to remove it so I can change iTunes stores from USA to Canada.
-
Section code in customer line item for scrap
Hi I created customer. I assigned business place to manufacturing plant and then section code to business place. Now i created scrap order and did PGI and invoice. Now i i saw accounting entry and double clicked on customer line item. There i saw bus
-
Hello. New to iPhone, veteran of Windows. In studying the phone and manual, i cannot find a way to upload files to the iPhone and then manage those in some sort of folder heirarchy. For instance, PDF files, or text files, or spreadsheets. Is there a