Return query from one CFC to another CFC

I have a CFC called "order.cfc". Also in this app is a CFC
called "user.cfc".
In my order.cfc, one of the functions will setup and create a
new order for an existing user. The user ID is passed to the
function "createOrder" in order.cfc.
Instead of duplicating a function called "getUser" from
user.cfc, I figured I could pass the arguments.userID from
order.cfc over to the getUser function of user.cfc and get my query
result back:
<cfset thisCustomer =
createObject("component","user").getUser(arguments.userID) />
Obviously, I'm doing something wrong as I keep getting this
error message:
The value returned from function getUser() is not of type
query.
However, getUser does return a proper query data type when I
access that component directly and not from this other cfc.

quote:
Originally posted by:
Newsgroup User
What is the difference you and Dan perceive in using
<cfinvoke> over
createObject() (<cfset> really has nothing to do with
it).
Adam
Since you asked.
This is the line of code:
<cfset thisCustomer =
createObject("component","user").getUser(arguments.userID) />
My style is to be a bit more methodical. If I were going to
use createobject, I would do it like this:
MyObject = createObject("component","user");
thisCustomer = MyObject.getuser(arguments.userID);
If I wanted to do it in one line, or if I were only going to
call one function from that component, I'd use cfinvoke.
I'm simply not clever enough to try using cfset like that. I
had no idea it would work.

Similar Messages

  • How to transfer ABAP query from one server to another server

    Hi all,
    I have a ABAP query in development server and i need to transport it to production server.
    I have attached a transaction to it using the program which got generated in the back ground
    from the abap query in the developemnt server.
    I have downloaded and uploaded  a ABAP query from one server to another server.
    But the program which got generated in the back ground in the production server is different from
    program which is generated in the development server.
    But my transaction is attached to the program in the development server.If i transport the transaction
    to production server,it is giving error since that program is not present in the production server.
    Am i going in the right way......? 
    Is there any problem in my upload/download procedure ?
    Is there any way to achieve my purpose ...............?
    Please kindly reply me at the earliest.

    You have different ways to call a query using a t.code. One way is to create a pgm with the following code and attach a t-code to it.
    data: gv_test type sy-repid.
    DATA: GV_USERGROUP TYPE AQADEF-BGNAME VALUE 'FI',
          GV_QUERY TYPE AQADEF-QUNAME VALUE 'ZCON_FI_QUERY',
          GV_RNAME TYPE AQADEF-PGNAME .
    CALL FUNCTION 'RSAQ_REPORT_NAME'
      EXPORTING
        WORKSPACE        = ''
        USERGROUP        = GV_USERGROUP
        QUERY            = GV_QUERY
    IMPORTING
       REPORTNAME       = GV_RNAME
    * For the dynamic excution of the called query assisgn GV_RNAME to <gv_test>.
    gv_test = GV_RNAME.
    SUBMIT (gv_test) via selection-screen and return.
    Alternate way is while creating T-Code you choose option Transaction with parameters.
    Transaction as START_REPORT and in default values table control at bottom give as follows
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-REPORT = User group
    D_SREPOVARI-EXTDREPORT = Your Query name
    Regards
    Sathar

  • How to copy a query from one infoprovider to another infoprovider

    Hi Experts,
    Could anyone suggest me on how to copy a particular query from one infoprovider to another infoprovider which are identical and have the same objects in them.
    Thanx in advance
    Lalit

    Hi Lalith,
    Use the Transaction RSZC and specify the - > Source InfoCube  -> Target InfoCube and select the queries  you want to copy.
    Hope it helps
    Regards
    Srikanth

  • Copying a Single BEx Query from One Infoprovider to Another

    Is it possible to copy just a single query from one Infoprovider to another?
    I know how to copy all of them at once, but I want to know if there is a way to do it just for a single query.

    Ah.  That worked perfectly.
    Awarding points.
    Thank you.

  • Copying a query from one cube to another cube

    HI BW Gurus,
    I am having a report due date for net payment analysis in Accounts receivables and i want to copy the same query into a different infocube accounts payable.
    Is it posssible to copy a query from one infocube to another infocube.
    Regards,
    Syed

    Hi,
    Yes,it is possible to copy query from one infoprovider to another infoprovider with some conditions.Please have a look at the note 981104 which explains you how to Copy between InfoProviders and Copy within one InfoProvider.
    Rgds
    Manoj Kumar

  • Copy one query from one infocube to another infocube

    Hi BW Experts,
    Hope all of them are doing good.How can we copy one query from one infocube to another infocube.
    I have infocube1 having one query ,I  NEED to copy that query to  infocube2? How?
    Could you please help me out?
    Thanks

    Use transaction RSZC in BW (BTW you're addressing BW experts in a BO forum better post in the Bex section of the BW forum)

  • Transport sap query from one client to another client

    Hi,
    how to transport the sap query from one client to another client.
    Moderator Message: Basic Question
    Edited by: kishan P on Sep 15, 2010 3:39 PM

    use report "RSAQR3TR"
    Moderator Message: Do not answer such basic questions
    Edited by: kishan P on Sep 15, 2010 3:44 PM

  • Copy Query from One MultiProvider to Another

    How easy is it to copy a Query from one MultiProvider to another?
    thanks

    If the elements of the query is not same try using following function module RSZ_I_COPY_QRY_TO_CUBE to copy queries
    Re: Copying query structure to new infoprovider
    Ravi

  • How to return ResultSet from one function to another?

    Hi friends,
    Greetings.
    How do we pass the query Results from one function to another function?
    Actually i have a database in the server and i am the client.
    Client sends the id to the server as an argument. From HTML file this goes to the JSP file(which i am using as a link between HTML and EJB) and then this goes to the RemoteInterface and then to the Bean itself. The functions are written in the bean. Bean connects to the database using jdbc:odbc driver and then a query is written and executed as follows:
    In the Stateless Session Bean, there is one function with the following query.
    public ResultSet check(String id)
    //other code
    ResultSet rs = Statement.("select * from table1 where id=123");
    if(!rs.next)
    // print no such id exists. other ids are
    rs=Statement.("select * from table1");
    return rs;
    I have written it approximately only because the problem is not with the query :(
    Now, in rs there's a resultset. Now how do i display it in a tabular format in HTML? This should obviously be done using JSP. How can we do it?
    In JSP file if i write
    ResultSet rs1=Remote.check(12);
    i get NullPointerException
    Thank you in anticipation to your reply!
    Regards

    Crossposted over all places:
    [http://forums.sun.com/thread.jspa?threadID=5336533]
    [http://forums.sun.com/thread.jspa?threadID=5336534]
    [http://forums.sun.com/thread.jspa?threadID=5336532]
    [http://forums.sun.com/thread.jspa?threadID=5336519]
    [http://forums.sun.com/thread.jspa?threadID=5336510]
    Stop crossposting. It's very rude.

  • Movement type: moving the returnable package from one customer to another

    Hello,
    I would like to know if there exists any predefined movement type (in transaction MIGO) which would allow to move the stock of the returnable package (material type LEIH, pallets etc.) from one customer to another IN ONE STEP (now we do it in 2 steps: first we return the stock from the customer to the our location and then move it to another customer). When we sell material to the customer, the stock type for the returnable package has the mark for special stock type (''V'').
    I tryed types 301V and 309V, but the customer had to be the same. It only allows to move the pallets between different plants for the same customer.
    Best regards,
    Mojca Kukman

    Hi
    There is no such movement type. Customers always look for one-step transactions and the only way to achieve this is through ABAP!
    Normally I do this:
    Create a Z-txn for customer input and on saving create 2 material documents (as in 2-step process).
    Best regards
    Ramki

  • Copy Query from one cube to another

    Hi ,
    Where can i do copy query from one to another cube
    Thanks
    Gururaj

    Hi,
    For copying queries from one cube to the another use Tcode :RSZC.
    If you have RKF and CKF in the queries,
    then only  those RKF's and CKF's which are used in the query will be copied(Only those which you use in the structure).
    One more important all the keyfigures will be copied with Technical name as _1 at the end.
    i.e: if you have a KF called AVERAGE with Techname as <b>OSD_AVG</b> then this will be copied as <b>OSD_AVG_1</b>.Meaning you cannot define your own Tech names.
    Thanks,
    Uma Srinivasa Rao.

  • Issues after copying a query from one IP to another

    Hi Friends,
    I have a query which was built on a infoset, i have built a multi provider with aditional objects apart from what i have in the infoset, i.e. this Multi provider has all the objects which are used in the query. I have copied the query from infoset onto the multi provider. All is well until this point.
    but when i see the default values or free characteristics of this copied query, it still shows the objects with prefix of old infoset. Shouldn't it be having prefix of multi provider instead as this query is based on the Multi provider?.
    Also when i save the query, i get a error message saying that XXX characteristic is not found in the info provider(MP), where as this cahr is available in the Multi provider.
    Can someone pls guide me how to resolve this?.
    Regards
    BN

    Hi,
    I get an error message when i try to copy the existing query to the new Mulit Provider. This i get in Transaction RSZC after i give source Ino cube XXX and Target Info cube ZZZ and select Queries radio button and execute.
    The error message what i am getting is as follows
    InfoObject Source__F1 is  missing in target info cube (Muti provider name).
    like this i am getting for almost all the objects, but all these objects are available in the target.
    Since, the query was a stright forward one i have created a new query exactly like the other one.But now i get another problem, i cant see the data in the report, even though there is data in DB. I checked the data on the Infoset and Multi Provider using Listcube.
    Can you suggest what can i do here?
    Regards
    BN

  • Copy query from one InfoProvider to another InfoProvider...

    Thank you in advance for your response and help...have a good day......
    Have a query that I  want to use with another InfoProvider.  What are the possible TC's to do the copy or the best way to duplicate the query?
    Than You Jim

    Hi Jim,
    Hi,
    For copying queries from one cube to the another use Tcode :RSZC.
    It asks for target infoprovider and source infoprovider..
    You can copy queries between two cubes only in the case where both these cubes are exactly the same. The cube to which you want to copy the queries may have some additional info objects than the original. But it must have all the info objects of the original one.
    Hope  this helps,
    Sudhakar.

  • Transport abap query from one client to another--v--urgent---v----urgent

    hi,
    i have an abap query in one client and want to copy to another client.can i do this if so what are the steps involved .i tried the options like in query go to environment and then to transport .i also tried to do by running the programe RSAQR3TR.but it was transporting in the same client .i want to transfer into another client.plz help me out asap .

    hi,
    Create a request related to that Table Definition and add data content in the request like
    R3TR-TABL-<table name>
    R3TR-TABU-<table name>
    R3TR-TABD-<table name>
    and release the request
    Take the DATA files and CO files related to that request in a Pen drive and put the same into the new server DATA and CO files and import using STMS.
    For new program, it gets transported along with the program.
    For changed program (which has already been transported once), you need to include texts in transport request - just go to Selection texts, save them in the transport request and you're all set.
    whenever you assign a request number to the program
    and also the selection texts willbe stored under that request number
    so when u release the program
    the selection texts will also go
    after releasing the request if you change only the seleciton texts
    only the changes done to selection texts will reach the target
    and the rest of the things remain same
    so when ever you release a request all the things under that request
    will go

  • How to copy query from one cube to another ? OR atlest a KF strecture?

    Hello edperts,
    just wanted some tips on coping a query or KF strecture from one cube to other . i am trying to use TCODE RSZC, but bcoz some of the chars. are not present in the target cube i a m not able to copy it.
    But, looks like both the cube has save KFs, so i thought atlest let me copy KFS , so i just have to pull manually chars. but thats also not working..
    Is there any back door way to do it ? please help me, it might save lots of time.
    Appreciated.

    Hi,
    Check the below article, it might help you out.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/204111a9-0fca-2d10-219c-be20e686cdb5?QuickLink=index&overridelayout=true]
    Regards,
    Durgesh.

Maybe you are looking for

  • HT1918 Trying to change the country on my iPad

    Recently moved back to the UK, from CA. Trying to update iTunes on iPad, half of the details have changed but refuses to change country so cannot change phone details OR bank details on the device, I have succeeded via iTunes online. Any advice?

  • Catch 22 on Updating Aperture -

    App Store, that claims to have an upgrade 3.2.3 (I'm stuck on 3.1.1) says "use Apple Updates" - DMGs won't load saying "use App Store" - Nothing comes down for Aperture in a general update. Any ideas? Thanks

  • Get draging item'z reference

    Hello i am adding a new item by draging it on the page using sdk file helper. the main issue is that item is added to the page but i cannot find its reference point. is there any way i can get its reference..... Thanks Regards, MS Choudry

  • Telstra Palm Treo Pro & Whereis Navigator problem

    Hi, hoping this might save some time for other Telstra users subscribing to Whereis Navigator to take advantage of the GPS capability of the Palm Treo Pro.  The problem: when trying to open Whereis Navigator there was intermittant account (you subscr

  • Itunes soooo slow and often stuck, solutions????

    i downloaded the latest version of Itunes for my windows cause recently reinstalled everything on  my laptop and threw everything off. Now really is awfull to use. If i start it up it takes a long time and freezes my whole computer. And if i finally