How to open a popup and get some data from a model class

Hi experts,
mi problem is the next.
I am opening a popup from a view that is  controlled by a controller named identificador.do, the controller class is z_identity_cl.
the window that is opened is other view controlled by nocupentes.do, with a controller class, z_nocupantes_cl.
In the do_init event of the z_nocupantes class i have added the next code:
<i>  DATA: cl_parent TYPE REF TO Z_IDENTtity_CL.
Recuperamos el atributo parent
  cl_parent ?= me->m_parent.
model is the class i want to recover, it is defined in the attibutes of the class z_identity_cl
  model     ?= cl_parent->get_model( 'mo' ).</i>
When i open the popup i get the next error:
<i>BSP exception : the object  numero_ocup.htm(this is the page i want to open) in URL sap/ZHR_PDWEB_GDPT/numero_ocup.htm is a view. Initialize the controller.</i>
what do i have to do?
any help?
thanks in advance

Hi Eduardo,
  you should be calling the Controller in the URL not the View. after calling the controlles in the URL create the view in the DO_REQUEST of the Controller. This should resolve the issue.
  In the the DO_INIT define the Parent class of the Controller.
METHOD do_init.
  DATA: lr_my_parent TYPE REF TO zcl_hr_main_control.
* set (MVC) model
  lr_my_parent ?= me->m_parent.
  set_model( model_instance = lr_my_parent->model
                   model_id = 'Z' ).
  me->model = lr_my_parent->model.
ENDMETHOD.
method DO_REQUEST.
* datadeclaration
  DATA: abs      TYPE REF TO if_bsp_page.
* if input is available, dispatch this input to subcomponent.
* this call is only necessary for toplevel controllers.
  dispatch_input( ).
* if any of the controllers has requested a navigation,
* do not try to display, but leave current processing
  IF is_navigation_requested( ) IS NOT INITIAL.
    RETURN.
  ENDIF.
* output current view (create, set attibutes, and call)
  abs = create_view( view_name = 'to_disp.htm' ).
* set attribute model if needed
  abs->set_attribute( name = 'model' value = model ).
* call master views
  call_view( abs ). "calls itself
endmethod.
Cheers
Amandeep

Similar Messages

  • How to get the data from the model node like a table ?

    I want to get the data from the model node  once a record ,and the node  is bound to a internal table in the RFM which I called in the R/3 system. Who can give me some advice to achive it?Thank you!!

    Hi,
    To get the data from the node:
    wdContext.node[your node name].current[node name]_InputElement().get[specific element in the node];
    or you van use:
    wdContext.current[your node]Element().get[your element in the node];
    examples:
    wdContext.nodeZ_Mepro_Po_Detail_Stock_Distri_Input().currentZ_Mepro_Po_Detail_Stock_Distri_InputElement().getUcpd_Flag();
    wdContext.currentT_Delv_ReqsElement().getShelflife();
    regards,

  • How to open new window and generate oracle report from apex

    Hi,
    I had created an application that generates PDF files using Oracle Reports, following this Guide.
    http://www.oracle.com/technology/products/database/application_express/howtos/howto_integrate_oracle_reports.html
    And I followed 'Advanced Technique', so that users can't generate PDF file by changing URL and parameters. This is done for security reasons.
    But in this tutorial, when 'Go' button is pressed, the PDF file is displayed on the same window of apex application. If so, user might close the window by mistake. In order to avoid this, another window have to be opened.
    So, I put this code in the BRANCH - URL Target. (Note that this is not in Optional URL Redirect in the button property, but the branch which is called by the button.)
    javascript:popupURL('&REPORTS_URL.quotation&P2100_REP_JOB_ID.')
    But if the button is pressed, I get this error.
    ERR-1777: Page 2100 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    If I put the code 'javascritpt ....' in the Optional URL Redirect, another window opens successfully, but the Process to generate report job is not executed.
    Does anyone know how to open new window from the Branch in this case?

    G'day Shohei,
    Try putting your javascript into your plsql process using the htp.p(); procedure.
    For example, something along these lines should do it:
    BEGIN
    -- Your other process code goes here...
    htp.p('<script type="javascript/text">');
    htp.p('popupURL("&REPORTS_URL.quotation&P2100_REP_JOB_ID.")');
    htp.p('</script>');
    END;
    What happens is the javascript is browser based whereas your plsql process is server based and so if you put the javascript into your button item Optional URL Redirect it is executed prior to getting to the page plsql process and therefore it will never execute the process. When you have it in your branch which normally follows the processes, control has been handed to the server and the javascript cannot be executed and so your page throws the error "Page 2100 provided no page to branch to"... By "seeding" the plsql process with the embedded javascript in the htp.p() procedure you can achieve the desired result. You could also have it as a separate process also as long as it is sequenced correctly to follow your other process.
    HTH
    Cheers,
    Mike

  • Steps to to enhance the existing cube and get the data from r/3

    I am at entry level.
    if i want to enhance an existing cube and pull data from R/3 into the cube what are the main steps i do.
    in my scenario - this is SD module. The infocude is  custom cube(CONTRACT cube) . I have to enhance this existing custom cube with new info objects. The person who had created this cube years ago has used generic data source .
    Please explain me the main stepd i need to do in R/3 till i get it to BI

    check if you can enhance the existing generic data source to bring data for new info objects or if those fileds are aleady existing in the data source - if existing, you will have to make changes only in BW side, if not, you will have to first modify the generic data source
    if you have modified the data source, relicate data source at BW side
    create new info objects and add those to cube > activate info cube
    map the info objects with fields in data source > activate tranformation
    test it by loading the data
    now you will have to move these changes to produciton;
    move the data source changes to R/3 production system (if applicable)
    replicate data source in BW production system
    move the BW transports to production system
    you will have communicate to the uses that data will not avialable for some time or you need to reload data in cube in off business hours or on a weekend
    delete data from info cube
    initialize delta without data transer
    do a full repair to the cube
    now you can run delta on a daily basis
    I hope it helps.
    Regards,
    Gaurav

  • How to make qury form and copy one data from one form to another

    Hi,
    i would like to develop a form which is used to query a particular data and copy that data to other form.
    Thanks

    Hi,
    i have to develop two form namely memo and chalan.
    memo will generate by different departments and send to store department to create a chalan.
    first memo data will enter by department and this memo no will send to store department.
    store department will find that memo by find button and data should copy from memo form to chalan form

  • How can I open a file and get the data inside  file when using  WebStart

    When I use ClassLoader,
    Which methold can I use the read the information inside that file?
    Thanks
    Ryan

    Assuming you are trying to read the jar file.
    http://forum.java.sun.com/thread.jspa?forumID=22&threadID=572955
    rykk

  • How to read a file and pickup some information from  a file

    Hai all,
    I wrote a beloe program to read a file and write it into another file
    import java.io.*;
    public class Rdata {
    /** Creates a new instance of Rdata */
    public Rdata() {
    public static void main(String a[])throws Exception
    FileReader fr=new FileReader("c:\\java\\attach\\attach2\\resume1.doc");
    FileWriter fw=new FileWriter("C:\\java\\attach\\abc2.doc");
    char ch;
    int i;
    while((i=fr.read())!=-1)
    ch=(char)i;
    fw.write(ch);
    fw.close();
    This program reads the content from resume1.doc and write it into abc2.doc . But in my project I want to read the resume1.doc and and write only peace of information like "keyskills are java,jsp,javamail"
    I mean how to read the entaire file and how to write into another file whisc i require
    Thanks&regards
    radhs

    http://java.sun.com/docs/books/tutorial/essential/io/

  • Erasing internal P'book HD and restoring SOME data from external TM HD?

    I would like to erase the internal 60 GB HD in my PowerBook G4 that is about 99% full.
    I did a TM backup yesterday (to a 250 GB firewire external) and would like to clear off the internal HD and bring back SOME of the data but not so much that there isn't room to work.
    Someone here on the forum advised against erasing all the original data on the internal HD because then your backups are no longer backups.
    Short of putting a larger HD into the P'Book (which is probably 5 - 6 years old) what strategy would you recommend? I have a new 1TB USB 2.0 external that could get into the act here . . . anyone want to provide a direction for me?
    Thanks very much.

    1. First do your reinstallation and the restore of files you wish to keep on the internal drive. Once that is done turn off TM and set the backup drive to None. Change the Computer Name, turn TM back on and select the backup drive. When TM does the backup it should do so to a new folder under the new Computer Name. You Backups.backupd folder on the backup drive will then contain two main folders under each separate Computer Name.
    2. To transfer the existing TM backup to your new drive you must first partition the new drive using the APM partition scheme if the drive is used on a PPC or GUID if used on an Intel machine. Format the drive using Mac OS Extended, Journaled. Clone the old backup drive to the new one using the Restore option in Disk Utility per the following:
    Clone using Restore Option of Disk Utility
    1. Open Disk Utility from the Utilities folder.
    2. Select the destination volume from the left side list.
    3. Click on the Erase tab in the DU main window. Set the format type to Mac OS Extended (journaled, if available) and click on the Erase button. This step can be skipped if the destination has already been freshly erased.
    4. Click on the Restore tab in the DU main window.
    5. Select the destination volume from the left side list and drag it to the Destination entry field.
    6. Select the source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    Destination means the new backup drive.
    Source means the old backup drive.
    3. Yes, but when you use the TM application you will need to invoke the option to restore from a different TM backup drive or TM backup.
    For more on how to use TM or resolve problems see the User tips at the top of this forum's Topics listing.

  • Want to get SOME data from Time Machine to restore to NEW Drive.

    1) System: Leopard.
    2) HD configuration: 1TB Time Machine drive backs up internal 500GB AND an external 500GB (called "iMac Annex").
    3) The 500GB iMac Annex died.
    4) How can I get the iMac Annex Data on Time Machine to restore to a NEW external 500GB drive ("iMax Annex 2").
    Migration assistant only seems to ask about the "System to Transfer," and only my internal drive shows up.
    Question: Can I drag and drop the folders on Time Machine (from the latest backup set) to iMac Annex 2, then reconfigure Time Machine?

    hebron,
    I have done this little routine in the past, and Time Machine has carried on without the "hiccup" you seem to have had. Also, I was not asked for a destination folder.
    However, Time Machine may have changed a bit in this regard in one of the intervening updates, or it could be that I named my "replacement" volume during a format, and the UNIX disk name and the OS X Finder disk name were reproduced exactly as they were prior to the erasure/replacement; in other words, our mileages may have varied.
    Nevertheless, I see no real problem for you either way. I suspect that Time Machine is simply performing a "deep traversal" in preparation of a normal backup of what you have, and an entirely new backup will not be created. Let it run its course, and you tell us the outcome. Even if a new backup is made (and not just a large, but normal backup), you have all of your old files, and you have a backup of same. At some point, you can delete any old backup folders, if you end up starting a new one.
    Scott

  • Get some data from a string

    I've a string with a lot of ##.*##.*##.*## codes into the string.
    Example of a string:
    My name is ##Claus##Jul##Larsen## and my dog is named as ##Fido##Happy##Dog##. The dog is 2 years old and come from ##United Kingdom##Europe##World##
    I want to get the three codes into an array. I've tried with org.apache.regexp.* without lucky :-(
    I want to get these codes and put them into an array.
    Please help me..... thanx

    Using jregex library:
    import jregex.*;
    Matcher m=new Pattern("##(.*?)##(.*?)##(.*?)##").matcher(theString); //note '?'s after '*'s
    while(ms.find()){
    System.out.println(m.group(1)+","+m.group(2)+","+m.group(3));
    Using java.util.regex:
    import java.util.regex.*;
    Matcher m=Pattern.compile("##(.*?)##(.*?)##(.*?)##").matcher(theString);
    //follows the same as above
    Conclusion:
    Your pattern "##.*##.*##.*##" is incorrect.
    You must apply "reluctant matching", i.e. insert '?'s after '*'s, to avoid the entire string being eat by the first occurence of ".*".
    And, use groups(parens) to retrieve the parts you are interested in.
    Regards

  • How to recover address book and all mailbox data

    How to recover address book and all mailbox data, from mounted drive that had OS10.4.11 now has bad blocks, and is not boot-able.
    Any help would be appreciated.... hermann

    The drive is mounted (appears as a drive on the desktop)? You can't just copy the files, or is it not really mounted?
    It would help to have more details on the status of this drive since I am obviously confused as to whether or not it is mounted and appears on the desktop. Is this an internal or external drive? If internal, how are you booting your computer now?
    There are data recovery tools such as [Data Rescue II|http://www.prosofteng.com/products/data_rescue.php] or [FileSalvage|http://subrosasoft.com/OSXSoftware/index.php?mainpage=product_info&productsid=1]. Both have free trial versions that let you see if the software will help before you decide to buy. You will also need a second hard drive equal to or larger in size than your first drive as a destination drive for recovered files. If the critical files are located on the bad blocks then there isn't much hope other than to send the drive out to a professional data recovery service which could cost $1000.
    The easiest way to recover the files is to get them off a backup drive.

  • Anyone help? I click on buttons within websites and my mac opens new webpages advertising, mac keeper pro or some foreign exchange trading platform. Did i pick something hop in a download? how do i search for and get rid of this annoying infiltration?

    Anyone help? I click on buttons within websites and my mac opens new webpages advertising, mac keeper pro or some foreign exchange trading platform. Did i pick something hop in a download? how do i search for and get rid of this annoying infiltration?

    You've installed some form of adware. Take a look here:  http://www.thesafemac.com/arg/

  • When trying to open iphoto I get the error message "You can't open the application iPhoto because it may be damaged or incomplete." How do I fix this and get my photo's back?

    When trying to open iphoto I get the error message "You can't open the application iPhoto because it may be damaged or incomplete." How do I fix this and get my photo's back?

    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store you can find it in your Purchases List.

  • When I open FaceTime my screen also shows contacts list how do I remove this and get full FaceTime screen to return?

    When I open FaceTime my screen also shows contacts list how do I remove this and get full FaceTime screen to return?

    When I open FaceTime my screen also shows contacts list how do I remove this and get full FaceTime screen to return?

  • I bought a gift card, but it hasn't shown up in my e-mail after 1 hour.  How can I find it and get the credit on my account?

    I bought an iTune gift card for myself and sent it to my e-mail address.  I have waited over an hour and the e-mail showing the gift card has not arrived.  How do I find it and get the credit put into my iTunes account so that I can buy some music?

    Oh hold on - sudden development!
    I panicked and force-shut down my computer because it froze after I clicked on the 'Reset Cache' option, then I logged back on and noticed the Cloud symbol next to the missing song. I clicked it, and it's finally downloaded properly! <3
    Mate, thank you so much for helping me out! xxx

Maybe you are looking for

  • Unable to find a data source in RSA5 which can be seen in RSA3.

    Hi there, I am unable to find the business content data sources in RSA5, but I can find the same data sources in RSA3 (extract checker). I need these data sources to be replicated to BW and take it up further. Any light on the above issue will be of

  • Business Partner from SRM and CRM in BW

    Gurus, We are implementing both CRM and SRM this summer. Both make extensive use of Business Partner (0BPARTNER) which is causing headaches. CRM sends "customers" to BW via Business Partner and SRM sends vendors, purchasers and other stuff to BW via

  • Not able to use EXPLAIN PLAN in Toad

    hi, I am not able to use Explain Plan in Toad. The error it gives is the table PLAN_TABLE doesn't exit. But after seeing this error I did run the script "UTLXPLAN.sql" in order to create the plan_table table. After installing the above table I am not

  • Where I can maintain Text symbols and Selection texts?

    Hi there, I need to maintain Text symbols and Selection texts of a program manually, but I can't find  the tabs of Text symbols and Selection texts. My SAP is ECC6.0. Please help me with that... Thanks a lot, Bing

  • Photoshop Elements 7 neu PDF Miniaturen

    Plötzlich bekomme ich beim Öffnen eines Dokuments oder Bildes durch Emails ein zweites Fenster PDF Importieren mit Miniaturen. Wenn ich sie vergrössern will, kommen sie als weiss/graues Schachbrett und das in der letzten Zeit immer, dazwischen kommt