Queries: Problem creating file in background

Hi,
i am trying to create txt files in background with sap queries, but it doesn't work.
In dialog mode it works but not in background. Path is my standard application server path /home/data/..
Any ideas?
Thanks!

I have the same problem.
On another thread, it said it's not possible to do in background.
The File Store Option is only for execution in dialog mode.
Can somebody confirm or inform it ?
One solution is to activate an user exit!
Implement the user-exit to download the results of standard queries (SQ01) to application servers, while being run in a background.
First create a project, then use the enhancement assignment to include SQUE0001 SAP Query: Private data file. Further implement the user exit EXIT_RSAQEXCE_001 in the component section. Include ZXQUEU01 can have your code.
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/what-does-it-take-to-run-a-sap-query-in-the-background-mode-1258275
Thanks,
David de Limelette
Message was edited by:
        David de Limelette

Similar Messages

  • Problems creating file. Can't get resource path.

    Hey, I'm new to Java with an Actionscript background and I'm using NetBeans IDE.
    Now this comes with my basic lack of understanding for how Java works but I'm getting confused a lot so if someone could just steer me in the right direction I'd be very grateful.
    Essentially I'm checking for a config file and if it's not there, I want to create a default one but the paths are messing me up. class.getResource seems to use the src or the build/classes dir? What's the relationship of these? If I put assets in the src folder should they be moved to the build folder or something like that?
    The actual problem in code is that if I create a file, (config.xml) and put it in my src folder I can grab it using Main.class.getResource("config.xml"); Which is great but if the file's not there it throws an exception..
    Now In actionscript I'd use the File class, which seems very similar to Java's. I'd pass in a literal for the filename "config.xml" and prepend a constant that gives the path of the apps storage directory. If the file's not there then the File.exists property == false.
    What I need is to get the same path that getReresource("config.xml") outputs, but in a File and I can't do that with the exception being thrown because the file's not there.
    Any help appreciated.. I can't read another blog full of different setups or face another Google page of results pertaining to different problems.
    - Chris W

    RoninStretch wrote:
    Essentially I'm checking for a config file and if it's not there, I want to create a default one but the paths are messing me up. class.getResource seems to use the src or the build/classes dir?It looks relative to the classpath, as I recall.
    What's the relationship of these? If I put assets in the src folder should they be moved to the build folder or something like that?NetBeans might do that for you. It's a reasonable thing for a build system to do.
    You might be better off working without an IDE until you're more familiar with Java.
    The actual problem in code is that if I create a file, (config.xml) and put it in my src folder I can grab it using Main.class.getResource("config.xml"); Which is great but if the file's not there it throws an exception..Actually I think getResource will return null if the resource isn't there. Are you not checking for null?
    Now In actionscript I'd use the File class, which seems very similar to Java's. I'd pass in a literal for the filename "config.xml" and prepend a constant that gives the path of the apps storage directory. If the file's not there then the File.exists property == false.The Java File object refers to a path on the filesystem, not a virtual one in the manner of Class.getResource. Check the result of getResource to see if it's null.
    What I need is to get the same path that getReresource("config.xml") outputs, but in a File and I can't do that with the exception being thrown because the file's not there.Can you show us the actual exception and actual code?
    Anyway, if you're packaging all this up in a jar, you wouldn't put the new config.xml that you create in the jar anyway.
    More likely you'd do something like:
    1) check user's home directory for config.xml
    2) if it's not present, check to see if there's a config.xml packaged in your jar.
    3) if the user has any config changes, put them in a config.xml in the user's home directory.
    So you wouldn't be trying to get the path of the default config.xml anyway.
    Or maybe you can use the Preferences framework.

  • Problems creating FILE  comm channel

    Hi there,
    I'm having problems with the creation of a simple communication channel that will pick and read a XML file from my computer. I'm trying to pick the XML file for mapping it to the corresponding fields and generate an IDOC.
    I'm not concerned with the IDOC right now, i'd would like to try to fix this problem first.
    I've created the business system with the communication channel.The channel has the following characteristics:
    Adapter Type: File
    Transport Protocol: File System NFS
    Message Protocol: File
    Adapter Engine: Integration Server
    File System Aacess Parameters:
    Source Directory: C:/temp
    File Name: Vendor.xml
    Processing Parameters:
    Quality of Service: Exactly once
    Poll Interval: 60 secs
    Processing Mode: Delete
    File Type: Text
    So the file should be picked and deleted after being processed by the Integration Engine.
    I've already created the Sender Agreement with the service and the communication channel i'd already created.
    Do you have any ideas?
    Do I have to turn the firewall off? it's off...
    Do I have to create any connections to my pc?....
    thanks

    Thanks for all the answers but the problem persists....
    Bhanu:
    "Please check the SLD entry for the R3 system where the IDoc is." Are you refering to the SWCV?
    " make sure that the XI system has access to the File system (or it is on the same App Server as XI)" Yes, the file is on the same App Server.
    Prabhat:
    I've tried your suggestion but the result was the same...
    Is there a log where I can see why is he not doing anything? There must be a log where I can find what exception was launched...
    Help...please...:)

  • Merge Excel cells when creating file for Background job

    Hi Experts
    I need to create an Excel document and within the excel sheet merge some cells, I can get that done via OLE.
    My problem though comes in with... the Report needs to be scheduled as a background job and therefore OLE does not work!!!
    Does any of you have another solution to merge cells while running in background??
    Your thoughts are greatly appreciated.
    Vic

    Hi Vic,
    You can use the xml transformations for formatting excel. For my case I needed multiple sheets including glossary sheet to be mailed in a particular format , which was achieved by using transformations.
           CALL TRANSFORMATION z_xls_xxx
                SOURCE table = i_tmp_b[]
                RESULT XML wa_xmlstr.
            TRY.
                cl_bcs_convert=>string_to_solix(
                   EXPORTING
                     iv_string   = wa_xmlstr
                   iv_codepage = '4103'  "suitable for MS Excel, leave empty
                     iv_add_bom  = 'X'     "for other doc types
                   IMPORTING
                     et_solix  = l_bin
                     ev_size   = l_size ).
              CATCH cx_bcs.
                MESSAGE e445(so).
            ENDTRY.

  • Problem creating file generator channel rule definition

    I would really appreciate some help on this.
    Environment
    Weblogic integration 10.3
    Windows 7 Ultimate
    Oracle Weblogic Workshop 10.3
    1) I created a fine generator using Weblogic integration console. I have also create a channel file using Workshop and I can see it in the console.
    2) When I try to create a file generator channel rule, Weblogic hangs. I see a stuck thread holding lock on a filegenerator object.
    ^-- Holding lock: com/bea/wli/eventgenerators/file/FileEventGenerators@0x1232E378[thin lock]
    at org/apache/beehive/netui/pageflow/internal/FlowControllerAction.execute(FlowControllerAction.java:52)
    at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:431)
    3) I tried changing permissions on the file directory used for input and error. Did not help.
    Not sure where exactly it is hanging. I have not been able to create the channel definition rule. Can you please advise? Is there a workaround to create the rule such as editing a configuration xml file?
    Thank you,
    Mangesh

    Hi everyone intersted in a solution:
    after consulting the bea support we finally found out the reason for this ManagementException:
    We configured our test and production server in a cluster environment, that means we specified <listen-address>our.cluster.name</listen-address> in the file <domain>/config/config.xml. The server does not work with this properly, this is a bug for which a patch will be developed!
    This workaround helps for servers in cluster environment:
    * stop server
    * edit config.xml and clear the listen-address field: <listen-address></listen-address>
    * start server
    * use physical address of server to log into wli-console and create all eventgenerators you need
    * stop server, change config.xml to original value and restart
    best regards and happy beta testing ...

  • How to Create Excel File in Background processing with different colors

    HI All
    I am trying to create Excel file in background & send it to user through e-mail, this i could acheive using fucntion module SO_DOCUMENT_SEND_API1, but here my requirement is i want to put different colors to columns of excel & this should happen in Background processing,
    Initially i completed above requirement by using HTML type of document with attachment type 'ALI'  & formatted output using write statement & used colors, after that i took this o/p using save_list function module & then table compress...etc.
    but i don't know how to achieve same if we need o/p in excel as size of object of excel file is less than that of HTML
    I am thankfull to everybody who will help me.
    Regards
    Lokesh

    Lokesh,
    Iam also trying to populate my text file with colors as an attachment . If you know this please let me know.

  • Problem in creating file on local machine

    Hello everbody...
    i m using forms and reports 6i
    i m creating file out_file := Text_IO.Fopen(:filepath || '.csv', 'a'); using this command in before_report trigger. And closing file in after_report trigger.
    here filepath is = \\IP address of local machine\d$\file name
    now problem is that if i m giving IP address of local machine then its giving error ORA-39856.
    And if i m giving IP address of server machine then it is going to create file on server machine from local machine.
    Why its not creating file on client machine?
    i think there r problems related to rights
    can anyone has solution then please tell me

    yes in report there is report output and with that it also creating file in coding by
    out_file := Text_IO.Fopen(:filepath || '.csv', 'w');
    this open stmt is written in before report trigger
    Below lines r written for each row thats fetch by report main query.
    str := rpad(:apt_bil_no,8,' ') || ',' || lpad(:apt_bil_dt,10,' ') || ',"' ||
                   rpad(:supl_name,30,' ') || '",' || rpad(:supl_tin_no,11,' ') || ',' ||
                   rpad(:aptvat_hsn_no,10,' ') || ',' ||
                   lpad(ltrim(to_char((apt_amt2 - apt_vat_amt2),'999999990.00')),12,' ') || ',' ||
                   lpad(apt_vat_amt2,12,' ') || ',' ||
                   lpad(ltrim(to_char(apt_amt2,'999999990.00')),12,' ');
    Text_IO.Put(out_file, str);
    Text_IO.New_Line(out_file);
    file is closing in after report trigger.
    text_io.fclose(out_file);
    now i wants to create this file on local machine.
    yes using report server and its started window service.
    can u have any idea?

  • [File] Problem while creating files with long pathnames

    Hello everybody
    I'm trying to create File objects corresponding to physical files. These files have very long pathnames because they are located in directories tree with large depth. So, my pathname conatins a lot of directories plus the name of the file itself.
    It seems, that there is a limitation in the length of the pathname that I pass to the File constructor because files with small pathnames are OK bu the ones with very large pathnames cannot be created.
    I tried the different File constructors (File(String pathname) and File(File parent, String childname)) but it still does not work. Even if the second constructor is a little bit better as it succeeds on files where the first constructor failed. But still, it's not enough.
    Please Help!
    Thank you
    Hugo

    RESOLVED!
    The problem was from the OS itself (Windows XP) which accepts at most 255 characters long path names.

  • Retrieve the date a file was created in the background

    EDITED CONTENT----
    Apologies all...I just realized there is a specific forum for this type of question.  I will post it there.
    Thanks Marilyn for point this out>>>>should have read it first as suggested. 
    /message/2572763#2572763 [original link is broken]
    Hi guru's,
    I have a custom application that does some windows directory cleaning based an older than 'X' days setting.  I have to do some calculation to determine if the file being processed is older than that number of day and delete it if it is.  To determine the file created date I use the method DIRECTORY_LIST_FILES from CL_GUI_FRONTEND_SERVICES.  This works great in the foreground but dumps in the background because the handle object reference is not created in the class constructor and subsequently does a call to a "NULL" object.
    My question:
    Does anyone know of a way to get the date a file was created while running in the background?  If not, please read on --- I have another question regarding an alternate approach I am trying.
    I have tried the following approach FM EPS_GET_DIRECTORY_LISTING to return an internal table with all files in a directory.  Works fine in the background, but the created date is not in the return values.  Soooooo I looped at the internal table and called this system function:
            CALL 'C_FILE_ATTRIBUTES'
                ID 'NAME'     FIELD tempfile
                ID 'TYPE'     FIELD singleFile-
                ID 'LEN'      FIELD file-len
                ID 'OWNER'    FIELD file-owner
                ID 'MTIME'    FIELD file-mtime
                ID 'MODE'     FIELD file-mode
                ID 'ERRNO'    FIELD file-errno
                ID 'ERRMSG'   FIELD file-errmsg.
    This returns the MTime, which is the Modified time (in Epoch time format: number of seconds since Midnight 1 January 1970), but no created time.  Does anyone know the ID for the created time?  I tried CTIME but no value is returned. 
    Along with this question: any idea if a FM or Method exists to convert Epoch time to a standard time.  I could do the calculation myself....but it seems someone would have already done this.  No point in re-creating the wheel.
    Thanks so much,
    Quack
    Message was edited by:
            Ryan Quackenboss

    I will be happy to.
    Please post something to this thread. 
    Retrieve the date a file was created in the background
    I UNMARKED this question as a post and reposted in the data transfer forum.
    That post is still open.  Once you post there, I will mark it ANSWERED and award points.
    Thanks for the help
    Quack

  • HT4168 When I export a pages document as an ePub file the result is a blank locked text edit file on my desk top not an ePub file as previously no problem creating. How do I fix? HHD

    WHenWhen I export a pages document as an ePub file the result is a blank locked text edit file on my desk top not an ePub file as previously no problem creating. How do I fix? HHD

    Try adding .epub to the end of the name.
    I assume you are aware that to open an .epub file you need a special app, not TextEdit or Pages, right?

  • Director 12- can't create a windows projector - problem writing file error

    I am trying to create a windows projector of a project. when I get the following error - problem writing file - file name- Can't compress file that has been modified and not saved. The file has not been modified and has been saved. Any help would be great.

    Hi.
    You say you have tried publishing to a new empty folder.  From the video I can see that the folder has table1.app in there (25 secs in) which is a Mac projector that has been published.
    Yet you have Windows Projector checkbox ticked at the start of the video.
    I publish Mac and Windows projectors to entirely seperate folders as a matter of practice.
    I call the folders "Published" and "PublishedMac" and that is where the respective projectors for each piece of software lives.
    Perhaps there is some mix up between Mac and Windows publishing that is going on because
    you are publishing both to the same folder?
    Hope this helps.
    Richie

  • Problem creating several image maps (linking to different pdf files) RoboHelp 8

    Hi,
    I have a problem creating several image map hotspots (that link to different .pdf files), from the same image using RoboHelp 8 HTML (WebHelp project).
    After compiling, the first image map hotspot created, opens the .pdf file correctly.  Unfortunately, when clicking on the other image hotspots, I get an error " Cannot find file...<file path>... Make sure path or Internet address is correct".
    All the pdf documents are located in the same folder within the project.
    Can anyone help?

    Have you added the target files as baggage?
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Create an Excel File in background

    Ladies and Gentlemen,
    I have a requirement to create an Excel file in a program that will only be executed in background mode.  This automatically rules out GUI_DOWNLOAD or any download funtion that presents the file on the presentation server.
    I think that the 'Open Dataset...' command will work to create the file on the Application server, but this seems a bit archaic to me.  Is there another way of creating the excel file on the application server in background?  I am working on a 4.7 system at the moment, but this is scheduled for a upgrade to ECC6 sometime in the next 12 months, so I'm after a process that will be valid both before and after the upgrade.
    Cheers,
    Steve

    Hi Stephen,
    Use Open dataset, Transfer, Close dataset to create file on Application server.
    Use FM Z_CONV_ITAB_TO_TAB_DELIMITED to convert your lines in TAB delimited format. you can download file from your application server to presentation server using T Code CG3Y and give extension as .xls ...
    As you data is Tab delimited it will automatically get formatted in columns in your EXCEL file.
    Regards,
    Mohaiyuddin

  • Creating an Excel File in Background

    Hi Guys,
    Is there a function or Bapi that allows the creation of an Excel file in a background process?, because the WS_EXCEL function doesn't allow it.
    Regards,
    Eric

    Hi,
    If you want to create a file in Background then you have to use OPEN DATASET statement only. WS_EXCEL function module will work only in foreground.
    use below statement to open a file in background and use Transfer statement to move a record into this opened file and at last close the dataset using Close statement.
    OPEN DATASET p_outfile FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
    thanks,
    sksingh

  • Create an Excel format file in background w/DATASET Cmds?

    I have heard that you can create a file into an excel format file in background mode using dataset commands - anyone know how to do this?  Thanks!

    Hi Stephen,
    Use Open dataset, Transfer, Close dataset to create file on Application server.
    Use FM Z_CONV_ITAB_TO_TAB_DELIMITED to convert your lines in TAB delimited format. you can download file from your application server to presentation server using T Code CG3Y and give extension as .xls ...
    As you data is Tab delimited it will automatically get formatted in columns in your EXCEL file.
    Regards,
    Mohaiyuddin

Maybe you are looking for

  • Faulty iDisk downloads to ipod touch

    Has anyone else experienced this problem with idisk and ipod touch? I have tried several times via apple care and my apple store to correct a problem of incomplete downloads with the iDisk application to my ipod touch. A page of four small jpeg photo

  • Can I get rid of the MobileMe sync icon in Mountain Lion?

    I recently set up a new MacBook Pro by using setup assistant to restore from a Time Machine backup of an old Snow Leopard machine. In general it's worked fine, but I still seem to have the old MobileMe sync icon in the menu bar, and as far as I can w

  • Verizon is the 4.3 update causing problems with my phone because my phone is having problems

    I have been having multiple problems with my GS3 since the 4.3 update including wifi connection issues dropped and frozen calls frequent unmounting of my sd card bluetooth problems to site the worst. I have updated and reset my router checked and res

  • Can I add a processor to my single 1.8 Ghz, making it a dual?

    Can I add a processor to my single 1.8 Ghz, making it a dual? If so, where can I find installation instructions to do that? Thanks.

  • View fails when grouping by RBS

    Hello: I have an environment that was upgraded from Project Server 2007 to 2010.  In the 2007 instance, I had a Resource Center view that grouped on the RBS column.  The grouping was configured within the Manage Views page (i.e., not something I appl