How to specify the file path while doing bdc recording

hi guys,
using recording we specify transaction code where we enter all the details for the screen after that we get the recording program .....i have a doubt where can we specify the path for uploading a program from a local pc.......if possible can anyone provide a simple program to explain recording to upload an excel file from the system using recording

Hi Gokul,
  You can use the following code to upload excel data into internal table.
   PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
           CODEPAGE                = ' '
           FILENAME                = P_FILE
           FILETYPE                = 'DAT'
           HEADLEN                 = ' '
           LINE_EXIT               = ' '
           TRUNCLEN                = ' '
           USER_FORM               = ' '
           USER_PROG               = ' '
      IMPORTING
           FILELENGTH              =
       TABLES
            DATA_TAB                = IT_FILE
      EXCEPTIONS
           CONVERSION_ERROR        = 1
           FILE_OPEN_ERROR         = 2
           FILE_READ_ERROR         = 3
           INVALID_TABLE_WIDTH     = 4
           INVALID_TYPE            = 5
           NO_BATCH                = 6
           UNKNOWN_ERROR           = 7
           GUI_REFUSE_FILETRANSFER = 8
           CUSTOMER_ERROR          = 9
           OTHERS                  = 10
  IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
    CLEAR IT_FILE.
  ENDIF.
In SAP Enterprise edition, You can use FM : GUI_UPLOAD.
From internal table, Data will be moved to BDCDATA and continue with BDC coding.
Reward, if useful.
Thanks,
USR

Similar Messages

  • How to get the file path in adf application

    hii all,
    i have a txt file that i am using in my adf application,
    i am passing this txt file through a File Reader, for which i have to mention the file path.
    The file is in web-content and when i am hard coding the complete file path i.e C:/JDeveloper/myApp/ViewController/public_html/log.txt
    the application is working fine when run on integrated weblogic server.
    My requirement is to access this file without giving the static file path, as in case i have to use this application on any other machine..
    for that how to mention the file path-
    i tried using FacesContext to get the context path :-
    FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
    which gives me
    \myApp-ViewController-context-root
    after appending public_html\log.txt
    I am using the following path to access the file :-
    \myApp-ViewController-context-root\public_html\log.txt
    again i am getting the java.io.FileNotFoundException
    Does anyone know how to use file from inside the web-content without giving the complete path..???
    Thanks

    Hi,
    If you put your file under public_html folder, you can use this code to access the file:
    For example file is : log.txt
    FacesContext.getCurrentInstance().getExternalContext().getRealPath('/log.txt').toString().trim();
    Thanks.
    - LSR

  • How to set default file path while downloading alv output

    Hi,
    Can anyone tell me that how to set default file path while downloading the ALV output to system using Local file button on tool bar.
    Please look below screenshots:
    Kindly help me resolve it.
    Thanks in advance.
    Regards,
    Ashutosh Katara

    This information initial value is (maybe) stored in Windows Register (register.exe) at Software\SAP\SAPGUI Front\SAP Frontend Server\Filetransfer -> PathDownload, you can read it thru class CL_GUI_FRONTEND_SERVICES method GET_UPLOAD_DOWNLOAD_PATH and update it thru method REGISTRY_SET_VALUE. (Else there may be some parameter ID to force data, but I'm no longer sure)
    Regards,
    Raymond

  • How to validate the file path when downloading.

    Hi
    How to validate the file path when downloading to Presentation or application Server.

    hiii
    you can validate file path by following way
    REPORT zvalidate.
    TYPE-POOLS: abap.
    DATA: w_direc TYPE string.
    DATA: w_bool TYPE abap_bool.
    w_dir = 'c:\Myfolder\'.
    CALL METHOD cl_gui_frontend_services=>directory_exist
    EXPORTING
    directory = w_direc
    RECEIVING
    result = w_bool
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    wrong_parameter = 3
    not_supported_by_gui = 4
    OTHERS = 5.
    IF NOT w_bool IS INITIAL.
    WRITE:/ 'Directory exists.'.
    ELSE.
    WRITE:/ 'Directory does not exist.'.
    ENDIF.
    regards
    twinkal

  • How to get full file path while uploading a file in flex Applications

    How to get full file path while uploading a file in flex applications.
    FileReference Object is giving file name and other details but not the actual path.
    Is there any workaround to to get the file path?.
    Thanks

    Why not ask in the Flex forum; it is more likely that someone over there knows.

  • File browse : How to keep the file path in the file browse field?

    Hello,
    I have
    1) file browse field called P2_FILE_PATH.
    2) a select list with submit : P2_REGION
    If i upload some file d:\abc.gif , then select some region in the P2_REGION,
    P2_FILE_PATH will become empty. But in the session, i can find the blob value. but not the "d:\abc.gif "
    Using the following script I could capture the value of P2_FILE_PATH in a field
    P2_TEST.
    onload="javascript:document.getElementById(P2_FILE_PATH').value = document.getElementById('P2_TEST').value;"
    P2_TEST contains d:\abc.gif .
    How to retain the file path, though some other field is selected and submitted?
    Thanks in advance.
    Regards,
    Archana

    Hello Archana,
    You can't do what you want because of some HTML security restrictions – nothing to do with APEX. As you found out, You can capture the value of this item. You can't set it. After submitting the page, the browser is the one to clear the item.
    The only workaround is to work with AJAX and not submit the page until the end of the user input phase.
    Regards,
    Arie.

  • How to give the file path in adf application

    Hii all,
    I want to use castor xml framework in adf application..
    for which i have to un- marshaller the xml file..
    by using following method-
    Person person = (Person)
    Unmarshaller.unmarshal(Person.class,
    new FileReader("src/com/person.xml"));
    if i use this method in a java class inside a main method directly it works fine,
    but when i try to initiate the java class through a jspx page deployed on integrated server..
    it gives the file not found exception..
    how to define the file path so it can be properly used even when application is deployed on server.
    Thanks

    duplicate {thread:id=2418158} ?
    I guess the path you are using is wrong. It works on your mashiene as the src path is available. When you run the app on a server (jspx file) there is no src path as long as you don't include it in your WAR wich you should not do anyway.
    If you need to access such data you can create a folder in your webroot folder and the the resources from there as /xml_folder_name or if the xml files shouldn't be visible from the outside put the folder under hte web-inf folder.
    Timo
    Edited by: Timo Hahn on 23.07.2012 16:20

  • How to set the file path dynamically based on sytem, username, and date

    Hi All,
    My requirement is upload the data into one  structure like xyz that is related to t.code MCSZ.
    file will be in  UNIx SERVER .
    PATH IS: /sapif
    file name is xy789 load .txt
    I have  to write code in one user-exit
    how can i set the file path for this.
    shall i put hard code file path?
    because i have to writecode in user-exit.
    plz tell me how to set the file path based ons syetem, username, date
    Thanks in advance
    Ram.A

    Concatenate the field SY-SYSID, SY-UNAME and SY-DATUM for the file path

  • How to specify the target name while deploying a code in OSB-- Plz Help

    Hi all,
    Am working in creating a cluster environment. For my testing i created a new managed server(OSB_Server) in 9001 port in the admin console itself and that server started running. The default managed server(Admin_Server) is in 7001 port. So when i deploy a code in 7001 sb console the WSDL gets exposed in 7001 because the default admin server port is 7001. While deploying a code in service bus admin console we are not specifying the target name. So how to specify the target name while deploying the code in service bus admin console. Plz help me.
    Regards
    Prabhu

    Hi Prabhu,
    There are three kind of server architecture possible for OSB -
    1. Single server - Everything gets deployed on Admin server itself
    2. Admin Server + Single Managed Server for OSB -- OSB configuration gets deployed on OSB managed server. OSB resources (proxy service, WSDL, Schema) will remain available on OSB managed server port only and NOT on admin server port
    3. Admin Server + OSB cluster -- OSB configuration gets deployed on OSB cluster. OSB resources (proxy service, WSDL, Schema) will remain available on OSB Cluster port(s) only and NOT on admin server port
    Converting one type of server architecture to any other type, requires a manual tedious process, so it is suggested that you create domain accordingly i.e. if you need clusters then while creating domain itself, create OSB cluster, so that all OSB applications gets deployed to OSB cluster. I will suggest you to create a clustered domain from scratch and import the configuration from your existing domian to this new clustered domain.
    You may refer-
    http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15022/toc.htm
    Regards,
    Anuj

  • How to set the File Path to run a javascript using Plugin Code?

    Hi All,
    Im new to Indesign Plugin Development.Can any one help me out with my problem.
    What i want to do is to run a javascript using Plugin Code.When i went through this forum i was able to find out that i should use the IscriptRunner Class to automate this.I could also figure out that the Member Function to use is "CanHandleFile" &"RunFile".
    The first parameter in CanHandleFile & RunFile Member Function is to specify the path of the JavaScript File i suppose!I could also find out that IDFile has to used to set the file path Information.
    But im clueless how to set the Javascript FilePath using IDFile.Can any one help me how to do this?Any Code Snippets Please?
    Waiting for reply.
    Thanks
    myRiaz

    Hi,  Andreas<br /><br />  Can you explain this in detail? I found it in your post before.<br /><br />  The content of elements are returned through the Characters callback function:<br /><br />From ISaxContentHandler.h:<br /><br />/**<br />        Receives character data<br /><br />The parser will call this method to report each chunk of<br />        character data. SAX parsers may return all contiguous<br />        character data in a single chunk, or they may split it into<br />        several chunks. But all characters in any single<br />        event must come from the same external entity so the<br />        Locator provides useful information.<br /><br />Note some parsers will report whitespace using the<br />        IgnorableWhitespace() method rather than this one (validating<br />        parsers must do so).<br /><br />@param Chars The characters from the XML document.<br />        */<br />virtual void Characters(const PMString& chars) = 0; <br /><br />  What i have done is implement my own SAXContentHandlerServiceBoss, and in my file XXXSAXContentHandler.cpp, I override the fonctions StartElement, EndElement, and Characters() like below: I add the PMString xmlData to collect the file content:<br /><br />class XXXSAXContentHandler : public CSAXContentHandler<br />{<br />void XXXSAXContentHandler::Characters(const WideString& chars)<br />{<br />xmlData.Append(chars);<br />}<br /><br />void XXXSAXContentHandler::StartElement(const WideString& uri, const WideString& localname, const WideString& qname, ISAXAttributes* attrs)<br />{<br />xmlData.Append("<"); xmlData.Append(localname); xmlData.Append(">");<br />}<br />void XXXSAXContentHandler::EndElement(const WideString& uri, const WideString& localname, const WideString& qname)<br />{<br />xmlData.Append("</"); xmlData.Append(localname); xmlData.Append(">");<br />}<br /><br />}<br /><br />and in my program, I use the code below to call the fonction I overrided, but I dont know how I can get the String xmlData I defined in the XXXSAXContentHandler.cpp<br /><br />InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());<br /><br />InterfacePtr<IK2ServiceProvider> xmlProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLParserService, kXMLParserServiceBoss));<br /><br />InterfacePtr<ISAXServices> saxServices(xmlProvider, UseDefaultIID());<br />InterfacePtr<ISAXContentHandler> saxHandler(::CreateObject2<ISAXContentHandler>(kXXXSAXContentHandlerServiceBoss));<br />saxHandler->Register(saxServices);<br />bool16 parseFailed = saxServices->ParseStream(readStream, saxHandler);<br /><br />Can you give me any help?<br /><br />Thanks and regards!

  • How to get the file path from HTML input form in Firefox3

    In IE7 (and probably all famous browsers, including old Firefox 2), if we submit a file like 'C:\folder1\folder2\folder3\filename' it works properly and gives the full path to the file and the filename.
    In Firefox 3, it returns only 'filename', because of their new 'security feature' to truncate the path, as explained in Firefox bug tracking system (https://bugzilla.mozilla.org/show_bug.cgi?id=143220)
    I have no clue how to overcome this 'new feature'.
    Can anyone help to find a single solution to get the file path both on Firefox 3 and IE7?
    Thanks in advance....

    Doubleposted and ignored any previous answer: [http://forums.sun.com/thread.jspa?threadID=5342405]. Don't do that. It's rude.
    Regarding to your "problem": why do you need the file path?

  • How to get the file path from HTML input form in Firefox 3...

    In IE7 (and probably all famous browsers, including old Firefox 2), if we submit a file like 'C:\folder1\folder2\folder3\filename' it works properly and gives the full path to the file and the filename.
    In Firefox 3, it returns only 'filename', because of their new 'security feature' to truncate the path, as explained in Firefox bug tracking system (https://bugzilla.mozilla.org/show_bug.cgi?id=143220)
    I have no clue how to overcome this 'new feature' because it causes all upload forms in my webapp to stop working on Firefox 3.
    Can anyone help to find a single solution to get the file path both on Firefox 3 and IE7?
    Thanks in advance....

    As you're posting this in the JSF forum and looking at your [previous topic|http://forums.sun.com/thread.jspa?threadID=5342365], I assume that you're using Tomahawk's t:inputFileUpload. In this case, just use UploadedFile#getInputStream(). You may find this article useful: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html].
    By the way, are you lazy or just dumb? You wasted one week to this! I've posted the aforementioned article one week ago. How did you stuck?

  • How to force the File Path Control Browser button to the RT Target instead of the host machine?

    I am building an application on a RT PXI system, and for one of the functions I would like the user to be able to use the browser button of the File Path Control to choose a directory on the PXI. However the browser button seems to only want open a file on the host PC, even though the application is fully deployed on the target. Note that I am controlling the PXI from a host PC.
    If anyone has any suggestions that would be great. Thanks.

    Hi,
    Unfortunately, there is not a VI to do this. Are you browsing to these files from your host VI? In order to access the files on your PXI RT target, you'll need to FTP in and browse to them that way. You could programmatically do this, but there is not a simple VI to do so.
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • How to specify a file path in java code to run on Unix machine?

    Hi
    I have a problem when running my project Swing on Unix machine.
    In my code, the user will press a button and then the program will look for the file "ReadMe" in the folder "Documentation" , and reads the content of this file. My code is "Documentation\\ReadMe" and it works well on PC. (The folder "Documentation" is in the same directory with my Java code).
    But when I try on Unix, the program can not read the file. It can only read the file "ReadMe" if I take this file and put it in the same directory with my Java code ( this means not through another folder). So how can we make it read the file in a folder ? It seems that "Documentation\\ReadMe" does not work in Unix, or the symbol "\\" does not work.
    I would be thankful if anybody can help me with this.
    Thank you very much

    You really shouldn't use any path method, as neither are very consistant or platform independent. The JVM provides a way to grab resources from the classpath. These resources can be any data at all, in fact, it's how java itself locates classes. Here's an example how you would do this in a non-static method.
    public URL getReadMe() {
      // In this context the forward slash is universal
      String docDirectory = "Documentation/"
      // We have to use the classloader to grab the resource
      ClassLoader cl = this.getClass().getClassLoader();
      // Next we get the resource 
      URL readMeURL = cl.getResource(docDirectory + "ReadMe");
      return readMeURL;
    }The URL can be used in whatever way you need to get the information out of the resource. If it was an image you might use the "Toolkit" to make an image object out of it. The great thing about this method is it will work even if your loading the program out of a Jar file. The resource paths start at the top of the classpath, just like classes.

  • How to specify the saving path pdf by a "saveas" button in Javascript?

    Hello,
    Firstly, I use LiveCycle ES3 designer on PC. I created a form with a button executing a Java script that opens a dialog box "save as ..." like this:
    \ \ Script save-as \ \
    app.execMenuItem ("SaveAs");
    I would like to predefine a file path to open the dialog box that opens by default on the current location of the file "C: \ export \" for example.
    Could someone help me telling me the code and nomenclature to be used for this?
    I know Livecycle use XFA language and can use the "myDoc.saveAs ();" but I do not know how :-/
    I found this post in this forum but I don't understand how to use this code directly with a click event on a button
    http://forums.adobe.com/thread/685920
    There is also a tutorial here but I can not seem to apply
    http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript
    Thank you in advance for your help :-)

    Try putting this script in the click event of the button
    Hidden_Text_Field_Path.rawValue=this.somExpression;
    This ought to work using either FormCalc or JavaScript.  I'm not sure from your description whether you will need to use the full path name for the hidden text field or use a relative one, but that's not too hard to deal with.

Maybe you are looking for

  • Computer freezes -- PLEASE HELP

    Each time a new song starts on my iTunes, about 10 seconds into the song my memory usage for iTunes will shoot up from 53,000K to 85,000K and will cause everything I am doing on my computer to freeze up for about 5-10 seconds. Like I said, this happe

  • EXIF time altered on conversion from PEF to DNG

    Converting Pentax PEF files from my *istDS to DNG using the Adobe DNG converter (4.1) results in the EXIF date/times all being shifted forward by six hours. I gather that the camera and the converter are miscommunicating regarding time zone. But the

  • QAS and Virtual server advice

    Hi all, I am after a little advice I will soon be implementing a QAS system for both our ERP and BI system landscapes, our current setup is that our system landscape has no virtualisation in place, I was wondering if anyone would recommend either hav

  • MS Word-missing print in file drop down menu

    My Mom runs Microsoft Word on her approx 4-year old iMac using OSPanther. Just recently, when she wants to print using the File-drop down menu to select print, the print option is not there at all. Not just suppressed. Not there at all. Command+P doe

  • App store not recognising Disk version of Garageband

    I have Garageband 11 but it seems to have lost all its loops in Mountain Lion. When I go into App Store it doesn't recgonise that I've brought it.