Output of SQ01 Query to a file in background

Hello,
       I have created a SQ01 query for a certain specific outpur from my SAP system. I need to get the output of this query to a file. While i have tried executing this report from the frontend; it works smoothly, and based on the variant it creates the output and writes to a file at a remote location. But while i am trying to process the same query using background job, it creates a spool request and doesnt export the data to a file.
       Can someone please help me in getting me right in case i am doing anything wrong.
Regards,
V

Hi,
SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
It look exactly like what you see during a spool display.
Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
Regards,
Pavan

Similar Messages

  • Procedure to save the output of a query into excel file or flat file

    Procedure to save the output of a query into excel file or flat file
    I want to store the output of my query into a file and then export it from sql server management studio to a desired location using stored procedure.
    I have run the query --
    DECLARE @cmd VARCHAR(255)
    SET @cmd = 'bcp "select * from dbo.test1" queryout "D:\testing2.xlsx;" -U "user-PC\user" -P "" -c '
    Exec xp_cmdshell @cmd
    error message--
    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for user 'user-PC\user'.
    NULL
    Goel.Aman

    Hello,
    -T:
    Specifies that the bcp utility connects to SQL Server with a trusted connection using integrated security. The security credentials of the network user,
    login_id, and password are not required. If
    –T is not specified, you need to specify
    –U and –P to successfully log in.
    -U:
    Specifies the login ID used to connect to SQL Server.
    Note: When the bcp utility is connecting to SQL Server with a trusted connection using integrated security, use the
    -T option (trusted connection) instead of the
    user name and password combination
    I would suggest you take a look at the following article:
    bcp Utility: http://technet.microsoft.com/en-us/library/ms162802.aspx
    A similar thread regarding this issue:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/b450937f-0ef5-427a-ae3b-115335c0d83c/bcp-connection-error-sqlstate-28000-nativeerror-18456?forum=sqldataaccess
    Regards,
    Elvis Long
    TechNet Community Support

  • Export of report/query to a file for background job runs

    I have a requirement to automate the export of a report or query to a file  so when a background job runs a  new file is generated to the drive. 
    This cannot be a customized solution for 1 report, it must be able to adapt to other reports or queries as well.
    Any help will be highly appreciated.
    Thank you,
    Thamina

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    It look exactly like what you see during a spool display.
    Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    Regards,
    Pavan

  • Question regarding outputing results of query to pdf file

    Is there a way in which we can output the results of the query to a PDF file in PLSQL?
    Thanks much,
    Madhu

    I have a situation where there needs to be emails sent to the customers on a daily basis.Right now there is scheduled bat file on a particular machine which calls the Form which has the logic to generate the pdf file using Oracle Reports for each of the customer,which is then mailed using Outlook(OLE in form).But now this is kind of a problem as they are constant network problems which hinder the timely sending of the reports.
    I am trying to look for a solution so that we can do everything on database end instead of relying on the newtork.
    Thank you for any suggestions you have regarding implementing this.
    Madhu

  • Write the output of a query in ODI to file

    Hi Friends,
    I am using ODI 11g.
    In ODI I want to write the output of the below query to a unix file.
    SELECT 'H'|| rpad('SB9KT.KTPRTO.EBSDATA.D0000000','30',' ')|| rpad(to_char(sysdate, 'YYYYMMDDHHMMSS'), 16, ' ')
    FROM dual;
    Please suggest any inputs.
    Thanks,
    Lony

    lony wrote:
    Hi Friends,
    I am using ODI 11g.
    In ODI I want to write the output of the below query to a unix file.
    SELECT 'H'|| rpad('SB9KT.KTPRTO.EBSDATA.D0000000','30',' ')|| rpad(to_char(sysdate, 'YYYYMMDDHHMMSS'), 16, ' ')
    FROM dual;
    Use OdiSqlUnload tool to write the output of the sql query to a file
    Please suggest any inputs.
    Thanks,
    Lony

  • How to store output of SQ01 into internal table.

    Hello Experts
    How to store output of SQ01 into internal table.
    Thanks,
    Umesh

    You can't store the sq01 output into internal table.
    Once you create the query it will generate the abap program, in that program you can see the contents.
    Regards
    Sasi

  • Get the output of a query in a textpad..

    Hi..
    I need to get the output of a query in a notepad..
    Can anyone help me..

    spool c:\emp.txt
    fire select * from emp;
    spool off;
    go to c: and check your text file.
    hare krishna
    Alok

  • "Save output of a query in Substitute variable"

    Hi All,
    I am using oracle11g r1 on windows platform. i want to know how can i save the output of a query in a substitute variable so that i can user that variable in other query .i am using this query and i want to store the output in *"&Schema*" variable.
    select substr('D:\activities\expLive_vikash',23,instr('D:\activities\expLive_vikash','0')-22) from dual;
    Thanks & Regards,
    Vikash chauradia(junior DBA)

    Thanks for replyng..
    i am using this in sqlplus prompt . actually i am using a batch file to cange the dump .
    DEFINE FILE_NAME=&file_name; -- This will ask the Dump file name as an input.
    declare Schema varchar2(20);
    begin
         select substr('&&file_name',23,instr('&&file_name','0')-22) into Schema from dual; -- this will give the Schema name as an output.
    dbms_output.put_line(Schema);
    end;
    Drop user &&Schema Cascade;--(Now i am facing the problem in this line. I am not getting Schema name to drop)
    Can u tell me what's the problem in this Script.

  • I want to just spool output of a query only

    now when i try to use spool command, query, output and spool off command also get spooled into the specified filename.
    for ex:
    SQL>spool <filename>.txt
    SQL>select * from dual;
    SQL>spool off
    but the content of output file is:
    select * from dual;
    DUMMY
    X
    spool off;
    i just want output of the query, nothing else, i.e.,
    DUMMY
    X
    plz, suggest me soln.

    Save this script in a text file
    Call the script...
    O/P will be stored in xx.txt
    script
    set feedback off
    set echo off
    spool xx.txt
    select * from dual;
    spool off
    set echo on
    set feedback on
    (You can find the same answer if search in the forum)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error when attempting to download SQ01 query data to Excel

    Hi Experts ,
    I am getting error when attempting to download SQ01 query data to Excel .
    Error message - Contact your system administrator. The following template is missing: sap_om.xls
    Message no. 0K 407
    I have looked through the SAP GUI installation files and can find no record of the missing file
    Help

    Hi
    Please check SAP note 305900 & 803067
    Regards
    Ravinder

  • SQL Query to Text file

    I need to dump a query out to files, the issue is that this
    query has to break by an specific code and then create the text
    file based on this code. But when I try to execute it I get a Jrun
    Server error "Jrun 500 Null".
    please take a look at the code and tell me what I'm doing
    wrong.

    ok some of these suggestions worked, I no longer get the Jrun
    Server 500 NUll error but the query still does not execute except
    for the last Master_IPA code.
    <!------Revised Code------>
    <cfsetting requesttimeout="500000">
    <cfparam name="form.data_var" default="0">
    <cfswitch expression="#form.data_var#">
    <cfcase value="1">
    <cfinvoke component="dataCOM" method="getCapdata"
    returnvariable="ipaList">
    <cfset List = #ValueList(ipaList.MASTER_IPA,",")#>
    <CFSET CRLF = chr(13) & chr(10)>
    <cfoutput>
    <cfloop index="curLine" list="#List#" delimiters =
    ",">
    <cfset fields = #TRIM(curLine)#>
    <cfset filePath =
    #GetDirectoryFromPath(ExpandPath("."))#&"downloads\"&#TRIM(curLine)#&"_capPremSpec_"&#Dat eFormat(NOW(),'mmddyyyy')#&".txt">
    <cffile action="write" file="#filePath#"
    output="WDW_PRODUCT|MASTER_IPA|WDW_IPA_ID|WDW_PCP_ID|EXTERNAL_PCP_ID|SEQ_MEMB_ID|ACTIVITY _DATE|ADJUSTMENT|FUNDING_AB|FUNDING_D|FUNDING_MEMBER_PREMIUM|GROSS_DC_ABOVE_ATTACH_PNT_AMT |IBNR|INST_CLAIM|IPA_CLAIM|IPA_DISBURSEMENTS|LOW_INCOME_COST_SHARING_AMT|MED_EXP_AB|MED_EX P_D|MEMBER_COUNT|MEMBER_PREMIUM|NET_AB|NET_PART_D|PART_D_INCLUDE_FLAG|PART_D_PREMIUM|PCP_C AP|PHARMACY|PLAN_DISBURSEMENTS|PREMIUM|PROF_CLAIM|REINSURANCE|RISK_CORRIDOR|RX_CLAIM_DOLLA RS|RX_STOP_LOSS|SPEC_CAP|SSC_AMT|STOP_LOSS|WDW_FUNDING_COUNTY|PLAN_CODE|PCP_LAST_NAME|PCP_ FIRST_NAME|WDW_INPUT_CHANNEL|WDW_COHORT|WDW_ELIG_CATEGORY|MASTER_DOB|MASTER_SEX|MEDICAID_N O|MEDICARE_NO|SUBSCRIBER_ID|LAST_NAME|FIRST_NAME|ADDRESS_LINE_1|ADDRESS_LINE_2|CITY|WDW_ST ATE|ZIP|RISK_SCORE_AB|RISK_SCORE_D|HOSPICE|ESRD|INSTITUTIONAL|NURSING_HOME_CERTIFIABLE|MED ICAID|MEDICAID_ADD_ON|PREVIOUS_DISABLE|PHONE|REGION|WDW_PRODUCT|MASTER_IPA|WDW_IPA_ID|WDW_ PCP_ID|EXTERNAL_PCP_ID|SEQ_MEMB_ID|ACTIVITY_DATE|ADJUSTMENT|FUNDING_AB|FUNDING_D|FUNDING_M EMBER_PREMIUM|GROSS_DC_ABOVE_ATTACH_PNT_AMT|IBNR|INST_CLAIM|IPA_CLAIM|IPA_DISBURSEMENTS|LO W_INCOME_COST_SHARING_AMT|MED_EXP_AB|MED_EXP_D|MEMBER_COUNT|MEMBER_PREMIUM|NET_AB|NET_PART _D|PART_D_INCLUDE_FLAG|PART_D_PREMIUM|PCP_CAP|PHARMACY|PLAN_DISBURSEMENTS|PREMIUM|PROF_CLA IM|REINSURANCE|RISK_CORRIDOR|RX_CLAIM_DOLLARS|RX_STOP_LOSS|SPEC_CAP|SSC_AMT|STOP_LOSS|WDW_ FUNDING_COUNTY|PLAN_CODE|PCP_LAST_NAME|PCP_FIRST_NAME|WDW_INPUT_CHANNEL|WDW_COHORT|WDW_ELI G_CATEGORY|MASTER_DOB|MASTER_SEX|MEDICAID_NO|MEDICARE_NO|SUBSCRIBER_ID|LAST_NAME|FIRST_NAM E|ADDRESS_LINE_1|ADDRESS_LINE_2|CITY|WDW_STATE|ZIP|RISK_SCORE_AB|RISK_SCORE_D|HOSPICE|ESRD |INSTITUTIONAL|NURSING_HOME_CERTIFIABLE|MEDICAID|MEDICAID_ADD_ON|PREVIOUS_DISABLE|PHONE|RE GION"
    addnewline="yes" />
    <cfquery name="textFiles" datasource="#request.dsn#">
    SELECT TOP 100
    WDW_PRODUCT,MASTER_IPA,WDW_IPA_ID,WDW_PCP_ID,EXTERNAL_PCP_ID,SEQ_MEMB_ID,ACTIVITY_DATE,
    ADJUSTMENT,FUNDING_AB,FUNDING_D,FUNDING_MEMBER_PREMIUM,GROSS_DC_ABOVE_ATTACH_PNT_AMT,IBNR, INST_CLAIM,
    IPA_CLAIM,IPA_DISBURSEMENTS,LOW_INCOME_COST_SHARING_AMT,MED_EXP_AB,MED_EXP_D,MEMBER_COUNT, MEMBER_PREMIUM,
    NET_AB,NET_PART_D,PART_D_INCLUDE_FLAG,PART_D_PREMIUM,PCP_CAP,PHARMACY,PLAN_DISBURSEMENTS,P REMIUM,PROF_CLAIM,
    REINSURANCE,RISK_CORRIDOR,RX_CLAIM_DOLLARS,RX_STOP_LOSS,SPEC_CAP,SSC_AMT,STOP_LOSS,WDW_FUN DING_COUNTY,PLAN_CODE,
    PCP_LAST_NAME,PCP_FIRST_NAME,WDW_INPUT_CHANNEL,WDW_COHORT,WDW_ELIG_CATEGORY,MASTER_DOB,MAS TER_SEX,MEDICAID_NO,
    MEDICARE_NO,SUBSCRIBER_ID,LAST_NAME,FIRST_NAME,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,WDW_STAT E,ZIP,RISK_SCORE_AB,
    RISK_SCORE_D,HOSPICE,ESRD,INSTITUTIONAL,NURSING_HOME_CERTIFIABLE,MEDICAID,MEDICAID_ADD_ON, PREVIOUS_DISABLE,
    PHONE,REGION,WDW_PRODUCT,MASTER_IPA,WDW_IPA_ID,WDW_PCP_ID,EXTERNAL_PCP_ID,SEQ_MEMB_ID,ACTI VITY_DATE,
    ADJUSTMENT,FUNDING_AB,FUNDING_D,FUNDING_MEMBER_PREMIUM,GROSS_DC_ABOVE_ATTACH_PNT_AMT,IBNR, INST_CLAIM,
    IPA_CLAIM,IPA_DISBURSEMENTS,LOW_INCOME_COST_SHARING_AMT,MED_EXP_AB,MED_EXP_D,MEMBER_COUNT, MEMBER_PREMIUM,
    NET_AB,NET_PART_D,PART_D_INCLUDE_FLAG,PART_D_PREMIUM,PCP_CAP,PHARMACY,PLAN_DISBURSEMENTS,P REMIUM,PROF_CLAIM,
    REINSURANCE,RISK_CORRIDOR,RX_CLAIM_DOLLARS,RX_STOP_LOSS,SPEC_CAP,SSC_AMT,STOP_LOSS,WDW_FUN DING_COUNTY,PLAN_CODE,
    PCP_LAST_NAME,PCP_FIRST_NAME,WDW_INPUT_CHANNEL,WDW_COHORT,WDW_ELIG_CATEGORY,MASTER_DOB,MAS TER_SEX,MEDICAID_NO,
    MEDICARE_NO,SUBSCRIBER_ID,LAST_NAME,FIRST_NAME,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,WDW_STAT E,ZIP,RISK_SCORE_AB,
    RISK_SCORE_D,HOSPICE,ESRD,INSTITUTIONAL,NURSING_HOME_CERTIFIABLE,MEDICAID,MEDICAID_ADD_ON, PREVIOUS_DISABLE,PHONE,REGION
    FROM dbo.CapPremSpecInload
    WHERE MASTER_IPA ='#TRIM(curLine)#'
    </cfquery>
    <cfset msg = "file"&#TRIM(curLine)#&"
    created!">
    #msg#<br />
    </cfloop>
    </cfoutput>
    <cfoutput>
    <cfloop query="textFiles">
    <cffile action="append" file="#filePath#"
    output="#WDW_PRODUCT#|#MASTER_IPA#|#WDW_IPA_ID#|#WDW_PCP_ID#|#EXTERNAL_PCP_ID#|#SEQ_MEMB_ ID#|#ACTIVITY_DATE#|#ADJUSTMENT#|#FUNDING_AB#|#FUNDING_D#|#FUNDING_MEMBER_PREMIUM#|#GROSS_ DC_ABOVE_ATTACH_PNT_AMT#|#IBNR#|#INST_CLAIM#|#IPA_CLAIM#|#IPA_DISBURSEMENTS#|#LOW_INCOME_C OST_SHARING_AMT#|#MED_EXP_AB#|#MED_EXP_D#|#MEMBER_COUNT#|#MEMBER_PREMIUM#|#NET_AB#|#NET_PA RT_D#|#PART_D_INCLUDE_FLAG#|#PART_D_PREMIUM#|#PCP_CAP#|#PHARMACY#|#PLAN_DISBURSEMENTS#|#PR EMIUM#|#PROF_CLAIM#|#REINSURANCE#|#RISK_CORRIDOR#|#RX_CLAIM_DOLLARS#|#RX_STOP_LOSS#|#SPEC_ CAP#|#SSC_AMT#|#STOP_LOSS#|#WDW_FUNDING_COUNTY#|#PLAN_CODE#|#PCP_LAST_NAME#|#PCP_FIRST_NAM E#|#WDW_INPUT_CHANNEL#|#WDW_COHORT#|#WDW_ELIG_CATEGORY#|#MASTER_DOB#|#MASTER_SEX#|#MEDICAI D_NO#|#MEDICARE_NO#|#SUBSCRIBER_ID#|#LAST_NAME#|#FIRST_NAME#|#ADDRESS_LINE_1#|#ADDRESS_LIN E_2#|#CITY#|#WDW_STATE#|#ZIP#|#RISK_SCORE_AB#|#RISK_SCORE_D#|#HOSPICE#|#ESRD#|#INSTITUTION AL#|#NURSING_HOME_CERTIFIABLE#|#MEDICAID#|#MEDICAID_ADD_ON#|#PREVIOUS_DISABLE#|#PHONE#|#RE GION#|#WDW_PRODUCT#|#MASTER_IPA#|#WDW_IPA_ID#|#WDW_PCP_ID#|#EXTERNAL_PCP_ID#|#SEQ_MEMB_ID# |#ACTIVITY_DATE#|#ADJUSTMENT#|#FUNDING_AB#|#FUNDING_D#|#FUNDING_MEMBER_PREMIUM#|#GROSS_DC_ ABOVE_ATTACH_PNT_AMT#|#IBNR#|#INST_CLAIM#|#IPA_CLAIM#|#IPA_DISBURSEMENTS#|#LOW_INCOME_COST _SHARING_AMT#|#MED_EXP_AB#|#MED_EXP_D#|#MEMBER_COUNT#|#MEMBER_PREMIUM#|#NET_AB#|#NET_PART_ D#|#PART_D_INCLUDE_FLAG#|#PART_D_PREMIUM#|#PCP_CAP#|#PHARMACY#|#PLAN_DISBURSEMENTS#|#PREMI UM#|#PROF_CLAIM#|#REINSURANCE#|#RISK_CORRIDOR#|#RX_CLAIM_DOLLARS#|#RX_STOP_LOSS#|#SPEC_CAP #|#SSC_AMT#|#STOP_LOSS#|#WDW_FUNDING_COUNTY#|#PLAN_CODE#|#PCP_LAST_NAME#|#PCP_FIRST_NAME#| #WDW_INPUT_CHANNEL#|#WDW_COHORT#|#WDW_ELIG_CATEGORY#|#MASTER_DOB#|#MASTER_SEX#|#MEDICAID_N O#|#MEDICARE_NO#|#SUBSCRIBER_ID#|#LAST_NAME#|#FIRST_NAME#|#ADDRESS_LINE_1#|#ADDRESS_LINE_2 #|#CITY#|#WDW_STATE#|#ZIP#|#RISK_SCORE_AB#|#RISK_SCORE_D#|#HOSPICE#|#ESRD#|#INSTITUTIONAL# |#NURSING_HOME_CERTIFIABLE#|#MEDICAID#|#MEDICAID_ADD_ON#|#PREVIOUS_DISABLE#|#PHONE#|#REGIO N#"
    addnewline="yes" />--->
    </cfloop>
    </cfoutput>
    </cfcase>
    </cfswitch>
    <!------Revised Code------>

  • How to write the output of a mapping into a file (OWB10.2

    Hi
    I am using Oracle 10.2.0.1 version of OWB.
    the task is to write the output of a mapping into a File (Flat File).
    Please help me out!
    Regards
    Abi

    Hi,
    Create the file format thru OWB and mention the location in OWB. Deploy the file and it will be ready to use for target load. Make sure the connection to the target loc is available.
    Regards
    Bharadwaj Hari

  • Is there a way to create multiple BQY output to one of the Job File ?

    Hello,
    I am using EPM11.1.2.3.501 version.
    BQY report due to the large amount of data, it is difficult to use a WebClient.
    So will share on a quarterly basis.
    However,
    If modifications are to occur,There are difficulties must modify each file.
    For example,
    Register 2014 1Q, 2014 2Q, 2014 3Q, 2014 4Q BQY Job file.
    When you run the job, the output of the job file is created.
    If the job file is changed, you must modify all four files.
    This will be only grow ations.
    Is there a way to create multiple BQY output to one of the Job File ??
    Please help me.
    Thanks

    It is not possible to have multiple BQY outpu into a job file.
    Thanks,
    KK

  • Alarm & Event Query To Spreadsheet File VI doesn't work correctly (DSC 7.1)

    I am using the Alarm & Event Query To Spreadsheet File VI to write alarms/events to an Excel spreadsheet. However there are two things it does wrong:
    1. Global variables in the header are not correctly inserted. I am using the header "{creationDate}{delimiter}{creationTime}" but none of the variables are translated to their actual values. The same header in Write Traces To Spreadsheet VI works correctly, so I assume it is only the Alarm & Event Query To Spreadsheet File VI that isn't working.
    2. My display format is set to display the date of the alarms but it never appears. Set time/ACK time, etc all appear, just not the date.
    Can anyone explain what might be wrong?

    Hi AndrewWilliams,
    I have been looking into this problem for you and I can't quite figure out exactly what it is you are trying to do. Could you possibly send me your VI's (for the Alarm & Event Query To Spreadsheet File VI and for the Write Traces To Spreadsheet VI) so I can get a better idea of it.
    Have you looked at the Export Alarms to File VI in the LabVIEW examples that are installed with the DSC module. This is a very good VI and it might help you to see any faults in your code.
    Hope this helps, I look forward to speaking to you soon.
    Best regards,
    Peter H.
    Applications Engineer.
    National Instruments.

  • How to download alv grid output(with field catalog) into excel file format

    Hi all,
    How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
    Please help.
    Regards,
    Satya.

    Hi,
    On list where alv is displayed, select export icon( green color -> ),select spread sheet.
    This will display records in Excel sheet.

Maybe you are looking for

  • Can't Uninstall/Install Quicktime...

    Basically, I want to uninstall my old version of quicktime. I basically corrupted it (I believe) because it won't open. When I remove the app from my mac, it's no longer there. However, whenever I'm trying to re-install using the official Quicktime 7

  • How to format 250Gb IDE disk

    I'm using Sun Ultra 5/10. I'm trying to add new 250 Gb IDE hard disk. But all I can do is format 127Gb. So, I realized there is LBA limitation. Is it possible to break this threshold?

  • How can i connect a printer through PLSQL for taking printouts

    Hi, I want to take a printout of the specified file through PLSQL. Pls give u'r idea. Thanks Suresh

  • Installation Icon Disappears w/out installing w/out error msg

    64 bit Windows 7 Home Premium SP1 on an ASUS laptop.  First noticed a problem with itunes - saying 'itunes has detected a problem with your audio configuration.' I checked youtube on IE9, and the video and audio were fine.  On Chrome however, youtube

  • Simple Viewer

    OK, so first off I need people to check out my site because this is going to be really hard to explain. My computer crashed and when pulling over back-up stuff I forgot to bring over my MassReplaceit stuff and lost/forgot for to work the flash in my