Adding to RAF

Hello,
can anyone help me by modifying this method so that it simply writes something into a random access file?
public static void addingtoRAF() {
        UsernameRAF = Username.getText();
        System.out.println(UsernameRAF);
        try {
            RandomAccessFile raf = new RandomAccessFile("C:/Users/mkniebecker/Documents/Microsoft Office 2007/Computer Science HL/Java Projects/Java Projects/NewDossier/Usernamefornextframe.max", "rw");
             Writer out = new OutputStreamWriter ( new FileOutputStream ( raf.getFD (  )  ) , "" ) ;
             out.write (UsernameRAF) ;
             out.flush (  ) ; //flush the stream before seeking to a new position
            raf.close (  ) ;
        catch (Exception err) {
        System.out.println("ERROR: FKOFF " + err);
        }thanks,
max

can anyone help me by modifying this method so that it simply writes something into a random access file?It already does that.
RandomAccessFile raf = new RandomAccessFile("C:/Users/mkniebecker/Documents/Microsoft Office 2007/Computer Science HL/Java Projects/Java Projects/NewDossier/Usernamefornextframe.max", "rw");Here you are opening the file for 'rw'.
Writer out = new OutputStreamWriter ( new FileOutputStream ( raf.getFD ( ) ) , "" ) ;Here you are doing something completely and utterly pointless and opening a FileOutputStream with the same FD as the RandomAccessFile, with the important side-effect that the file will be deleted and re-created. If you leave this line of code out and write with 'raf' you will get what you probably want, which is to write into the existing file, although almost certainly at the wrong place. However as you haven't actually defined your problem it is impossible to say with certaintly.

Similar Messages

  • How to import RAF format raw photos taken by Fujifilm X-T1 to Lightroom 4.4? RAF raw files cannot be recognised by Lightroom 4.4

    Fujifilm X-T1 is on the list of cameras with RAW file format supported by Lightroom, but I fail to import the RAF raw format photos taken by Fujifilm X-T1 to Lightroom 4.4 with the error message "Lightroom can't process the RAW files".  Is there a way to fix it?

    Fujifilm X-T1 is on the list of cameras with RAW file format supported by Lightroom,
    It is but Raw support varies depending on the version of Lightroom. Newer versions have more Camera Raw support than older versions.
    The column on the right hand side says "Minimum Lightroom version required" for the Fuji X-T1 is 5.4.
    Camera Raw plug-in | Supported cameras
    Raw support is never added to older versions of LR retrospectively so Lightroom 4.4 will never be able to read X-T1 Raw files.
    Your choices:
    Pay to upgrade to Lightroom 5, or
    Download the free Adobe DNG converter, convert all X-T1 Raw files to DNG format then edit the DNGs in Lightroom 4.4
    Photoshop Help | Digital Negative (DNG)

  • When will Lightroom enable importing RAF files from Fuji X100T?

    Just got my new X100T but Lightroom 5.6 does not yet enable importing RAF files. When will this be available?

    You might want to read this, Anne:
    Why doesn’t my version of Photoshop or Lightroom support my camera?
    Especially this part:
    "Finally, if your camera came out within the past 90 days, be patient, as you may need to wait for the new camera support. Adobe goes through a rigorous process of adding support for and testing of each new camera raw format. Adobe generally releases updates of the Adobe Camera Raw plug-in and Lightroom to provide new camera support about once a quarter, or about every 90 days. Feel free to drop us request or vote for specific camera support on our Feedback Site."
    There's no secret about this situation - it's a Frequently Asked Question...

  • Error while adding A/P Credit Memo!

    Error while adding A/P Credit Memo..........
    'G/L Accounts' (OACT) (ODBC-2028) Message - 131-183
    Please advice me .....
    Thanks...

    Hi
    Check this thread this may help you.
    [Re: AP Invoice - No Matching Account Error]
    Regards
    Balaji

  • Added new field to cube but data not passed from DSO

    Hope someone can help.
    (BI 7.0) We added new fields into a cube. The fields already existed in the DSO. When we ran the process chain in development for the first time after making this change, we notice that the 'historical' data for these fields is populated in the cube. When we do this in our quality system only new data passed to the cube is updated. In development in the sub-chain DTP request we see all previous requests listed under selections. In quality it is only the latest request. The only difference is that the DeltaInit flag in the DTP request in development is ticked (extraction mode) - but not in quality. Does anyone know whyb this is?

    hi peter,
    Adding fields to cube doesn't affect delta status...The delta DTP should be able to handle delta requests automatically.
    I guess in you quality system, the cube already got all requests updated from ODS before you importing the change request. And in develop system none of the requests in ODS were updated before the change.
    Regards,
    Frank

  • Adding data mid-month?

    HI, i recently just switched to verizon and so far i have loved it. But now im running into an issue and itseems almost impossible to get ahold of anyone via phone for support so im going to try this way.
    I am mid way through my month and i have ran out of data. I want to add more to my account so my phone will have internet again. How do i do this? I have added more data packages but that hasnt solved the issue, i still have no internet. I use my phone for work alot and need to have internet the remainder of the month. Can someone please tell me how to go about getting internet on my phone until my plan renews in two weeks.
    THank you for any help!

        huss9,
    I am happy to hear that you are loving the service. Welcome to the Verizon Wireless family. But let's get to work on the issue at hand today. With the iPhone can you please go into Settings, General, Scroll to the bottom and tap on Reset, then do reset network settings. This will not delete any of your personal information. All of your pictures, contacts, apps, and music will still be on the phone. Then re-try the network out. Please keep us posted.
    KevinR_VZW
    Please follow us on Twitter @VZWSupport

  • When adding folders to iTunes 11, they don't show up in the library.  On one folder add, it created a playlist (not what I wanted).  On the second folder, it shows nothing.  Never seen this before.  Advice?

    I added my first folder of MP3s and it created a playlist, but didn't show up in the library.  When adding a second folder, it didn't show up anywhere.  I can do a search for them in the search window, and it finds/plays them, but I want to be able to browse them in my library.  These are not MP3s downloaded from iTunes, but are personal files located on my hard drive.  Can anyone help?

    I have a Dell that's running Windows XP. I have found that itunes is very temperamental. this works most of the time... except on my son's computer that's running Windows Vista.
    Go to your library in iTunes. Then go up to file and try one of the options (import, add folder to library, or add file to library).
    Adding a folder is the least work. You can add all the files from a folder with one click... if it works. Remember that itunes is temperamental.
    If that doesn't work, try adding a file. The problem with that is that you have to go through the whole process for each and every file (song, movie, etc).
    Sometimes the only thing that works is to import.
    I haven't gotten iTunes to work on my son's computer (Windows Vista).
    I can't get support from apple in any way at all! They are good about creating electronics that appeal to us But they are lousy at support. If anyone figures out how to access support (where you can actually contact Apple) please let me know ([email protected]). I've been trying for 6 months.

  • Adding New Data To Same Page - HELP

    I am trying to put together a invoice on the fly, the products are added to the invoice by selecting the disired product from a drop down menu and hitting the add button. You SHOULD then be able to select more products from the same drop down menu and htting add again will include it in the invoice.... simple?? Well the problem i have is that when i hit the add button to add another item it just replaces the one i have already added.... this is very annoying... i cannot think of a way to take the product data through the form submission ready for adding too.
    Any Ideas this is really bugging me, and the more time i spend on it, the worse its getting. Code Below
    <%@ page buffer="32kb" %>
    <%@ page import="java.sql.*, javax.servlet.ServletException, java.io.IOException, com.stock_control.*" %>
    <%!
    String convertResultsToSelect ( ResultSet rs, String selectName, String idCol, String descCol ) throws SQLException
    StringBuffer sb = new StringBuffer ( "<select name=" + selectName +">" );
    if (rs != null) {
    while (rs.next()) {
              sb.append ( "<option value=" );
    sb.append ( rs.getString(idCol) );
    sb.append ( ">" );
    sb.append ( rs.getString(descCol) );
    sb.append ( "</option>" );
    sb.append ( "</select>" );
    return sb.toString ();
    %>
    <html>
    <head>
    <title>Members Area - Stock Check</title>
    </head>
    <body bgcolor="#CCCCCC" topmargin="0">
    <%@ include file="topConn.jsp" %>
    <%
              String msg = "";
              String name = "";
              String address1 = "";
              String address2 = "";
              String town ="";
              String postcode = "";
              String country = "";
              String phone = "";
              String mail = "";
              String comments = "";
              float total = 0;
              int nextFree = 0;
              String prodResults;
              int numberOfItems = 0;
         String shop = (String)session.getValue("SHOP");
         String selectProd = "SELECT ProductID, ProductName FROM product WHERE ShopID=";
         rs1 = stmt.executeQuery(selectProd+shop);
         prodResults = convertResultsToSelect( rs1, "product","ProductID","ProductName");
         rs = stmt.executeQuery("SELECT COUNT(*) AS stockLevel FROM product WHERE ShopID ="+shop);     
    while(rs.next())
         numberOfItems = rs.getInt("stockLevel");
         Product[] products = new Product[numberOfItems];
    if (request.getParameter("add")!=null)
              // get values from all text boxes....
              name = request.getParameter("name");
              address1 = request.getParameter("address1");
              address2 = request.getParameter("address2");
              town = request.getParameter("town");
              postcode = request.getParameter("postcode");
              country = request.getParameter("country");
              phone = request.getParameter("phone");
              mail = request.getParameter("mail");
              comments = request.getParameter("comments");
                   // add data from dropdown
              String newProduct = request.getParameter("product");
              //connect to database and put product data into array + increment
                   int thenewid = 0;
                   String theName = "";
                   float thePrice = 0;
                   String nono = "0";
              String getProd = "SELECT * FROM product WHERE ProductID=";
              rs = stmt.executeQuery(getProd+newProduct);
              if(rs.next())
                   thenewid = Integer.parseInt(newProduct);
                   theName = rs.getString("ProductName");
                   thePrice = rs.getFloat("SalePrice");
                   Product addProduct = new Product(thenewid, theName, thePrice, nono);
                   products[nextFree] = addProduct; //PROBLEM
                   nextFree++;
    // reload page with new data in form
    //for loop arround array     
    %>
    <form method="GET">
    <div align=center>
    <p>
    <%=prodResults%>
    <input type="submit" value="Add" name="add"></p>
    <TABLE width=100% height="1">
    <TBODY>
    <tr>
    <td width="4%" height="19"> </td>
    <td width="96%" height="19"> 
    </td>
    </tr>
    <tr>
    <td width="4%" height="198"> </td>
    <td width="96%" height="198">
    <div align="center"></div>
    <table border="0" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
    <tr>
    <td width="4%"> </td>
    <td width="15%"><font face="Verdana" size="2">Customer Name</font></td>
    <td width="30%"><input type="text" name="name" size="30" value="<%=name%>"></td>
    <td width="19%"><font face="Verdana" size="2">Customer Phone #</font></td>
    <td width="26%"><input name="phone" type="text" size="30" value="<%=phone%>"></td>
    <td width="6%"> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font face="Verdana" size="2">Address Line 1</font></td>
    <td><input type="text" name="address1" size="40" value="<%=address1%>"></td>
    <td><font face="Verdana" size="2">Customer E-mail</font></td>
    <td><input name="mail" type="text" size="30" value="<%=mail%>"></td>
    <td> </td>
    </tr>
    <tr>
    <td height="32"> </td>
    <td><font face="Verdana" size="2">Address Line 2</font></td>
    <td> </td>
    <td><font face="Verdana" size="2">Comments</font></td>
    <td width="26%" rowspan="5"><p>
    <textarea name="comments" cols="29" rows="5"><%=comments%></textarea>
    </p>
    <p>  </p></td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Town/City</font></td>
    <td><input name="town" type="text" size="40" value="<%=town%>">
    <input name="address2" type="text" size="40" value="<%=address2%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Post Code</font></td>
    <td><input type="text" name="postcode" size="10" value="<%=postcode%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td> </td>
    <td><font size="2" face="Verdana">Country</font></td>
    <td><input type="text" name="country" size="40" value="<%=country%>"></td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="24"> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    <td> </td>
    </tr>
    <tr>
    <td height="23"> </td>
    <td><strong><font size="2" face="Verdana">Product Code</font></strong></td>
    <td><strong><font size="2" face="Verdana">Name</font></strong></td>
    <td><strong><font size="2" face="Verdana">Price</font></strong></td>
    <td> </td>
    <td> </td>
    </tr>
    <%
    if (request.getParameter("add")!=null)
    for(int i=0; i<nextFree; i++)
    Product temp = products;
    int prodID = temp.getid();
    String prodName = temp.getname();
    float prodPrice = temp.getprice();
    total = total + prodPrice;
    // work out total on the fly
    %>
    <tr>
    <td height="23"> </td>
    <td> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodID%> </font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=prodName%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">&pound;<%=prodPrice%></font></td>
    <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td> </td>
    </tr>
    <%
    %>
    <tr>
    <td width="4%" height="23"> </td>
    <td width="15%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="30%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
    <td width="19%"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total:</font></strong></td>
    <td width="26%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><%=total%></font></td>
    <td width="6%"> </td>
    </tr>
    </table>
    <p align="center">
    <input type="submit" value="Continue" name="continue">
              </form>
    </p>
    </td> </tr> </TBODY></table>
    <%@ include file="bottomConn.jsp" %>
    </body>
    </html>

    anyone?

  • HT1423 I am adding more memory, should I replace the top two slots with the 4g memory modules, then place 2g memory modules on bottom slots. Does it even matter?

    I am adding more memory, should I replace the top two slots with the 4g memory modules, then place 2g memory modules on bottom slots. Does it even matter?

    I am adding more memory, should I replace the top two slots with the 4g memory modules, then place 2g memory modules on bottom slots. Does it even matter?

  • Get All Values From NewForm.aspx using Event Receiver Item Adding

    HI All,
             I have conditions to check before the insertion of "Calendar Event".For this I am using Item Adding Event Receiver ,When Click on Save button I need to get all the values of Items filled in NewForm.aspx and check
    the condition,If condition satisfies make them insert else show alert info  as"Not Valid",Below is code and error message
    public override void ItemAdding(SPItemEventProperties properties)
                base.ItemAdding(properties);
               string StartTime = properties.AfterProperties["Start Time"].ToString();
               string EndTime = properties.AfterProperties["End Time"].ToString();
    Error
    Object reference not set to an instance of an object.
    Use the New "Keyword to create an object instance
    Can any one help me how can I do it.
    Thanks,
    Quality Communication Provides
    Quality Work.
    http://siddiq-sharepoint2010.blogspot.in/
    Siddiqali Mohammad .

    Hi,
          Have you tried with the code snippet as mentioned below
    string EndDate = Convert.ToString(properties.AfterProperties["EndDate"]);
    string StartDate = Convert.ToString(properties.AfterProperties["EventDate"]);
    If my post is helpful - please click on the green arrow to mark it as answer

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Not Able to Generate Out of the Report by adding the new 2 fields

    Hi,
    I'm Very new to ABAP. I have created one report. after 2 new fields added they are EKNAM and EKGRP.
    The Thing is the remaining fields are displaying in the output. The Newly added fields are not displaying the out. I was able to add this 2 fields in the head of the report. But issue is not able to get the data on these 2 fields.
    Please see the below program and any one please help me out to display the data in this report for the fields eknam and ekgrp.
    TABLES: eban,
            lfa1,
            ekko,
            t024,
            v_username.
    DATA: BEGIN OF i_req_items OCCURS 10,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            ebeln LIKE eban-ebeln,         "PO Number
            ebelp LIKE eban-ebelp,         "PO Item
            eknam LIKE t024-eknam,         "Pur.Grp Name
            ekgrp LIKE t024-ekgrp,         "Pur.Grp Number
            flief LIKE eban-flief,         "Fixed vendor
            name1 LIKE lfa1-name1,         "Vendor name
            badat LIKE eban-badat,         "Creation date
            erdat LIKE eban-erdat,         "Change date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            bsart LIKE eban-bsart,         "Document type
            knttp LIKE eban-knttp,         "Acct.assgmt category
            txz01 LIKE eban-txz01,         "PO item description
            menge LIKE eban-menge,         "Quantity
            preis LIKE eban-preis,         "Price
            peinh LIKE eban-peinh,         "Price unit
            value(14) TYPE p DECIMALS 2,   "Item Value
          END OF i_req_items.
    DATA: BEGIN OF i_reqs OCCURS 10,
            ernam LIKE eban-ernam,         "Created by
            persn LIKE usr21-persnumber,   "Person number
            uname LIKE adrp-name_text,     "User name
            lifnr LIKE eban-lifnr,         "Vendor
            name1 LIKE lfa1-name1,         "Vendor name
            badat LIKE eban-badat,         "Creation date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            bsart LIKE eban-bsart,         "Document type
            knttp LIKE eban-knttp,         "Acct.assgmt category
            txz01 LIKE eban-txz01,         "PO item description
            eknam like t024-eknam,         "Purchase Grp Name
            ekgrp like t024-ekgrp,         "Purchase Grp Number
            value(14) TYPE p DECIMALS 2,   "Item Value
          END OF i_reqs.
    DATA: BEGIN OF i_req_keys OCCURS 0,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            erdat LIKE eban-erdat,         "Create or Change date
            banfn LIKE eban-banfn,         "Requisition no.
            bnfpo LIKE eban-bnfpo,         "Req. item no.
            eknam like t024-eknam,         "Purchase Grp Name
            ekgrp like t024-ekgrp,         "Purchase Grp number
          END OF i_req_keys.
    DATA: BEGIN OF i_req_keeper OCCURS 0,
            ernam LIKE eban-ernam,         "Created by
            lifnr LIKE eban-lifnr,         "Desired vendor
            banfn LIKE eban-banfn,         "Requisition no
          END OF i_req_keeper.
    DATA: wa_reqitems LIKE i_req_items.
    DATA: BEGIN OF i_export OCCURS 10,
           record(150) TYPE c,
          END OF i_export.
    CONSTANTS
    CONSTANTS:
          c_doccat       LIKE eban-bstyp  VALUE 'B',
          c_creind       LIKE eban-estkz  VALUE 'R',
          c_delflag      LIKE eban-loekz  VALUE 'L',
          c_write(5)     TYPE c   VALUE 'WRITE',
          c_slash(1)     TYPE c   VALUE '/',
    *start ESPZC U8DK900439
         c_delimiter    TYPE x   VALUE '09',
           c_delimiter    TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    *end ESPZC U8DK900439
          c_sc(1)        TYPE c   VALUE ';',
          c_x(1)         TYPE c   VALUE 'X',
          c_usd(1)       TYPE c   VALUE '2',
          c_export LIKE authb-filename VALUE '/BAY2/UBEM_SPLIT_REQS'.
    WORKING VARIABLES
    DATA: w_report_id   LIKE syst-repid,
          w_sttime      LIKE syst-uzeit,
          w_rpt_pagno   LIKE syst-pagno,
          w_rc          LIKE sy-subrc,
          w_datelow     LIKE eban-badat,
          w_datehigh    LIKE eban-badat,
          w_export      LIKE c_export,
          w_records     TYPE i,
          w_message(50) TYPE c.
    TYPES number TYPE i.
    SELECTION SCREEN / PARAMETERS
    SELECTION-SCREEN BEGIN OF BLOCK org WITH FRAME TITLE text-001.
    PARAMETERS: p_purorg LIKE eban-ekorg OBLIGATORY DEFAULT 'US02'.
    SELECT-OPTIONS: s_doctyp FOR eban-bsart,
                    s_date FOR eban-badat.
    PARAMETERS: p_timper(2) TYPE n.
    SELECTION-SCREEN: COMMENT 37(37) text-002.
    SELECTION-SCREEN END OF BLOCK org.
    SELECTION-SCREEN BEGIN OF BLOCK outp WITH FRAME TITLE text-003.
    PARAMETERS: p_onlin  RADIOBUTTON GROUP outp DEFAULT 'X',
                p_servr  RADIOBUTTON GROUP outp.
    SELECTION-SCREEN END OF BLOCK outp.
    AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      IF p_servr = c_x.
        CLEAR w_rc.
        PERFORM authority_check_dataset USING    w_export
                                        CHANGING w_rc.
        IF w_rc <> 0.
          MESSAGE e532 WITH text-006 w_export.
        ENDIF.
        CLEAR w_rc.
        PERFORM verify_unix_path_and_file CHANGING w_rc.
        IF w_rc <> 0.
          MESSAGE e531 WITH w_message.
        ENDIF.
      ENDIF.
      INITIALIZATION EVENT
    INITIALIZATION.
      PERFORM get_filename.
      MOVE  syst-uzeit  TO   w_sttime.
      MOVE  syst-repid  TO   w_report_id.
      CLEAR: w_rpt_pagno.
    START-OF-SELECTION.
      PERFORM get_data.
      IF p_onlin = c_x.
        IF w_records GT 0.
          PERFORM print_report_header.
          PERFORM write_report.
        ELSE.
          MESSAGE i531 WITH text-007.
        ENDIF.
      ELSEIF p_servr = c_x.
        PERFORM write_export.
      ENDIF.
    END-OF-SELECTION.
    ---- F O R M   R O U T I N E S -
    *&     FORM get_filename
    FORM get_filename.
      CALL FUNCTION 'FILE_GET_NAME'
        EXPORTING
          logical_filename = c_export
        IMPORTING
          file_name        = w_export
        EXCEPTIONS
          file_not_found   = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " get_filename
      FORM authority_check_dataset
    FORM authority_check_dataset USING    p_filename
                                 CHANGING p_rc.
      CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
        EXPORTING
          activity         = c_write
          filename         = p_filename
        EXCEPTIONS
          no_authority     = 1
          activity_unknown = 2
          OTHERS           = 3.
      p_rc = sy-subrc.
    ENDFORM.                    "authority_check_dataset
        FORM verify_unix_path_and_file
    FORM verify_unix_path_and_file CHANGING p_rc.
    *start ESPZC U8DK900439
    OPEN DATASET w_export FOR OUTPUT IN TEXT MODE
         MESSAGE w_message.
      OPEN DATASET w_export FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
          MESSAGE w_message.
    *end ESPZC U8DK900439
      p_rc = sy-subrc.
    ENDFORM.                    "verify_unix_path_and_file
      FORM get_data
    FORM get_data.
      CLEAR w_datelow.
      CLEAR w_datehigh.
      w_datelow = s_date-low - p_timper.
    w_datehigh = s_date-high + p_timper.
      w_datehigh = s_date-high.
      SELECT ernam lifnr ebeln ebelp flief badat erdat banfn bnfpo bsart
            knttp menge preis peinh txz01
       FROM eban
       INTO CORRESPONDING FIELDS OF TABLE i_req_items
          WHERE bstyp = c_doccat
            AND estkz = c_creind
            AND knttp <> space
            AND bsart IN s_doctyp
            AND loekz <> c_delflag
            AND ekorg EQ p_purorg
           AND ( ( badat BETWEEN w_datelow and w_datehigh ) OR
            ( erdat BETWEEN w_datelow AND w_datehigh ) ).
            AND  erdat BETWEEN w_datelow AND w_datehigh.
      IF sy-subrc = 0.
        LOOP AT i_req_items.
          IF i_req_items-lifnr IS INITIAL.
            IF NOT i_req_items-flief IS INITIAL.
              MOVE i_req_items-flief TO i_req_items-lifnr.
              MODIFY i_req_items.
            ENDIF.
            IF NOT i_req_items-ebeln IS INITIAL.
              SELECT lifnr FROM ekko
                  INTO i_req_items-lifnr
                  WHERE ebeln = i_req_items-ebeln.
              ENDSELECT.
              MODIFY i_req_items.
            ENDIF.
          ENDIF.
          IF i_req_items-erdat GT i_req_items-badat.
            MOVE i_req_items-erdat TO i_req_items-badat.
            MODIFY i_req_items.
          ENDIF.
        ENDLOOP.
        PERFORM weed_out_unique_records.
        PERFORM apply_time_period.
        SORT i_req_items BY ernam lifnr banfn bnfpo.
        LOOP AT i_req_items.
          i_req_items-value = ( i_req_items-menge *
               ( i_req_items-preis / i_req_items-peinh ) ).
          MODIFY i_req_items.
        ENDLOOP.
    Getting vendor name from table LFA1 -
        CLEAR i_req_items.
        LOOP AT i_req_items.
          SELECT SINGLE name1 FROM lfa1
            INTO i_req_items-name1
              WHERE lifnr = i_req_items-lifnr.
          MODIFY i_req_items.
        ENDLOOP.
        LOOP AT i_req_items.
          MOVE-CORRESPONDING i_req_items TO i_reqs.
    Getting user name from view v_username -
          SELECT SINGLE name_text
           FROM v_username INTO i_reqs-uname
          WHERE bname = i_reqs-ernam.
          APPEND i_reqs.
        ENDLOOP.
      ENDIF.
      DESCRIBE TABLE i_reqs LINES w_records.
    ENDFORM.                        "Get_data
      FORM print_report_header
    FORM print_report_header.
      ADD  1   TO   w_rpt_pagno.
      CALL FUNCTION '/BAY2/UBEXBH_BAYER_HEADR_FUN'
        EXPORTING
          f_jobname        = text-020
          f_business_group = text-021
          f_report_title   = text-022
          f_repid          = w_report_id
          f_sysid          = syst-sysid
          f_linsz          = syst-linsz
          f_pagno          = w_rpt_pagno
          f_mandt          = syst-mandt
          f_datum          = syst-datum
          f_uzeit          = w_sttime.
      FORMAT COLOR COL_HEADING.
      WRITE:  /1     text-010,      "Created by CWID & user name
              29     text-011,      "Vendor #
              38     text-012,      "Vendor Name
              69     text-013,      "Req Number
              79     text-014,      "/Item
              87     text-015,      "Created On
              98     text-017,      "A (AcctAssgmtCat)
             100(14) text-019 RIGHT-JUSTIFIED,  "Item Value
             116(30) text-018,      "Item Description
             148     text-030,      "Pur.Grp Name
             170     text-031.      "Pur.Grp Number
      FORMAT COLOR OFF.
      ULINE.
    ENDFORM.                             "print_report_header
    *&      Form  WRITE_REPORT
    FORM write_report.
      LOOP AT i_reqs.
        WRITE: /1 i_reqs-ernam,
                9(18) i_reqs-uname,
               29 i_reqs-lifnr,
               38(30) i_reqs-name1,
               69 i_reqs-banfn,
               79 c_slash,
               80 i_reqs-bnfpo,
               87 i_reqs-badat,
               98 i_reqs-knttp,
              100(14) i_reqs-value CURRENCY c_usd,
              116(30) i_reqs-txz01,
              145 i_reqs-eknam,
              160 i_reqs-ekgrp.
      ENDLOOP.
    ENDFORM.                    "write_report
    *&      Form  WRITE_EXPORT
    FORM write_export.
      DATA: l_value(14)    TYPE c,
            l_bsart(100)   TYPE c,
            l_uname(7)     TYPE c,
            l_records(5)   TYPE c,
            l_header(150)  TYPE c,
            l_params(150)  TYPE c,
            i_char         TYPE i.
      LOOP AT i_reqs.
        CLEAR l_value.
        CLEAR l_uname.
        l_value = i_reqs-value.
        l_uname = sy-uname.
        CONCATENATE: i_reqs-uname
                     i_reqs-ernam
                     i_reqs-lifnr
                     i_reqs-name1
                     i_reqs-banfn
                     i_reqs-bnfpo
                     i_reqs-badat
                     i_reqs-knttp
                     l_value
                     i_reqs-txz01 INTO i_export
                                  SEPARATED BY c_delimiter.
        APPEND i_export.
      ENDLOOP.
      CONCATENATE: text-008   "Created By Name
                   text-009   "CWID
                   text-011   "Vendor No
                   text-012   "Vendor Name
                   text-013   "Req Number
                   text-023   "Item
                   text-015   "Created On
                   text-017   "A
                   text-019   "Item Value
                   text-018   "Item Description
                   text-030   "Purchase Grp name
                   text-031   "Purchase Grp number
                   INTO l_header SEPARATED BY c_delimiter.
      INSERT l_header INTO i_export INDEX 1.
      IF sy-batch IS INITIAL.
        MOVE sy-uname TO l_uname.
      ELSE.
        MOVE text-024 TO l_uname.
      ENDIF.
      PERFORM collect_bsart CHANGING l_bsart
                                     i_char.
      l_records = w_records.
      CONCATENATE: sy-sysid
                   p_purorg
                   l_bsart(i_char)
                   s_date-low
                   s_date-high
                   p_timper
                   l_uname
                   sy-datum
                   l_records INTO l_params
                             SEPARATED BY c_delimiter.
      INSERT l_params INTO i_export INDEX 1.
      LOOP AT i_export.
        CONDENSE i_export NO-GAPS.
        TRANSFER i_export TO w_export.
      ENDLOOP.
      CLOSE DATASET w_export.
      MESSAGE s533 WITH text-028 w_export text-029.
    ENDFORM.                    "write_export
    *&      FORM collect_bsart
    FORM collect_bsart CHANGING p_bsart
                                p_char.
      CLEAR p_bsart.
      LOOP AT s_doctyp.
        IF sy-tabix = 1.
          p_bsart = s_doctyp-low.
        ELSE.
          CONCATENATE: p_bsart c_sc s_doctyp-low INTO p_bsart.
        ENDIF.
      ENDLOOP.
      CONDENSE p_bsart NO-GAPS.
      p_char = strlen( p_bsart ).
    ENDFORM.                      "collect_bsart
    *&      Form  WEED_OUT_UNIQUE_RECORDS
    FORM weed_out_unique_records.
      DATA: i_l_req_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
      DATA: i_l_req_final_items LIKE i_req_items OCCURS 0 WITH HEADER LINE.
      DATA: l_count TYPE i,
            l_sy_tabix LIKE sy-tabix,
            l_banfn    LIKE eban-banfn.
      REFRESH i_l_req_items.
      REFRESH i_l_req_final_items.
      CLEAR l_banfn.
      i_l_req_items[]       = i_req_items[].
      i_l_req_final_items[] = i_req_items[].
      SORT i_req_items         BY ernam lifnr.
      SORT i_l_req_items       BY ernam lifnr.
      SORT i_l_req_final_items BY ernam lifnr.
      LOOP AT i_l_req_items.
        l_banfn = i_l_req_items-banfn.
        CLEAR l_count.
        LOOP AT i_req_items
            WHERE ernam = i_l_req_items-ernam
              AND lifnr = i_l_req_items-lifnr.
          IF i_req_items-banfn <> l_banfn.
            ADD +1 TO l_count.
          ENDIF.
        ENDLOOP.
        IF NOT ( l_count > 0 ).
          LOOP AT i_l_req_final_items
            WHERE ernam = i_l_req_items-ernam
              AND lifnr = i_l_req_items-lifnr.
            DELETE i_l_req_final_items.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
      REFRESH i_req_items.
      i_req_items[] = i_l_req_final_items[].
    ENDFORM.                    " WEED_OUT_UNIQUE_RECORDS
    *&      Form  APPLY_TIME_PERIOD
    FORM apply_time_period.
      DATA: l_i_req_keys LIKE i_req_keys.
      DATA: l_days_diff          TYPE p,
            l_no_of_key_recs     TYPE i,
            l_next_item          LIKE sy-tabix,
            l_finished_with_keys TYPE c VALUE 'N',
            l_add_line           TYPE c VALUE 'N',
            l_count              TYPE i,
            l_req_ernam          LIKE eban-ernam,
            l_req_lifnr          LIKE lfa1-lifnr,
            l_req_banfn          LIKE eban-banfn,
            l_save_tabix         like sy-tabix.
      REFRESH: i_req_keys, i_req_keeper.
      LOOP AT i_req_items.
        MOVE-CORRESPONDING i_req_items TO
                           i_req_keys.
        IF i_req_items-erdat IS INITIAL.
          i_req_keys-erdat = i_req_items-badat.
        ENDIF.
        APPEND i_req_keys.
      ENDLOOP.
      SORT i_req_keys BY ernam lifnr erdat.
      CLEAR l_no_of_key_recs.
      DESCRIBE TABLE i_req_keys LINES l_no_of_key_recs.
      LOOP AT i_req_keys.
        IF l_add_line = 'Y'.
          MOVE-CORRESPONDING i_req_keys
                          TO i_req_keeper.
          APPEND i_req_keeper.
          l_add_line = 'N'.
        ENDIF.
        IF l_finished_with_keys = 'Y'.
          EXIT.
        ENDIF.
        CLEAR l_next_item.
        l_save_tabix = sy-tabix.
        COMPUTE l_next_item = sy-tabix + 1.
        IF l_next_item = l_no_of_key_recs.
          l_finished_with_keys = 'Y'.
        ENDIF.
        clear: l_i_req_keys.
        READ TABLE i_req_keys INDEX l_next_item
            INTO l_i_req_keys.
        sy-tabix = l_save_tabix.
        CLEAR l_days_diff.
        l_days_diff = l_i_req_keys-erdat -
                      i_req_keys-erdat.
        IF l_i_req_keys-ernam  =
           i_req_keys-ernam                  AND
           l_i_req_keys-lifnr  =
           i_req_keys-lifnr                  AND
           l_i_req_keys-banfn  <>
           i_req_keys-banfn                  AND
           l_days_diff         <= p_timper.
          MOVE-CORRESPONDING i_req_keys
                          TO i_req_keeper.
          APPEND i_req_keeper.
          l_add_line = 'Y'.
        ENDIF.
      ENDLOOP.
      DELETE ADJACENT DUPLICATES FROM i_req_keeper
                            COMPARING ALL FIELDS.
      SORT i_req_keeper BY ernam lifnr banfn.
      LOOP AT i_req_items.
        CLEAR l_count.
        CLEAR: l_req_ernam,
               l_req_lifnr,
               l_req_banfn.
        l_req_ernam = i_req_items-ernam.
        l_req_lifnr = i_req_items-lifnr.
        l_req_banfn = i_req_items-banfn.
        LOOP AT i_req_keeper
            WHERE ernam = i_req_items-ernam
              AND lifnr = i_req_items-lifnr
              AND banfn = i_req_items-banfn.
          ADD +1 TO l_count.
        ENDLOOP.
        IF NOT ( l_count > 0 ).
          LOOP AT i_req_items
            WHERE ernam = l_req_ernam
              AND lifnr = l_req_lifnr
              AND banfn = l_req_banfn.
            DELETE i_req_items.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " APPLY_TIME_PERIOD

    Rajesh,
    Put a breakpoint and try to debug the report step by step.
    You will findout the reason very easily.
    Whenever you have a select and are trying to append into an internal table, keep checking your internal table if it is been populated with the correct records.
    This way, you will findout the cause and can correct is accordingly.
    Thanks,
    Suresh Ganti

  • Mail compose window jumps to back when adding address. As soon as I add a single character to the address window of a new mail message, it pops  under all other existing windows. If I have others open...and who doesn't? I have to then close them all.

    So.....deeply....disappointed by Lion...
    It honestly gets in the way of getting things done.
    When was the last time you had an upgrade, in any program or  OS that caused an immediate productivity drop?
    Mail windows, when adding a new address, pop under to become the lowest window in the stack...before you are done composing...
    no extra clicks..just adding ONE character to the actual address bar does it.
    Trying to add files to an online content management system is hard...it's hard because when you attempt to add the file, it disappears from
    the list, so a search must be conducted...oh not a search of your hard drive...no...it has to include ALL FILES and that takes a while, showing
    files totally unrelated to what you need or in whatever that view is, showing everything from movies to documents, to a whole range of other stuff
    that is irrelevant to what is being sought.
    I can get used to the disappearing icon tool bar...but the message threading in Mail is so strangely bad it's hard to describe. So you send out an email,
    and it had 5 points...but that was 3 emails before...A reply comes in addressing those 5 points but saying something like ..."I disagree with point number 4"
    Unless you have total recall the thread shows you only incoming mail and the LAST most recent folded up message you sent. You are forced to go digging
    into sent mail to see what that point you made 8 days eariler actually was...
    I am pleased that I don't have to have Launchpad (honestly the silliest 'feature' I've ever seen on a computer) in the dock and see no point in the juvenile Mission Control (the naming scheme is odd and reminiscent of Junior Spaceman...how ironic that we end America's manned launch capability at the same time as Launch Pad and Mission Control, both throwbacks to the 60's are added to an OS). In any case both are virtually useless tools. One, replacing the mildly useful Spaces and the other just genuinely useless.
    I'm going to give Apple until the second bug fix...but I can tell right now that Snow Leopard was a far more robust OS. The thousands of posts about this may rise to the level of AntennaGate...I hope so...It seems the only way to get Steve (for whom I have now honestly lost respect for the FIRST TIME) to address the issues is to embarrass the company publicly. Lion is a broken system, poorly conceived...and proof that the Apple methodology of no widespread user testing can and does fail. This needs to get fixed. Soon.

    It seems to have something to do with profile manager.
    I get stack traces in the "system messages" logs for the "Server" application, grrrr.
    I'll get that info and attempt to submit a but report tonight.

  • I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contracts from my phone that I did not want there and find they are now gone from my e-mail account on my computer.  Can I retrieve them?

    I added an e-mail account to my iphone using microsoft exchange; all went fine. I then deleted a number of contacts from my iphone that I did not want on my phone. when I went into my e-mail account on my computer the contacts were deleted from there also.  Will I be able to retrieve them?  If so, how?  Thank you.

    In the device sync pages select Photos on the top at the right.
    Un tick Sync Photos
    Apply

  • I have added a work colleague to my family's members on iCloud so we can share the calendar for work appointments. However whe heakes purchases on iTunes I now get charged. How can I stop this happening?

    ive added my work coleague to my iCloud account so we can share the calendar on our I-phones for work appointments. when he makes a purchase on iTunes i now get charged though so how do I stop this from happening? also can I just share only work appointments or do i have to share the whole calendar with him? Can I select what he sees?

    Hi Frantic503,
    Welcome to the Apple Support Communities!
    When you are the Family Sharing organizer, purchases are billed to your account unless the family member making purchases has an iTunes Gift Card or iTunes credit on their account. The attached article has more information on how this process works. 
    Family Sharing - Apple Support
    What I may suggest in your situation would be to discontinue the Family Sharing and use iCloud calendar sharing. Using this method keeps your accounts separate but allows you to still share your calendar. 
    iCloud: Share a calendar with others
    Have a great day,
    Joe

Maybe you are looking for