How to set the default file name for upload

Hi All,
I have the following BSP app for a file upload of a csv file. I want the page when displayed show the default file name to be loaded as c:\db1\currentPM.csv
What changes do I need to make to get the default file name in the BSP app.
Thanks
Karen
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<htmlb:content id               = "content"
               design           = "classicdesign2002design2003"
               controlRendering = "sap"
               rtlAutoSwitch    = "true" >
  <htmlb:page title="File Upload " >
    <htmlb:form method       = "post"
                encodingType = "multipart/form-data">
          <htmlb:textView text   = "File:"
                          design = "STANDARD" />
          <htmlb:fileUpload id          = "uploadID"
                            onUpload    = "UploadFile"
                            upload_text ="Upload"/>
    </htmlb:form>
  </htmlb:page>
</htmlb:content>
On Input Processing
event handler for checking and processing user input and
for defining navigation
DATA: EVENT TYPE REF TO IF_HTMLB_DATA,
      DATA TYPE REF TO CL_HTMLB_FILEUPLOAD,
      LV_OUTPUT_LENGTH TYPE I,
      LV_TEXT_BUFFER TYPE STRING,
      FILE_NAME TYPE STRING,
      FILE_PATH TYPE STRING ,
      INTERN TYPE TABLE OF  ZALSMEX_TABLINE.
DATA: LT_BINARY_TAB TYPE TABLE OF SDOKCNTBIN .
TYPES: BEGIN OF TY_TAB,
       FIELD1(2) TYPE C,
       FIELD2(2) TYPE C,
       FIELD3(2) TYPE C,
       FIELD4(2) TYPE C,
       FIELD5(2) TYPE C,
       END OF TY_TAB.
DATA:  WA_TAB TYPE TY_TAB,
       IT_TAB TYPE TABLE OF TY_TAB.
TYPES: BEGIN OF TY_LINE,
          LINE(255) TYPE C,
       END OF TY_LINE.
DATA:  WA_LINE TYPE TY_LINE,
       IT_LINE TYPE TABLE OF TY_LINE.
EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME = HTMLB_EVENTS=>FILEUPLOAD.
  DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'fileUpload' ID = 'uploadID' ).
  FILE_NAME = DATA->FILE_NAME.
  FILE_PATH = FILE_NAME.
  IF DATA IS NOT INITIAL.
    CALL FUNCTION'SCMS_XSTRING_TO_BINARY'
     EXPORTING BUFFER = DATA->FILE_CONTENT
     IMPORTING OUTPUT_LENGTH = LV_OUTPUT_LENGTH
     TABLES BINARY_TAB = LT_BINARY_TAB .
    CALL FUNCTION'SCMS_BINARY_TO_STRING'
    EXPORTING INPUT_LENGTH = LV_OUTPUT_LENGTH
     IMPORTING TEXT_BUFFER = LV_TEXT_BUFFER
     TABLES
     BINARY_TAB = LT_BINARY_TAB.
    IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SPLIT LV_TEXT_BUFFER AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE IT_LINE.
    IF SY-SUBRC = 0.
      LOOP AT IT_LINE INTO WA_LINE.
       SPLIT WA_LINE AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
        split wa_line at ','
        INTO WA_TAB-FIELD1 WA_TAB-FIELD2 WA_TAB-FIELD3 WA_TAB-FIELD4 WA_TAB-FIELD5.
        append wa_tab to it_tab.
      ENDLOOP.
    ENDIF.
  ENDIF.
ENDIF.

Also, I missed another point.
In the folder c:\dbdata I have a number of CSV files on the user frontend. I would like the BSP application to get the list of files in the folder and process them one after the other. How can I get the list of files on the folder in the user PC and how to process them one after the other.
I want the form to display only the default folder and once I press on upload it must process all files and display the status of processing on the same page.
Please kindly share ideas how I can implement this app.
Thanks
Karen

Similar Messages

  • How to set the default settment rule for the same kind project.

    hi experts:
       the project of the same kind of the project profile have the same settment rule to one account (G/L).
    how to set the default settment rule for the project of  this kind of the project profile.
    regards

    Hi,
      You need to define the settlement profile and allocation structure.
    next you need to define the  Strategy for settlement rule.
    navigation-PS> costs> automatic and periodic allocations> settlement> Settlement rule for WBS
    --> Define strategy for settlement rule.
    Select the strategy and click on settings. in that new entries, check the Acc Assg element, enter Settlement profile and mention accass category as reposnsible cost center.
    Save this transaction.
    Now create a project assgin responsible costcenter for the WBS element in the project buider and save the transaction.
    Now run CJB2 transaction for the project, settlement rule will generated automatically.
    even you can configure the same for profitability segment.
    Rgds
    Sudhir Reddy

  • How do I set the default file path for the Place command?

    I keep my graphics files for each document in a particular folder. Every time I open an existing InDesign document and place a new image I have to browse back to that location - even though all of the previous images in that document came from the same folder. InDesign does not remember the file path that was used previously in the document. This is very annoying.
    IS THERE A WAY TO SET THE DEFAULT FILE PATH, OR LOCATION, FOR IMAGE FILES?
    I have looked through the preferences, searched the forums and internet, but I have not found any reference to setting default paths. Is there a setting like the one in MS Word called "File Locations" on the Options toolbox?
    Thank you.

    Since you're working in ID on Windows, you can take advantage of a neat trick in Windows. Copy the file path out of the File Explorer address bar and paste it directly into the Place filename field. That will jump you directly to the desired volume. For example, let's say I want to place a graphic located at X:\PS Jobs\May PS\709672bp\Working Source Files\Links. I copy that entire path from the File Explorer address bar, go to InDesign, select File|Place, and press Control + V to paste that path into the filename field. I press the Open button and Shazam! I'm there instantly, without a bunch of navigation.
    You can do the same thing in the File|Save As and File|Export fields. Let's say you want export a PDF file from InDesign to the volume X:\PS Jobs\May PS\709672bp\Working PDF Files. First copy the desired file path from the File Explorer window. In InDesign, select File|Export, click anywhere in the filename field, and press the Home key to move the insertion point to the front of the filename. Press Control + V to paste that path in front of the filename, then add the backslash character (\). The filename will now look like this: X:\PS Jobs\May PS\709672bp\Working PDF Files\Filename.pdf. Press the Save button to bring up the Export Adobe PDF window. Select your desired PDF preset, press the Export button, and the PDF file will magically appear in the desired volume.
    This sounds really complicated, but it's not. In practice, it only takes a few seconds. I probably save an hour's worth of needless navigation every day with this technique.

  • How to set the default maximum size for java's heap?

    Hi!
    Im trying to set the default max size for the java heap - but not from the command line.
    I would like to set it higher as default on my computer.. how can I do that?
    thanks!

    >
    ...You may increase the memory heap only when you're launching a new JVM.>Much like IWantToBeBig does.
    OTOH, it this is an app. with a GUI, it is easier to launch it using webstart, and request extra memory in the JNLP descriptor (the webstart launch file).

  • How to set the default context value for flexfield in OAFramework pages

    Hi,
    I have a page which contains a contexxt value field i.e Flexfields
    To select the context value we have to select the value from drop down
    So Here we want to display the context value immediately when the page is called
    How to set the default valu in this case
    Regards,
    Krishna

    You can set the Attribute category view attribute to the Flexfield context value and call prepareforRendering in the flex bean. Check the dev guide for details.
    Regards
    Sumit

  • How to set the default web site for WGM users

    Hi,
    In Tiger server there was a place to input the URL of the default web page for all browsers when users logged into network home folders. This was really helpful and saved a bunch of bandwidth and class time. Is there any way to do this in Leopard server? If so, please point me in the right direction.
    Thanks,
    ..Tom

    Antonio, Thanks! That seems to have worked for Safari. However, we like Firefox too, and I tried to set that up the same way, but was told "can't find a manifest for that app". I wonder if I can copy the Safari list then alter and rename it?
    ...Tom

  • How to set the default value filters for navigational block in WAD.

    Hi Experts.
    as per the customer requirement . they have bex report we need to convert in to web. but in the bex for one field  they using default filters but am not aware in the WEB reports.
    Please anyone suggest me how to give the default filter values in the navigation block in WAD.
    Thanks
    Ashok

    Hi,
    In the Properties of the Navigation Block pane. Goto WebItem-- Goto List of Characteristics, in that click list it will pop up new window, there enter the required objects wants to be in the default filter area.
    Hope it hleps you.
    Veerendra.

  • Urgent!How to set the default selected date for an OAMessageDateFieldBean

    Hi,
    There is messagetextinput on the page.the dataType is Date.
    if I do not input anything on this messagetextinput ,when I click on the date icon,the default selected date is today.
    But I want to set the default selected date base on another messagechoice.
    Is that possible?
    binghao.

    Sumit/Binghao,
    When u set deafult date in the OAMessageDateFieldBean, the OAInlineDatePickerBean (which are referring as datepicker popup windows), takes the default value from OAMessageDateFieldBean.
    If you explore OAMessageDateFieldBean in framework, u will find its nothing but a onClick js event is called on the imageicon attached with messagetextinput bean(in case the type is Date) and OAInlineDatePickerBean is opened in a modal js window.
    So, here is code for setting default value both in both in OAMessageDateFieldBean and OAInlineDatePickerBean :
    OAMessageDateFieldBean dateField = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive(<item id>);
    dateField.setValue(pageContext,new Date(100, 06, 04)/* 4th July 2000*/);
    One more important thing, here Date class is java.sql.Date.I hope i am clear.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set the default file transfer location for ...

    With the latest update from skype for Windows Desktop Skype version 6.22.81.104. I am unable to find the settings for Default file transfer location, Let me know how can i manage those settings.
    Solved!
    Go to Solution.

    http://community.skype.com/t5/Windows-desktop-client/Got-a-problem-when-download-some-files-from-Sky...

  • Interactive Form Element 7.1:  How can I set the default file name?

    I am using Interactive Form Element with 7.1 to display a pdf.  When one clicks the save button in Adobe's toolbar, the dialog defaults the file name to "F.pdf".  Is there a way to default this to a different value?

    Making customisation from the default profile is generally considered poor practice and quite often doesn't work out as planned. (If you're interested in some more information on this, [http://mockbox.net/windows-7/227-customise-windows-7-default-profile.html see here] see here)
    This article should help you with developing and deploying your customised Firefox 4 installation (without touching the Windows 7 default user profile):
    http://mockbox.net/configmgr-sccm/174-install-and-configure-firefox-silently.html

  • Setting the default Output Name for the Export Media dialog

    In File | Export | Media the Export Settings always show the wrong Output Name, from a project I did several days ago. If I change it for this export, the wrong path just comes back again for the next export.  I don't know how I accidently  got it set for the earlier project.  I don't see any way to set it. Could someone tell me where this is set?  I'm running PrPro CS4.
    Thanks

    dkeubnasoieng wrote:
    I'd read earlier the update wasn't a good one so had avoided it. The
    real frustration comes from not finding how I did it a couple months ago!
    I do not know where you read that but there is nothing wrong with the update.
    Here you will find the latest update.
    http://www.adobe.com/support/downloads/product.jsp?product=98&platform=Windows

  • How to get the trace file name for current running application?

    Hi, I want to know if it is possible to get the file name directly for current running application instance which is launched by javaws.
    There is a property "deployment.user.logdir" tells the log directory, it would be great if a file name property
    is available. something like "instance.trace.file".
    Our application wants it because we would like our client send use the application log by clicking a "send error"
    button, the codes finds the trace file and compress it and send it by using a smtp server.
    In 1.5, we can do it by using a shell program.

    I found other asked it before, but I tried to set both properties, but neither works. my sun JRE version :java version "1.6.0_04"
    <property
    name="deployment.javaws.traceFileName"
    value="abcfefsfdsf"/>
    <property
    name="deployment.javapi.trace.filename"
    value="235235235"/>
    But it always write to one trace file with name lik javaws63645.trace

  • How to set the default print format for the report

    Hi,
    In ALV report , i want to defalut specific print format and printer for background processing .
    Any clues!!!!!!!!!
    Regards
    Swatantra

    Hi
    Please check below code:
    DATA: PRIPAR TYPE PRI_PARAMS,
          ARCPAR TYPE ARC_PARAMS,
          LAY    TYPE PRI_PARAMS-PAART,
          LINES  TYPE PRI_PARAMS-LINCT,
          ROWS   TYPE PRI_PARAMS-LINSZ.
    DATA: val(1).
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = 'LOCL'   " <--- Printer Name
        no_dialog              = 'X'
        immediately            = ' '
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *** Specifying the page formats
        pripar-linct = 65.
        pripar-linsz = 190.
        pripar-paart = 'X_65_132'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_archive_parameters  = arcpar
        in_parameters          = pripar
        no_dialog              = 'X'
    *      list_name              = 'Testing Purpose Only' "l_list
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc EQ 0.
      NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS pripar
      ARCHIVE PARAMETERS arcpar
      NO DIALOG.
    ELSE.
      write:/ 'Unable to create spool'.
    ENDIF.
    So now a spool is created with the required print parameters...
    The list that is created from here will be in the spool.
    Once the list is completed, close it with NEW-PAGE PRINT OFF.
    Hope this helps.
    Regards
    Eswar

  • How do I set the default print margins for ALL printers in mozilla.cfg

    How do I set the default print margins for ALL printers in mozilla.cfg, even ones that are not yet installed / connected to the computer?
    I'm trying to install firefox with MDT and apply certain print options, but the printers themselves are connected at a later stage so the print.printer_myprinterhere cannot be used.

    Best answer I could find: [https://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/#comment-132668]
    If you can figure out how to add the printer name, this can be used to lock the margins.

  • How do I set the default welcome page for PUBLIC user

    gurus,
    i'm using -
    Oracle 9i Database
    Oracle 9ias Portal Release 2
    QUESTION => how do I set the default welcome page for the PUBLIC user.
    i did the following to achieve this -
    1. logged into portal
    2. clicked on builder
    3. clicked on administer tab
    4. selected PUBLIC user in the Portal User Profile portlet
    5. went to the preferences tab
    6. in the default home page selected a custom page group
    7. logged out of portal
    8. open a new browsere session
    9. type the portal URL and i get the login page ....??
    i'm unable to understand this behavior ... shouldn't i be getting the page group that i set for the PUBLIC user in step 6 above ....
    the second QUESTION is => when the user logs out he/she should see the PUBLIC page set in step 6 above ... but, instead the user sees a page that is as follows -
    Partner Application Name Logout Status [Logout Status]
    Oracle Portal (portal) logout status
    The SSO Server (orasso) checkmark
    buzz.resva.trw.com:7778 checkmark
    infrastructure.happy.resva.trw.com checkmark
    portal1.buzz.resva.trw.com checkmark
    portal2.sylvester.resva.trw.com checkmark
    sylvester.resva.trw.com:7778 checkmark
    so, how can i set the default page for the PUBLIC user and also a page when he user logs out.
    ideas anyone ....?
    thanx a bunch.
    hero

    Hi,
    The sequence of operation you are doing to set the home page for public users is correct. You are getting the login screen as the "custom page group" selected as "home page" has not been granted to public.
    Also, while logging-out, it is normal behaviour to get the screen where it shows the list of partner applications from where user has been logged-out. When you click on "Return" button, you will get to the "home page" set above.
    Hope it clarifies the things.
    Regards,
    Ved

Maybe you are looking for

  • IMac hosed, can't boot from SuperDrive or HD - help!

    My iMac had a kernel panic last weekend. I tried to reboot, but got the endless blue screen. I booted to the Superdrive and used the AppleCare-supplied TT disc. Ran the diagnostic, did a repair, ejected, and rebooted. Now, endless grey screen. Shut d

  • SOAP Response Unmarshal Problem

    I am using the SOAP Proxy Generator to generate stubs from a WSDL file.  This part is okay.  When I use a method in the stub, the runtime generates an exception -- "null".  Yes that all it says.  I have verified that there is a SOAP response. You can

  • EXEC SQL

    Hi, What does an EXEC SQL stmt do in ABAP? What is the disadvantage of using it? Regards, Kalai

  • Epson Print CD Program for Mac

    I have an imac and Epson Stylus Photo R200 printer that allows me to print onto DVDs using the "Epson Print CD" program that came with the printer. However when I print onto the cd it's to the right by an inch. I attempted to change the position in t

  • Mail account setup

    Trying to setup my mother's new macbook. She has an existing bellsouth.net e-mail account. When I try to add the account I get the error "SMTP can't connect to the server..." (her .mac account works fine) I'm sure all the info is entered correctly--