Using data from HTTPService call

I have been searching every forum, Google, etc for what I'm
trying to do. I have found some answers, but none of them seem to
work for me or I'm doing something wrong (probably the latter).
I have a simple app that presents a form to a user and based
on their input it makes and HTTPService call to send a GET to a PHP
script which then returns data to fill a datagrid and present a
chart. That all works good. Now I'm trying to figure out the best
way to export the data to a CSV. I've seen the forums that show how
to put the data to a clipboard and then copy it. I can't get any of
those to work for some reason. I had another idea, but can't figure
out how to do it.
I'd like to take the same query and returned results and put
it into a string or similar so I can output the data to a TextArea.
Is this possible? I've got the popup working and when I can get it
to fill in the TextArea, it just says
"[Object,object],[Object,object]...... " over and over again. So
it's almost like the data is getting there, but it's not displaying
properly. Any thoughts on how to do this?
Is the data returned from a query like this an Array? An
XMLList? I can't find any docs on how to determine what the result
is returned as or how to use the result other than in a datagrid or
filling in Labels or Text fields.
Any help would be greatly appreciated.
Thanks,
chris

Tracy - Thank you for taking the time to reply. Sorry about
posting to the wrong forum. I was busy reading so many other posts,
I just hit the link to add a new topic.
You are right, my first problem was how to use the returned
data. I found another post that said to use the e4x format, just
like you said and that definitely helped. I found this example on
manipulating XML data:
http://www.brucephillips.name/blog/index.cfm/2006/10/15/XML-Tutorial-Part-2,
which also help.
With all of this, I am able to take the XML output and dump
it right into the TextArea for viewing or selecting and copying.
What I'd like to do now though is to pull off the XML tags
and just have the straight content so that I can have usable CSV
text to copy.
As for the System.setClipboard() call - I guess I didn't have
so much trouble with that other than figuring out how to get the
data out of my datagrid properly, convert it to a string to create
a CSV format and then copy it.
Chris

Similar Messages

  • How to use data from standard view in Web dynpro for ABAP

    Hello:
    I have to create an Abap Web Dynpro, and I must use data from a standard view in the new one. Does anybody know what do I have to do?
    Thank you and have a happy new year.

    Hi Rodrigo,
    Firstly, list the Standard component under Component Usage of the Component which you are creating in your View.
    Second, In the Custom Component, view, goto context, and try to add the node from the Standard component in to your view.
    NOTE: The second step requires a Node in component controller of the Standard Component.
    Finally, Now in your view, get the data from that and map the data.
    NOTE: To do this, I think you need to call your Standard WDA first and then only your node contains data and it will be passed.
    I hope it is helpful.
    Regards,
    Shashikanth. D

  • Filtering using data from a spreadsheet in WebI

    I need to convert a BO6.5 Full client report to a BO XI R3.1 WebI report.  The report needs to use data from an Excel spreadsheet to filter data from a universe, and in 6.5 this was achieved by creating a universe for the spreadsheet data and using 'Select Query Results' as an operand returning this data in the report conditions.  When we put this report through the conversion wizard the conversion fails.
    Are there any other techniques that can be used in WebI that would allow me to use a spreadsheet to filter / join with a query from a 'regular' universe?
    Thanks,
    Steve Clarke

    Thanks for the response! I'd be interested in writing a script for it (I've actually been researching it a bit already). I'm completely new to Javascript (and scripting) but have a fair level of experience with c/c++ so I feel it shouldn't be too bad. I'll ask here for now, just let me know if I should ask a new question on the scripting forum instead.
    I've looked at the Acrobat JavaScript API Reference (http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf) a bit but am having trouble finding a way to read the spreadsheet's data in (I was planning on using a csv file). I found Doc.importTextData(), which can parse a tab delimited file and from the sounds of it fill in the forms automatically (though I would much prefer a c style file interface that lets me write the parsing logic). Every time I try to call importTextData it returns -1 though, which means "Warning: User Canceled File Select". When I call it direct from the JavaScript Debug Console I just get a -1, but when I have it execute when I save I get "NotAllowedError: Security settings prevent access to this property or method.". I did a bit of research on that and modified my script to look like:
    Autofill = app.trustedFunction(
        function ()
            app.trustedFunction(importTextData);
            app.beginPriv();
            var result = this.importTextData("test.csv", 0);
            app.endPriv();
            return result;
    I've also tried running Acrobat as an administrator, but I still get the same error. I could just not be understanding privileges correctly.
    My overall plan was:
        for each row in the spreadsheet
            - read the row in from the file
            - fill out the fields in the PDF using the read data
            - save the file with a new file name.
    If there is a better method to do this, just let me know.
    Thanks again for your time!

  • Does Facetime Use Data From You Data Plan?

    Does Facetime Use Data From You Data Plan?
    If so, what would be a good plan to use :200MB, 2 GB, or 2GB + Tethering?
    Or Does it use up minutes?

    Facetime uses wi-fi.
    "People have been dreaming about video calling for decades. iPhone 4 makes it a reality. With just a tap, you can wave hello to your kids, share a smile from across the globe, or watch your best friend laugh at your stories — iPhone 4 to iPhone 4 or to the new iPod touch over Wi-Fi."
    http://www.apple.com/iphone/features/

  • How to get useful data from request?

    Hello.
    I am looking for creating a management tool for a web site. All I want is that is there any ready to use API or package or open source project for retrieving user�s information? I just mean that is there any easy to use way in java to get useful data from a client (for example location, his or her system configuration and information �).
    Thanks.

    If you dump all the data from request (see the javadoc, and especially the "header methods" ) you'll see the data you can get are quite simple.
    The only thing you can try to rely on are ;
    - the IP address from the sender (when reversed to DNS, you can sometime use the tld to locate the country it comes from. Yet, you'll get many .com name, so it's not that significant. it may also give you the IAP used). Note that if the user is using a proxy, it's the proxy IP that you'll collect
    - the User-Agent header : from this, you can guess the OS and the browser used
    - the Referer header : usefull to get where your user comes from (where they found a link to your site)
    - the Cookie header : if you're using a servlet container with session id stored in cookie, you should see the Cookie header appear on the second request to your site. That helps finding out wether your user accep cookie or not (from a server point).
    Besides these, i don't think you can get any other useful data without asking your users on a form. Note that it's the client that decides to send Referer, User-Agent or Cookie headers. Those are not mandatory to the Http Protocole and some browser allow their user to fool their content (butmore than 90% of the widespread browsers don't)

  • I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. years each month.

    I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but need to report each month.

    Hi Tony,
    Answering your question would be easier given a screen shot of the source table and one of what you want the summary table to look like.
    Is the data you want for each month in a single cell o the source table, or does the summary table need to collect February's data (for example) from several cells and do some math with those numbers before presenting them on the summary table?
    Regards,
    Barry

  • Have a combobox pre-filled using data from database

    What would be a recommended method to have a combobox
    pre-filled using data from database?

    You can load an Array with the data returned from your
    database and bind to that array as the dataProvider for the
    comboBox.
    [Bindable]
    private var myArrayDP:Array = new Array();
    //Load the array with your returned data.
    <mx:ComboBox dataProvider="{this.myArrayDP}">
    </mx:ComboBox>
    Using an ArrayCollection however is often better if you want
    changes to the dataProvider to automatically reflect in the
    ComboBox.

  • Does my devices that are on my apple account use data from apple phone

    Will all devices on my apple account use data from my apple phone Grimm at&t.  Snapchat or face time

    Are you referring to cellular data? Is your iPad wifi + cellular? Your iPad cellular is separate from your iPhone cellular account.
    Facetime on an iPad only works on wifi.
    Can you explain your concern?
     Cheers, Tom

  • HT5569 When my daughter uses her i-phone on our wirless network at home does it use data from our data plan when she plays games or aps from her phone?

    When my daughter uses her I-phn on our home wirless network does it still use data from our data plan? Thanks.

    No. As long as she's connected to WiFi, no cellular data is being used.

  • Loading Textual Data from HttpService Would Not Show Up on TextArea

    Hi,
      I have something fairly strange here that I have a little problem getting it to work. I am loading some data from XML and attempt to format it a little more on Actiosncript and print it out on the TextArea. For some reason, it would not show up, even though when I used Alert.show it does spit out the entire xml data set. Based on this, I know my data has been loaded correctly, but I am not sure why it is not showing up on my page.
    Here is the code,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:states>   
            <mx:State name="view">
              <mx:RemoveChild target="{intro}"/>
                <mx:AddChild relativeTo="{applicationcontrolbar1}" position="before">
                    <mx:TextArea editable="false" id="viewText" width="450" height="279" text="{messageInfo}"/>
                </mx:AddChild>
            </mx:State>
        </mx:states>
        <mx:Script>
            <![CDATA[
                import mx.events.ItemClickEvent;
                import mx.controls.Alert;
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                [Bindable]private var message:XMLList;
                [Bindable]private var messageInfo:XMLList;
                private var savedIndex:int = 99999;
       private function clickHandler(event:ItemClickEvent):void {
                    if (event.index == savedIndex) {
                        //don't do a thing
                    else {
                        savedIndex = event.index;
                          navigateToURL(new URLRequest("../"+ event.item.data));
                private function toggleButtonBar_itemClick(evt:ItemClickEvent):void {
                    currentState = evt.item.data;
                    if(evt.item.data == "view") view();
               private function view():void{
                  currentState="view";
                  userView.send();          
               private function httpService_fault(evt:FaultEvent):void {
                    var title:String = evt.type + " (" + evt.fault.faultCode + ")";
                    var text:String = evt.fault.faultString;
                    Alert.show("There is an error! Type " + title + " " + text);
               private function httpService_result(evt:ResultEvent):void {
                    messageInfo = XML(evt.result).messages.message;
                    Alert.show(messageInfo);
                    message = XML(evt.result);
                    var message_name:String = "";
                    var message_phone:String = "";
        for each (var message:XML in messageInfo.messages.message) { 
              viewText.text += "Name " + messageInfo.name + "\n";
              viewText.text += "Phone " + messageInfo.phone + "\n";               
            ]]>
        </mx:Script>
    <mx:HTTPService id="userView" url="messages.xml" resultFormat="e4x"
      fault="httpService_fault(event);" result="httpService_result(event)" />
    <mx:PhoneNumberValidator id="pnVal" source="{your_phone}" property="text"/>
    <mx:EmailValidator id="emailVal" source="{your_email}" property="text"/>
        <mx:Array id="dp">
            <mx:Object data="view" label="View"/>
        </mx:Array>
        <mx:Panel id="panel" title="My Home" height="70%">            
        <mx:TextArea id="intro" width="77%" height="100" borderStyle="none" paddingLeft="10" color="black">
                <mx:htmlText><![CDATA[Welcome to my page.]]></mx:htmlText>
            </mx:TextArea>
             <mx:ApplicationControlBar id="applicationcontrolbar1">
            <mx:ToggleButtonBar id="toggleButtonBar" color="#FFFFCC"
                    dataProvider="{dp}"
                    itemClick="toggleButtonBar_itemClick(event);" />
        </mx:ApplicationControlBar>           
        </mx:Panel> 
    </mx:Application>
    Note, there are other items in the array, but those are not relevant to the question of the topic here, and therefore I am not posting the code for those sections.
    When I click on the View button, it does give me the correct state, but I get a blank box of textArea with no data when I know there is output from Alert.show in the view(). What have I missed?
    Thanks for your help.

    Thanks for the pointer. As a matter of fact, I found out that it is because of my xml nodes messing up, and that the text was displayed as white for someb reason. With a white background, of course I would not see a thing.
    Thanks again.

  • Unable to read data from previous calls...!

    I am trying to capture data from the previous calls using the following code...
    The program "/irm/sapliparm" has value in the variable "gs_ipar_infocus-x-arhdr-artyp" at runtime. I am able to see this value in debug mode. I need this value in a variable in my routine. Below is the code that I have written, but, this is not working. sy-subrc is 4 at the assign statement.
    data: artyp type /irm/iparhdr-artyp,
             lv_artyp type /irm/iparhdr-artyp,
             g_iparhdr type /irm/iparhdr,
             objky type nast-objky,
             line type string,
             lv_var type string.
    FIELD-SYMBOLS: <lv_artyp> type any. "/irm/iparhdr-artyp.
    move '(/irm/sapliparm)gs_ipar_infocus-x-arhdr-artyp' to line.
    lv_var = line .
    assign (lv_var) to <lv_artyp>.
    if <lv_artyp> is assigned.
       move <lv_artyp> to artyp.
       unassign <lv_artyp>.
    endif.
    I want to capture the value in variable "(/irm/sapliparm)gs_ipar_infocus-x-arhdr-artyp" inside my program.
    Please let me know if you have an idea on how to capture the value.
    Thank you in advance,
    Srinath

    Srinath,
    The trick you are using seems OK to access standard program parameters which are not available in user-exits / BADIs.
    I am also using similar code at some places and is working well for me.
    Is gs_ipar_infocus-x-arhdr-artyp a single variable or a nested structure ?
    Define <lv_artyp> as type of  /irm/iparhdr-artyp and try.
    Define lv_var of chat type and try.
    My sample code which works well is as below :
    constants: prgwa(30) type c value '(SAPMV50A)XVBADR_SAV[]'.
      types: t_sadrvb type table of sadrvb.
      FIELD-SYMBOLS: <prgwa> type t_sadrvb ,
                                   <watab> type SADRVB.
      assign (prgwa) to <prgwa>.
      if <prgwa> is assigned.
        loop at <prgwa> ASSIGNING <watab> .
        endloop.
      endif.
    I hope it helps you find your problem.
    Regards,
    Diwakar

  • Is there a way to create address labels using data from a Numbers document?

    I'd like to print mailing labels for holiday cards and my wife created the list in a Numbers spreadsheet.
    Is there any way to export to Pages or some other label printing application?
    Thanks.

    Righty-ho. This is based on a spreadsheet like this with named columns in Numbers 3.5. (The rows must be consecutive - the script moves on as soon as it sees an empty row):
    With the spreadsheet open, run the following AppleScript. It will create a group called Christmas List in Contacts, and then import the name and address data from the spreadsheet, adding each person to the group:
    tell application "Numbers" to tell front document to tell active sheet to tell table 1
      set all_contacts to {}
      set row_count to count rows
      repeat with each_row from 2 to row_count
      set nu_contact to {}
      set first_name to value of cell each_row of column "First"
      if first_name is missing value then exit repeat
      copy first_name to end of nu_contact
      copy (value of cell each_row of column "Last") to end of nu_contact
      copy (value of cell each_row of column "Address1") to end of nu_contact
      copy (value of cell each_row of column "Address2") to end of nu_contact
      copy nu_contact to end of all_contacts
      end repeat
    end tell
    tell application "Contacts"
      set group_exists to (every group whose name is "Christmas List")
      if the result is {} then
      make new group at end of groups
      set name of the result to "Christmas List"
      save
      end if
      repeat with each_contact in all_contacts
      activate
      set nu_person to (make new person with properties {first name:item 1 of each_contact, last name:item 2 of each_contact})
      save
      make new address at end of addresses of nu_person with properties {street:item 3 of each_contact, city:item 4 of each_contact}
      save
      add nu_person to group "Christmas List"
      save
      end repeat
    end tell
    Contacts will look like this:
    With the Christmas List group selected in Contacts, go to the Print menu and choose the label format you want:
    Once the labels are printed, select all the names in the Christmas List Group and press the delete key:
    Click the middle "Delete" button and the contacts will be gone.You can then delete the Christmas List group itself.
    This can also be done in Numbers 09, but the script would have to be modified slightly.
    Hope it helps,
    H

  • Use data from a frame to another

    Hi,
    I would like use the data from my first frame in DataPanelCli in my second frame StruCliBox.
    BUT when I writte text in my first frame, and I use the button structcli in the ButtonPanelCli, it is always blank in my second frame.
    What have I to do.
    regards.
    Thierry
    import java.util.*;
    import java.sql.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.Container;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.*;
    import java.lang.String;
    public class AppClient extends JFrame {
         private DataPanelCli screenvarcli;
         public AppClient() {
              //titre fen�tre
              super( " APPLICATION CLIENT");
              // set up GUI environment
              Container p = getContentPane();
              screenvarcli = new DataPanelCli();
              p.setLayout( new FlowLayout() );
              p.add( new JScrollPane(screenvarcli) );
              // Complete GUI
              ButtonPanelCli controls = new ButtonPanelCli( screenvarcli);
              p.add(controls);
              setSize(500,475);
              show();
         public static void main( String args[]) {
              AppClient cli = new AppClient();
              cli.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing(WindowEvent e) {
                             System.exit(0);
    class DataPanelCli extends JPanel {
         JTextField ICCliFact, INSociete;
         JLabel LCCliFact, LNSociete;
         public DataPanelCli() {
              //Label Panel
              JPanel labelPanelCli = new JPanel();
              labelPanelCli.setLayout( new GridLayout(2, 1));
              LNSociete = new JLabel( "Nom ", 0);
              labelPanelCli.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              labelPanelCli.add(LCCliFact);
              //TextField Panel
              JPanel screenvarcli = new JPanel();
              screenvarcli.setLayout( new GridLayout(2, 1));
              INSociete = new JTextField("Enter Name - click RECHERCHER", 20);
              screenvarcli.add(INSociete);
              ICCliFact = new JTextField( 20);
              screenvarcli.add(ICCliFact);
              // Accessibility Section - relate labels and text fields
              // for use by assistive technologies
              LNSociete.setLabelFor( INSociete);
              setLayout( new GridLayout( 1, 2));
              add( labelPanelCli);
              add( screenvarcli);
    class ButtonPanelCli extends JPanel {
         public ButtonPanelCli( DataPanelCli scv ) {
              setLayout( new GridLayout( 2 ,0 ));
              JButton clearcli = new JButton( "Clear" );
              clearcli.addActionListener( new ClearScreenCli( scv ));
              add( clearcli );
              JButton structcli = new JButton( "STRUCTURE" );
              structcli.addActionListener( new StructRecCli( scv));
              add( structcli );
    class ClearScreenCli implements ActionListener {
         private DataPanelCli screenvarcli;
         public ClearScreenCli( DataPanelCli scv ) {
              screenvarcli = scv;
         public void actionPerformed( ActionEvent e ) {
              screenvarcli.ICCliFact.setText( "" );
              screenvarcli.INSociete.setText( "" );
    // STRUCTURE
    class StructRecCli extends JFrame implements ActionListener {
         private DataPanelCli screenvarcli;
         private boolean firsttime = true;
         public StructRecCli( DataPanelCli scv) {
              super( " APPLICATION CLIENT STUCTURE " );
              screenvarcli = scv;
         public void actionPerformed( ActionEvent e) {
              if (firsttime) {
                   Container cnt = getContentPane();
                   cnt.setLayout( new FlowLayout() );
                   StruCliBox ob = new StruCliBox();
                   cnt.add( ob );
    //     screenvarcli.INSociete.getText();
                   ButtonPanelStr controls = new
                   ButtonPanelStr( screenvarcli);
                   cnt.add(controls);
                   setSize(500, 475);
                   firsttime = false;
              show();
    class StruCliBox extends JPanel {
         JTextField ICCliFact, INSociete;
         JLabel LCCliFact, LNSociete;
         public StruCliBox() {
              //Label Panel
              JPanel s = new JPanel();
              s.setLayout( new GridLayout(2, 1));
              LNSociete = new JLabel( "Nom ", 0);
              s.add(LNSociete);
              LCCliFact = new JLabel( "Num�ro Client", 0);
              s.add(LCCliFact);
              //TextField Panel
              JPanel screenvarcli = new JPanel();
              screenvarcli.setLayout( new GridLayout(2, 1));
              INSociete = new JTextField( 20);
              screenvarcli.add(INSociete);
    //          String rechnom = new String();
    //          screenvarcli.INSociete.getText();
              ICCliFact = new JTextField( 20);
              screenvarcli.add(ICCliFact);
              LNSociete.setLabelFor( INSociete);
              setLayout( new GridLayout( 1, 2));
              add( s);
              add( screenvarcli);
    class ButtonPanelStr extends JPanel {
         public ButtonPanelStr( DataPanelCli scv) {
              setLayout( new GridLayout( 1 ,0 ));
              JButton addstr = new JButton("Ajouter");
    //          addstr.addActionListener( new AddStructure( dbconn, screenvarcli, msgout, ob));
              add( addstr );
              JButton majstr = new JButton("Mise � jour");
    //          majstr.addActionListener( new MajStructure( dbconn, screenvarcli, msgout, ob));
              add( majstr );
              JButton clestr = new JButton("Clear");
    //          clestr.addActionListener( new CleStructure( dbconn, screenvarcli, msgout, ob));
              add( clestr );
              JButton prnstr = new JButton("Impression");
    //          prnstr.addActionListener( new PrnStructure( dbconn, screenvarcli, msgout, ob));
              add( prnstr );
         // Fermeture de l'application
    //     protected void processWindowEvent(WindowEvent e) {
    //          if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    //               System.exit(0);

    a Q&D, note the static DataPanelCli's ICCliFact.
    class DataPanelCli extends JPanel {
    static JTextField ICCliFact, INSociete;
    class StruCliBox extends JPanel {
    ICCliFact = new JTextField( 20);ICCliFact.setText( DataPanelCli.ICCliFact.getText() );

  • Creating XML file using data from database table

    I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
    It would be great if you can suggest some approach to achieve my requirement.
    Thanks,
    -Vinod

    An example from the forum: Re: How to generate xml file from database table
    Edited by: Marco Gralike on Oct 18, 2012 9:41 PM

  • Create XML using data from Oracle

    Other than using OracleXMLQuery, how do I create an XML file from the data from a table in Oracle?
    Rgds,
    Seetesh

    Vetsrini:
    Thanks for your response. I no longer can receive email at [email protected], because I am at a different company now. So please post directly to this forum so I can receive my messages.
    I would imagine that "look ahead" is a feature needed by many applications, since the heading of a document may depend on the data within. In my case, we have a Pack Slip that we want the bold heading title to change if the word "FAX" is inside the body of the document. Instead of saying "Pack Slip", it would say "Fax Pack Slip".
    Any hints would be greatly appreciated.
    Regards,
    Rich Locus

Maybe you are looking for

  • Boolean data element in ABAP Dictionary

    Dear friends, Is it possible to have a Boolean variable defined in the domain without having the value range ??? Regards, Vivek K

  • Password Protected xls files

    I just installed IWork with the hope of not needing to buy office for my new Mac. I have a number of password protected xls files that i need to open, and I am not given the option to put in the password? Any way around this, or am I stuck buying off

  • How to enable my touch screen?

    I'm using Hp sleekbook 14 Windows 8 but i just notice that i coudn't use my touch screen i want to enable, i tried to go to settings at the control panel and at pen and touch but there is no check button to enable or disable the touch screen i tried

  • BB Connection speed worse than it was before repor...

    Hi I am new to this forum but wonder if someone can help. I had a speed of 1.2Meg and was supposed to get between 3.5-5.5 according to BT via a call center, BT wholesale website and through recent letter when I signed up to a new contract. I therefor

  • Video Player stoped working

    Hi  I have symbian Belle on my e7.0, its video player suddenly stoped working for all file formates. only audio comes out when playing video files. Please help me.