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

Similar Messages

  • 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!

  • 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 set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • 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

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • 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 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 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 set the root path of XML document when calling Inserting procedure

    Hi,
    I was create a procedure to insert XML Document in to DBMS Tables, but i am not able to set the Start root element in calling procedure.
    My calling procedure is
    exec insXmldoc('pmc_sample.xml', 'pmc')
    When i am calling this procedure i got this error
    11:23:54 Error: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 8
    ORA-06512: at line 2
    I am checking my XML file using XML Validator. My XML file was parsed with out errors.
    Please give the solution,and tell me where i did wrong in my calling procedure.
    suppose i have this XML file in local E drive ,how to set the path for that XML file in my calling procedure.

    Hi, I am doing the code likthis,please give the solution.
    SQL> create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
    2 insCtx DBMS_XMLSave.ctxType;
    3 l_ctx dbms_xmlsave.ctxtype;
    4 rows number;
    5 begin
    6 insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    7 rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    8 DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    9 end;
    10 /
    Procedure created.
    SQL> begin
    2 insProc('/usr/tmp/ROWSET.xml', 'emp');
    3 end;
    4 /
    begin
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException:
    Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 7
    ORA-06512: at line 2
    Kishore B

  • How to configure the schema name dynamically based on user input.

    configure the schema name dynamically based on user input.
    For ex:
    We have two schemas:
    Schema1  - base schema having 15 tables.
    Schema2 -  tables which is specific to modules. Having only 10 tables which is also available in Schema1
    Login to application using Schema 1
    Access a particlular module and select the country. Here country selection is identified.
    Based on the country selection, we need to connect the schema respectively.
    If the user selects France --> It should connect Schema1
    If the user selects Germeny --> It should connect schema2.
    Used: Eclipselink

    You may want to have a different persistence unit for each country, then you just need to switch persistence units, and can put the schema in your orm.xml file.
    You may also want to investigate EclipseLink multi-tenant support,
    http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/a_multitenant.htm
    You can the schema in a persistence unit in code using a SessionCustomizer and the tableQualifier.

  • 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 set default file path for save

    Hello all,
    I'm currently blocked on the below issue and is hoping to gain your help and insights.
    We have recently upgraded to InDesign CS6. Now when an INDD file created in an older version of INDD is opened in CS6, all the save dialogs would not default to the location of the original INDD file. Though if the same file is opened in the version of InDesign that created it, the save dialog goes to the proper location by default.
    Debugged using our custom plugin as a gate way, and found out that after InDesign CS6 performed the document upgrade/convert, the database for the converted document loses file information. i.e.  IDataBase::GetSysFile() returns nil. I think we can figure out some way to get the original file path. For example, we can intercept "kAfterOpenDocSignalResponderService", and get the original file path of the opened file from IDocumentSignalData. Though I haven't yet able to figure out a safe way to set this file path to the document, so that the save dialogs would by default point at this path.
    Utils<Facade::IWorkgroupFacade>()->InitDocumentAssetManagement(docRef, filePath) seems to do the right thing, but it seems to be quite intruding, and I'm afraid that it is overkilling and will cause bad side effect for the use case I'm looking for.
    So I'm wondering if anyone has any suggestions to achieve this without implementing/overriding the file save dialog.
    Thanks.
    -Jeff

    You should be able to avoid writing your own open-doc trap by using kDocBoss's IOpenedFileInfo to obtain the original file's path. It seems fairly reliable; the only time I've seen it come up empty is for an opened QuarkXPress document.
    I'm afraid I don't know of a sanctioned way to change IDataBase::GetSysFile() without going through the database's SaveAs machinery. Overriding this behavior might only be possible by replacing the regular Save dialog with your own.
    But if InitDocumentAssetManagement() is helping, maybe the workgroup/asset management approach is worth pursuing. Have you tried spying on that call in the debug app? You might be able to isolate and use one of the commands that it's invoking (IAMSPManager::BindAsset() / kSetAssetAttributesCmdBoss?) without all of the side-effects of the higher-level call.

  • Set the file path of get image method

    I have a program that takes multiple IV curves of some nano-devices and saves each set of the IV curve data into a CSV file. I also have a graph on the main screen that gives me a visual representation of the data after each IV curve is taken.
    My program automatically names each IV curve with a different file path and at the end of the program execution I could have 50-60 IV curves.  What i'm trying to do is have LabVIEW export an image file of the graph on my front panel and save it with the save file path as the CSV file.
    Currently i'm using "Invoke Node -> Export Image" method, which is working fine and doing exactly what I want because i can tell it what file path to save to....however it is just a black and white image.
    There is another method that I found here: http://digital.ni.com/public.nsf/allkb/5AE4ADCBB65​A6D8F86256FBF007A1AC1
    That talks about a "Invoke Node -> Get Image Method" which physically captures the colorful chart on the front panel.  However I cannot figure out a way to tell it the file path to save to.  So when I run my program, after each IV curve, it takes the image from the front panel and then on the next IV curve, it interrupts my program to ask me to overwrite the previous file because it's using the same name.
    Is there a way to tell the Get Image Method to save to a specific file path?

    Hi Puneet_K,
    Thanks for the code....I didn't know you could wire the output of the image data to a write VI.  It makes sense in theory and i thought it would work....but it's not actually writing the PNG. I even tried BMP and JPEG but no results.
    I'm posting an image of my code with the before and after.  The before uses export image and it works, the after uses the get image and it doesn't create the file.
    Attachments:
    before.PNG ‏71 KB
    after.PNG ‏71 KB

Maybe you are looking for