Calling a BSP page with flow logic from LAYOUT

Hello all.  I am developing a BSP transaction to update HR data on SAP.  I initially developed this with one 'page with flow logic' and several 'page fragment's.  It has been suggested that I break this out into several pages with flow logic because the code in  the 'OnInputProcessing' Event Handler was getting quite complicated.  I was using the BSP directive to execute my 'page fragments'.  This was very simple to do.  What do I replace the BSP directive to call a page fragment with in order to call a page with flow logic.  I have included the code below.  I have converted the 'body.htm' 'page fragment' to a 'page with flow logic' and I am not sure of the correct way to call the page.  I do not have access to the navigation->goto_page( 'body.htm' ) at this point.  I am new to BSP and appreciate any help offered.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="phtmlb" prefix="phtmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<htmlb:content id     = "content"
               design = "design2002+design2003" >
  <htmlb:document disableBackspaceNavigation="TRUE" >
    <htmlb:documentHead title="ESS: Employee Self Service" >
    </htmlb:documentHead>
    <htmlb:documentBody>
      <htmlb:form id="OOEform" >
        <%-- Positioning --%>
        <htmlb:gridLayout columnSize = "2"
                          rowSize    = "2"
                          width      = "100 %" >
          <%-- Row 1 - Header --%>
          <htmlb:gridLayoutCell columnIndex       = "1"
                                rowIndex          = "1"
                                colSpan           = "2"
                                width             = "100 %"
                                verticalAlignment = "MIDDLE" >
            <DIV style="border-bottom-style:solid;border-color:#A5B1BF;border-width:20px">
            <%@include file="header.htm" %>
            </DIV>
          </htmlb:gridLayoutCell>
          <%-- Row 2; Column 1 (Body Area) --%>
          <htmlb:gridLayoutCell columnIndex       = "1"
                                rowIndex          = "2"
                                width             = "80%"
                                verticalAlignment = "MIDDLE" >
            <%@include file="body.htm" %>
          </htmlb:gridLayoutCell>
          <%-- Row 2; Column 2 (Right Area) --%>
          <htmlb:gridLayoutCell columnIndex         = "2"
                                rowIndex            = "2"
                                width               = "20%"
                                verticalAlignment   = "TOP"
                                horizontalAlignment = "LEFT" >
            <%@include file="right.htm" %>
          </htmlb:gridLayoutCell>
        </htmlb:gridLayout>
      </htmlb:form>
    </htmlb:documentBody>
  </htmlb:document>
</htmlb:content>

Hi,
uhmmm, as it was previously suggested, you should perhaps think about MVC for your development. Working with classes and methods gives you more room for a better looking code. But at this point I´m not sure where your real problem is. You mentioned first that you created one page with logic and several page fragments and then you are worried because the code in the OnInputProcessing event is getting out of control
First, you cannot insert a page in a page. You can only insert fragments in a page with <%@include file="header.htm" %>.
Second, if you don´t have idea of MVC or you don´t want to switch to MVC, then create a modules program (SE38) where you´ll enter your code as subroutines and you call these subroutines from OnInputProcessing as follows:
perform subrout1 in program XXXXXX tables YYYYY using AAAAA.
In your programm XXXXX you declare the code as:
form subrout1 in program XXXXXX tables YYYYY using AAAAA.
This can be a substitute to classes and methods.

Similar Messages

  • Hpw tp call a 'Page with Flow Logic' from within a View

    Within the same BSP, I have the requirment to call a page in the ;Page with Flow Logic' section from a page in the 'View' section.   
    Is this possible and if it is, how do I do it?  I have tried some calls but they all have failed.
    Thanks
    Glenn

    in the view you want to navigate then try
    <bsp: call > or <bsp: goto>  htmlb tags. or else you can use window.open method and open in a new window.

  • Calling a page with flow logic from a controller

    Is there any possibility of calling a page with flow logic(x.htm ) from a controller?
    Also I want to know how to apply scrolling to a tableview  in a View as there is no event handler here. Iam able to view the first 30 records but want to navigate from 31 to 60...61to 90 and so on.......
    Thanks and regards,
    Sinu

    Thank you so much...
    but will I be able to call from a controller as we call  a view...similar to the below code.
    lref_first_view = create_view( view_name = 'first.htm' ).
    lref_first_view->set_attribute( name = 'MODEL' value =           mref_model_first ).
    call_view( lref_first_view ).
    I have already set the visibleRowCount....but my issue is to navigate to the next records i.e say 2nd page 3rd page..........
    Regards,
    Sinu

  • Xhtmlb: tabStrip - how to execut a page with flow logic

    Hello all, how do I execute a "page with flow logic" from a "tabStrip".  Currently I am using a "page fragment".  But I need to change to a "page with flow logic" becuase of a technical issue. 
    Is it possible to tell which tab was selected using event processing?  When I try, I am getting "illegal reference". 
    Here is a sample of my current code.
    <xhtmlb:tabStrip id            = "TABSTRIP"
                     viewState     = "EXPANDED"
                     viewStateMode = "COLLAPSED_EXPANDED"
                     tooltip       = "Choose tab" >
      <xhtmlb:tabStripItem name  = "Home"
                           title = "Home" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Medical"
                           title = "Medical" >
        <%@include file="medical.htm" %> 
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Dental"
                           title = "Dental" >
        <%@include file="dental.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Vision"
                           title = "Vision" >
        <%@include file="vision.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "FlxSpnd"
                           title = "Flexible Spending" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "Other"
                           title = "Other" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
      <xhtmlb:tabStripItem name  = "RevSub"
                           title = "Review and Submit" >
        <%@include file="home.htm" %>
      </xhtmlb:tabStripItem>
    </xhtmlb:tabStrip>
    What would I replace the "page frament" with?
    Thanks in advance for your help, Troy

    Hi Troy,
      If i understood your requirement i think you need to move to other pages or views when the tabstrip items or clicked. If your requirement is the above one below is the explanation....
    In the layout you include a attribute  onSelect        = "mySelect" in the tag  xhtmlb:tabStrip.
    For event handling in the oninputprocessing you write the below code,
       CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    DATA: TABSTRIP TYPE REF TO CL_XHTMLB_TABSTRIP.
    Reading Data from Toolbar
    TABSTRIP ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = REQUEST
                                            NAME    = 'xhtmlb:tabstrip'
                                            ID      = 'tb3' ).
    Optional: test that this is an event from HTMLB library.
    IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
    Scenario 1: Read event from manager.
      DATA: EVENT TYPE REF TO IF_HTMLB_DATA.
      EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( RUNTIME->SERVER->REQUEST ).
    DATA: request_event TYPE REF TO cl_xhtmlb_event.
    request_event ?= event.
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME =
    CL_XHTMLB_TABSTRIP=>CO_EVENT_NAME.
    *---here you can handle the event... 
    ENDIF.
    ENDIF.
    Regards,
    Azaz Ali.

  • How to call the Page Fragment in Page with Flow logic

    Hi,
        I am new to BSP, My requirement is to created 1 page fragment which contains the Logo.  and to create 2 pages in flow logic
    The  logo has to apper in Pages with flow logic Pages. My question is how to call the PAge fragment in the 1 &2 pagesin page with flow logic
    Thanks,
    suresh

    Suresh,
    There is a very enriching portal help.sap.com  where you can find all basic and good documentation .
    http://help.sap.com/saphelp_nw04/helpdata/en/77/8a54d7434ff34784272a3df98ab645/content.htm
    the above link is from that portal.
    Before asking such basic questions please at least try to find or do some research yourself.
    There are standard applications like HTMLB_SAMPLES and SBSEXT_HTMLB and more for sample applications.
    Regards,
    Anubhav

  • Fill select-options in Page with flow logic ???

    Hello All,
              I created a BSP Application using Page with Flow Logic.
    In the first page of my Application I'm using 2 input fields as select-options.
    Now I'm populating a Ranges of that Field using the type :-
    selopttab
    I populated the ranges table like :-
    wa_bname_sel-sign   = 'I'.
              wa_bname_sel-option = 'BT'.
              wa_bname_sel-low    = '*'.
              wa_bname_sel-high   = 'Z'.
            ELSE.
              wa_bname_sel-sign   = 'I'.
              wa_bname_sel-option = 'EQ'.
              wa_bname_sel-low    = p_bname.
              wa_bname_sel-high   = p_bname.
            ENDIF.
            APPEND wa_bname_sel TO p_bname_sel.
            CLEAR  wa_bname_sel.
    But the problem is I checked the corresponding DATABASE Table entries by passing thesame value .
    i.e I passed the low and high values to the field as '*' and 'Z'.
    The total number of entries differ when passing '*' and 'Z' to when passing SPACE.
    I tried even with contains Pattern .This time the total number of records fetching has Increased but the sum is not exact when passed SPACE to the Database Table.
    So what should I pass to the Low and High values of my Ranges Table to get all the entries ????
    DOes this type of building the Ranges work in BSP's ?
    How are u people working out for the select-options functionality in Page with flow logic ?
    Message was edited by:
            deepu k

    Hello Jessy,
    To populate select-options or Ranges in Page with flow logic I used the following code :
    ************************ Bulid the Select-Options**************************************
          DATA: p_bname_sel     TYPE STANDARD TABLE OF selopttab,
                p_bsp_name_sel  TYPE STANDARD TABLE OF selopttab,
                p_tcode_sel     TYPE STANDARD TABLE OF selopttab.
          DATA: wa_bname_sel    TYPE selopttab,
                wa_bsp_name_sel TYPE selopttab,
                wa_tcode_sel    TYPE selopttab.
    * Select-Options for Username
          REFRESH p_bname_sel.
          CLEAR   wa_bname_sel.
          IF ( p_bname IS INITIAL  ).
            wa_bname_sel-sign   = 'I'.
            wa_bname_sel-option = 'CP'.
            wa_bname_sel-low    = '*'.
            wa_bname_sel-high   = ''.
          ELSE.
            wa_bname_sel-sign   = 'I'.
            wa_bname_sel-option = 'EQ'.
            wa_bname_sel-low    = p_bname.  " p_bname is the Input field and the value is taken from it
            wa_bname_sel-high   = p_bname.
          ENDIF.
          APPEND wa_bname_sel TO p_bname_sel.
          CLEAR  wa_bname_sel.
    * Select-Options for BSP_Application
          REFRESH p_bsp_name_sel.        
          CLEAR   wa_bsp_name_sel.
          IF ( p_bsp_name IS INITIAL  ).
            wa_bsp_name_sel-sign   = 'I'.
            wa_bsp_name_sel-option = 'CP'.
            wa_bsp_name_sel-low    = '*'.
            wa_bsp_name_sel-high   = ''.
          ELSE.
            wa_bsp_name_sel-sign   = 'I'.
            wa_bsp_name_sel-option = 'EQ'.
            wa_bsp_name_sel-low    = p_bsp_name.       " Input field
            wa_bsp_name_sel-high   = p_bsp_name.
          ENDIF.
          APPEND wa_bsp_name_sel TO p_bsp_name_sel.
          CLEAR  wa_bsp_name_sel.
    * Select-Options for TCODE
          REFRESH p_tcode_sel.
          CLEAR   wa_bsp_name_sel.
          IF ( p_tcode IS INITIAL  ).
            wa_tcode_sel-sign   = 'I'.
            wa_tcode_sel-option = 'CP'.
            wa_tcode_sel-low    = '*'.
            wa_tcode_sel-high   = ''.
          ELSE.
            wa_tcode_sel-sign   = 'I'.
            wa_tcode_sel-option = 'EQ'.
            wa_tcode_sel-low    = p_tcode.       " Input field
            wa_tcode_sel-high   = p_tcode.
          ENDIF.
          APPEND wa_tcode_sel TO p_tcode_sel.
          CLEAR  wa_tcode_sel.
    * Select all the related entries when either BSP or TCode is choosen
          IF ( ( p_bsp_name IS NOT INITIAL ) AND ( p_tcode IS INITIAL ) )
                     OR
             ( ( p_bsp_name IS INITIAL ) AND ( p_tcode IS INITIAL ) ).
            REFRESH gt_final.
            SELECT bname
                   bsp_name
                   description
                   ldate
                   ltime
                   calls
                   FROM <custom_table>
                   INTO TABLE gt_final
                   AND   bsp_name  IN p_bsp_name_sel
                   AND   ldate          IN p_ldate_sel.
    endif.
    Hope that wud help u !!!
    Regards,
    Deepu.K

  • In MVC, do i need a View or Page with flow logic for POPUP window

    Hi All,
    I have the below scenario using the MVC pattern.
    I have a main view with 3 trays, each tray has two buttons, for example first tray has Create Order button. When I click on this button, I need a popup window to come with a tableview and a button(Create), where I select some rows and click on the button Create  to create order.
    But as per the MVC pattern I canu2019t call the view (popup) from another view(main view).  So should I create a VIEW or PAGE WITH FLOW LOGIC for the popup? .
    I need 6 popup to be called from the main view and once the function is done close the popup.
    Please suggest me the flow for this scenario.
    Cheers,
    Srini.

    Srini,
    1. You can call the view in pop-up because you will be calling the controller using open.window.
    Here is the sample code:
    method DO_REQUEST .
      data:
            li_vw           type ref to   if_bsp_page,
            lv_form_field   type          string,
            li_md           type ref to   zcl_model01.
      dispatch_input( ).
      li_md ?= get_model( 'm01' ).
      lv_form_field = request->get_form_field( 'invoice_create' ).
      if lv_form_field is initial.
    *------ Request to display main page
        li_vw = create_view( view_name = 'main.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      elseif lv_form_field eq 'true'.
    *------ Request to display Invoice page in pop-up
        li_vw = create_view( view_name = 'invoice.htm' ).
        li_vw->set_attribute( name = 'model' value = li_md ).
        call_view( li_vw ).
      endif.
    endmethod.
    Layout:
          function do_Invoice()
          { var s=0; r=1; w=300; h=300; x=screen.width/2;
            x=x-w/2;
            var y=screen.height/4;
            y=y-h/2;
            popUp=window.open('main.do?invoice_create=true','win','width='+ w
            +',height='+ h +', left=' + x +',top='+ y +');
    Option2:
    Ofcourse you can't bind the model in page becos those are 2 different things. But all you need to do is access the model to get some value. To know how to access the model from Page w/flow logic look at [this link|Passing model reference to a page in a Popup].
    Raja
    Edited by: Raja Thangamani on Apr 14, 2009 11:22 AM

  • MVC model / page with flow logic

    Hi all,
    I have started using MVC model in BSP application. Can anyone tell me the name of the controller methods corresponding to the following event handler methods(in case of page with flow logic):
    onCreate
    onRequest
    onInitialization
    onManipulation
    onInputProcessing
    onDestroy
    Thanks and Regards
    Shilpa

    Hi Shilpa,
    onRequest          -
    > DO_REQUEST
    onInitialization      -
    >  DO_INIT
    onInputProcessing  -
    > DO_HANDLE_EVENT
    onDestroy             ---> DO_DESTROY
    Thanks.

  • Page With Flow Logic x Views

    Hi Guys,
    What is the main difference between working with Page with flow logic and Views? I mean, I may build up my site using only Page with flow logic or just using Views, so Why should I use views or Page w/FL or Both?
    Thank you in advance,
    Alexandre

    Hi ACR,
    You can build your application using only flow logic but not ONLY with views..
    Take a look at below threads for difference in MVC and Flow logic methods...
    [Difference in MVC and Flow logic 1.|Re: diffrence between MVC and Classical Bsp application]
    [Difference in MVC and Flow logic2.|Difference between MVC and PAGES WITH FLOW LOGIC]
    [Difference in MVC and Flow logic3.|MVC model / page with flow logic]
    Kindly search the forum for more details.
    Regards,
    Anubhav.

  • Differences between controller/view & pages with flow logic

    Hi experts!!
    I am trying to create a BSP using the SBOOKSHOP tutorial.
    What i have not understood so far is the differnce between creating a bsp with pages with flow logic,
    and using the controller/ view method.
    When should we use the first and when the other approach??
    Any link to documentation would be appreciated!
    Thank you!!

    Hi Grigoria Koutsogianni,
    I hope the older thread on the same topic could help you understand the difference!
    1. Re: Understanding easy BSP development (MVC vs. Flow Logic and more...)
    2. Re: diffrence between MVC and Classical Bsp application
    -Maheswaran

  • Open a pop-up in the OnInputProcessing part of a web page with flow Logic

    Dears all,
    System used : SAP WebAs 6.20
    I have a html page in my project where every user can choose some options with radio buttons. When the user choose something, he click on a button which send us in the OnInputProcessing part of the page.
    In the OnInputProcessing, we will do a CALL FUNCTION. If the result is Ok, we must display a pop-up with only a OK button.
    From the layout part of the page, I display a pop-up with success using this code :
    SCRIPT language=javascript
       function ConfirmMessage() {
           var bflag = confirm("Are you sure that you want to confirm your offer ?")
           u2026
    /SCRIPT
    FORM
       <input type = "submit" onClickMethod="ConfirmMessage()" name="onInputProcessing(post)" value="Confirm">
    /FORM
    But I can't call this code form the OnInputProcessing. I try with the functions of the class : CL_JAVA_SCRIPT too, but nothing is displayed.
    Someone can help me ?
    Best Regards,
    Nelson
    To Insert the post I was obligated to remove all the ">" and "<" and rename OnClick in OnClickMethod...
    Edited by: Nelson Antunes on Feb 11, 2009 10:02 AM

    Hi Nelson ........ i wrote this test BSP page for you:
    Page Attribute :
    iv_visible type boolean.
    OnCreate:
    iv_visible = 'X'.
    OnInputProcessing:
    DATA:  event TYPE REF TO cl_htmlb_event.
    event = cl_htmlb_manager=>get_event( runtime->server->request ).
    CASE event->name.
       WHEN 'button' .
        CASE event->id.
          WHEN 'BUTTON'.
            if iv_visible = 'X' .
              " data status type bollean.
              " call function 'FUNC'
              " EXOPORTING
              " status = status .
              " if status =  'X'.
                 clear iv_visible .
              " else.
              "" do nothing
              "endif.
            endif.
          WHEN 'POPUP_OK'.
            " process action after the user confirm
          WHEN 'POPUP_CANCEL'.
            " process action after user press "cancel"
            " in confirm popup
            iv_visible = 'X'.
        ENDCASE.
    ENDCASE.
    Layout:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
              <% if iv_visible is not initial. %>
               <% else. %>
               <% endif. %>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>    
    <style type="text/css">
        #confirm_popup{
          position: absolute;
          visibility: visible;
          border: 7px solid #001EA1;
          width: 300px;
          height: 50px;
          left: 400px;
          top: 300px;
          background-color: #ECE222;
    </style>
    Edited by: fabrizio gemma on Feb 13, 2009 5:49 PM
    Edited by: fabrizio gemma on Feb 13, 2009 5:51 PM
    Edited by: fabrizio gemma on Feb 13, 2009 5:52 PM
    Edited by: fabrizio gemma on Feb 13, 2009 5:57 PM

  • Calling a Page(flow logic ) from a controller

    Hi Guru's ,
        I have a senario in which I have a controller and also Page flow logic .. I want to call a page of type page flow logic from the controller ..
    I tried the below methods .. but it didnt work ..
    *navigation->goto_page('test.htm').
    DATA: r_view TYPE REF TO if_bsp_page.
    DISPATCH_INPUT( ).
    r_view = create_view( view_name = 'test.htm' ).
    call_view( r_view ).
    this works only if its is a view but not flow logic ..
    Please give ur suggesions ..
    Thanks
    Sivaraj

    hi sivaraj ,
    first refer whether u could call a page using pages with flow logic by the controller which is used in mvc design.
    may be u canot call it . u have to create a page using view according to mvc . try it once.

  • How to call BSP page in one frame from a webdynpro page in another frame?

    Dear experts,
    I have a scenario as follows:
    A BSP application which contains 5 frames. in the first frame I am calling a web Dynpro application. This is a tree and it is displayed correctly. on click of an item (node item) in the tree, a bsp page should be displayed in the second frame. I am not able to display this in the second frame. When I call the BSP page, it is getting displayed in the same frame (i.e, the first frame).
    Kindly help me out.
    Thanks & Warm Regards,
    Jenny

    From WDA you can't force the navigation of a different frame. Nor should you really be building an application with WDA running within a frame.  You will have session management problems. 
    SAP recommendation is to use the NetWeaver Portal. You could then place the WDA and BSP applications into separate iViews.  They can communicate with each other using Portal Eventing.

  • Calling portal v2 pages with parameters in a jsp

         Hello everybody,
         I'm currently trying to create, in a jsp, a link to a portal-v2 page with parameters.
    Practically :
    [JSP / Portlet 1]
         - a 1st jsp generates some links, all to the same page but each sets a different value to a parameter (for example a productId in a list).
    [JSP / Portlet 2]
         - a 2nd jsp gets this parameter and use it (for example it displays the details of the chosen product).
    So the 1st portlet would be jsp (coded by a portlet designer) and clicking a link would lead to another page (chosen by a page designer) which would hold the 2nd portlet (= 2nd jsp, coded by the same portlet designer).
         Writing the second jsp is easy : getting parameters is described in many examples and pdk articles.
         But I can't find the java methods to use to generate the link. More precisely I don't know how to call the portal page (which would then be a jsp1's parameter). Adding the parameter is well described in the jpdk API-Doc.
         I've tried to use portal events but they seem to work only in an html form. So I supposed it was a wrong way.
    As I've lost myself so many times in the API-Doc and I didn't find any jpdk sample about that, I would be really thankfull if someone has an idea (may I hope for a sample code ? :-)
    Thanks.
    Jean-Roch

    I'm having a similar problem!
    I have a JSP page which I have published as a portlet to Portal. The JSP portlet is placed on Portal a page. I need to call this Portal page with some parameters in the URL, which should get passed to the JSP portlet.
    In the JSP portlet I used this syntax in release 1 to retrieve the URL parameters:
    String p_itemID = request.getParameter("item_id");
    That worked great in release 1, but not in release 2.... I think the problem is that you need to define which parameters a portlet has, then map those portlet parameters to page parameters in the page properties. In dynamic page - portlets you define bind variables to accomplish this. But how do you do in JSP portlets? When you try to map Page Parameters to the JSP portlet you'll find that Portal doesn't think that the JSP portlet has any parameters. Hence the page parameters does not get passed to the portlet.
    (More info: JDBC----getImportedKeys() )
    I've looked at the Multipage example and the forminput example. But I don't see how pass a parameter in the URL to the very first JSP portlet from looking at those examples. I do see how you can pass parameters to the next JSP portlet, but that's not my problem. Maybe I'm missing something obvious...
    Any ideas?

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

Maybe you are looking for