Help with if/else in displaying data - (possibly foreach)

Hello all,
I've been trying to set something up, and I'm having difficulty getting it to work.
Lines 84-111 have become my biggest difficulty.  I've got an if/else statement set up so that if one record has an image located on the localhost that image is pulled up.  The way I have it now, this works great.
If I swap lines 93-96 with 102-105, and just tweek line 90, I can get it to work if the image is located on an alias and not the localhost.
The problem is that if I have it like it is now, I can't get both to work at the same time.  So, I'm trying to get the if/else statement to apply to each record that is being pulled up.  It seems like what it is doing now is choosing which part of the if/else statement it needs to use for the first record, and then applies that for all records.
Is there a way to have it coded like it is now for the if/else statement (because I want to be able to add multiple alias' and just check to see if the image is on the localhost or not); but have the image be displayed no matter if the image is located on the localhost or an alias?
The following is what I've got so far:
<?php
$search = $_GET['series'];
$query_begin=" SELECT * FROM movies WHERE movie_name_series = '$search' ";
$search_begin = mysql_query($query_begin) or die(mysql_error());
$row_begin = mysql_fetch_assoc($search_begin);
if($row_begin == 0){
?>
<script type="text/javascript"><!--
setTimeout('Redirect()',0000);
function Redirect()
  location.href = 'index.php?content=noresult';
// --></script>
<?php
else
                $query_display = "SELECT * from series WHERE series_id = '$search'";
       $result_display = mysql_query($query_display);
       $row_display = mysql_fetch_array($result_display, MYSQL_ASSOC);
          $series_id = $row_diaplay['series_id'];
          $series_name = $row_display['series_name'];
    ?>
<h2>All Movies in our Library categorized in the series <?php echo $series_name ?></h2>
<br />
<div style="float: left; width: auto">
    Click on the name of the movie to edit the movie.
</div>
     <br />
        <hr size="1" noshade="noshade" />
  <br />
<?php
$query="SELECT * FROM movies
  INNER JOIN family_rating ON movies.movie_star_rating=family_rating.star_id
  INNER JOIN alias ON movies.alias=alias.alias_id
  INNER JOIN parent_alert ON movies.parent_alert=parent_alert.alert_id
  INNER JOIN rating ON movies.movie_rating=rating.rating_id
  WHERE movies.movie_name_series='$search'
  ORDER BY movies.movie_name ASC";
$result= mysql_query($query)or die (mysql_error());
while($row=mysql_fetch_array($result)){
// Display the data
?>
    <table width="200" style="margin: 20px">
    <tr align="center">
  <td valign="top">
   <h1 style="font-size: 12px"><?php echo $row['movie_name']; ?></h1>
        </td>
    </tr>
    <tr align="center">
  <td valign="top" style="width: 100%; border-bottom: ridge #FFF; border-left: ridge #FFF; background: url(assets/images/transback.png) repeat; padding: 10px">
   <a class="ToolText" onMouseOver="javascript:this.className='ToolTextHover'" onMouseOut="javascript:this.className='ToolText'">
   <style media="screen" type="text/css">
          #coverart {
            display: block;
            width: 110px;
            height: 150px;
          #coverart:hover {
            background: url("assets/icons/play_movie.png") no-repeat 0 0;
          background-size: 110px;
         </style>
        <p>
         <form action="index.php?content=play_movie" method="post">
            <input type="hidden" value="<?php echo $row['movie_id']; ?>" name="movie" />
         <input type="hidden" value="<?php echo $row['warning'] ?>" name="warning" />
                                    <?php
          if ($row['alias_name']='localhost') {
         ?>
                                    <input onmouseover='this.src="assets/icons/play_movie.png"'
                                     onmouseout='this.src="movies/coverart/<?php echo $row['art']; ?>"'
                                    type="image" src="movies/coverart/<?php echo $row['art']; ?>"
                                    style="border: none" height="150" width="110" />
                                    <?php
          }else{
           ?>
                                    <input onmouseover='this.src="assets/icons/play_movie.png"'
                                     onmouseout='this.src="http://<?php echo $row['ip_address']; ?>/<?php echo $row['alias_name']; ?>/coverart/<?php echo $row['art']; ?>"'
         type="image" src="http://<?php echo $row['ip_address']; ?>/<?php echo $row['alias_name']; ?>/coverart/<?php echo $row['art']; ?>"
                                    style="border: none" height="150" width="110" />
                                    <?php
          ?>
            </form>
                                    </p>
                                <span><h2 align="center"><?php echo $row['movie_name']; ?></h2>
        <?php echo $row['rating_name']; ?>
                                <h4><?php echo $row['description']; ?></h4>
        <?php
         if($row['parent_alert']='1') {
          ?>
        <p align"center"><img src="assets/icons/<?php echo $row['alert_file_name']; ?>"></p></span>
                                <?php
         } else {
         ?>
            </a>
            <img src="assets/icons/s_<?php echo $row['star_file_name']; ?>" />
        </td>
</tr>
    </table>
<?
?>
I've looked through a number of tutorials and it's been indicated to use a for each loop.  However, I can't seem to get this to work.  Is there anything I can do to get this to work the way I am trying to?  Is it a problem with my if/else or do I need a for each?  If I need a for each, how do I do that?
Thanks.

Thank you for your reply.  I apologize for not being as clear as I needed to be, so I'll try and explain better.
I've got a page that pulls up some records from a database, where I've got an if / else statement as part of the section where it displays the data.
                                    <?php
          if ($row['alias_name']='localhost') {
         ?>
                                    <input onmouseover='this.src="assets/icons/play_movie.png"'
                                     onmouseout='this.src="movies/coverart/<?php echo $row['art']; ?>"'
                                    type="image" src="movies/coverart/<?php echo $row['art']; ?>"
                                    style="border: none" height="150" width="110" />
                                    <?php
          }else{
           ?>
                                    <input onmouseover='this.src="assets/icons/play_movie.png"'
                                     onmouseout='this.src="http://<?php echo $row['ip_address']; ?>/<?php echo $row['alias_name']; ?>/coverart/<?php echo $row['art']; ?>"'
         type="image" src="http://<?php echo $row['ip_address']; ?>/<?php echo $row['alias_name']; ?>/coverart/<?php echo $row['art']; ?>"
                                    style="border: none" height="150" width="110" />
                                    <?php
          ?>
When the records are pulled, it seems like only the first part of the if / else statement is being applied to every record that is being pulled. The problem is if I've got records like the following:
Record one - (file on the host computer)
needs to be displayed from the condition
src="movies/coverart/<?php echo $row['art']; ?>"
Record two - (file on networked external hard drive)
needs to be displayed from the condition
src="http://<?php echo $row['ip_address']; ?>/<?php echo $row['alias_name']; ?>/coverart/<?php echo $row['art']; ?>
The way it's coded now, only record one will display the image (record two will not display the image).  If I swap the order of the conditions, only record two will display the image (record one will not display the image).
How do I get both record one and record two to display the image when both appear on the same page from a single search query?
If I still did not explain it well enough, please let me know and I will try and do better.  Again, thank you for your help.

Similar Messages

  • Need help with representing 2 bits of data in a column

    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?

    CommitMan wrote:
    I Need help representing only 2 bits of data in a column in order to save space.
    Is that possible?Yes - using Assembler....
    If you need to count bits to save space, then you must be on 70's, or early 80's, hardware. So using Assembler should not be a problem. Let me guess.. a 8051 microcontroller from the 1980?
    Here's what the 8051 code and memory optimisation manual says:
    >
    The simplest and best way to get dramatic improvements
    in efficiency is to look for all variables that will have only
    binary values (0 and not 0), and define them as type 'bit‘:
    bit myVar;With bit variables, the full set of 8051 bit-level assembler
    instructions can be used to generate very fast and
    compact code. For example, the following C code:
    myVar = ~myVar;
    if (!myVar)
    }Generates only two lines of assembler:
    B200    CPL myVar
    200006  JB myvar,?C0002This example uses only 5 flash bytes and 8 CPU cycles.
    When you use bit variables, you can implement a
    nontrivial line of C code with just one assembler
    instruction.
    >
    <i>PS. Yes, the above is really from a manual for a real 80s microcontroller. And yes, I'm poking fun at your question as saving bits were a problem in the 80s and prior. It should not be a problem in the 21st century information system and database.</i>

  • Help on jsp code to display data in same page using using ajax ?

    Is there any jsp code to display in same page using using ajax ?

    Re: need help on how to display data in same jsp page. Locking.

  • Help with new hard drive and data recovery

    I have a macbook pro 13" from early 2011...last week the hard drive crashed and after a few hours at the genius bar had to got  tekserv to recover my data and get a new hard drive and update to 8GB of Ram.  When I got my macbook back I was given an external hard drive that had everything from my old hard drive saved by the users on the old hard drive.  I was hoping I could just transfer the user over to the new hard drive but since I had to restart the computer as a new computer I am not able to just reassign my old profile as the new one on this laptop.  Maybe I've done something wrong but at this point I transferred all my documents over, moved my music and pictures over but I have a few things I can't figure out that I'm hoping someone can help with.
    1. Do emails that were in my mail program from both gmail and my verizon.net program get saved somewhere or do I have to just assume those were lost?
    2. my iTunes library is now there but none of my playlists are there.  Should those have been saved somewhere in my iTunes folder that I should see them?  I'm concerned about syncing my iPhone or iPads to iTunes without those there.
    thanks for the help.

    Here's the spec page on your PB.  http://www.everymac.com/systems/apple/powerbook_g4/stats/powerbook_g4_1.25_15.ht ml  It came with OS 10.2.7 installed. The max OS is Leopard 10.5.x
    Tiger install DVDs are in short supply. Tiger is no longer available at the Apple Store but may be available for $129 by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753). For other sources, do a Google search for MA453Z/A (10.4.6), MA190Z/A (10.4.3) and M9639Z/A (10.4). Also look on eBay. Be sure & buy a retail version (black with silver X) and not a model specific version (gray) (See http://discussions.apple.com/thread.jspa?threadID=1976068 Can I use another Mac's system restore disc on my Mac?.
    Also check these web stores: http://www.lacomputercompany.com/cgi-bin/rpcart/index.cgi?command=dispitem&type= sku&sku=19521  http://www.allmac.com/shop/index.php?cPath=5_10003
    After you install the base 10.4.x, update to the final Tiger version 10.4.11. Here's the link for the 10.4.11 combo update http://support.apple.com/kb/TA24901?viewlocale=en_US
    Look at this link Mac OS X v10.4 Tiger Installing Software Support Page
    http://www.apple.com/support/tiger/install/
    You can also download the Tiger Installation and Setup Guide
    http://manuals.info.apple.com/en/Tiger_Install_Setup_Guide.pdf
     Cheers, Tom

  • Need Help in finding FM for displaying date as output EX:april-07

    Hi All,
    I have a problem in displaying date for example:
    If i give period as 4 and year as 2007,
    the output should be displayed as april-07.
    Can any one help me out in finding a solution.
    Thanks in advance.

    MONTH_NAMES_GET  will give you the month name
    FUNCTION MODULES
    http://www.erpgenie.com/abap/functions.htm
    http://www.sapdevelopment.co.uk/fmodules/fmssap.htm
    http://www.erpgenie.com/abap/index.htm
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Rewards if useful...........
    Minal
    Message was edited by:
            Minal Nampalliwar

  • Help with replicating/updating vendor master data

    Hi,
    Currently, we run the bbp_vendor_sync program to do the replication. It does the job of both bbpgetvd (new vendor creation) and bbpupdvd (update existing vendor).
    But the problem is, we have two number ranges for vendors. One is Numeric and other one is Alpha.
    Group -->AB     From 0010000000     to 0699999999
    Group -->AZ     From A     to ZZZZZZZZZZ
    The vendor synchronization program can consider only one number range at a time i.e.
    either Numeric or Alpha. So, we have to switch the active number range
    and run the program twice., first for numeric and then for alpha.
    In order to avoid this, I'm looking at implementing bbp_transdata_prep which I was told would take care of this issue.
    I looked around for documentation/sample code for bbp_transdata badi and couldnt find any on SAP help site or SDN.
    Wondering if someone can help with the documentation/sample code and difficuly level of implementing this BADI.
    Any help would be highly appreciated and suitable points would be awarded for your help.
    Also, if there is another way to solve this issue without implementing transdata badi, pls. let me know.
    TIA,
    Seyed

    Hi
    <u>Please go through this -></u>
    http://help.sap.com/saphelp_srm50/helpdata/en/56/54f137a5e6740ae10000009b38f8cf/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/62/fb7d3cb7f58910e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/42/d3b671ba67136fe10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/bb/6c0e3b02616a42e10000000a11402f/frameset.htm
    <b><u>Sample BADI Implementation
    BADI Definition - BBP_TRANSDATA_PREP
    Purpose -> Impl. for BBP_TRANSDATA_PREP, Delete Invalid Mail Addresses</u></b>
    <u>PREPARE_REPLICATION_DATA method -></u>
    method IF_EX_BBP_TRANSDATA_PREP~PREPARE_REPLICATION_DATA.
      FIELD-SYMBOLS: <LFS_ADR6> TYPE ADR6.
      LOOP AT CT_ADR6 ASSIGNING <LFS_ADR6>.
        IF <LFS_ADR6>-SMTP_ADDR NS '@'.
          DELETE CT_ADR6.
        ENDIF.
      ENDLOOP.
    endmethod.
    <u>PREPARE_UPDATE_DATA method -></u>
    method IF_EX_BBP_TRANSDATA_PREP~PREPARE_UPDATE_DATA.
      FIELD-SYMBOLS: <LFS_ADR6> TYPE ADR6.
      LOOP AT CT_ADR6 ASSIGNING <LFS_ADR6>.
        IF <LFS_ADR6>-SMTP_ADDR NS '@'.
          DELETE CT_ADR6.
        ENDIF.
      ENDLOOP.
    endmethod.
    Hope this will help.
    Regards
    - Atul

  • Help with Title and Author Displaying on the iBooks Bookshelf.

    I have created a book using iBooks Author and connected my iPad to my iMac to Preview my book, the book previews correctly the information I have entered into iBooks Author, however when you look on the iBooks Bookshelf it says UNKNOWN TITLE and UNKNOWN ARTIST even though I have entered this on my title page in iBooks Author, however the icon of my book on the iBooks Bookshelf is showing correctly the photo on the cover and the title and author, can any one help with this please?
    Also no Category is showing against my book onthe iBooks Bookshelf how do I add one please?

    To be honest, you should really put this under a seperate post of your own, but I'm not here to whine...
    It sounds that you haven't defined the book title yet.
    Open your book in iBooks Author and go to the panel on the left-hand side of your screen that shows your page thumbnails. Scroll to the top of this box, and find the panel that has the:
    Book Title
    Intro media
    Table of contents
    Glossary.
    If your Book Title here says simply 'Book Title', then define it by double-clicking on the 'Book Title' text in the thumnails panel, and type in your book's title.
    HTH.

  • Need little help with JPA code and displaying database data into tables

    Hello Everyone,
    I am using java6 and Netbeans 6.1 on Windows XP platform.
    This is probably very simple but have'nt been able to figure it out yet. I am using the Travel Java Databse included in NB6 as a learning tool.
    I have a JComboBox connected to Person Table and want to display a Trip table from using the selected item from theJcombobox. In other words, Trip table shows only the Person selected from the Jcombobox.
    If someone could point me on the right direction how to code JPA code or how to use NB6 GUI to accomplish this.
    Thanks

    The w and wi are just table aliases that make it easier to
    referrence those tables by column when joining multiple tables
    (avoids having to prefix column names with the entire table name,
    etc.) When doing a self-join (joining a table to itself), the use
    of table aliases is
    required, otherwise you would have no other way to tell
    which column belonged to which "instance" of table.
    The query itself is pretty simple. It is just using a
    correlated subquery to select only those instances of
    workstationApps where the count of appID instances in
    workstationAppIndex is less than the amount specified in the
    maxConcurrentInstalls for the same appID.
    Also, I do see what you are doing with #form.searchType#, I
    was just making sure that it was what you really intended to do.
    Phil

  • Need help with query that can look data back please help.

    hi guys i have a table like such
    CREATE TABLE "FGL"
        "FGL_GRNT_CODE" VARCHAR2(60),
        "FGL_FUND_CODE" VARCHAR2(60),
        "FGL_ACCT_CODE" VARCHAR2(60),
        "FGL_ORGN_CODE" VARCHAR2(60),
        "FGL_PROG_CODE" VARCHAR2(60),
        "FGL_GRNT_YEAR" VARCHAR2(60),
        "FGL_PERIOD"    VARCHAR2(60),
        "FGL_BUDGET"    VARCHAR2(60)
      )and i have a data like such
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','1','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','2','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7470','4730','02','10','2','200');I bascially need to get the total of the budget column. however its not as simple as it sound(well atleast not for me.) the totals carry over to the new period. youll noticed the you have a period column. basically what im saying is that
    fgl_grant_year 10 period 1 = for account 7600 its $100 and $100 for period 2 you see 100 dollars again this is not to be added this is the carried over balance. which remains $100.
    so im trying to write a query that basically does the following.
    im given a period for the sake of this example lets say period 1 i get nothing else. I have to find the greates grant year grab the amount for period 14(which is the total from the previous year) and add it to the amount of the current period. in this case period 1 grnt_year 11
    so the expected outcome should be $700
    240055     240055     7240     4730     02     10     14     200
    240055     240055     7600     4730     02     10     14     100
    240055     240055     7600     4730     02     11     1     400keep in mind that im not given a year just a period.
    any help that you guys can offer would be immensely appreciated. I have been trying to get this to work for over 3 days now.
    finally broke down and put together this post
    Edited by: mlov83 on Sep 14, 2011 8:48 PM

    Frank
    wondering if you can help me modify this sql statement that you provided me with .
    table values have been modified a bit.
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','00','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','1','0');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','11','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7200','4730','02','10','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('360055','360055','7600','4730','02','10','1','400');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7600','4730','02','10','14','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','14','200');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','10','2','100');
    Insert into FGL (FGL_GRNT_CODE,FGL_FUND_CODE,FGL_ACCT_CODE,FGL_ORGN_CODE,FGL_PROG_CODE,FGL_GRNT_YEAR,FGL_PERIOD,FGL_BUDGET) values ('240055','240055','7240','4730','02','11','2','600');i need to take one more thing into consideration. if the greatest year has a value on period 00 i need to ignore the period 14 and the current period total would be
    the current period +(current period - greatest year 00)
    hope that makes sense so in other words with the new data above. if i was querying period two of grant year 11. i would end up with $800
    because the greatest year is 11 it contains a period 0 with amount of $400 so my total should be
    period 2 amount $ 600
    period 0 amount $ 400 - period 2 amount of $600 = 200
    600+200 = $800
    if i query period 1 of grant 360055 i would just end up with 800 of grnt year 10.
    i have tried to modify that query you supplied to me with no luck. I have tried for several day but im embarrased to say i just can get it to do what im trying to do .
    can you please help me out.
    Miguel

  • Icloud help with restoring to an earlier date

    I plugged my Iphone 4S into my computer and it said i could update to the new IOS 7 so i did.
    When i completed the download my phone had completely lost all pictures, videos ect along with all text message history and so on.
    All i had was my contacts.
    I therefore tried to restore back to an earlier date but that didnt seem to work.
    So i decided to restore my phone as i read that may work, then once done that sign into icloud and get it back that way.
    Well once i restored my phone all my itunes was wiped and it now says i have 12.8gb of space when before (when all my stuff was there) i only had 7 or 8.
    Therefore i am worried now that EVERYTHING has been truly deleted, even from my itunes and icloud.
    Is there any way i can get this back?
    I am willing to hear any help possible. Thanks

    It sounds as if you either didn't backup to iTunes before updating, or you clicked "Restore iPhone" instead of Update.  Either way, you can try to restore again from iCloud (https://support.apple.com/kb/ph12521), and if nessecary choose to Show the older backups available from iCloud.  Or learn more about how to keep a backup of your device so this doesn't happen again. 
    Choosing an iOS backup method (Should I use iTunes or iCloud to back up my iOS device?)

  • Problem with ALV Grid Not Displaying Data

    Hi Gurus,
    I have a report program, when i run it I display an output summary on ALV Grid, and when i click on each of the row in the output summary, I'm suppose to see the item detail of each record.
    This item detail is showing for some record and is not showing for some other records (when i use different selections). I debugged it and observed that the table populating the ALV grid actually has records in it. The ALV grid is not just displaying the records.
    I debugged the 2 examples (one showing record and the other not showing), I found out that nothing is different in the way they run till they populate the final internal record to passed to the ALV Grid.
    Please any suggestions on this:
    This is the function code for the ALV grid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_program_id
          i_callback_pf_status_set = c_detail_status
          i_callback_user_command  = c_detail_user_comm
          i_grid_title             = lv_grid_title
          is_layout                = w_detail_layout
          it_fieldcat              = i_detail_fieldcat
          it_sort                  = i_detail_sort
        TABLES
          t_outtab                 = i_faglflexa[]   "NEM - detail
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE e064
          WITH sy-subrc.
    Function REUSE_ALV_GRID_DISPLAY failed on detail view SY-SUBRC = &
      ENDIF.

    This is the full code:
    ***INCLUDE ZFIGL_HYPERION_F01.
    *&      Form  open_files
    Open files used by the program.
    FORM open_files.
      OPEN DATASET p_fileot FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
        MESSAGE g_message.
      IF sy-subrc <> 0.
        MESSAGE e056
          WITH g_message.
    Unable to open output file &
      ENDIF.
    ENDFORM.                    " open_files
    *&      Form  close_files
    Close files used by the program.
    FORM close_files.
      CLOSE DATASET p_fileot.
    ENDFORM.                    " close_files
    *&      Form  extract_data
    Extract data from database needed to generate output file and report.
    FORM extract_data.
    Get the required general ledger totals records.
      PERFORM get_faglflext_data.
    Derive any other necessary fields for I_FAGLFLEXT.
      PERFORM derive_add_fields_faglflext.
    Split records by fiscal period.
      PERFORM split_records_by_period.
    Summarize the detail records to allow for creation of the file and
    reporting.
      PERFORM summarize_records_by_period.
    Get the required general ledger actual line items records.
      PERFORM get_faglflexa_data.
    Derive any other necessary fields for I_FAGLFLEXA.
      PERFORM derive_add_fields_faglflexa.
    Sort the detail and summary output tables into key sequence.
      PERFORM sort_output_tables.
    ENDFORM.                    " extract_data
    *&      Form  process_data
    Create the requested file and report.
    FORM process_data.
    Create the local file if requested by the user or the month-end file
    at month-end.
      IF cb_test = c_not_selected.
        PERFORM create_pc_file.
      ELSEIF sy-uname = c_user_batch_admin.
        PERFORM create_output_file.
      ENDIF.
    Create the necessary tables for summary ALV report.
      PERFORM build_summary_layout.
      PERFORM build_summary_field_catalog.
      PERFORM build_summary_sort_table.
    Check to see that there is data in the summary output table.  If yes,
    generate report, if not, then give a message to the user.
      READ TABLE i_output_summary INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        MESSAGE s062.
        STOP.
    No data extracted for selection criteria entered
      ENDIF.
    Generate the summary ALV report view.
      PERFORM generate_summary_alv_report.
    ENDFORM.                    " process_data
    *&      Form  verify_user_selections
    Verify data input by the user.
    FORM verify_user_selections.
      IF NOT p_ryear IS INITIAL.
        IF p_ryear < 2006 OR
           p_ryear > 2100.
          MESSAGE e057.
    Fiscal year is invalid
        ENDIF.
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    fiscal year selection blank, display a error message.
      IF cb_test IS INITIAL AND
         p_ryear IS INITIAL.
        MESSAGE e058.
    A fiscal year must be entered when generating the file
      ENDIF.
    If program is being run in a non-test mode and the user has left the
    period selection blank, display a error message.
      IF cb_test IS INITIAL AND
         s_rpmax IS INITIAL.
        MESSAGE e132.
    A period must be entered when generating the file
      ENDIF.
      IF cb_test IS INITIAL AND
         p_lfile IS INITIAL.
        MESSAGE e071.
    Local filename is required when generating the file
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
      IF s_rhype IS NOT INITIAL.
        LOOP AT s_rhype.
          CLEAR r_hyper.
          r_hyper-sign = 'I'.
          r_hyper-option = 'CP'.
          CONCATENATE '' s_rhype-low '' INTO r_hyper-low.
          APPEND r_hyper.
        ENDLOOP.
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl
               WHERE hyper IN r_hyper.
        LOOP AT i_zall_gl INTO w_zall_gl.
          w_zall_gl1-saknr = w_zall_gl-saknr.
          w_zall_gl2-bukrs = w_zall_gl-bukrs.
          APPEND w_zall_gl1-saknr TO i_zall_gl1.
          APPEND w_zall_gl2-bukrs TO i_zall_gl2.
          CLEAR: w_zall_gl, w_zall_gl1, w_zall_gl2.
        ENDLOOP.
        SORT i_zall_gl1 BY saknr.
        SORT i_zall_gl2 BY bukrs.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl1 COMPARING saknr.
        DELETE ADJACENT DUPLICATES FROM i_zall_gl2 COMPARING bukrs.
        IF s_racct IS INITIAL.
          LOOP AT i_zall_gl1 INTO w_zall_gl1.
            r_saknr-sign = 'I'.
            r_saknr-option = 'EQ'.
            r_saknr-low = w_zall_gl1.
            APPEND r_saknr.
            CLEAR r_saknr.
            CLEAR w_zall_gl1.
          ENDLOOP.
        ELSE.
          r_saknr[] = s_racct[].
        ENDIF.
        IF s_rbukrs IS INITIAL.
          LOOP AT i_zall_gl2 INTO w_zall_gl2.
            r_bukrs-sign = 'I'.
            r_bukrs-option = 'EQ'.
            r_bukrs-low = w_zall_gl2-bukrs.
            APPEND r_bukrs.
            CLEAR r_bukrs.
            CLEAR w_zall_gl2.
          ENDLOOP.
        ELSE.
          r_bukrs[] = s_rbukrs[].
        ENDIF.
      ELSE.
        r_saknr[] = s_racct[].
        r_bukrs[] = s_rbukrs[].
        SELECT bukrs saknr hyper
               FROM zall_gl_hype INTO TABLE i_zall_gl.
      ENDIF.
    ****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
    ENDFORM.                    " verify_user_selections
    *&      Form  get_faglflext_data
    Get FAGLFLEXT (General Ledger: Totals) data from the database.
    FORM get_faglflext_data .
    Use the fiscal year for the selection, if it was populated by the
    user.
      IF NOT p_ryear IS INITIAL.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
               zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
               hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
               hslvt
          INTO TABLE i_faglflext
          FROM faglflext
          WHERE rldnr = c_run_ledger    AND
                rbukrs IN r_bukrs       AND
                racct  IN r_saknr       AND
                rfarea IN s_rfarea      AND
                prctr  IN s_prctr       AND
                ryear  =  p_ryear       AND
                rvers  = c_run_version.
      ELSE.
        SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
             zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
             hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
             hslvt
        INTO TABLE i_faglflext
        FROM faglflext
        WHERE rldnr = c_run_ledger    AND
              rbukrs IN r_bukrs       AND
              racct  IN r_saknr       AND
              rfarea IN s_rfarea      AND
              prctr  IN s_prctr       AND
              rvers  = c_run_version.
      ENDIF.
    ENDFORM.                    " get_faglflext_data
    *&      Form  derive_add_fields_faglflext
    Derive additional fields needed for the I_FAGLFLEXT.
    FORM derive_add_fields_faglflext.
    Get needed company code and profit center data from the database.
      PERFORM get_t001_data.
      PERFORM get_t880_data.
      READ TABLE i_faglflext INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        PERFORM get_cepc_data.
      ENDIF.
      SORT i_zall_gl BY bukrs saknr.
      LOOP AT i_faglflext INTO w_faglflext.
    Get necessary company code data.
        READ TABLE i_t001 INTO w_t001
          WITH KEY bukrs = w_faglflext-rbukrs
                   BINARY SEARCH.
        IF sy-subrc <> 0.
          MESSAGE e059
            WITH w_faglflext-rbukrs.
    Company code & not found on table T001
        ENDIF.
    Determine the entity.
        PERFORM derive_entity USING w_t001-rcomp
                           CHANGING w_faglflext-entity.
    Determine the strategic segment.
        PERFORM derive_strategic_segment USING w_faglflext-rassc
                                               w_faglflext-prctr
                                      CHANGING w_faglflext-strat_seg
                                               w_faglflext-zzsareaim
                                               w_faglflext-zzsarea.
    Determine the strategic segment channel.
        PERFORM derive_strat_seg_chnl USING w_faglflext-rassc
                                            w_faglflext-prctr
                                   CHANGING w_faglflext-strat_seg_chnl.
    Determine the all item ID and all products.
        PERFORM derive_all_item_id USING w_t001-waers
                                CHANGING w_faglflext-all_item_id
                                         w_faglflext-all_products.
    Determine the all customers and all customers channel.
       PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
    *w_faglflext-strat_seg_chnl
                                        CHANGING w_faglflext-all_cust
    *w_faglflext-all_cust_chnl.
    Determine the sub account using the company ID of the trading partner.
       PERFORM derive_sub_account USING w_faglflext-rassc
                               CHANGING w_faglflext-sub_acct.
        PERFORM derive_sub_account USING w_t001-rcomp
                                         w_faglflext-rassc
                           CHANGING w_faglflext-sub_acct.
    ****Begin Basil changes to include hyperion acct in selection (10/03/2007).
        READ TABLE i_zall_gl INTO w_zall_gl
                     WITH KEY bukrs = w_faglflext-rbukrs
                              saknr = w_faglflext-racct
                          BINARY SEARCH.
        IF sy-subrc = 0.
    ****End Basil changes to include hyperion acct in selection (10/03/2007).
    Determine the Hyperion account number from G/L account long text.
          PERFORM derive_hyperion_account USING w_faglflext-racct
                                                w_faglflext-rfarea
                                                "KMK5/22/06 ITR: 20592
                                                w_faglflext-sub_acct
                                                w_faglflext-rassc
                                                w_faglflext-prctr
                         CHANGING w_faglflext-hyperion_acct
                                  w_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                  w_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                  w_faglflext-zzsarea
                                  w_faglflext-zzsareaim
                                  w_faglflext-strat_seg.
        ENDIF.
    Determine the all customers and all customers channel.
        PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
                                                  w_faglflext-strat_seg_chnl
                                         CHANGING w_faglflext-all_cust
                                                  w_faglflext-all_cust_chnl.
    Update i_FAGLFLEXT with the newly derive fields.
        MODIFY i_faglflext FROM w_faglflext
          TRANSPORTING entity
                       strat_seg
                       strat_seg_chnl
                       all_item_id
                       all_products
                       all_cust
                       all_cust_chnl
                       hyperion_acct
                       sub_acct
                       fiscal_period
                       zzsarea
                       zzsareaim
                       reverse_sign        "NEM8/21/06 ITR: 24286
                       balance_sheet.      "NEM8/21/06 ITR: 24286
      ENDLOOP.
      CHECK s_rhype IS NOT INITIAL.
      SORT s_rhype BY low.
      LOOP AT i_faglflext INTO w_faglflext.
        READ TABLE s_rhype WITH KEY low = w_faglflext-hyperion_acct.
        IF sy-subrc NE 0.
          CLEAR w_faglflext-hyperion_acct.
          MODIFY i_faglflext FROM w_faglflext.
        ENDIF.
      ENDLOOP.
      DELETE i_faglflext WHERE hyperion_acct IS INITIAL.
    ENDFORM.                    " derive_add_fields_faglflext
    *&      Form  derive_entity
    Derive the entity using the company code.
         -->RCOMP  - Company code.
         <--ENTITY - Entity
    FORM derive_entity USING rcomp  TYPE t_t001-rcomp
                    CHANGING entity TYPE t_faglflext-entity.
      CLEAR:
        entity.
    Get necessary global company code data.
      READ TABLE i_t880 INTO w_t880
        WITH KEY rcomp = rcomp
                 BINARY SEARCH.
      IF sy-subrc = 0.
        entity  = w_t880-name2+0(3).
        TRANSLATE entity TO UPPER CASE.
      ELSE.
        MESSAGE e060
          WITH w_t001-rcomp.
    Company code & not found on table T880
      ENDIF.
    ENDFORM.                    " derive_entity
    *&      Form  get_t001_data
    Get T001 (Company Codes) data from the database.
    FORM get_t001_data.
      SELECT bukrs waers rcomp
        INTO TABLE i_t001
        FROM t001
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t001 BY bukrs.
    ENDFORM.                    " get_t001_data
    *&      Form  get_t880_data
    Get T880 (Global Company Data (for KONS Ledger)) data from the
    database.
    FORM get_t880_data.
      SELECT rcomp name2
        INTO TABLE i_t880
        FROM t880
        CLIENT SPECIFIED
        WHERE mandt = sy-mandt.
      SORT i_t880 BY rcomp.
    ENDFORM.                    " get_t880_data
    *&      Form  derive_all_item_id
    Derive the all item ID from the company code currency key.
         -->WAERS       - Currency key.
         <--ALL_ITEM_ID - All item ID.
         <--ALL_ITEM_ID - All item ID.
    FORM derive_all_item_id USING waers        TYPE t_t001-waers
                         CHANGING all_item_id  TYPE t_faglflext-all_item_id
                                  all_products TYPE t_faglflext-all_products
      CLEAR:
        all_item_id.
    Populate all item ID.
      all_item_id = c_all_item_id.
      IF waers = c_us_dollars.
        REPLACE '*' WITH c_united_states INTO all_item_id.
      ELSE.
        REPLACE '*' WITH c_local         INTO all_item_id.
      ENDIF.
    Populate all products.
      all_products   = c_all_products.
      TRANSLATE all_products TO UPPER CASE.
    ENDFORM.                    " derive_all_item_id
    *&      Form  derive_all_customers_fields
    Derive the all customers and all customer channel fields from
    the strategic segment and strategic segment channel respectively.
         -->STRAT_SEG      - Strategic segment.
         -->STRAT_SEG_CHNL - Strategic segment channel.
         <--ALL_CUST       - All customers.
         <--ALL_CUST_CHNL  - All customers channel.
    FORM derive_all_customers_fields USING strat_seg      TYPE
    t_faglflext-strat_seg
                                           strat_seg_chnl TYPE
                                           t_faglflext-strat_seg_chnl
                                  CHANGING all_cust       TYPE
                                  t_faglflext-all_cust
                                           all_cust_chnl  TYPE
                                           t_faglflext-all_cust_chnl.
      CLEAR:
        all_cust,
        all_cust_chnl.
      all_cust        = strat_seg.
      all_cust+2(1)   = c_all_customers.
      TRANSLATE all_cust TO UPPER CASE.
      all_cust_chnl   = strat_seg_chnl.
      TRANSLATE all_cust_chnl TO UPPER CASE.
    ENDFORM.                    " derive_all_customers_fields
    *&      Form  derive_hyperion_account
    Read G/L account long text to get the Hyperion account number.
         -->RACCT         - SAP G/L account number.
         <--HYPERION_ACCT - Hyperion account number.
    FORM derive_hyperion_account USING racct         TYPE t_faglflext-racct
                                       farea         TYPE t_faglflext-rfarea
                                       "KMK5/22/06 ITR 20592
                                       sub_account   TYPE
                                       t_faglflext-sub_acct
                                       rassc         TYPE t_faglflext-rassc
                                       prctr         TYPE t_faglflext-prctr
                          CHANGING hyperion_acct TYPE t_faglflext-hyperion_acct
                                   reverse_sign  TYPE t_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
                                   balance_sheet TYPE t_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
                                   zzsarea       TYPE t_faglflext-zzsarea
                                   zzsareaim     TYPE t_faglflext-zzsareaim
                                   strat_seg     TYPE t_faglflext-strat_seg.
      DATA:
        lv_text_name          TYPE thead-tdname,
        l_strl                TYPE i VALUE 0,
        l_hyperion_acct(10),                       "KMK5/20/06 ITR 20527
        l_farea(10)           VALUE '0000000000',  "KMK5/22/06 ITR 20592
        l_balance_sheet(1),                        "NEM8/17/06 ITR 25792
        l_string              TYPE tline-tdline.   "NEM8/17/06 ITR 25792
      DATA: l_hyp_account_1 TYPE tline-tdline,
            l_hyp_account_2 TYPE tline-tdline,
            l_hyp_account_3 TYPE tline-tdline.
      reverse_sign = '1'.
      SELECT SINGLE bilkt xbilk
        FROM ska1
        INTO (l_hyperion_acct,l_balance_sheet)
        WHERE ktopl = c_global_tcoa
          AND   saknr = racct.
      balance_sheet = l_balance_sheet.
      l_string = w_zall_gl-hyper.
      SEARCH l_string FOR '-'.
      IF sy-subrc = '0'.
        reverse_sign = -1.
      ELSE.
        reverse_sign = 1.
      ENDIF.
      CHECK w_zall_gl-hyper IS NOT INITIAL.
      CLEAR: l_hyp_account_1, l_hyp_account_2, l_hyp_account_3.
      SPLIT w_zall_gl-hyper
        AT ';'
        INTO l_hyp_account_1 l_hyp_account_2 l_hyp_account_3.
      IF l_hyp_account_2 IS INITIAL.      " Only one hyperion account
        hyperion_acct = l_hyp_account_1+0(7).
        l_strl = STRLEN( hyperion_acct ) - 1.
        IF hyperion_acct+l_strl(1) EQ '1'.
          CLEAR sub_account.
          PERFORM repopulate_strategic_segment
            USING rassc prctr
            CHANGING strat_seg.
          zzsareaim = g_hold_sales_type.
          zzsarea = g_hold_sales_area.
        ENDIF.
      ELSE.                                " Two or more hyperion accounts
        IF sub_account > ''.
          hyperion_acct = l_hyp_account_2+0(7).
        ELSE.
          hyperion_acct = l_hyp_account_1+0(7).
        ENDIF.
      ENDIF.
      CLEAR: w_hyperion.
      w_hyperion-racct           = racct.
      w_hyperion-hyperion_acct   = hyperion_acct.
      w_hyperion-reverse_sign    = reverse_sign.
    ENDFORM.                    " derive_hyperion_account
    *&      Form  derive_sub_account
    Determine the sub account based on the company ID of the trading
    partner.
         -->RASSC    - Company ID of trading partner.
         <--SUB_ACCT - Sub account.
    *FORM derive_sub_account USING rassc    TYPE t_faglflext-rassc
                        CHANGING sub_acct TYPE t_faglflext-sub_acct.
    IF rassc IS INITIAL.
       CLEAR: sub_acct.
    ELSE.
       sub_acct  = rassc.
       TRANSLATE sub_acct TO UPPER CASE.
    ENDIF.
    *ENDFORM.                    " derive_sub_account
    FORM derive_sub_account USING rcomp  TYPE t_t001-rcomp
                                  rassc  TYPE t_faglflext-rassc
                    CHANGING sub_acct TYPE t_faglflext-sub_acct.
      IF rassc IS INITIAL.
        CLEAR: sub_acct.
      ELSE.
        READ TABLE i_t880 INTO w_t880
          WITH KEY rcomp = rassc
                   BINARY SEARCH.
        IF sy-subrc = 0.
          sub_acct  = w_t880-name2.
          TRANSLATE sub_acct TO UPPER CASE.
        ELSE.
       MESSAGE e060
         WITH w_t001-rcomp.
    Company code & not found on table T880
        ENDIF.
      ENDIF.
    ENDFORM.                    " derive_sub_account
    *&      Form  repopulate_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM repopulate_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    "repopulate_strategic_segment
    " repopulate_strategic_segment&----
    *&      Form  derive_strategic_segment
    Derive the strategic segment based on the company ID of the trading
    partner or the profit center.
         -->RASSC     - Company ID of trading partner.
         -->PRCTR     - Profit center.
         <--STRAT_SEG - Strategic segment.
    FORM derive_strategic_segment USING rassc     TYPE t_faglflext-rassc
                                        prctr     TYPE t_faglflext-prctr
                               CHANGING strat_seg TYPE t_faglflext-strat_seg
                                        sales_type TYPE t_faglflext-zzsareaim
                                        sales_area TYPE t_faglflext-zzsarea.
      DATA:
        lv_segment              TYPE cepc-segment.
      CLEAR:
        strat_seg.
    *Hold values in Sales Type and Sales area before setting to default
    *values
    In case need to use them later
      g_hold_sales_type = sales_type.
      g_hold_sales_area = sales_area.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
    And set Sales Type and Sales area to default values     **NEM 07/13/06
      IF NOT rassc IS INITIAL.
        strat_seg   = c_def_strat_seg.
        sales_type  = c_sales_type.
        sales_area  = c_sales_area.
        TRANSLATE strat_seg TO UPPER CASE.
        TRANSLATE sales_type TO UPPER CASE.
        TRANSLATE sales_area TO UPPER CASE.
        EXIT.
      ENDIF.
    Find the valid profit center record.
      LOOP AT i_cepc INTO w_cepc
        WHERE prctr =  prctr    AND
              datab <= sy-datum AND
              datbi >= sy-datum.
    Pad segment with leading zeros if necessary.
        lv_segment      = w_cepc-segment.
        SHIFT lv_segment RIGHT DELETING TRAILING ' '.
        TRANSLATE lv_segment USING ' 0'.
    Get the segment name from FAGL_SEGMT (Master Data for Segments).
        SELECT SINGLE *
          FROM fagl_segmt
          WHERE langu   = sy-langu AND
                segment = lv_segment.
        IF sy-subrc = 0.
          strat_seg      = fagl_segmt-name+0(3).
          TRANSLATE strat_seg TO UPPER CASE.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " derive_strategic_segment
    *&      Form  get_cepc_data
    Get CEPC (Profit Center Master Data Table) data from the database.
    FORM get_cepc_data.
      SELECT prctr datbi kokrs datab khinr segment
        INTO TABLE i_cepc
        FROM cepc
        FOR ALL ENTRIES IN i_faglflext
        WHERE prctr = i_faglflext-prctr.
      SORT i_cepc BY prctr datab.
    ENDFORM.                    " get_cepc_data
    *&      Form  derive_strat_seg_chnl
    Derive the strategic segment channel based on the company ID of the
    trading partner or the profit center area.
         -->RASSC          - Company ID of trading partner.
         -->PRCTR          - Profit center.
         <--STRAT_SEG_CHNL - Strategic segment channel.
    FORM derive_strat_seg_chnl USING rassc          TYPE t_faglflext-rassc
                                     prctr          TYPE t_faglflext-prctr
                            CHANGING strat_seg_chnl TYPE
                            t_faglflext-strat_seg_chnl.
      CLEAR:
        g_setclass,
        g_subclass,
        g_setname,
        strat_seg_chnl.
    If the company ID of the trading partner is populated, then set the
    strategic segment to a default value.
      IF NOT rassc IS INITIAL.
        strat_seg_chnl  = c_def_strat_seg_chnl.
        TRANSLATE strat_seg_chnl TO UPPER CASE.
        EXIT.
      ENDIF.
    Check for SETNAME = 2*** in setleaf table.
      PERFORM get_setleaf_data USING c_prctr_group
                                       prctr
                              CHANGING g_subrc.
      IF g_subrc NE c_no_record.
        PERFORM find_setleaf_record CHANGING g_subrc.
        SELECT SINGLE *
        FROM setheadert
        WHERE  setclass = g_setclass AND
               subclass = g_subclass AND
               setname  = g_setname  AND
               langu    = sy-langu.
        IF sy-subrc = 0.
          strat_seg_chnl    = setheadert-descript+0(2).
          TRANSLATE strat_seg_chnl TO UPPER CASE.
        ENDIF.
      ELSE.
    Find the valid profit center record.
        LOOP AT i_cepc INTO w_cepc
          WHERE prctr =  prctr    AND
                datab <= sy-datum AND
                datbi >= sy-datum.
    Get the correct SETNODE (Lower-level sets in sets) record.
          PERFORM get_setnode_data USING c_prctr_group
                                         w_cepc-khinr
                                CHANGING g_subrc.
          PERFORM find_setnode_record CHANGING g_subrc.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
    If an appropriate SETNODE record still has not been found, then
    keep looking.
          IF g_subrc = c_wrong_record.
            DO.
              PERFORM get_setnode_data USING c_prctr_group
                                             w_setnode-setname
                                    CHANGING g_subrc.
              PERFORM find_setnode_record CHANGING g_subrc.
              IF g_subrc = c_no_record OR
                 g_subrc = c_correct_record.
                EXIT.
              ENDIF.
            ENDDO.
          ENDIF.
    In the end, there was no SETNODE record to find.
          IF g_subrc = c_no_record.
            EXIT.
          ENDIF.
          SELECT SINGLE *
            FROM setheadert
            WHERE  setclass = g_setclass AND
                   subclass = g_subclass AND
                   setname  = g_setname  AND
                   langu    = sy-langu.
          IF sy-subrc = 0.
            strat_seg_chnl    = setheadert-descript+0(2).
            TRANSLATE strat_seg_chnl TO UPPER CASE.
          ENDIF.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " derive_strat_seg_chnl
    *&      Form  get_setnode_data
    Get SETNODE (Lower-level sets in sets) data from the database.
         -->SETCLASS   - Set class.
         -->SUBSETNAME - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setnode_data USING setclass   TYPE c
                                subsetname TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      SELECT setclass subclass setname
        INTO TABLE i_setnode
        FROM setnode
        WHERE setclass   = c_prctr_group AND
              subsetname = subsetname.
      subrc  = sy-subrc.
    ENDFORM.                    " get_setnode_data
    *&      Form  get_setleaf_data
    Get SETLEAF (Values in Sets) data from the database.
         -->SETCLASS   - Set class.
         -->VALFROM    - Subordinate set ID.
         <--SUBRC      - Return code.
    FORM get_setleaf_data USING setclass   TYPE c
                                valfrom    TYPE c
                       CHANGING subrc      TYPE sy-subrc.
      subrc = c_correct_record.
      SELECT setclass setname valfrom subclass
        INTO TABLE i_setleaf
        FROM setleaf
        WHERE setclass   = c_prctr_group AND
              valfrom = valfrom AND
              setname GE '2000' AND
              setname LE '2999'.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    ENDFORM.                    " get_setleaf_data
    *&      Form  find_setleaf_record
    Find the appropriate SETLEAF record.
         <--SUBRC      - Return code.
    FORM find_setleaf_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setleaf INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setleaf INTO w_setleaf.
        g_setclass = w_setleaf-setclass.
        g_subclass = w_setleaf-subclass.
        g_setname  = w_setleaf-setname.
        subrc  = c_correct_record.
      ENDLOOP.
    ENDFORM.                    " find_setleaf_record
    *&      Form  find_setnode_record
    Find the appropriate SETNODE record.
         <--SUBRC      - Return code.
    FORM find_setnode_record CHANGING subrc TYPE sy-subrc.
      subrc  = c_wrong_record.
    If no records were found during selection, then exit the routine.
      READ TABLE i_setnode INDEX 1 TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        subrc  = c_no_record.
        EXIT.
      ENDIF.
    Check to see if one of the records has a setname in the 2000 series of
    numbers.
      LOOP AT i_setnode INTO w_setnode.
        IF w_setnode-setname+0(1) = c_valid_number.
          g_setclass = w_setnode-setclass.
          g_subclass = w_setnode-subclass.
          g_setname  = w_setnode-setname.
          subrc  = c_correct_record.
          EXIT.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " find_setnode_record
    *&      Form  split_records_by_period
    Split the i_FAGLFLEXT records by fiscal period.  This is necessary
    because all (16) fiscal periods are on one record.
    FORM split_records_by_period .
      REFRESH:
        i_output_detail.
      LOOP AT i_faglflext INTO w_faglflext.
    START OF CHANGES BY BAYAPV on 07/07/2007**********************
    *SELECT SINGLE BUKRS
          SAKNR
          XOPVW
          into w_skb1
          from skb1
          FOR ALL ENTRIES IN I_FAGLFLEXT
          where bukrs = w_faglflext-rbukrs
            and SAKNR = w_faglflext-racct.
    *IF w_skb1-XOPVW = 'X'.
    *SELECT BUKRS
          HKONT

  • Help with a popup window displaying info from a record set

    Hi I am working on a Shopping cart web site I have set up my
    database and I have created my page to display items from the
    database. The fields in my database table are auto_id, category,
    sub_catagory, manufacture, style, descripition, descripition2,
    price, image, image2, fc_id, link_id
    What I am trying to do is to display this part of the info in
    one record . manufacture,style,descripition , image and price there
    will be a link from this page (link_id)to display a popup and in
    that pop up I want to display
    manufacture,style,descripition2,Image2
    basicly I want to now how to put a link in database so when
    all of the data is displayed on the page I want to click on a link
    (link_id) from any record that opens a popup to display a larger
    image and a longer descripition of the product. and anything else I
    may need from that record.
    I hope this maks sence
    Cheers
    Dave

    In your product insert form or however you are adding these
    products to the store add a feild called image link2 or
    large_img_link
    in your code for the pop up window you would wrap your PHP
    recordset like this
    <a href="
    http://yoursite.com/images/large_images/<?php
    echo $row_image_rs['large_img_link']; ?>"><?php echo
    $row_image_rs['large_img_link']; ?></a>
    This will produce a link like this
    http://yoursite.com/images/large_images/myLargeImage.jpg
    the hot spot will be your second php tag which is the
    thumbnail image itself that is now wrapped with the larger image
    link.
    Hope this is helpfull
    JM

  • Help with excessive push notifications - identifying data trafic on iPhone

    I have a peculiar issue. According to my usage logs from my carrier, I am using 1MB of data every 15 to 20 minutes. With a cost of $0,17 per MB, this ammounts to quite a bit by the end of the month, in February I had spent over $200 in data trafic.
    I do not wish to re-set my iPhone, since there is data on it that is important, so I want to figure out what the phone is really fetching.
    Is there some way of identifying the data stream on the phone? Kind of like little snitch for an iPhone. This would allow me to see who the culprit was and possibly stop the traffic before it would cost too much.
    Another question is how push notifications really work. By what I understand push is a subscribtion that is logged on a database somewhere (with Apple?. So if there is a bug in a support server, or a jam in one of the push subscribtions, would it really work to re-set the phone?
    Any help or assistance is greatly appreciated.

    I have a 750mb usage allowance and I was going over it because I wasn't aware how much my apps were actually using.
    I turned off 3G when I was out of the house and only connected with wireless.
    What it came down to was me using the app Instagram which is a photo sharing app. Every time the app refreshed it downloaded photos which was using up all my data. I stopped accessing Instagram through 3G and the problem was fixed. Now I go back on 3G a little and check my mail, use whatsapp, Facebook and find I stay well within my limit, in fact I hardly use anything at all now.
    I honestly didn't realise how much I used 3G every day until I had to think about it. I wouldn't have thought your apps should be using so much data when you're not using them. Think about what apps you are using though, especially if it's anything to do with photos or downloading a lot of info.

  • Help with DisplayPort to HDMI display settings

    I am using a 50" Sony LCD TV with Mac Mini via DisportPort to HDMI adaptor. I am getting parts of the Dock and none of the top menu bar, why? The only setting that looks right is setting the display output to 1080x720 (overscan on). Any other settings will not fit the screen and crops both top & sides. Here are the TV specs. What am I doing wrong?
    Sony's Description
    Compared to enhanced definition televisions and other technologies, the Grand WEGA TVs deliver natural color reproduction and exceptional brightness levels due to 3LCD technology with *1280 x 720 native 720p resolution*.

    The only time I can choose a PC setting is if I plug it in the VGA port. The problem with that is that it will not fill the screen no matter what combination of TV, and Mac OS X settings & that's why I am using a DVI to HDMI cable. Video looks pretty good, but text looks horrible.
    What can I do to improve the look of text so when I browse safari I can actuallly read it. Right now all text on any white background looks like there is a RGB blur filter. Text on grey (like on system preferences), look like there is a blue & emboss filter. Is it possible to get my mac mini look incredible the way it would look if I hooked it up to a regular apple monitor using HDMI or is that just impossible? Video looks pretty good as I said so it's not bad for watching podcasts or Hulu, but it looks horrible when I want to Surf, and I don't know if my expectation to replicate what I see on an apple monitor is doable via HDMI with my 2006 Sony Bravia.

  • Help with Spry Detail Regions, XML Data Sets, for IMG gallery

    Hello,
    I'm working on a site for a friend of mine, a photo gallery. You can see the gallery here, it's a temporary one I'm working on
    http://www.emiliajozefa.com/a_index.html
    Here are some important parts of my code:
    //initially load these data sets. the function will be called by the links to update components later<script type="text/javascript">
         var intNumPhoto = 0;
         dsGallery = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride/photo");
         dsNav = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride");
         function updateSpryComponents(galleryDir){
              alert("updating spry components for " + galleryDir);
              intNumPhoto = 0;
              dsGallery = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir + "/photo");
              dsNav = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir);
              dsGallery.setCurrentRow(intNumPhoto);
              //document.getElementById('nav').innerHTML='<H1>'+enlarge.inp.value+'</H1>';
              document.getElementById('nav').innerHTML=
              "<span spry:detailregion = 'dsGallery'>
             <a href = 'javascript:' onclick = 'if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);'>&lt;</a> {@id} / </span>
             <span spry:detailregion = 'dsNav'>{@numPhotos}
             <a href = 'javascript:' onclick = 'if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);'>&gt;</a>
             </span>";
    </script> <--- later ----><!-- SIDEBAR NAV. When link i clicked, set DataSet to the location of the new gallery -->
         <div id = "sideBarNav">
             <a href = "javascript:" onclick ='updateSpryComponents('ride');">Tannersville</a>
                <br />
              <a href = "javascript:" onclick = "updateSpryComponents('dive');">Dive</a>
            <br />
              <a href = "javascript:" onclick = "updateSpryComponents('poland');">Poland</a>
            <br />
              <a href = "javascript:" onclick = "updateSpryComponents('alaska');">Alaska</a>
        </div>
    </div>
    <div id = "content2">
         <!-- PHOTO CONTAINER I think I somehow need to refresh this section of the code to reload new data-->
         <div id = "fotoContainer" spry:detailregion="dsGallery"><img src = "photos/{@path}" width = "{@width}" height = "{@height}"/></div>
         <!-- IMAGE NAVIGATION -->
         <div id = "nav">       
             <span spry:detailregion = "dsGallery" id = "galSpan">
             <a href = "javascript:" onclick = "if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);">&lt;</a> {@id} / </span>
             <span spry:detailregion = "dsNav" id = "navSpan">{@numPhotos}
             <a href = "javascript:" onclick = "if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);">&gt;</a>
             </span>
         </div>
    You could view source there to get the code. Here is what I believe is my problem
    I'm trying to automate the site so that when you click on one of the links on the left, without refreshing the page, the paths to the galleries xml file changes, and the spry Detail Regions (1 for the images, 1 for the navigation - left and right arrows). I think the problem is that once the link changes the set and calls my updateSpryComponenets() function, the detail regions need to be refreshed. I'm currently trying to solve this by dynamically rewriting the HTML thru .innterHTML, everytime I call updateSpryComponents().There may also be a problem in the Javascript function updateSpryControllers because if I put the alert after the spry calls, I never get the alert
    Thanks in advance for any help!

    Update:
    Ok, the first query on the Recent tab doesnt work for me because it wont show unless its already voted, and since these are supposed to be new blurts, that kind of breaks the whole site:
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC";
    So I replaced it with what I originally had.
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt ORDER BY Blurt.`Date` DESC";
    But this doesn't provide me with the initial average rating:(

Maybe you are looking for

  • Integrating CFMX and Netsuite webservices

    Started a new thread since this has moved on from the original discussion here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=7&threadid=1131981&CFID =11118706&CFTOKEN=25dbff123c24b709-419805A4-9295-C039-52E183060903DD0F&jsession

  • I need help to solve the following problem

    EMPLOYEES with coulmns employee_id number, first_name varchar2(50), last_name varchar2(50), salary number, deptno number, manager number, date_of_join date, date_of_birth date. DEPARTMENT with columns deptno number, dept_name varchar2(100),location v

  • N97 unlocking keypad freezes

    Hey Just wondering if anyone has a similar problem with their N97. When I go to unlock my keypad with the slide device on the site my phone will often completely freeze up and I will have to remove the battery. This has become rather annoying now. Do

  • BAPI  for Order BOM

    Hi All, Is there any BAPI for Order BOM PLS can you help me thanks mars

  • Getting Error Message using Formatted Search

    Hi, I am using formatted search for validating a particular field, and that happens fine.  Kindly let me know if I can also display error messages using the same formatted search. If yes, what am I to include in the formatted search, and if No, pleas