How to put the return data from webservice to a text field
Dear All ,
I created a function module for calculating the square of the input given and created a webservice using the create webservice option available for function modules.
function module:-
FUNCTION ZJK_FLEX_TEST.
*"*"Local Interface:
*" IMPORTING
*" VALUE(DATA) TYPE ZSLNO OPTIONAL
*" EXPORTING
*" VALUE(DATA1) TYPE ZSLNO
*" TABLES
*" IT_DAT STRUCTURE ZWBSER OPTIONAL
data: wa_dat LIKE LINE OF it_dat.
data1 = DATA * data.
wa_dat-results = data * data .
APPEND wa_dat TO it_dat.
ENDFUNCTION.
and i passed the it_dat in table fields and data1 in the export paramenters of FM.
but in the flex i am not getting the table values. but i am able to get the data1 value. but the problem is . I am getting it as an XML format.
<s0:ZJK_FLEX_TEST.Response xmlns:s0="urn:sap-com:document:sap:rfc:functions" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<DATA1>0000025</DATA1>
</s0:ZJK_FLEX_TEST.Response>
so how to set the value of data1 to my text field in the flex .
Hi Jay,
resultFormat="e4x" will give you resultset in XMLListCollection otherwise resultset will be an ArrayCollection.
For your example try with this statement after web service result:
txtInput.text = ws.ZJK_FLEX_TEST.lastResult.DATA1.toString();
where ws is id for web srvc and txtinput is a simple textInput control UI.
I hope this will solve your query.
Regards,
Vivek
Similar Messages
-
How to view the returned data from a stored procedure in TOAD?
Hi,
I created ref cursor in the stored procedure to return data. The stored procedure works fine, just want to view the result in TOAD. The BEGIN... EXEC... END can execute the stored procedure, but how to make the result display?
Thanks!Right click the editor and choose
"Prompt For Substitution Variables".
Run for example the following code:
DECLARE
PROCEDURE p (cur OUT sys_refcursor)
AS
BEGIN
OPEN cur FOR
SELECT *
FROM DUAL;
END p;
BEGIN
p (:cur);
END;
The result will display in Toad's Data Grid!
Regards Michael -
How to view the returned data from a stored procedure?
Hi,
I created ref cursor in the stored procedure to return data. But how can I view the data when I execute it? The stored procedure works fine, just want to view the result.
Thanks!SQL>set serveroutput on size 100000;
SQL>set autoprint on
SQL>variable cv refcursor;
SQL>exec proc_name(param1,:cv); -
How to get the complete data from Webdynpro using a RFC
hi guys,
A form is created in the webdynpro, when that pdf form is called the user have to provide the key field ie the employee number in the form and then when he press the 'go' button a rfc is called and it gives all the details of the employee in the form. Then the user have to input some fields in the form and he have press the submit button. My problem is here, when the user is going to press the submit button that form will be converted to a stream (binary) of data and it is sent to one of the import parameter used in the RFC.
I have created a RFC and created a import parameter of data type XSTRING, since i want to see what exactly R3 is receiving from web dynpro i am writing this contant in the sever as a text file. When i saw that text file i cant see the complete data.
And when i searched in R3 the capacity of xstring is 1024 CHAR, so i dont know how to capture the entire data from webdynpro into my R3.
I give the code what i worte please tell me am i missing anything in my code, or is there any data type which can hold more than 500kb of data which is coming from webdynpro.
FUNCTION ZSEND_MAIL_ATTACHMENT.
""Local Interface:
*" IMPORTING
*" VALUE(OUT_PLACE_LEVEL) TYPE XSTRING OPTIONAL
*" VALUE(BIN_DATA) TYPE INDX_CLUST OPTIONAL
*" TABLES
*" IT_MESSAGE STRUCTURE SOLISTI1
Data Declaration
DATA: gd_cnt TYPE i,
gd_sent_all(1) TYPE c,
gd_error TYPE sy-subrc,
tab_lines LIKE sy-tabix.
Structure Declaration
DATA : BEGIN OF it_file OCCURS 0,
row(255),
END OF it_file.
DATA : BEGIN OF i_split OCCURS 0,
row(50),
END OF i_split.
Internal Table Declaration
data : it_receivers like table of SOMLRECI1 with header line."occurs 0.
DATA : objbin LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE. "sOLIX
DATA : it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
data : wa_receiver like table of SOMLRECI1 with header line.
data : it_receiver like table of SOMLRECI1 with header line.
data : v_bin_data like SOLISTI1 occurs 0 with header line.
DATA : gd_doc_data LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE.
*data bin_data1 like table of solix with header line.
REFRESH : objbin, it_packing_list, it_receivers, wa_receiver.
CLEAR : objbin, it_packing_list, wa_receiver, it_receivers.
DATA V_SUBJECT(255) VALUE 'HI'.
gd_doc_data-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( it_message ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SENDFILE'.
gd_doc_data-obj_descr = v_subject.
gd_doc_data-sensitivty = 'O'.
APPEND GD_DOC_DATA.
Appending The Internal Table it_packing_list
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'RAW'.
it_packing_list-body_num = tab_lines.
APPEND it_packing_list.
*CALL FUNCTION 'GUI_UPLOAD'
*EXPORTING
*filename = V_FILE_PATH
*filetype = 'BIN'
*TABLES
*data_tab = BIN_DATA.
move bin_data to v_bin_data.
append v_bin_data.
*move soli to bin_data.
LOOP AT V_BIN_DATA into objbin.
MOVE v_bin_data TO objbin-line.
APPEND objbin.
ENDLOOP.
CLEAR it_packing_list.
DESCRIBE TABLE objbin LINES tab_lines.
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
it_packing_list-doc_type = 'PDF'.
it_packing_list-body_num = tab_lines.
it_packing_list-doc_size = tab_lines * 255.
APPEND it_packing_list.
data file(255) value '/tmp/bali.txt'.
*Appending The Internal Table it_receivers
close dataset '/tmp/bali.txt'.
open dataset '/tmp/bali.txt' for output in text mode encoding default.
if sy-subrc = 0.
loop at objbin.
transfer objbin to '/tmp/bali.txt'.
endloop.
else.
write 'hi'.
close dataset '/tmp/bali.txt'.
endif.
it_receiver-receiver = '[email protected]'.
it_receiver-rec_type = 'U'.
it_receiver-com_type = 'INT'.
APPEND wa_receiver.
move wa_receiver[] to it_receiver[].
append it_receiver.
*Move wa_receiver[] to it_receivers[].
Clear it_receivers.
if i_OUT_PLACE_LEVEL NE 0.
loop at it_receivers into wa_receiver.
loop at it_receivers into wa_receiver.
**Function Module To Post The Message To Externa Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_packing_list
CONTENTS_TXT = objbin
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
clear wa_receiver.
ENDFUNCTION.You have to convert your long string to a table of shorter strings.
There may be other ways, but one possibility is to use a loop to process you string.
while (there is something left)
put the next e.g. 1024 characters in a new row of your table
endwhile
If you need to reconstruct your string from the table, don't use simple concatenation since it will remove blanks at the end of lines. Believe me (from experience) sooner or later this will happen.
Instead you need to either set the subsections of your long string, or insert from the end of your table and keep shifting the contents (probably less efficient) right -
How to get the return values from a web page
Hi all :
how to get the return values from a web page ? I mean how pass values betwen webflow and web page ?
thank you very much
Edited by: jingying Sony on Apr 15, 2010 6:15 AM
Edited by: jingying Sony on Apr 15, 2010 6:18 AMHi,
What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
Regards,
Karri -
How to delete the duplicate data from PSA Table
Dear All,
How to delete the duplicate data from PSA Table, I have the purchase cube and I am getting the data from Item data source.
In PSA table, I found the some cancellation records for that particular records quantity would be negative for the same record value would be positive.
Due to this reason the quantity is updated to target but the values would summarized and got the summarized value of all normal and cancellation .
Please let me know the solution how to delete the data while updating to the target.
Thanks
Regards,
SaiHi,
in deleting the records in PSA table difficult and how many you will the delete.
you can achieve the different ways.
1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
3.you can restrict the cancellation records at query level.
Thanks,
Phani. -
How to delete the Hierarchy data from Infoobjects.
How to delete the Hierarchy data from Infoobjects. In my case I had 300 records in the corresponding table of info object.
When i was trying to delete the hierarchy data, I am getting error message. "Some master data not deleted". Can any one tell me to delete all these records by using a program.Hi
Go to SE11 and enter the hierarchy table name.
/BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
Thanks
TG -
How to upload the master data from legacy to SAP
Hi Frends,
how to upload the master data from legacy system to SAP System once the configuration is over.how to carry forward the open items of vendors and customers while uploading.who will upload functional consultantsor ABAPER.
please clarify me
Regards
Sap GuruHi ,
use LSMW or BDC for uploading Master & transaction data.
This work is done by the Respective Functional team.
Chandra -
How to change the font used to fill in a text field.
Can you please tell me how to change the font that comes up when a text field is filled in?
Can I change this setting in InDesign or does it have to be done in Acrobat?It must be done in Acrobat. InDesign only allows Times Roman for some reason.
To change it in Acrobat 11, open the PDF and select: Tools > Forms > Edit
and select the field(s) you want to change, bring up the field properties dialog, and look on the Appearance tab for the font dropdown. -
How to display the updated data from db to user interface in sruts framewor
A beginner in this area, I have been able to read a record from a
MySQL database and populate in jsp form . Now, my goal is to
allow the user to edit the contents of the form and then update the
record in MySQL and then display the same in jsp. page
The scenario in detail
1)the data is fetched from db and displayed in non-editable format
2)Next button is clicked
3)Now in the same jsp page I view the same data from db in editable format
4)The user is allowed to change the information
5)Now update button is clicked
6)the records are updated in the db -Finished doing till this step
7)But the updated info in non - editable format to be displayed in jsp page is left pending.
Here is my code for jsp,i want know how to write an action for this,tried doing the same in java and I'm successful.but what I need is how to fetch the updated information in the user interface.
I've made both editable as well as non editable info in the same page with different actions.
pl help me,I'm a newbie
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
<%@ page language="java" %>
<%@ page import="java.util.ArrayList,java.util.Iterator" %>
<%@ page import="com.finocus.common.container.CustomerDetailsTest;" %>
<html:html>
<head>
<title>CUSTOMER DISPLAY</title>
</head>
<body>
<table width="100%" bgcolor="darkkhaki">
<tr>
<td><table width="100%" bgcolor="indigo">
<tr>
<td><font color="white">Display</font></td>
<td><font color="white">Update</font></td>
<td><font color="white">Verify</font></td>
<td><font color="white">Confirm</font></td>
</tr>
</table>
</td>
</tr>
<%
//Container for holding data
ArrayList list = (ArrayList)session.getAttribute("CUSTOMERDETAILS");
Iterator itr=list.iterator();
while(itr.hasNext())
CustomerDetailsTest cust = (CustomerDetailsTest) itr.next();
System.out.println("testGetCustomerDetails()-successed. retrieved CustomerDetailsTest="+cust.toString());
%>
<%
//Session for checking whether edit or non-edit mode
String pageMode = (String)session.getAttribute("CUSTOMER_PAGE_MODE");
session.removeAttribute("CUSTOMER_PAGE_MODE");
if(null==pageMode)
pageMode = "EDIT";
if(pageMode.equals("EDIT"))
//display data in the form
System.out.println("Editable mode");
%>
<html:form action="/nonedit">
<tr>
<td><table width="100%" bgcolor="darkkhaki">
<tr>
<td><b><bean:message key="label.id"/></b></td>
<td><font color="red"><%=cust.getCusId()%></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.Company"/></b>
</td><br>
<tr>
<td><bean:message key="label.cname"/></td>
<td><font color="blue"><html:text property="name" value="<%=cust.getCname()%>"/></font></td>
<td><bean:message key="label.cphone"/></td>
<td><font color="blue"><html:text property="phone" value="<%=cust.getCphone()%>"/></font></td>
</tr><br>
<tr>
<td><bean:message key="label.caddr1"/></td>
<td><font color="blue"><html:text property="address1" value="<%=cust.getCaddress1()%>"/></font></td>
<td><bean:message key="label.cemail"/></td>
<td><font color="blue"><html:text property="email" value="<%=cust.getCemail()%>"/></font></td>
</tr><br>
<tr>
<td><bean:message key="label.caddr2"/></td>
<td><font color="blue"><html:text property="address2" value="<%=cust.getCaddress2()%>"/></font></td>
<td><bean:message key="label.cfax"/></td>
<td><font color="blue"><html:text property="fax" value="<%=cust.getCfax()%>"/></font></td>
</tr><br>
<tr>
<td><bean:message key="label.ccity"/></td>
<td><font color="blue"><html:text property="city" value="<%=cust.getCcity()%>"/></font></td>
<td><bean:message key="label.czip"/></td>
<td><font color="blue"><html:text property="zip" value="<%=cust.getZip()%>"/></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.cstate"/></b></td>
<td><font color="red"><html:text property="state" value="<%=cust.getCstate()%>"/></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.Admin"/></b>
</td><br>
<tr>
<td><b><bean:message key="label.AAname"/></b></td>
<td><font color="red"><html:text property="adminname" value="<%=cust.getAname()%>"/></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AAemail"/></b></td>
<td><font color="red"><html:text property="adminemail" value="<%=cust.getAemail()%>"/></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AAphone"/></b></td>
<td><font color="red"><html:text property="adminphone" value="<%=cust.getAphone()%>"/></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.User"/></b>
</td><br>
<tr>
<td><b><bean:message key="label.AUname"/></b></td>
<td><font color="red"><html:text property="adminusername" value="<%=cust.getUname()%>"/></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AUemail"/></b></td>
<td><font color="red"><html:text property="adminuseremail" value="<%=cust.getUemail()%>"/></font></td>
</tr><br>
<tr align="center">
<td><html:cancel value="Cancel"/>
<html:submit value="Next"/></td>
</tr>
</html:form>
<%
}else
//display data in the text
System.out.println("Non-Editable mode");
%>
<html:form action="/edit">
<tr>
<td><table width="100%" bgcolor="darkkhaki">
<tr>
<td><b><bean:message key="label.id"/></b></td>
<td><font color="red"><%=cust.getCusId()%></font></td>
<td><b><bean:message key="label.status"/></b></td>
<td><font color="red"><%=cust.getStatus() %></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.Company"/></b>
</td><br>
<tr>
<td><bean:message key="label.cname"/></td>
<td><font color="blue"><%=cust.getCname()%></font></td>
<td><bean:message key="label.cphone"/></td>
<td><font color="blue"><%=cust.getCphone()%></font></td>
</tr><br>
<tr>
<td><bean:message key="label.caddr1"/></td>
<td><font color="blue"><%=cust.getCaddress1()%></font></td>
<td><bean:message key="label.cemail"/></td>
<td><font color="blue"><%=cust.getCemail()%></font></td>
</tr><br>
<tr>
<td><bean:message key="label.caddr2"/></td>
<td><font color="blue"><%=cust.getCaddress2()%></font></td>
<td><bean:message key="label.cfax"/></td>
<td><font color="blue"><%=cust.getCfax()%></font></td>
</tr><br>
<tr>
<td><bean:message key="label.ccity"/></td>
<td><font color="blue"><%=cust.getCcity()%></font></td>
<td><bean:message key="label.czip"/></td>
<td><font color="blue"><%=cust.getZip()%></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.cstate"/></b></td>
<td><font color="red"><%=cust.getCstate()%></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.Admin"/></b>
</td><br>
<tr>
<td><b><bean:message key="label.AAname"/></b></td>
<td><font color="red"><%=cust.getAname()%></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AAemail"/></b></td>
<td><font color="red"><%=cust.getAemail()%></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AAphone"/></b></td>
<td><font color="red"><%=cust.getAphone()%></font></td>
</tr><br>
<td>
<font color="brown" face="Courier New"><b>
<bean:message key="label.User"/></b>
</td><br>
<tr>
<td><b><bean:message key="label.AUname"/></b></td>
<td><font color="red"><%=cust.getUname()%></font></td>
</tr><br>
<tr>
<td><b><bean:message key="label.AUemail"/></b></td>
<td><font color="red"><%=cust.getUemail()%></font></td>
</tr><br>
<tr align="center">
<td><html:submit value="Update"/></td>
</tr>
</html:form>
<%
%>
<%
%>
</table>
</td>
</tr>
</table>
</body>
</html:html>u r using action classes. so after calling the insert method in Action Class to a dao... the next statement should be retrieve statement. so at the time of updating first it will get updated.. the next statement it will execute is retrieve and then set these details in VO or FORM and show it on JSP
Message was edited by:
leo_michael -
How to recover the autocomplete data from a Time Machine backup?
How to recover the Safari 5.1.7 autocomplete data from a Time Machine backup on Mac OS X 10.6.8 (Snow Leopard)?
To solve other issues (Safari crashing sometimes when saving web pages), I selected:
Safari - Empty Cache
Safari - Reset Safari - Selected ALL - Reset
I could later on recover some Safari autofill data restoring
HD/Users/~/Library/Cookies/Cookies.plist
HD/Users/~/Library/Safari/Form Values
HD/Users/~/Library/Safari/History.plist
but other autocomplete data is missing, including the one when filling web form search fields in web pages, for instance, and also some username and password login data on some web sites.
How to restore all such data from the Time Machine Backup?
Thanks!I also recovered:
HD//Users/~/Library/Keychains/login.keychain
What else should I recover? -
How to extract the historical data from R/3
hi
I am extracting data from R/3 through LO Extraction. client asked me to enhance the data source by adding field. i have enhanced the field and wrote exit to populate the data for that field.
how to extract the historical data into BI for the enhanced field. already delta load is running in BI.
regardsHi Satish,
As per SAP Standard also the best way is to delete whole data from the cube and then load the data from set up tables as you have enhanced the data source.
After data source enhancement it is supported to load normally because you don't get any historical data for that field.
Best way is to take down time from the users, normally we do in weekends/non-business hours.
Then fill the set-up tables; if the data is of huge volume you can adopt parallel mechanism like:
1. Load set-up tables by yearly basis as a background job.
2. Load set-up tables by yearly basis with posting periods from jan 1st to 31st dec of any year basis as a background job.
This can make your self easier and faster for load of set-up tables. After filling up set-up tables. You can unlock all users as there is no worries of postings.
Then after you can load all the data into BI first into PSA and then into Cube.
Regards,
Ravi Kanth. -
How to get the current Date from the system?
How do I acquire the current date from the system? Also, if possible, can I assign the day, month and year separately into three variables and how? It would be thankful if some simple Example could be given. Thanx!
import java.util.*;
public class count {
public count() {
Calendar now = Calendar.getInstance();
int month = now.get(Calendar.MONTH);
int day = now.get(Calendar.DAY_OF_MONTH);
int dayyear = now.get(Calendar.DAY_OF_YEAR);
int year = now.get(Calendar.YEAR);
int a = 365;
int b = a - dayyear;
System.out.println("The day is the" + " " + day);
System.out.println("IT is the" + " " + month + " " + "month of the year");
System.out.println("The year is" + " " + year);
System.out.println("This many days till next year" + " " + b);
public static void main(String[] args) {
count cou = new count();
} -
How to get the forecast data from SCM into BW
Hello,
Is there a table or Function module in SCM F&R that can be used to transfer the forecast data from SCM F&R into BW? I dont see any Business content datasources that has the forecast data.
I would like to get the future forecast data. For ex, if there is a forecast for a material and Site for the next 52 weeks, I would like to retrieve
the same from SCM. I dont see any business content. The closest would be 0FRE_ANA_WEEKLY_1. But it has only the past data, not the future data.
Thanks,
SBS.Hi,
You would follow the same process as you would for getting data from a R3 system to BW, i.e generate datsources on the APO side and then set the extraction to flow from APO to BW. On the BW side, you'll need a source system for the APO, replicate datsources, set up update and transfer rules in the infosource and then load data to the data targets.
Cheers,
Kedar -
hello, we need to remove the dirty data from MDS, but we found we can only do this from MDS web, and we need to do this by store procedure to make this process automatically. is there any easy method to remove the data from MDS automatically? thank.
WarrenHi Warren,
Assuming the dirty data is easily identifiable, all you need to do is use the staging process with import type of 5 (de-activate - i.e., soft delete) or import type of 6 (hard delete).
Could give more details if I knew the version of MDS you are running (SQL 2008R2 or SQL 2012).
Kind regards,
M
Maybe you are looking for
-
Analyzer 6.5.1.2.01063 Gifs problem
i have a problem when i put an animated gif in a report, when i want to open the report, show me the following error" An unknown exception ocurred while communicating with the server.; nested exception is:java.lang.NullPointerException"how can i solv
-
Can't print. Network Host is Busy or Unable to Connect to Printer 10.6.4
This started yesterday. I had made no changes to my network. I get this error, and cannot print from my MacBook Pro running 10.6.5 wirelessly. I print using the IP address of the printer. (10.0.1.2) The printer is a Brother (drivers updated), connect
-
I've had an iPod mini for about 2 years and last year I started saving podcasts on it. At first they were all fine but now the most recent one will save in "Podcasts" along with naybe 3 or 4 others and the rest of the 20 or so will only save in songs
-
Deleting duplicates in iphoto library
Does anyone know how to delete duplicates in iphoto. I hit the duplicate button by mistake.
-
Hey everyone, A colleague of mine just got moved from a desktop to a laptop, then was given full admin rights. Suddenly, everything in RH (WebHelp builds work ok, nothing is "blank" in the TOC, no error messages) works perfectly. I'm trying to nail d