Tiles insert on condition

I need to insert one of the 3 pages via tiles depends on condition.
I use solution found on this forum and it works fine but as you can see it's not clean as it should be.
Is there a way to do this without jsp code but with pure jsf + tiles.
I tried using some jsf elements and rendered proprety to achive that but that dont work.
tia Danilo
<f:verbatim>
<%
com.esenca.ekspert.beans.EPage p = com.esenca.ekspert.util.SessionObjects.getEPage();
if(p!=null&&p.isShowMainHTML()) {
%>
<tiles:insert attribute="main-start" flush="false"/>
<%
%>
<%
if(p!=null&&p.isShowResults()) {
%>
<tiles:insert attribute="main-results" flush="false"/>
<%
%>
<%
if(p!=null&&p.isShowPropis()) {
%>
<tiles:insert attribute="main-propis" flush="false"/>
<%
%>
</f:verbatim>

Wrap each Select Into in BEGIN .. EXCETION ...END.
BEGIN
  BEGIN
    SELECT INTO
    EXCEPTION
    WHEN NO_DATA_FOUND
  END;
  BEGIN
    SELECT INTO
    EXCEPTION
    WHEN NO_DATA_FOUND
  END;
  BEGIN
    SELECT INTO
    EXCEPTION
    WHEN NO_DATA_FOUND
  END;
  BEGIN
    SELECT INTO
    EXCEPTION
    WHEN NO_DATA_FOUND
  END;
END;    Or better yet. Create 4 procedures, one for each table. Let your current procedure call these.
Regards
Peter
Message was edited by:
Peter Gjelstrup

Similar Messages

  • How to insert a condition in the Graphic Window of a SAP Script ?

    Hi,
    I need to give a condition inside the Graphic Window for printing the Logo in the  SAP Script. Now, my problem is that the Graphic window is only opening in Display mode. How to make it editable and insert a condition in it?
    OR
    Is there any other way to do it?
    Please Help.
    Thanks in Advance.
    -VRU

    Hi
    I got your point. I'll provide  you solution
    In the logo window goto coding part by pressing F9 and give your coding as
    IF &BKPF-BUKRS& = 'COM1'
    INCLUDE GSPL OBJECT GRAPHICS ID BCOL LANGUAGE DE
    BITMAP 'LOGO1' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM2'
    BITMAP 'LOGO2' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM3'
    BITMAP 'LOGO3' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM3'
    BITMAP 'LOGO4' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ELSEIF &BKPF-BUKRS& = 'COM4'
    BITMAP 'LOGO5' OBJECT GRAPHICS ID BMAP TYPE BCOL
    ENDIF
    <b>Note:</b>But you have to upload all your logos in se78 then only you can upload and give conditions for this
    Regards
    Pavan

  • Restrict to insert Duplicate Condition Types

    Hi,
    During PO creation with Freight Condition - ZFR1, user is able to insert this condition TWICE.
    Means Freight Condition is showing 2 times in Conditions...due to this My purchase register report get incorrect data...
    How to restrict user to insert Duplicate Condition Type???
    Please guide..

    Hi,
    If you want Freight Condition - ZFR1 should not enter again or not possible to enter by user  & select D {Not possible to process manually} in Manual entries in M/06 t.code in 'Changes which can be made' segment'
    NOTE:
    As you needed keep Freight Condition type- ZFR1 to be appeared in the PO as automatic, so then maintain the condition record (t.code MEK1) with condition type ZFR1
    OR check routine or design to write a routine & assign to Freight Condition - ZFR1 in M/08( in MM Schema), so it should not enter again or not possible to enter by user(can appear only once).
    Regards,
    Biju K

  • Insert a condition step in a workflow

    Dear Expert,
    I have a general question about the workflow. I have created a workflow template and currently it is being used. This workflow consist about 35 steps in it. Currently i have a requirement which is to insert a condition check in step 6. If satisfied the condition the it will continue in step 7 and so on, if it does not then will continue in step 20.
    Is this possible to be done? How can i achieve this.
    Thanks,
    Regards,
    Bryan

    Hi,
    1. First create a new version for the workflow in SWDD
    SWDD ->workflow -> generate version
    It will create new version because some times you may loss all steps while cut and paste
    2. Define condition in step 6 , then it will opens two branches
    a> true
    b> false
    3.  In true branch will have all the steps from 7 to 35 , then u cut the steps from 20 to 35 and paste it in False side.
    Better you create one more workflow that includes all the steps from 20 to 35 and call that sub workflow in False side.
    If you made some mistake while cut and paste you just activate the old version and make use of it.

  • ME21N : Avoid to insert the condition type

    Dear.
    When I access to condition view of the purchase order position , I need to avoid to insert every time a specific condition type (RA00). How can I do in order that this condition type appear in the pricing elements automatically ?
    Thanks.

    You can achieve it either thru creating an access sequence and assigning the same to the condition type thru customization follow path SPRO - Material management - Purchasing - Conditions - Define access sequences.   Later assign the access sequence to conditon vide trasnsaction m/06.
    Incase of achieving it thru master, you can then create an inforecord for the material/vendor combinations and all the conditions maintained in the inforecord could flow automatically.
    S. Kumar

  • How to insert a conditional image into a report

    Hi
    I am fairly new to HTML DB, but I have managed to create my first application.
    I need a little help with one report.
    One of the columns in the report contains Y, N or R. The customer wants me to display a different coloured image depending on the value (ie a red button for N, green for Y or amber for R).
    I have can add a static image to a report via "Column Formatting" -> "HTML Expression", but I have no idea how to make it conditional.
    Any ideas?
    Many thanks in advance.
    Rak

    Great, that works!!!!
    Thanks very much.
    For completeness (incase anyone else reads this), there was one typo, in your solution, you omitted the opening '<' in the image source HTML tag
    select loanno, itemid,
    decode (returned, 'N', '<img src="#IMAGE_PREFIX#bullet_red.gif" border="0" alt="Loaned">',
    'Y', '<img src="#IMAGE_PREFIX#bullet_green.gif" border="0" alt="In Library">',
    'R', '<img src="#IMAGE_PREFIX#bullet_orange.gif" border="0" alt="Returned">'
    ) as status
    from loans
    Thanks for your help,...
    Rak

  • Inserting Pricing condition in Sales order when saving the sales order

    Dear ABAPers,
           My customers requirement is when saving the sales order new pricing condition has to be updated in the line item.for this i am using the User Exit 'USEREXIT_SAVE_DOCUMENT_PREPARE' ( MV45AFZZ).While saving the Sales order i am calculating the Price and updating in the Pricing conditions.
    In XKOMV internal table i am appending the pricing condition.But the problem is ,it is not calculating the taxes and it is Updating in VBAK and VBAP.
    How to do this.
    Thanks & Regards,
    Ashok.

    Dear ABAPers,
    I have Solved this Problem.
    Thanks & Regards,
    Ashok.

  • How to insert 2 conditions in a Query

    Hi ,
    How can i apply 2 conditions to a query
    First i need to apply a condition X to query and then i need to apply condition Y to the  results which are based on condition X
    How can i acheve this

    Hi
    We can create multiple condition in one query
    When ever u select condition on tab it shows two options Chenge condition and new condition
    If we have 2 comndition in one query it works with AND function .
    If we have all applicable condition in one condition then it works with OR functionality.
    Assign points

  • Inserting new condition Price on BAPI (BAPI_SALESORDER_SIMULATE)

    Goodnight everyone,
    need to run the bapi BAPI_SALESORDER_SIMULATE, indicating a new condition of payment (KDKGR) and I need after the performance, I return to the same new condition in the table of conditions (ORDER_CONDITION_EX).
    The problem is I do not found in any of the structures of the BAPI, the fields relating to the payment terms (KDKGR) and therefore can not get the return of this condition (value and description).
    I would be grateful with any help,
    hugs,
    Vinicius Buscariolli

    Moderator message - Welcome to SCN.
    You will probably get more response if you mark this as a question.
    Also, Please read Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!! and How to post code in SCN, and some things NOT to do... and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again.
    Rob

  • How to insert code conditions ina QUERY

    Hi All,
    I'm creating a Query to extract the data from EKKO, EKPO and EKKN.
    here I have to insert a piece of code as checking below.
    IF EKPO-KNTTP ne '   '.      "not equal to blank
    extract the data from table EKKN.
    ENDIF.
    here I need your help like how to write this code in a Query.
    Thanks,
    Sunil Bodda.
    Edited by: sunil bodda on Apr 15, 2009 12:05 PM

    Hi Sunil,
    You need to code it in infoset. follow the steps below.
    1. Goto SQ02, enter your infoset.
    2. Click on "Extras" button(above find button). On the next page you will find a "Code" tab. 
    3. Declare a constant as space. choose DATA in the drop down for coding section.
    4. Choose "Record processing" or if any other appropriate choice from the drop down in the coding section.
    5. CHECK EKPO-KNTTP EQ c_space. and write your code here.
    Hope this helps.

  • Inserting Pricing Condition

    hi abaper expert,
    i'm currently working in SAP CRM Modul. and for now i making some program for Complaint.
    due to change in business process, a new pricing condition us added for complaint documents. the scenario is the new pricing condition will added manually via abap program.
    i have tried using Function Modul 'CRM_ORDER_MAINTAIN' in order to add and save the new pricing condition in complaint document. the return of the function modul is 0 / success, but the new pricing condition is not added for the complaint documents.
    is there any clue why this happened ?
    or is there any body have an experience to add and maintain pricing condition in CRM via abap program ?
    please help n share your experience .
    many thanks in advance
    regards
    eddhie

    Eddie,
    Were your other conditions created with respect to ECC Master data or CRM Master data. If your pricing strategy in CRM involves master data in ECC then you`ll play with ECC.
    Hope my answer should throw some light on ur issue.
    Reward if helpful.
    Regards

  • Help with inserting records conditionally in another table

    I need some help on this task please. I have a table with some records like so
    Table1
    Column1   Column2   Column3      Colum4
    1                 Name1    Lastname1     1,2
    2                 Name2    Lastname2     3
    3                  Name3    Lastname3     NULL
    4                  Name4    Lastname4     1,3
    So the last column, Column4 has the number of the column that the values got changed. So the values on the first row on the Columns 1 and 2 got changed. So I have to insert those values in another table and the same for the other records.
    Table2
    Column1   Column2    Column3      
    1                Name1     NULL
    2                 NULL      Lastname2
    4                 NULL      Lastname4
    Any ideas on how to accomplish this? Any ideas would be much appreciated.

    Hi
    Try below, Next time please POST DDL & DML
    select 1 Column1, 'Name1' Column2, 'Lastname1'Column3, '1,2' Colum4 into #temp union all
    select 2 , 'Name2', 'Lastname2', '3' union all
    select 3 , 'Name3' , 'Lastname3', NULL union all
    select 4, 'Name4', 'Lastname4', '1,3'union all
    select 5, 'Name4', 'Lastname4', '1'
    select 1 Column1 ,'Name1' Column2, NULL Column3 into #temp1 union all
    select 2 ,NULL ,'Lastname2' union all
    select 4, NULL, 'Lastname4'
    select Column1, Column2, Column3, Colum4 ,C2,C1 from #temp a
    --(select Column1, Column2, Column3, case when Colum4 like '%,%' OR Colum4 IS null then Colum4 else Colum4+',' end as Colum4 from #temp) a
    outer apply (select COALESCE(Column2,Column3) From #temp1 where column1 = parsename(replace(a.colum4,',','.'),1)) a1(C1)
    outer apply (select COALESCE(Column2,Column3) From #temp1 where column1 = parsename(replace(a.colum4,',','.'),2)) a2(C2)
    You can also use split function
    http://sqlperformance.com/2012/07/t-sql-queries/split-strings
    select a.*,COALESCE(a2.Column2,a2.Column3) From #temp a
    cross apply dbo.Split(Colum4,',') a1
    left outer join #temp1 a2 on a1.item=a2.Column1
    Thanks
    Saravana Kumar C

  • Conditionally inserting tiles

    Hello All,
    I am using tiles with JSF. In my jsf page, i have the below logic but still the tiles get inserted...
    <% if(false){ %>
    <tiles:insert definition="NonMember" flush="false"/>
    <% } %>
    I am not sure whats happening.. does anyone know whats happening here...
    Basically,i want to check a condition and if the condition is false, i dont want to insert the tiles..

    Make sure nonMember definition is accessible via the jsp page:
    <f:verbatim>
    <%
    String nonMember = ...
    if(false)
    %>
    <tiles:insert name="<%=nonMember%>" flush="false" />
    <%
    %>
    </f:verbatim>
    Hope this may help.
    BaTien
    DBGROUPS

  • Problems with JSF&Tiles (displaying twice one inserted page in tiles)

    I'm using Tiles framework withih Dynamic Web Project in Websphere (WSAD 5.1.1), the project is based on JSF.
    - included tiles.jar in WEB-INF/lib directory
    - in web.xml defined servlet action as: <servlet>
              <servlet-name>action</servlet-name>
              <display-name>TilesServlet</display-name>
              <servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
              <init-param>
                   <param-name>definitions-parser-validate</param-name>
                   <param-value>false</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
         </servlet> - also to Faces Servlet set value "load on startup" on 1
    - added struts-tiles.tld to WEB-INF folder
    - then I created index.jsp: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
    <%@ page
    language="java"
    contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    %>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet"
         type="text/css">
    <TITLE>index.jsp</TITLE>
    <%-- jsf:codeBehind language="java" location="/JavaSource/codebehind/index.java" --%><%-- /jsf:codeBehind --%>
    </HEAD>
    <f:use_faces>
         <BODY>
         <TABLE border="1">
              <TBODY>
                   <TR>
                        <TD>
                             <tiles:insert page="/menu.jsp" flush="false"/>
                        </TD>
                        <TD>
                             <tiles:insert page="/content.jsp" flush="false"/>
                        </TD>
                   </TR>
              </TBODY>
         </TABLE>
         </BODY>
    </f:use_faces>
    </HTML> - menu.jsp and content.jsp inserted in index.jsp are not the same, and here is code for menu.jsp: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ page
    language="java"
    contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"
    %>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM WebSphere Studio">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="theme/Master.css" rel="stylesheet"
         type="text/css">
    <TITLE>menu.jsp</TITLE>
    <SCRIPT type="text/JavaScript" language="JavaScript"
         src=".ibmjsfres/hxclient.js"></SCRIPT>
    <LINK rel="stylesheet" type="text/css"
         href=".ibmjsfres/css/stylesheet.css" title="Style">
    <%-- jsf:codeBehind language="java" location="/JavaSource/codebehind/menu.java" --%><%-- /jsf:codeBehind --%>
    </HEAD>
    <f:use_faces>
         <BODY><hx:script_collector>
         <h:form formName="form1" id="form1"><P><hx:panel_actionbar
                        id="actionbar1"><hx:panel_actionbar nestedTitleText="Sub-Panel Label" id="actionbar2"><hx:command_buttonex label="Command Label" id="button1" action="go_page01"></hx:command_buttonex><hx:command_buttonex label="Command Label" id="button2"></hx:command_buttonex></hx:panel_actionbar><hx:panel_actionbar nestedTitleText="Sub-Panel Label" id="actionbar3"><hx:command_buttonex label="Command Label" id="button3"></hx:command_buttonex><hx:command_buttonex label="Command Label" id="button4"></hx:command_buttonex></hx:panel_actionbar></hx:panel_actionbar></P></h:form>
         </hx:script_collector></BODY>
    </f:use_faces>
    </HTML>The problem is when I run application on server and go to index.jsp the resulting page is containing two times menu.jsp, instead once menu.jsp and once content.jsp.
    Also when you click on buttons in "second" menu.jsp it's like it was clicked on the "first and the original one". When you click navigation rules do apply.
    Can anyone help on this?
    Message was edited by:
    DeYo

    I haven't solved problem yet but so far I realised this:
    - the problem is that both menu.jsp and content.jsp have forms, with tags: <h:form formName="form1" id="form1">.
    I've tried renaming form and id, but it didn't worked, alo tried changing scope of managed beans for the two inserted jsp pages - still nothing.
    - also if the content.jsp is not containing form but other JSF components like Image or Hyperlink, that components are not being shown/rendered.

  • Action with conditions

    Hi there. Firstly is there a concise document that explains how to create actions using the new condition statements - tried google nothing step by step with examples.
    I would like to crop an image to suit then have it resize vertically to a set size then stroke it with a colour of your choice (would stop and ask you to pick a colour from the image) then save it. Before conditions I made one but if the image changes the ratio of width to height during the crop it fails. Also of course before conditons it uses the colour for the stroke that I chose when making the the original action. BTW I don't have a document portrait option, document square and document horizontal only.
    Thanks, Rod.

    I can't help with the action itself because I am not sure what you are trying to accomplish.
    The principle is simple. You make an easy action as a starting point and insert a condition: say the image is horizontal then run action A otherwise run action B. So in fact you need 3 actions in total.
    I my opninon the first action should just query the condition. The actual things that need to be done you put in the 2 other "real" actions.
    BTW "horizontal only" is enough. If it is not horizontal then its vertical (unless its square but that option is provided)

Maybe you are looking for

  • I cannot write (only read) on an external hard drive when I'm running Windows on BootCamp.

    I'm running Windows thanks to BootCamp perfectly, but I have a problem. I can open and read files that I have on an external hard drive (HFS+) but I can't create or modify files in it. It's like I don't have permissions. Please, how can I solve this?

  • Cross company code transactions

    All gurus,, I have one problem in Cross company code transactions: Ex: I have Company code A and B,,, where A pays on behalf of B. how to configure and what is process to follow in APP for making payment to vendor of B... A pays to vendor of B... how

  • E-mail through SAP

    Hi, I have used FM SO_NEW_DOCUMENT_ATT_SEND_API1 to mail document.  However, this gets stuck in the Outbox. Doesnt reach the destination. Executing the TX - 'SCOT' also doesnt help. Please help. Regards, Ravi

  • Accessing Message Header fields from envelope

    I am doing an interface with the RNIF adapter. They want me to pull the delivery header information, which is in the RNIF envelope, not the payload document and map it into some fields that exist in the inbound schema. Can this be done in message map

  • Error when create third -party order

    Hi experts I am a beginner of sd module, when I create a sd order with sd order type 'or' and item category 'tas'. system prompted a error message :Item category TAS is not defined for this item can anyone tell me how to slove this problem? thanks in