How to refer one view from another view?

Hi,
I have 2 views in my Adobe Flash Builder mobile app. I need to refer the first view in my second view.
How to refer one view from another view? Or how to create a reference to a view wherever needed?

I don't need any data from my first view. In a certain flow, I need to make my first view to be invisible.
for eg., My First view is in portrait mode. I change the device to Landscape. In the landscape mode, I want to show a completely different view (second view).
In this case, what happens is, I see my first view in Landscape mode for a second. Then the second view appears. When I change to Landscape mode, only the second view should be seen. I need to make my first view to be completely invisible in the OnOrientationChanging event of
StageOrientationEvent
As stage object and StageOrientationEvent works at application level, I need to know how to refer my first view object in the application level.
private function onOrientationChanging(soe:StageOrientationEvent):void
      MyFirstView.Visible = False; ====> don't know how to refer MyFirstView here
Is my question clear now?

Similar Messages

  • Refresh/Reprocess view from another view.

    Hi all,
    I'm facing a problem with reprocessing a view in webgui:
    In component BT126H_CALL i've created a new assignment block ZREGDETAILS based on a Z-table which contains products.
    Also in component BT126H_CALL i've enhanced a view SCDETAILS and added a total-field (ztotal) that should show the total value of the records in ZREGDETAILS.
    My problem is now that view SCDETAILS is processed before ZREGDETAILS, so I cannot update the ztotal field... How can I call the SCDETAILS to be reprocessed again from the ZREGDETAILS view?
    In other projects I used folowing code for calling the save event on ZREGDETAILS from another view. But in this case the SCDETAILS is not a subcontroller of ZREGDETAILS.
      DATA: sub_contr TYPE REF TO CL_BSP_WD_VIEW_CONTROLLER,
            contr_regdetails TYPE REF TO ZL_ZBT126H__REGDETAILS_IMPL.
      sub_contr = ME->GET_SUBCONTROLLER_BY_VIEWNAME('ZBT126H_CALL/ZRegdetails').
      IF sub_contr is bound.
        contr_regdetails ?= sub_contr.
        contr_regdetails->Save( ).
      ENDIF.
    Many thanks in advance!
    Siegfried

    Hi Pooja,
    According to my understanding on action of radio buttons i hope you are calling some other component so on action of the radio  button may be it might be any of the radio button u can set the radio buttons as it was initially and then call the screen ...
    Setting the radio buttons should be done in the action of radio buttons... By doing this i hope that radio buttons will be set and second view also will be calleed when we go back to the screen we can view the radio buttons refreshed.. Try this hope it might be helpful...
    Regards,
    Sana.

  • Opening a view from another view of the same window in diff Browser.

    Hi Experts,
    My requirement is to open a view (say view 2) from another view (say view 1) with click of a button in a different browser, both the views are embedded into the same window, and also i have to pass some data from view1 to view2, based no the input data, i am displaying some information. Also both views belog to the same component.
    Some pointers on this would be of great help.
    Regards,
    Ashish.

    You would need to open another window.
    See if_wd_window and if_wd_window_manager.
    Call the GET_API to get a handle to window manager.
    The new window can show V2.
    The original Window with 2 views,
    must fire plug to navigate v2 to empty view to hide it from Window1.
    The to Views talk to one another via WDC Controller.
    View 2 calls WDC controller methods.  The WDC controller the fires Event.
    View 1 can listen to this event with a method of type event handler.
    View 1 can for example react to button on View 2 and close WINDOW 2.
    Good luck
    Phil.

  • How to Call one EJB from another

    Hi all
    I am trying to call one EJB in one system from another EJB residing on diferent system...
    Both are Stateless session beans ...
    I can't use No-args Intialcontext() as i need to specify the Ip address of other system to be looked up.....
    So i am using properties Dorg.omg.CORBA.ORBInitlalHost....
    But its not looking up..Its telling not bound...But i called it from standalone client remotely...
    Am i wrong..?
    I hope I am in right path....
    I hope ill get reply as fast as possible...
    Gopal V

    Hi ken Thanks for replying....
    Ya i packed it as a jar (using Export tool in Eclipse3.2)....
    I am using SUN AS 9.....
    I packed bean1 and bean2 as two different jars in the same domain...
    Here is my code...
    Bean1:
    @Stateless(mappedName="ejb/Second")
    public class SecondIMPL implements SecondRemote {
         public FirstRemote obj;
         public String connect() {
              try{
                   InitialContext ctx= new InitialContext();
                   FirstRemote obj =(FirstRemote)ctx.lookup("ejb/First");
                   System.out.println("Client :"+obj.bMethod());
              }catch(Exception e){
                   e.printStackTrace();
              return "Check server Log";
    }Bean2 :
    @Stateless(mappedName="ejb/First")
    public class FirstIMPL implements FirstRemote {
         public String bMethod() {
              return "From First Bean";
    Client:
    public static void main(String[] args) {
              try{
                   InitialContext ctx= new InitialContext();
                   SecondRemote obj =(SecondRemote)ctx.lookup("ejb/Second");
                   System.out.println("Client :"+obj.connect());
              }catch(Exception e){
                   e.printStackTrace();
    Here is my Stack Trace...
    [#|2007-05-24T18:35:17.214+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 19;_RequestID=bb4848e7-829a-421d-a560-93659898eb02;|
    javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.SecondRemote[Root exception is java.lang.ClassNotFoundException: com.SecondRemote]
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
         at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.FirstBean.rediff(FirstBean.java:16)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
         at $Proxy36.rediff(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Caused by: java.lang.ClassNotFoundException: com.Second
         at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:701)
         at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:614)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:568)
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:320)
         ... 31 more
    |#]

  • How to update one table from another

    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?

    Comet wrote:
    I am creating scripts in Oracle 10g. I have a table that has data corruption on three date fields.
    I created a table with the following sql of all the affected rows:
    CREATE TABLE LSU_INTER_FIX_DATE AS
    select request_id,received_date,planned_start_date, actual_start_date
    from lsu_inter2_requests_t
    where received_date < to_date('01-JAN-1900')
    OR planned_start_date < to_date('01-JAN-1900')
    OR actual_start_date < to_date('01-JAN-1900')
    I then repaired all of the rows with three data fixes
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET planned_start_date = TO_CHAR(planned_start_date,'YY-MON') ||'-'||(TO_CHAR(planned_start_date,'RRRR') + 2000)
    where planned_start_date < to_date('01-JAN-1900')
    UPDATE LSU_INTER_FIX_DATE
    SET actual_start_date = TO_CHAR(actual_start_date,'YY-MON') ||'-'||(TO_CHAR(actual_start_date,'RRRR') + 2000)
    where actual_start_date < to_date('01-JAN-1900')
    I now want to update the original base table with the corrected data so I wrote the following SQL UPDATE command:
    UPDATE lsu_inter2_requests_t aaa
    SET aaa.received_date = bbb.received_date
    FROM LSU_INTER_FIX_DATE bbb WHERE aaa.request_id = bbb.request_id
    When I run this sql Oracle returns the error “ORA-00933 SQL command not properly ended.” How do I update multiple rows in one table from another table that share the same primary key?I am not convinced you have what you think you have
    >
    UPDATE LSU_INTER_FIX_DATE
    SET received_date = TO_CHAR(received_date,'YY-MON') ||'-'||(TO_CHAR(received_date,'RRRR') + 2000)
    where received_date < to_date('01-JAN-1900')
    When you want to produce a DATE datatype when starting with a string,
    you must use TO_DATE() on the SET line!
    (TO_CHAR(received_date,'RRRR') + 2000)since when do you do add characters (from TO_CHAR) with a constant number (2000)?
    You should NEVER EVER rely on implicit datatype conversion
    Edited by: sb92075 on Jul 27, 2011 7:09 PM

  • How to call one .SWF from another?

    How do I call one .SWF from another. I built a very beefy
    base .SWF, and want to add music overlay, and an intro slide show
    to the exsting Flash animation, but put it in a second .FLA/.SWF
    file. How do I call one from the other?
    This will be embedded in an HTML file but I assume this is
    superfluous to my question.
    F.Z.

    I think you should open that Another SWF (FLA),
    and add some actionscript..
    For example, you could create a movie clip, and write
    actionscript in the
    first keyframe:
    loadMovie("
    http://www.somewebpage.com/movie.swf",
    this);
    "FredZimmerman" <[email protected]> wrote in
    message
    news:ftnjas$mj5$[email protected]..
    > How do I call one .SWF from another. I built a very
    beefy base .SWF, and
    > want
    > to add music overlay, and an intro slide show to the
    exsting Flash
    > animation,
    > but put it in a second .FLA/.SWF file. How do I call one
    from the other?
    >
    > This will be embedded in an HTML file but I assume this
    is superfluous to
    > my
    > question.
    >
    > F.Z.
    >

  • How to refer one pagedef to another ?

    Hi experts,
    how can i refer one pagedef in another pagedef ?

    Hi,
    +"I dont want to drag and drop again the same viewobject in page2.jspx.. how to do that..?"+
    Why ? Dragging the VO just creates a metadata reference to the VO instance. This basically is what you want - to leverage the same instance of a VO on two pages
    Frank

  • How to kill one class from another class

    I need to dipose one class from another class.
    So that first i have to find what are all threads running in that class and then to kill them
    Assist me.

    Subbu_Srinivasan wrote:
    I am explaining you in clear way
    No you haven't been.
    >
    In my application i am handling many JInternalFrame.Simultaneously i am running working on more than one frame.
    Due to some poor performance of some thread in one JInternalFrame,the thread is keeps on running .
    i could not able to proceed further on that screen.
    So i have to kill that JInternalFrame.Yoinks.
    To be begin with your problem sounds like you are doing everything in one thread. So stop doing that. Second when you get it split up and if a task is taking too much time then interrupt it. No kill. Interrupt. This means the worker thread needs to check sometimes if it has been interrupted.

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • How modify data one view from another view in Cluster view

    Hi,
    I have a cluster view which includes two independent maintenance views. These views have not a direct relationship.
    If I would append or change or delete records in the first view I want to add or change or delete some records in the second view.
    1.
    I have tried to use Extended Table Maintenance Events of the first view to modify the second but I cant access to the TOTAL and EXTRACT tables the second view from the fist view.
    Is there any way to get access from one view to another using Extended Table Maintenance Events?
    2.
    I have tried to use the Event 04/VC: Before Saving the Data in the Database of the cluster view. I can access and modify the second view internal table using routines
    READ TABLE vcl_struc_tab WITH KEY object = 'ZFIRST_VIEW' INTO structab_wa.
    if  not structab_wa-UPD_REQU is initial.
       perform VCL_SET_TABLE_ACCESS_FOR_OBJ using 'ZSECOND_VIEW' changing error_flag.
       it_tbl_second = <VCL_TOTAL>.
       loop at it_tbl_second into wa_second.
         wa_tbl_second-vim_action = 'U'.
         modify it_tbl_second from wa_second
       endloop.
    endif.
    But to save modified entries of the second view to database I have to twice press SAVE buttons.
    The first time I have pressed SAVE above routines are executed and modified entries appear only in the second view internal table. The second time I have pressed SAVE modified entries appear in the database.
    I would like user press SAVE button only once. How I can do it?
    Regards,
    Malnor
    Edited by: Malnor on Nov 30, 2010 9:11 PM

    If I would append or change or delete records in the first view I want to add or change or delete some records in the second view
    Without a dependant field how will you perform this operation ?
    You have to link the fields in the tables, generate maintenance view, add it to cluster view and do it.

  • UI5 load view from another view

    Hi all,
    I'm trying to load a view from an external project. The idea being that a view can be used by multiple projects to cater for reuse e.g a view that has different view modes, user role privileges etc.
    however I can't seem to find a way to find out how to do it. I've been trying to use the sap.ui.localResources function but that only looks locally (obviously). I can also register the folder structure using the jQuery.sap.registerModulePath but then when trying to combine it with embedding a view, it uses a different path, off the UI5 resource root.
    Has anyone else been able to do this? It feels like something that should be possible (like normal web project dependency) but I can't figure it out.
    If you can help or refer me to some documentation then that would be great!
    Thanks
    Mark

    the issue was because of the path name ABC
    since you views in project two are defined using application.viewOne / application.viewTwo -
    i had to register the path using the same name
    $.sap.registerModulePath("application", "../projectTwo/application");
    var view2 = sap.ui.jsview("application.viewTwo");
    here is the index.html
    <!DOCTYPE HTML>
    <html>
      <head>
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
      id="sap-ui-bootstrap"
      data-sap-ui-libs="sap.ui.commons"
      data-sap-ui-theme="sap_goldreflection">
      </script>
      <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
      <script src="js/bootstrap.js"></script>
      <script>
      sap.ui.localResources("application");
      var view = sap.ui.jsview("application.viewOne");
      view.placeAt("viewOneContainer");
      //$.sap.registerModulePath("ABC", "../projectTwo/application");
      $.sap.registerModulePath("application", "../projectTwo/application");
      var view2 = sap.ui.jsview("application.viewTwo");
      view2.placeAt("viewTwoContainer2");
      </script>
      </head>
      <body class="sapUiBody" role="application">
      <div id="viewOneContainer"></div>
      <div id="viewTwoContainer2"></div>
      </body>
    </html>

  • How to notify one subprocess from another subprocess

    Hi All
    I have a situation in which I need to notify one sub process from another sub process.e.g
    Let say Parent Process is - A
    First Child Process of A - a1 (Subprocess)
    Second Child Process of A - a2 (Subprocess)
    I have created Correlation for both the sub process. Now when I try to find a1(Subprocess) from an activity which is in a2(Subprocess), I am not able to do this.
    Code that I have used from a2(Subprocess) to notify a1(Subprocess) is as follows
    instanceId = Correlation.findInstanceBy(name : "a1Subprocess", values : {"a"});
    if(instanceId!=null){
    Notification.send(instanceId : instanceId, activityName : "TerminateA1", parameters : null);
    where "a1Subprocess" is Correlation name of a1(Subprocess) and "TerminateA1" is a NotificationWait activity in a1(Subprocess).
    Question is how can I correctly notify a1(Subprocess) from a2(Subprocess).
    Thanks in advance.

    Hi,
    There's another thread on this forum where I posted an answer to this today. Take a look at that.
    I'll admit that this is challenging (one of my simple 8 step processes), so I posted a working Oracle 10g Studio project example that has a split with notifications going between the child siblings. In the example on [Notification between siblings inside a Split activity|http://www.4shared.com/file/95299867/e7705994/CorrelationNotificationBetweenSplitSiblings.html] you'll see that this example aborts the sibling's instance (in the Interactive after the Notification Wait (now called Message Wait). Change the logic in this to suit your needs.
    Hope this helps,
    Dan

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • How to access one DC from another DC

    Hello,
    I have create a seperate DC for Model. I declared the model as public part. Also I have grant the access to the main DC, Could you please tell me how to proceed further?.
    How can I access this Model DC from my project DC?.
    Thanks
    Sunita.

    Hi sunitha
    <b>Model DC</b>
    1) In the model dc
    Component controller
    Create a rfc execution method
      //@@begin javadoc:CallRfc()
      /** Declared method. */
      //@@end
      public void CallRfc( java.lang.String rfcinput )
        //@@begin CallRfc()
         //Rfc execution steps
        //@@end
    2) component interface controller
    Add the usage of component controller of model dc component
    create a method in interface controller for calling the method CallRfc in component controller
    //@@begin javadoc:Interfa_ctl_mthd()
      /** Declared method. */
      //@@end
      public void Interfa_ctl_mthd( java.lang.String rfcimport )
        //@@begin Interfa_ctl_mthd()
        wdThis.wdGet<modeldc>Controller().CallRfc(rfcimport);
        //@@end
    3) Open the DC Metadata>Public Part>New public part
         Give a name and Select the API and in the Select Entity type, select the web dynpro component and in the select entity which is at the bottom of select entity select the modeldc/component (Ie component inside the web dynpro component)
    4) Build and deploy the model dc
    <b>Project DC</b>
    1) Expand the DC metedata > used DC >right click and select add used dc and select the model dc and select the build type in dependency tab
    2) Expand the web dynpro component structure and Select the Used web dynpro component and right click and select used webdynpro component and browse the component and give a name ie RFCComp
    3)In the view of project dc define the usage of the component RFCComp
    In any action of button , call the RFC comp like this
    //@@begin javadoc:onActionGo(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGo(ServerEvent)
        wdThis.wdGetRFCCompInterface().Interfa_ctl_mthd("XXXXXXXX");
        //@@end
    Hope this helps,
    Regards,
    Arun

  • How to update one table from another table?

    Hi,
    Please go through the case I am mentioning below and if possible try to provide with a solution.
    I am working on a report to generate cash flow forecast, where in one of the fields is "Payroll", in which its being mentioned as:
    In the selection screen: I am entering Project ID, profit Center and Period(in MM/YYYY format).
    Selection of all entries in table COSP for selected cost elements above, value type 1, version , all periods and for all selected WBS elements and all objects underneath.
    From this, update table COFP with information from COSP with value type 62 and same period.
    For updation of various fields the following information is being given.
    How should we update COFP?
    New entries per OBJNR/PERIO and HKONT are required via using the information from COSP:
    COFP-MANDT              =          SY-MANDT
    COFP-KOKRS              =          if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PKOKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-KOKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-KOKRS
    COFP-BELNR               =          Check table NRIV, CLIENT = SY-MANDT, OBJECT = RK_BELEG,
    SUBOBJECT = COFP-KOKRS, NRRANGENR = ‘05’,
    Add 1 to NRLEVEL and begin with 500000000
    Use same BELNR for one update-run
    COFP-BUZEI                =          ‘1’ + and 1 in next entry but same update-run
    COFP-TWAER              =          COSP-TWAER
    COFP-ZHLDT                =          always last day of month in field COFP-PERIO
    COFP-GJAHR               =          COSP-GJAHR
    COFP-PERIO               =          if entry in field WKG001 à PERIO = 001
                                                   If entry in field WKG006 à PERIO = 006……
    COFP-WRTTP              =          ‘62’
    COFP-VRGNG              =          ‘FIPL’
    COFP-POSIT                =          Check table SKB1 where SAKNR = COSP-KSTAR and use SKB1-FIPOS
                                                   for going to table FMCI-FIPOS and enter FMCI-POSIT
    COFP-OBJNR               =          COSP-OBJNR
    COFP-HKONT              =          COSP-KSTAR
    COFP-WKGBTR           =          WKGXXX
    COFP-WKGBTRO         =          -
    COFP-WTGBTR            =          WTGXXX
    COFP-WTGBTRO         =          -
    COFP-WOGBTR           =          WTGXXX
    COFP-WOGBTRO        =          -
    COFP-BUKRS1            =          -
    COFP-GJAHR1             =          -
    COFP-BELNR1             =          -
    COFP-BUZEI1              =          -
    COFP-BUKRS2            =          -
    COFP-GJAHR2             =          -
    COFP-BELNR2             =          -
    COFP-BUZEI2              =          -
    COFP-EBELN               =          -
    COFP-EBELP               =          -
    COFP-ZEKKN               =          -
    COFP-ETENRM            =          -
    COFP-STUNR               =          -
    COFP-LIFNR                =          -
    COFP-KUNNR              =          -
    COFP-GSBER              =          -
    COFP-BUKRS              =          (nearly same as COFP-KOKRS!)
                                                   if COSP-OBJNR begins with ‘PR’
                                                   Check table PRPS with COSP-OBJNR = PRPS-OBJNR and enter PRPS-PBUKR
                                                    If COSP-OBJNR begins with ‘NV’
                                                   Check table AFVC with COSP-OBJNR = AFVC-OBJNR,
    go to Table AFKO with AFVC-AUFPL,
    go to table AUFK with AFKO-AUFNR and enter AUFK-BUKRS
    If COSP-OBJNR begins with ‘OR’
    Check table AUFK with COSP-OBJNR = AUFK-OBJNR
    and enter AUFK-BUKRS
    COFP-EINDT                =          -
    COFP-SGTXT               =          -
    COFP-GEBER              =          -
    COFP-KURSF              =          -
    COFP-KUFIX                =          -
    COFP-GBETR              =          -
    COFP-KURSR              =          -
    COFP-KURSFIKRS       =          -
    COFP-KZKRS               =          -
    COFP-UMBKZ              =          -
    COFP-KBLNR               =          -
    COFP-KBLPOS            =          -
    COFP-HI FIVOR            =          -
    COFP-LO FIVOR          =          -
    COFP-HI ACCOUNT      =          -
    COFP-LO ACCOUNT     =          -
    COFP-HI LIFNR            =          -
    COFP-LO LIFNR           =          -
    COFP-HI KUNNR          =          -
    COFP-LO KUNNR         =          -
    COFP-XDELETE           =          -
    COFP-HI XOPVW         =          -
    COFP-LO XOPVW        =          -
    COFP-ZAEHK               =          -
    COFP-CHAINBELNR     =          -
    COFP-MWSKZ             =          -
    COFP-LEDNR               =          -
    COFP-BELTP               =          ‘1’
    COFP-VERSN              =          ‘0’
    COFP-OWAER             =          COSP-TWAER
    COFP-CPUDT               =          SY-DATUM
    COFP-CPUTM              =          SY-TIME
    after doing updation, its again saying Selection of all entries in table COFP with value type 51 to 62, selected year, selected cost elements above and for all selected WBS elements and all objects underneath. Summarisation by period.
    Now, can someone help me as how to proceed with the entire thing? An elaborate and illustrative answer would be highly appreciable.
    If you require any other information....then get back to me ..asap.
    Its bit urgent.
    Thanks & Regards,
    Ravi

    Hi
    update <table> from <i_tab>
    for different conditions.
    loop at i_cosp.
    if cosp-mandt eq sy-mandt and  cosp-objnr eq 'PR'.
    Read table i_PRPS with key  i_PRPS-OBJNR = i_COSP-OBJNR.
    if sy-subrc eq 0.
    update PRPS set PKOKR = ? where objnr = i_prpr-objnr.
    endif.
    endif.
    similarly for all the conditions
    Regards
    Message was edited by: Harikishore Sreenivasulu

Maybe you are looking for