How can I pass a docking container to a program in a non-simple context?

Dear colleagues,
I want to pass a docking container like the one in SE80 to another program.
The following code works fine:
REPORT z_moving_dock.
DATA: cl_docker type REF TO cl_gui_docking_container.
PARAMETERS: test.
INITIALIZATION.
  CREATE OBJECT cl_docker EXPORTING no_autodef_progid_dynnr = 'X'.
END-OF-SELECTION.
  WRITE:/ test.
But I cannot extend this to my current program. There I sourced out anything related to the GUI into a function group to obey the MVC paradigma. (That's maybe the error in reasoning, but I'm following the book Design Patterns in Object-Oriented ABAP from SAP Press and -- of course -- good and healthy programming style.)
So it's a function group which knows the dynpros and controls, the main program knows only the data.
Now I have a docking container like the one in SE80. We have many working older programs and I want to switch to them carrying the docking container with me. I have searched the Demos in SAP, the Online Help, the SAP Library, Books, the Web, this Forum, but none of them goes beyond the simpler examples that always work.
I tried the LINK method on the docking container. I tried it before calling the new program (btw. by SUBMIT). I tried it afterwards from the called program (via a function module from the aforementioned group -- but the group is tied to the old program context and therefore I am in a new "instance" of it). I tried different values for REPID and DYNNR in LINK. I debugged SE80 -- too complicated!
If it works well I get the container back when I return to the calling program. If it works badly the container is completely lost.
Perhaps I should export something to memory?
But I strongly would prefer not to alter the called programs: In the future I might also want to call a SAP standard program.
I also didn't find some documentation explaining what is going on in the background so I could figure out in which direction to "think".
I also tested the following code on SAP R/3 4.7 and SAP ERP 2005 with the same results.
In the meantime I also created a minimal example. First the triggering report:
REPORT z_moving_docking_container.
DATA: g_example TYPE REF TO zcl_moving_docking_container.
CREATE OBJECT g_example.
This obviously calls the main class ZCL_MOVING_DOCKING_CONTAINER which has only this constructor:
METHOD constructor.
  CALL FUNCTION 'Z_SHOW_DYNPRO'.
ENDMETHOD.
Normally this class should handle the business logic. Here it only calls this function module. In the appropriate function group, say Z_MOVING_DOCKING_CONTAINER, I have these declarations in the TOP-Include:
FUNCTION-POOL z_moving_docking_container.
DATA:
  gv_okcode TYPE ui_func,
  go_docker TYPE REF TO cl_gui_docking_container.
The function group also contains a dynpro 9000 with this flow logic:
PROCESS BEFORE OUTPUT.
  MODULE status_9000.
PROCESS AFTER INPUT.
  MODULE user_command_9000.
The modules are straightforward:
MODULE status_9000 OUTPUT.
  SET PF-STATUS '9000'.
  IF go_docker IS INITIAL.
    CREATE OBJECT go_docker
           EXPORTING no_autodef_progid_dynnr = 'X'.
  ENDIF.
ENDMODULE.
with at least the function code ONLI defined in PF-status 9000 and
MODULE user_command_9000 INPUT.
  IF gv_okcode = 'ONLI'.
    SUBMIT z_sample_report AND RETURN.
  ELSE.
    LEAVE PROGRAM.
  ENDIF.
ENDMODULE.
The report Z_SAMPLE_REPORT can be any report you like.
At last the function module contains the following code:
FUNCTION z_show_dynpro.
*"*"Lokale Schnittstelle:
  CALL SCREEN 9000.
ENDFUNCTION.
As I see this, this is a straightforward application of the working example at the top and the principles of MVC and encapsulation of the dynpro logic (to "avoid" global variables as best as possible).
Clearly in some sense this is an academic question, but I have built a fairly big application like that up to now ...
</edit>
Thanks for reading and contemplating,
Thomas
Edited by: Thomas Geiß on Feb 4, 2009 11:03 AM
Edited by: Thomas Geiß on Feb 4, 2009 11:59 AM
Edited by: Thomas Geiß on Feb 4, 2009 12:01 PM

You'll either have to pass the data in as parameters in the applet tags or create a JavaScript tag and have the JavaScript pass it in. If the array is very large then you open a connection between the Applet and a servlet and pass the data that way.

Similar Messages

  • How can I pass system commands from a java program? Urgent!

    hi,
    I have been trying this out since a long time. How do I send system commands to command.com or cmd.exe from a java program and an output of the executed command back to the java application.
    If u have any idea, or have any information about the kind os application reply back.
    Thanks
    Deepa Datar

    This is the code which I tried, but it displays only the title of MS-DOS, something like " Microsoft Corp...etc ". But doesn't take any input, and the subprocess(cmd.exe) hangs.
    import java.io.*;
    public class cmddemo2
    public static void main(String arg[])
    try
    System.out.println("cmd");
    Process p=Runtime.getRuntime().exec("cmd.exe");
    DataInputStream din=new DataInputStream(p.getInputStream());
    DataOutputStream dout=new DataOutputStream(p.getOutputStream());
    System.out.println("after streams");
    String s;
    dout.writeChars("type cmddemo2.java");
    while((s=din.readLine())!="\n")
    System.out.println(s);
    dout.writeChars("dir");
    String s1;
    while((s1=din.readLine())!="\n")
    System.out.println(s1);
    System.out.println("over");
    catch(Exception e)
    { System.out.println("Exception : "+e);

  • How can I pass a value into a page fragment?

    How can I pass a value into a page fragment?
    I am implementing four search screens. And the only thing different about them will be their backing bean.
    So I’d like to do something like have four pages, each which retrieves its appropriate backing bean, sets that bean to a variable, and then includes a page fragment which contains the generic search page code (which will make use of that variable).
    The code in the four pages would be something like this:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <c:set var="searchPageBackingBean"
    value="#{pageFlowScope.employeeSearchPageBean}"
    scope="page"/>
    <jsp:include page="./SearchPageBody.jsff"/>
    </jsp:root>
    At this point, what I’m seeing is that the fragment page, SearchPageBody.jsff, has no visibility of the searchPageBackingBean variable, either referencing it as #{pageFlowScope.searchPageBackingBean} or just #{searchPageBackingBean}

    The following will work, assuming you are needing to access a managed bean:
    Put this in the parent page:
    <c:set var="nameOfSearchPageBackingBean"
    value="employeeSearchPageBean"
    scope="request"/>
    Put this in the child, SearchPageBody.jsff:
    <c:set var="searchPageBean"
    value="#{pageFlowScope[nameOfSearchPageBackingBean]}"
    scope="page"/>

  • How can we pass the select-option value to modulepool program?

    hi,
      how can we pass the select-option value to modulepool program ?
      Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
               My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
               How i get select-option values to PAI of call screen for getting the data from database table to my internal table?

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • How can I pass dynamic value as a user input parameter in discoverer?

    Hi,
    I have a requirement for a discoverer report like this: The report will display only details for Suppliers that have expired (or soon to be) Insurance details. That is the Expiration Date is less than or equal to the day the report is being run plus any days specified in the Number of Days in the Future Parameter.
    The sample code as:
    SELECT s.segment1 vendor_number
    ,s.vendor_name
    ,flv1.meaning classification
    ,pca.certificate_number
    ,pca.certifying_agency
    ,pca.expiration_date
    ,flv2.meaning status
    FROM ap_suppliers s
    ,pos_bus_class_attr pca
    ,fnd_lookup_values flv1
    ,fnd_lookup_values flv2
    WHERE pca.vendor_id = s.vendor_id
    AND flv1.lookup_code = pca.lookup_code
    AND flv1.lookup_type = pca.lookup_type
    AND flv2.lookup_code = pca.class_status
    AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
    AND pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>
    order by pca.expiration_date asc
    Now the parameter is Number of Days in the Future (Enter the number days in the future to extract the data. This will default to 0).
    Is it possible in discoverer to do so as in query i do that like a condition as pca.expiration_date <= trunc(sysdate) + <No. of Days in the Future>.
    How can I pass <No. of Days in the Future> as a user input parameter in discoverer?
    Please help.

    Hi,
    All you need to do is to create the condition in the discoverer instead of in the query.
    Create a custom folder containing the following sq (note that i removed the condition)l:
    SELECT s.segment1 vendor_number
    ,s.vendor_name
    ,flv1.meaning classification
    ,pca.certificate_number
    ,pca.certifying_agency
    ,pca.expiration_date
    ,flv2.meaning status
    FROM ap_suppliers s
    ,pos_bus_class_attr pca
    ,fnd_lookup_values flv1
    ,fnd_lookup_values flv2
    WHERE pca.vendor_id = s.vendor_id
    AND flv1.lookup_code = pca.lookup_code
    AND flv1.lookup_type = pca.lookup_type
    AND flv2.lookup_code = pca.class_status
    AND flv2.lookup_type = 'POS_BUS_CLASS_STATUSES'
    Then create a discoverer report using this folder using all fields.
    Create a new calculation as (use this exact syntax):
    Sysdate + :No_of_Days_in_the_Future
    Create a new condition:
    pca.expiration_date <= <your calculation>
    To complete it add a sort as you did in the SQL.
    That's it.
    Tamir

  • How can I pass parameter from report to form?

    Hi :)
    Now I try to build conference room like this by using form
    and report. And i design that when users click at group report
    then i'll show page that contain questions report and add
    question form. And question form and report must receive the
    same parameter from group report.
    First Problem: is I don't know how group report send the
    same parameter to question report and add question report at the
    same time. And is it possible??? If not please suggest me what
    should I do???
    Second Problem: is I don't know how can I pass parameter from
    report to form. I don't know the way to do it.
    Please tell me!!! Please...
    I look forward to hearing from all of you.
    Thank You.

    One way is to create a link based on that form and attach that
    link with the report. Through links you can pass parameters

  • How can I pass field value betwen view in ICWC?

    Hi experts,
    I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
    Hope can get some advices and helps here.
    I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
    I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view  to the BupaCreate view when I click on the 'create' button.
    I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
    Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
    Really appreciate for any help.
    Edited by: mervyn tay on Apr 7, 2009 11:42 AM

    solved by myself...
    code in the CREATE_ACCOUNT method.
            ev_entity->set_property( iv_attr_name = 'ZZICNO'
                                     iv_value = lv_icnum1 ).

  • How can I pass an empty array to a parameter of type PLSQLAssociativeArray

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

  • How can i pass the Input value to the sql file in the korn shell ??

    Hi,
    How can i pass the Input value to the sql file in the korn shell ??
    I have to pass the 4 different values to the sql file and each time i pass the value it has to generate the txt file for that value like wise it has to generate the 4 files at each run.
    can any one help me out.
    Raja

    Can you please more elaberate., perhaps you should more elaberate.
    sqlplus is a program. you start it from the korn shell. when it's finished, processing control returns to the korn shell. the korn shell and sqlplus do not communicate back and forth.
    so "spool the output from .sql file to some txt file from k shell, while passing the input parameters to the sql file from korn shell" makes no sense.

  • How can I pass more than one parameters in PDK-URL services?

    Hi all,
    How can I pass more than one parameters in PDK-URL service? All samples on Portal Center shows just one parameter passing.
    <inputParameter class="oracle.portal.provider.v1.URLPortletParameter">
    <name>csz</name>
    <isMandatory>false</isMandatory>
    <displayName>What location do you want a map for (City, State or Zip)?</displayName>
    </inputParameter>
    How can I write the privider.xml file for passing multiple parameters?

    I answer to my question. I've got the answer.
    I repeatly write down the <inputParameter> tags, and it works.

  • How can i pass more than 1 param to servlet to show blob image

    Hi
    my servlet expects 2 param to SELECt an image from a blob column
    public class ImageBlobServlet extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException,
    IOException {
    response.setContentType(CONTENT_TYPE);
    String ImageId = request.getParameter("id");
    String TipImg = request.getParameter("tip");
    OutputStream os = response.getOutputStream();
    Connection conn = null;
    try {
    Context ctx;
    ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/rhDS");
    conn = ds.getConnection();
    PreparedStatement statement = conn.prepareStatement("select FIT from " +
    "RHH_FOTOS IMG " +
    "where IMG.IDASSO = ? and IMG.TIM_COA = ?");
    statement.setInt(1, new Integer(ImageId));
    statement.setString(2, TipImg);
    To display the image i tried to use:
    <af:image id="ot1"
    *source="/imageblobservlet?id=#{bindings.Con.inputValue}?tip=#{"EMP"}"*
    shortDesc="Foto"/>
    but i receive all content in the get of first param.
    String ImageId = request.getParameter("id");
    How can i pass one more then 1 param in EL.
    Thanks in advance

    Hello,
    seems to me you're using wrong separator for the second param into your URL:
    <af:image id="ot1" source="/imageblobservlet?id=#{bindings.Con.inputValue}
    tip=#{"EMP"}" shortDesc="Foto"/>
    I think it should be:
    <af:image id="ot1" source="/imageblobservlet?id=#{bindings.Con.inputValue}
    tip=#{"EMP"}" shortDesc="Foto"/>
    Jack

  • How can I pass arguments from one MIDlet to another MIDlet

    Hi everybody !
    Can anybody help me in knowing that how can I pass the parameters from one
    MIDlets to another one in same application.
    I am devloping a application in which I am using more than two MIDlet and I
    want to transfer Parameter from one MIDlet to another one.
    I just explain what I have done....
    I made a MIDlet "A" and "B" in the same project using NetBeans IDE.
    In MIDlet "A" I create the Object of MIDlet "B" so that the constructor of
    MIDlet "B" is called and parameter can be transferred.
    But when I run the program it shows me two MIDlet on the screen, that I
    doesn't need.
    Suggestion are most welcome....
    Thanks in advance
    Regards
    Bhagwat

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • How can I pass data generated in a SubVI inside a Case Structure out of the Case Structure?

    Hello,
    I am using a USB 2701 to control a heater.  I have three SubVIs that are all working properly on their own.  I'd like to use an Enum to select which of the SubVIs is running at a given time.  The problem is that no data is passing out of the case structure.  How can I pass the temperatures and heater outputs acquired by the SubVIs to the main VI?  I've attached my some of my code below.  I can't attach more than 3 files, but you can see how the main VI is configured.  Like I said, the SubVIs are working individually, so you shouldn't really need to look at them.
    Thank you,
    CJones581
    Attachments:
    RampHeater6-21-07.vi ‏305 KB
    69_Heater_Case.vi ‏23 KB
    HeaterTCD6-21-07.vi ‏210 KB

    CJones,
    You might check a couple of things.
    Your HeaterTCD... VI has a While loop with a stop button condition.  HeaterTCD pass out values only when it finishes running.  If it doesn't pop open the front panel (which usually doesn't happen when running a SubVI) you could run into a stuck loop because you don't have access to the Stop button.  This could appear in the form of no data being passed out (because the SubVI never stops running).  The primary VI opens the HeaterTCD VI, starts it, and waits for the VI to finish and pass final values .
    Secondary note: Unless you want your SubVI panel (which probably isn't open when running the main VI) to update continuously, consider moving your Temperature Graph and Temperature oC indicators outside the while loop.  Pass final values to them via a tunnel, since the main VI will only read their values after the loop finishes running, anyway.
    It might help to add error management to HeaterTCD like you have for RampHeater.  If you connect error lines with Error Outs to your main VI, that will help tell if there is an error somewhere that is preventing info output.
    RampHeater SubVI has the same issue with the stop button.  It is also probably getting stuck in the While loop waiting for a manual push of that SubVI's Stop button.
    An easy way to test this would be to set up a logic circuit so that when the While loop iteration counter reaches a certain number, it registers True and sends it to the conditional.  I know this isn't what you want to do long-term, but if that lets your SubVI return outputs it means that the SubVI was just never stopping.
    Hope that helps.
    David C, Applications Engineering
    David C
    Applications Engineering

  • HT201250 how can i pass information from one mac to another mac by using the time capsule

    how can i pass information from one mac to another mac by using the time capsule

    If you want to transfer files, settings, etc., you must open Migration Assistant (Applications > Utilities) in the Mac that you want to transfer the files and follow the instructions

Maybe you are looking for

  • How do you delete duplicate tracks off your playlist?!

    How do you delete duplicate tracks off your playlist - everytime I connect my hard-drive it adds another of every single track - argh!!!! I remember there being a 'delete duplicate tracks' option on a much older version of itunes - is this still avai

  • Passing parameter between two portlets which are in two diffrent pages

    hi, This is query regaring passing the parameters from one java portlets to another. Or Receiving parameter from Portlets. The Secanrio is like : I have two portlets shown in the two different pages. Now while running the application i want to send t

  • ITunes Store looks funny in Mountain Lion

    Since installing Mountain Lion, the iTunes store displays wrong - the large area at the top of the screen - which should display cycling artwork for current albums, movies, etc. is blank.   Everything else looks fine.   Attaching a screen cap.

  • I cant click the button to add events to my calendar

    The + sign button that I would use to add events has one gray and I havent been able to add events.  It is very annoying.  Has anyone solved this problem without using their computer?

  • 2012 MacBook Pro 15" retina [USB 3.0 Issue]

    Hello all, I am having an issue with my new laptop, please read! I've purchased Macbook pro retina few days back, and I can't connect my 3.0 USB ext hdd I have tried formatting with my other Mac computer, under every possible system type(?) such as "