If statement within a view is not working correctly ?

Hi all,
maybe i am wrong but i think the if statement within a view is not working correctly. See code down below.
I would like to use the Hallo World depending on the page attribute isFrame with or without all the neccessary html tags. Therefore i have embedded the htmlb tags in an if statement. But for any reason if isframe is initial it isn't working. It would be great if anybody could help me.
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<% if not isframe is initial. %>
  <htmlb:content design="design2003">
     <htmlb:page title = "Top Level Navigation view">
<% endif. %>
hallo world
<% if not isframe is initial. %>
     </htmlb:page>
  </htmlb:content>
<% endif. %>
thanks in advance and best regards
Matthias Hlubek

Matthias,
The short answer: your example is <b>NOT</b> going to work. The long answer will probably 5 pages to describe. So first let me rewrite the example so that it could work, and then give a short version of the long answer. Do not be disappointed if it is not totally clear. It is rather complicated. (See the nice form of IF statements that are possible since 620.)
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<% if isframe is <b>NOT</b> initial. %>
<htmlb:content design="design2003">
  <htmlb:page title = "Top Level Navigation view">
    hallo world
  </htmlb:page>
</htmlb:content>
<% else. %>
  hallo world
<% endif. %>
So why does your example not work? Let us start with a simple tag:
  <htmlb:page title = "Top Level Navigation view">
  </htmlb:page>
Now, for each tag, we have effectively the opening part (<htmlb:page>), an optional body, and then the closing part (</htmlb:page>). We are now at the level of the BSP runtime processing one tag. What the runtime does not know, is whether the tag wants to process its body or not. Each tag can decide dynamically at runtime whether the body should be processed. So the BSP compiler generates the following code:
  DATA: tag TYPE REF TO cl_htmlb_page.
  CREATE OBJECT tag.
  tag->title = 'Top Level Navigation view'.
  IF tag->DO_AT_BEGINNING( ) = CONTINUE.
  ENDIF.
  tag->DO_AT_END( ).
You should actually just debug your BSP code at ABAP level, and then you will immediately see all of this. Now, let us mix in your example with our code generation. First you simplified example:
<% if isframe is NOT initial. %>
  <htmlb:page title = "Top Level Navigation view">
<% endif. %>
<% if isframe is NOT initial. %>
  </htmlb:page>
<% endif. %>
And then with our generated code. Look specifically at how the IF/ENDIF blocks suddenly match!
if isframe is NOT initial.
  DATA: tag TYPE REF TO cl_htmlb_page.
  CREATE OBJECT tag.
  tag->title = 'Top Level Navigation view'.
  IF tag->DO_AT_BEGINNING( ) = CONTINUE.
endif.
if isframe is NOT initial.
  ENDIF.
  tag->DO_AT_END( ).
endif.
You can see that your ENDIF statements are closing IF blocks generated by the BSP compiler. Such a nesting will not work. This is a very short form of the problem, there are a number of variations, and different types of the same problem.
The only way to solve this problem, is probably to put the body into a page fragment and include it like I did above with the duplicate HelloWorld strings. But this duplicates source code. Better is to put body onto a view, that can be processed as required.
brian

Similar Messages

  • I bought an IPAD air from state and the screen is not working correctly and right now i'm in Egypt ,can i send my ipad to service in Egypt and the warranty will work in Egypt or what?

    i bought an IPAD air (32 gb wifi only) from USA just one month ago and the screen is not working correctly(picture attached) and right now i'm in Egypt ,can i send my ipad to service in Egypt and the warranty will work in Egypt or what?

    Have you tried a soft-reset to see if that fixes it ? You might be able to get warranty service in Egypt for your iPad, but the warranty includes :
    IMPORTANT RESTRICTION FOR iPHONE AND iPAD SERVICE.
    Apple may restrict warranty service for iPhone and iPad to the country where Apple or its Authorized Distributors originally sold the device.
    As it's wifi-only you should have a better chance of it being serviced under warranty, but there are no guarantees, it might depend upon the repairer.
    Egypt authorised service providers : https://locate.apple.com/eg/en/

  • Default pdf Viewer does not work correctly

    On this pdf, page 1 will not display, but displays fine in IE and Chrome. If you download the pdf, it displays just fine. So the issue is definitely FireFox, here is the url:
    http://www.powergatellc.com/pdfs/SNP-G12.pdf
    On this pdf, the Firefox has added grey boxes around the images. These boxes do not appear in IE or Chrome or when you download the file, here is the url:
    http://www.powergatellc.com/pdfs/SNP-G20.pdf
    Problems these are all throughout my client's website with a library of over 700 pdfs. This is causing major issues. Please tell me you are aware of these issues and already working on a fix, otherwise, I will have no choice but to put a disclaimer on the website to not use FireFox, which would look bad to the client and FireFox.
    Please advise as soon as you can.
    Gorden
    We are seeing thiss isue on Windows 7 PC's running current revs of FireFox.

    We have this problem as well. Unfortunately after years of only supporting IE and finally rewriting our site to be standards compliant we are going to have to force users back to IE because of this issue. It's not feasible for us to walk users through changing the default viewer. The default should stay Adobe (if installed) until a more robust native version is available. I understand you want to promote free and open tools but if they don't work, it's just not good enough.

  • Filters not working correctly

    We have the strange situation, that filters in calendar views are not working correctly (anymore?).
    If i set up a filter to search for my name as attendee, teaming still shows all entries instead of only just mine. This behavior applies to customized and standard calendar views.
    Filters for (customized) file folders still work as expected.
    Any ideas?

    jasi,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Help viewer does not work after update to 10.4.4

    Since updating to 10.4.4 my Help viewer does not work, and all of the troubleshooting fixes suggested in other threads have not had any success in resolving this. I've noted that when I go to Users>Library>Documentation>Help there is no mac.help file - can someone tell me if that means that I've lost the file altogether and need to reinstall it? I get to the first screen of the viewer, but the links from there don't work. Thanks for any help that you can provide!

    Thanks for your suggestion. I downloaded OnyX and ran the cleaning function. After restarting, I opened Help and once again the first screen appeared fine. But again most of the links did not work, though those under the "What's New" heading did work. I might add that I had previously tried a variety of suggestions posted in another thread, which included deleting from the caches folder in Home>Library several files such as com.apple.helpui and help.plist in the Preferences folder. (As noted in my previous post this evening, I also created another user but that also did not have any effect.) Any other ideas? Thanks

  • IBM cognos TM1 Executive viewer is not working on direct Access

    Hi,
    We are implementing DirectAccess in our environment and testing applications in test lab. It has been observed that executive viewer is not working on Direct Access but working fine over VPN mobile checkpoint. When DA client click on open view button it
    gives error
    " Additional information:
    Unable to connect to server XYZ.com using TCP-IP port 7112. Please make sure that IBM cognos TM1 executive viewer server is started and the port is not blocked by any proxy server or firewall"
    but from client telnet is working on port 7112. All ports between DA server and application server are open 3389,7112 and 80.
    Also select database option is grayed out and user is unable to select the database. When switching to VPN its working fine.
    We are using Executive viewer 9.4. 
    Any help would be appreciated.

    It sounds like this program may not be capable of talking over IPv6, which DirectAccess uses. First make sure that when you connect it is trying to talk to a hostname and not an IPv4 address. If your program is calling for "192.168.1.100" - this is never
    going to work over DirectAccess. It must call for a name that DirectAccess can resolve to an IPv6 address for communication over DA.
    If you confirm it is talking to a name, and then if you confirm that you can do other things to that same name (can you RDP into the server for example?), then that confirms that DirectAccess traffic flow is working to that name/server.
    If RDP works but the application still doesn't work, then the application is probably incapable of IPv6. You can either ask IBM if they have a newer version that does talk IPv6, otherwise I have a utility available that can intercept packets from these kinds
    of problematic applications and flip the packets into IPv6 on the DA client. Let me know if you need any further information on that: http://www.ivonetworks.com/news/2013/05/ivo-networks-announces-app46-for-directaccess/

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Chart view is not working in obiee11.1.1.5.0

    Hi,
    All types of chart views are not working(analysis compunt layout) in obiee11.1.1.5.0 version.please refer my below scren short
    http://imageshack.us/photo/my-images/209/chatnotworkingobiee1111.jpg/
    note:
    1) no luck below link
    OBIEE 11g - Cannot view charts
    2) some of the servers working fine. after deployed skin some times making this kind of problem
    Thanks
    Deva
    Edited by: Devarasu on Apr 4, 2012 10:51 AM
    Edited by: Devarasu on Apr 4, 2012 11:20 AM

    Hi,
    Its reolved. our sking and style dvn files not yed updated earliear...after updated and restarted its working fine.
    thanks
    Deva

  • Icon view is not working

    Icon view is not working in my mac book pro.I tried other types of view, they all are working but icon view stopped working all of the sudden. Any suggestions how to fix it ???

    1st i reinstalled snow leapord......d problem was fixed icon view was working and yesterday i installed lion....and everything is working properly....
    try reinstalling......shuld work

  • Dremweaver CS6. Design View is not working.

    Hello.
    Design View is not working.
    I got this instead of normal View.
    What wrong with it?
    Regards,
    Nata

    Sometimes it is just a temporary problem and by shutting down the DW and rebooting the system resolves such problems.  Otherwise, you can try to reset the preferences using the instructions given here:
    <Restore preferences | Dreamweaver CS6, Dreamweaver CC>
    Or even try deleting the cache file using these instructions:
    <Deleting a corrupted cache file>
    Good luck.

  • Brushes app question: does anyone know how to upload a brushes painting as a video? "Brushes Viewer" is not working for me ;-(

    Brushes app question: does anyone know how to upload a brushes painting as a video? "Brushes Viewer" is not working for me.
    Thanks! KAR

    Hi, Dave.
    If you're using the BlackBerry browser, you can't configure anything to bypass the RIM servers.  I believe you may do so by using the Opera browser, but I haven't tried it myself so cannot comment with authority.
    I hope that clears up the issue for you. 
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • Restore last view setting not working in version XI

    When reopening documents the new version XI, Adobe keeps opening my documents on page one. Though I have gone to preferences\documents and checked the box for restoring last view setting when reopening documents. Is this a bug that needs fixing? I already uninstalled and re-downloaded the program. It still will not work correctly.

    it still does not work for me. It is set to 1 minute. I have tried it in a number of pdf's. I left it longer than 1 minute and it still does not work. It does not work for any of my pdf's but it DID work in previous versions. I guess I will just go back to version 9! They should be able to fix this though. I also re-downloaded, deleted the program, and loaded it again.... still doesn't work!!!

  • My Help Viewer is not working for mac help

    My Help viewer is not working for mac help. Everytime i choose mac help the window opens then closes. But when i open another help like safari help it opens and works fine. If i switch it back to mac help the window just closes and the application quits.
    If you know how to fix please telll!

    noname212,
    Using "Search Discussions" with the term "Help Viewer" you will lead you to numerous posts which refer to Troubleshooting Help Viewer by Dr. Smoke.
    Good Luck
    ;~)

  • Key Figure calculation in Abap is not working correctly - Overlooping

    Hi,
    I wrote a logic to calculate the ratio of key figure but it is not working correctly
    For example I have a requirement to split 1 Product into Several new Products and also the Net Amount will be splitted to these several new products as well. The total Amount of the new product will be equivalent to the Net Amount.
    So far my Logic is splitting the product to several new products but the amount is incorrect as the calculation is over looping.
    Sample
    A PRODUCT has Net Amount 1000. And this product needs to be splitted into 3 new products. Each of this new product is assigned a ratio of 0.3, 0.2 and 0.7 respectively. total sum of the ratio is 1.
    PRODUCT1 0.3 = 1000 * 0.3 = 300
    PRODUCT2 0.2 = 1000 * 0.2 = 200
    PRODUCT3 0.7 = 1000 * 0.7 = 700
    The total amount of this new products is 1000.
    Now my logic is working this way.
    PRODUCT1 0.3 = 1000 * 0.3 = 300
    PRODUCT2 0.2 = 1000 * 0.2 * 0.3 = 60
    PRODUCT3 0.7 = 1000 * 0.2 * 0.3 * 0.7 = 42
    Only the PRODUCT1 is working correctly and there is overlooping for the remaining products
    Logic used
    DATA: t_data TYPE data_package_structure OCCURS 0 WITH HEADER LINE.
    DATA: t_newdso LIKE /bic/newdso OCCURS 0 WITH HEADER LINE.
    DATA: t_olddso LIKE /bic/olddso OCCURS 0 WITH HEADER LINE.
    DATA: amount LIKE data_package-netamount.
    DATA: zidx LIKE sy-tabix.
    REFRESH t_data.
    LOOP AT data_package.
      zidx = sy-tabix.
      MOVE-CORRESPONDING data_package TO t_data.
      REFRESH t_newdso.
      SELECT * FROM newdso INTO TABLE t_newdso WHERE prod =
      data_package-prod.
      SORT t_newdso BY prod.
    *LOOP AT T_NEWDSO.
      READ TABLE t_newdso WITH KEY prodh4 = t_data-prod.
      IF sy-subrc EQ 0.
        LOOP AT t_newdso.
          t_data-prod = t_newdso-/bic/znew_mp.
          t_data-material = t_newdso-material.
    *T_DATA-NETAMOUNT = T_DATA NETAMOUNT * T_NEWDSO-/BIC/ZSP_RATIO.*
          APPEND t_data.
        ENDLOOP.
      ELSE.
        REFRESH t_olddso.
        SELECT * FROM olddso INTO TABLE t_olddso WHERE prod =
        data_package-prod.
        SORT t_olddso BY prod.
        READ TABLE t_olddso WITH KEY prodh4 = t_data-prod.
        t_data-prod = t_olddso-prod.
        t_data-material = t_olddso-material.
        APPEND t_data.
      ENDIF.
      MODIFY data_package INDEX zidx.
    ENDLOOP.
    REFRESH data_package.
    data_package[] = t_data[].
    thanks
    Edited by: Matt on Sep 27, 2010 2:25 PM - added  tags

    Hi,
    I am not really good at debugging Abap code since I am a newbie. however  I have tried to add CLEAR T_DATA before the first loop.
    REFRESH T_DATA.
    LOOP AT DATA_PACKAGE.
    ZIDX = SY-TABIX.
    MOVE-CORRESPONDING DATA_PACKAGE TO T_DATA.
    and before the second loop and select statement and at the end of the loop.
    REFRESH T_NEWDSO.
    SELECT * FROM NEWDSO INTO table T_NEWDSO WHERE PROD =
    DATA_PACKAGE-PROD.
    SORT T_NEWDSO BY PROD.
    READ TABLE T_NEWDSO WITH KEY PROD = T_DATA-PROD.
    IF sy-subrc EQ 0.
    LOOP AT T_NEWDSO.
    but then not all data are being fetched.
    thanks
    Edited by: Bhat Vaidya on Sep 28, 2010 8:33 AM

  • Share point in server admin not working correctly... I think

    I suspect that the share point in server admin is not working correctly. In workgroup manager when I click on a user and then click on the "home" tab, under the full path field I see a file path of:
    afp://server.mydomain.com/Users
    However if I go to Server Admin -> AFP -> Share Points then click on the Users share and then click on the share point tab below, enable auto mount is disabled. How can this be possible? I thought for a directory to show up in home in workgroup manager it had to be set as an auto mount. Has something possibly corrupted? And what?

    Here's a bit more information about our setup and our experiences with Apple's CUPS implementation:
    On the server, all printer queues are set up with only lpr and ipp sharing enabled with the PPD setting for each printer set to Generic Postscript. We found that setting the PPD to the printer specific one on the server caused problems when clients tried to use printer specific options, like paper tray selection, etc.. The selection would be undone, apparently because the driver on the server would override the previous settings. Using Generic Postscript allows the client PPD settings to go through unmodified. Our printers are general a mix of HP LaserJets and some Sharp Copiers.
    All clients use lpd to the server queues with the printers' actual PPDs configured. Using ipp is superior in that printer feedback (jams, out of toner, etc) makes it back to the clients, but ipp only works when the client, the server, and the printer are on the same network. If the ipp client is not on the same network, the client spooler immediately goes into a paused state and the print job is stuck on the client.
    Using lpd to the server queues works reliably, but there is no feedback to the client. Jobs disappear from the client queue and go to the server, appearing to the user as a successful print. If the printer is down, there's nothing they can see or do about it.

Maybe you are looking for

  • Searching problems on new Macbook

    I bought a new Macbook last week and transferred all my files/data from previous model through crossover cable; worked flawlessly. Now I am having problems with searches both with Spotlight and in individual applications (worked fine on old model). T

  • WTA How to do MM PR /PO Workflow  configuration

    Hi Guru, I want to ask how do I configure the MM PR and PO workflow. Do anyone have a simple guide which I can build from. Thank you.

  • Problem extending mx:WebService

    This simple program gets a syntax error. If I replace WebService with lots of other class names, for example mx:VBox, it's OK. The error just says "Parse error at '<mx:WebService>'." Is there some rule that you can't extend a web service? Thanks. <?x

  • What happened to the T4i? Seems like it was here then gone...didn't seem to last very long.

    What happened to the T4i? Seems like it was here then gone...didn't seem to last very long. Did it have major problems?

  • Idle ASM-instance in list of processess

    Hello! I see smon of ASM-instanse in list of processes of AIX, after chekin the status : srvctl status ASM ASM is not running.Please let me now , why ASM-instance is idle and at the same time is in list of processes of OS ? I think if instance is idl