Vaue of sy-tcode when executing the report program in the background

Hello All,
To test and find out the value of sy-tcode when the report program is exectued in the background. I have done the below steps.
1. created a report program with the code given below.
Select option was just defiend to get the selection screen. it is of no use.
Select-options: s_name for sy-uname.
Write:/ sy-uname,sy-tcode.
2. then I created a transaction for the program to identify whether the value of sy-tcode explicitly.
3. Then I launched the transaction and in the selection screen of the program I selected the option of executing the program in the backgroung and i process the job immediately.
4 . In the spool I am able to see the correct sy-uname value but not the sy-tcode.
Where as if i am executing it in the foregroung it is giving the correct value of sy-uname and sy-tcode.
Can anybody provide me the reason as to why this is happening . that is in the backgound mode the value of sy-tcode is getting cleared.
Thanks,
Mohit

Hello,
As they say it is an SAP standard behavior, you can "hardcode" the transaction itself into the ABAP code...
ie:
if sy-batch eq 'X' "->IT MEANS THAT IT IS A BACKGROUND JOB.
w_tcode = 'Z*****'.
else.
endif.
bYE!!
Gabriel P.-

Similar Messages

  • Invalid Object Name When Executing from Report Manager

    I ran some code to create a modified view of ExecutionLog3 on a SQL Server 2012 instance.  The ReportServer and ReportServerTempDB were transferred from a 2005 instance and are still on that compatibility level. After creating the new view, I 
    created a report in SSDT and it runs fine.  I deployed the dataset followed by the report.  I went to Report Manager to test it and the report fails with the following:
    An error has occurred during report processing. (rsProcessingAborted)
    The execution failed for the shared data set
    'ExecutionLog'. (rsDataSetExecutionError)
    Query execution failed for dataset ''. (rsErrorExecutingCommand)
    Invalid object name 'ExecutionLog3_Modified'.
    The code for the view is below and it came from MSSQLTips.  Why does the report run fine from SSDT and fail in Report Manager?
    USE [ReportServer]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE VIEW [dbo].[ExecutionLog3_Modified]
    AS
    SELECT
    EL.InstanceName,
    COALESCE(C.Path, 'Unknown') AS ItemPath,
    EL.UserName,
    EL.ExecutionId,
    CASE(EL.RequestType)
    WHEN 0 THEN 'Interactive'
    WHEN 1 THEN 'Subscription'
    WHEN 2 THEN 'Refresh Cache'
    ELSE 'Unknown'
    END AS RequestType,
    -- SubscriptionId,
    EL.Format,
    Parameters,
    CASE(EL.ReportAction)
    WHEN 1 THEN 'Render'
    WHEN 2 THEN 'BookmarkNavigation'
    WHEN 3 THEN 'DocumentMapNavigation'
    WHEN 4 THEN 'DrillThrough'
    WHEN 5 THEN 'FindString'
    WHEN 6 THEN 'GetDocumentMap'
    WHEN 7 THEN 'Toggle'
    WHEN 8 THEN 'Sort'
    WHEN 9 THEN 'Execute'
    ELSE 'Unknown'
    END AS ItemAction,
    EL.TimeStart,
    YEAR(EL.TimeStart) AS Start_Year,
    MONTH(EL.TimeStart) AS Start_Month,
    DATENAME(MONTH,EL.TimeStart) AS Start_Month_Name,
    DATENAME(DW,EL.TimeStart) AS Start_Day_Of_Week,
    DATEPART(WEEKDAY,EL.TimeStart) AS Start_Day_Number_of_Week,
    EL.TimeEnd,
    EL.TimeDataRetrieval,
    EL.TimeProcessing,
    EL.TimeRendering,
    CASE(EL.Source)
    WHEN 1 THEN 'Live'
    WHEN 2 THEN 'Cache'
    WHEN 3 THEN 'Snapshot'
    WHEN 4 THEN 'History'
    WHEN 5 THEN 'AdHoc'
    WHEN 6 THEN 'Session'
    WHEN 7 THEN 'Rdce'
    ELSE 'Unknown'
    END AS Source,
    EL.Status,
    EL.ByteCount,
    EL.[RowCount],
    EL.AdditionalInfo,
    C.Name,
    C.CreatedByID,
    C.ModifiedByID,
    C.Description,
    C.CreationDate,
    C.ModifiedDate,
    CASE
    WHEN C.TYPE=1 THEN 'Folder'
    WHEN C.TYPE=2 THEN 'Report'
    WHEN C.TYPE=3 THEN 'XML'
    WHEN C.TYPE=4 THEN 'Linked Report'
    WHEN C.TYPE=5 THEN 'Data Source'
    WHEN C.TYPE=6 THEN 'Model'
    WHEN C.TYPE=8 THEN 'Shared Dataset'
    WHEN C.TYPE=9 THEN 'Report Part'
    END AS Type_Description
    FROM
    ExecutionLogStorage AS EL
    LEFT OUTER JOIN Catalog AS C ON (EL.ReportID = C.ItemID)
    GO
    Lee Markum

    Hi Lee,
    According to your description, you can't process the dataset when viewing the report on report server. Right?
    In this scenario, as you can see the dataset name in error message is empty, and it says "Invalid Object Name". Because you have already created a view in your database. When you run this report again, this query be executed again so that you can
    not create another view with same name. So you just need to query the view directly when creating dataset. 
    Select * from ExecutionLog3_Modify
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Error message when executing a report through a VB application

    Hello,
    I have a problem when I want to launch a Crystal Report 10 report in a Visual Basic application.
    I created a report using "Add a command" to add a SQL query to this report, the report is working well when I launch it in Crystal Report. But when I launch it in the application I get an error message "The table 'Command' could not be found".
    (Other reports are working in VB when I create a report whitout the sql command tool)
    How can I do to make this working through VB ?
    This application uses a sql server 2005 database.
    Thank's in advance for your help,
    Régis

    Thank's for your answer, yes I'm connecting through an ODBC connection, yes the VB app is running the same odbc entry.
    When I have only a "normal" link to a table the report is working well, the problem is that when I add a sql command in this report, the VB application thinks it's a "normal" sql table and it gives me the error message. The VB application didn't recognize that the table command in the report is a sql request. I don't know what's the difference between executing this report directly in CR or in the VB application, the report didn't react in the same way even if the ODBC entry is the same.
    I don't know if what I try to do is possible, is it possible to execute a CR report with a sql command in a VB application ?
    FI : I found yesterday the way to create the same report without a sql command, its working in the VB app. But it would be great if I could solve this problem because it's much more easier to create a report giving only the sql request and not to do that manually in the report (attaching all the tables, making the group by, sort...).

  • Error when executing MSS report  PWPC_RPT_START_REPORT_TEST in Se38

    HI Experts,
    when am executing the program we have following problem.
    Error when excuting function z_perf_eed_profmat.
    values in selection screen:
    Scenario : zall(custom) and fcode z_perf_eed_profmat (custom).
    Please help me on this.
    Advance thanks,
    satya

    Please try converting the standadrd-delivered scenario RPT0, then check
    out the things.
    Also problem may be that your function code names contain
    the character '&'. This causes a problem when the selected function
    code is passed to the ITS-WebGUI as a URL parameter. Please use only
    standard characters (A..Z and _) when you define a function code.
    Then it should work.
    Please go through the following link also
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/
    3198408d953154e10000000a1550b0/frameset.htm
    Please test in backend using Se38 > PWPC_RPT_START_REPORT_TEST
    The Reporting Iview in the portal has the Report category type, by
    the report category type is set to "RPT0". Therefore, when the
    application is launched, the reporting category type is also sent as URL
    parameter to the backend system. As of ECC 6.0 only the reporting
    category type "RPT0" is supported. ensure this is set for your custom reports if you are using own scenarion
    then set in the Iview property of reports as well
    ie example
    1)Change the Iview property "Scenario" of the Reporting iview from
    "RPT0" to your own "ZRPT", than this set of reports will work. however,
    the standard reports will not work.
    pwpc_convert_mdt_to_lpa >>
    The following list of reports have been converted.

  • Unable to execute the report.  2108: The object requested: doest not exist in repository

    <BR>Hi,<BR><BR>I have developed report and saved . when I tried to execute from Hyperion reports web URL . It is giving me the error . The object requested does not exist in the repository Error No 2108.<BR><BR>can any one help me in resolving the isssue<BR><BR><BR>tx in advance for the help<BR><BR>regards<BR>bheemesh<BR>

    There might be a number of reasons why your report doesnt open up .One of the main reasons is that your report is incorrectly configured for the server and application .If you think that it is correctly configured .Then try exporting the report and then delete the report from the repository and then re-import the report back to the repository and check the server/application configuration and then run ur report again on the web . You should do fineeeeee.Naveen

  • Getting the variant name when the report program is run in background

    Hi All,
    How to get the variant name for the report program when run in background? My requirement is to create an email attachement with the name 'variant.XLS', where variant = selection screen variant, when the report program is run in background. The system field SY-SLSET holds the variant name only when run online.
    Any pointers to this will be highly appreciated.
    Thanks and regards,
    Nilesh.

    Hello Nilesh,
    Please find the algo:
    1. Call the FM: GET_JOB_RUNTIME_INFO to get the background job details.
    2. Select data from TBTCP using these details:
    DATA:
    FP_EVENTID   TYPE BTCEVENTID
    FP_EVTPARM   TYPE BTCEVTPARM
    FP_ACTIVE    TYPE BTCXPGFLAG
    FP_JOBCNT    TYPE BTCJOBCNT
    FP_JOBNM     TYPE BTCJOB
    FP_STEPCNT   TYPE BTCSTEPCNT.
      CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
        IMPORTING
          EVENTID                 = FP_EVENTID
          EVENTPARM               = FP_EVTPARM
          EXTERNAL_PROGRAM_ACTIVE = FP_ACTIVE
          JOBCOUNT                = FP_JOBCNT
          JOBNAME                 = FP_JOBNM
          STEPCOUNT               = FP_STEPCNT
        EXCEPTIONS
          NO_RUNTIME_INFO         = 1
          OTHERS                  = 2.
      IF SY-SUBRC <> 0.
    *   Error calling FM: GET_JOB_RUNTIME_INFO
      ENDIF.
    DATA: FP_VARIANT TYPE BTCVARIANT.
      SELECT JOBNAME JOBCOUNT STEPCOUNT VARIANT
      FROM   TBTCP
      INTO TABLE L_IT_TBTCP
      WHERE  JOBNAME   = FP_JOBNM
      AND    JOBCOUNT  = FP_JOBCNT
      AND    STEPCOUNT = FP_STEPCNT.
      IF SY-SUBRC = 0.
        SORT L_IT_TBTCP BY JOBNM JOBCNT STEPCNT.
        READ TABLE L_IT_TBTCP INTO L_WA_TBTCP INDEX 1.
        IF SY-SUBRC = 0.
          FP_VARIANT = L_WA_TBTCP-VARIANT.
        ENDIF.
      ENDIF.
    Hope this helps.
    BR,
    Suhas

  • When send the report directly to the printer from Oracle IDS 9i

    Hi.....
    I m using Oracle IDS 9i, Oracle AS 9i and Database 9i for my new project.But i m facing a problem when i m trying to show a report from oracle IDS 9i.When i send the report directly to the printer without showing it,then the printer connected to the application server is working.But the printer connected to with PC(From where a send the command) is not working but printer connected with AS is working,but not that one which one i m wanting.....Why this problem is happening?Can anyone help me?
    KSI

    Note:It is always better to have network based printers rather then PC shared printers. What that means is your printer is not connected to a PC. It has a direct connection to the network via NIC. You would then setup the printer on your AS in the printers setup. If the AS is rebooted you do not need to authenticate the printer shares again with a network based printer.
    If I understand you correctly, you have a printer connected to your AS(application server) and a printer connected to your PC. You can submit a report direct to the printer connected to the AS but cannot send a report direct to your printer connected to your PC.
    From the symptoms you described, the problem is usually associated with the AS not being able to see the printer shared on your PC. You either have the address to your printer address defined wrong or your AS is trying to direct a job to your printer but doesn't have rights to do it.
    First, Try to print a notepad job to your printer attached to your PC from the AS. This will tell you if you have access to do so or not.
    - If it can't, you need to figure out why? This has nothing to do with oracle.
    Second, thing to check is your Oracle "Report Queue Manager" on the AS. Make sure that you can submit a report manually from the Report Queue Manager. If it fails the "Report Queue Manager" will give you useful errors as to why it failed. This will help you isolate the problem.
    Third, Once you can submit a job from the reports queue manager manually to your shared printer you should be able to submit from your application direct. If it still does not work your address to the printer is incorrect. Try submitting manually through the reports queue manager again. When selecting printer you will be given a list of accessible printers from the AS. Select the one connected to your PC. Once selected the full network address will appear. Copy and use this as the printer location in your job submission through your application.
    That's it... Where using this right now and it works great. Hope this helps.
    Eric.

  • When executing query...in the result i want to display each row values

    Hi All,
    When executing query...in the result area i want to display  each row values.
    Example:  query result is like this
    Business Area   Sales   Material 
    kh02                 1000      2000
                            2000       300
                            5000        400
                            6990       1000
    Kh03                1400        700
                             200        500
                              50          60
    but i need like this
    kh02               1000         2000
    kh02                500           600
    kh02                400           300
    kh03                1400         700
    kh03               200            500
    Why i need like this because am exporting to Excel spread sheet and i have to send as i show above ....i am doing manual but the file is very big like 95, 969 records i have to change manual...like this i have to change 8 files.
    please advice me easy way
    i willl be very gr8ful
    Thanks
    sidhartha

    Hi,
    that'S exactly what hide repeated key values does. If this option is on your result is:
    Kh02 1000 1500
    blank 500 456
    blank 600 700
    kh03 400 500
    balnk 500 600
    If you turn it off, the result will be:
    Kh02 1000 1500
    Kh02 500 456
    kh02 600 700
    kh03 400 500
    kh03 500 600
    Exaclty what you want. Try it, it should work
    Regards,
    Juergen

  • Hi,  We are developing quite a few excel worksheet reports. The reports dont show the cells if contain formulas ( when opened in iPad or ipod  ),  is there any good solutions .

    Hi, 
    We are developing quite a few excel worksheet reports.
    The reports dont show the cells if contain formulas ( when opened in iPad or ipod  ),
    Is there any good solutions .
    Thanks.

    There is no version of Excel for iPads.  iPads come with something that lets you view the contents of Excel files but it implements only the common easy features and there are (literally) hundreds of things you can do in Excel that it doesn't know how to show on the screen, including some functions.
    If you intend to work with spreadsheets on an iPad I suggest you buy Numbers for iPad
    http://www.apple.com/apps/iwork/numbers/
    which understands more (but still not 100%) of the things that Excel does.  It is so cheap that you can probably afford to buy a copy just to see whether it does what you want.
    If you are doing things with spreadsheets and intend to be primarily working on iPads then I suggest you actually use Numbers on a Mac as well, rather than using Excel at all.

  • NOT Able to print the Report output in the Printer

    Hello guys
    I have a concurrent Program-which is a report.A printer is installed in Oracle apps and i have assigned that printer to the concurrent Program.Now the problem is when i run the report after giving number of copies as 1 in options button,the report is getting completed sucessfully but it is not getting printed in the printer.
    please help me in this issue.
    log message:
    Printing output file.
    Request ID : 56734501      
    Number of copies : 1      
    Printer : xx-printer
    Finished executing request completion options.
    thanks

    Pl post your OS and EBS versions and pl confirm that you can print the file to the printer from the OS level using OS commands.
    MOS Doc 297522.1 - How to investigate printing issues and work towards its resolution ?
    HTH
    Srini

  • I have request in the report level but the same is missing in the infocube

    Dear Experts,
    I have request in the report level but the same is missing in the compressed infocube level. What could be the cause? does the compressed infocube deletes the request ? if so, I could able to view other requests under infocube manage level.
    Kindly provide with enough information.
    Thanks.............

    Hi
    Compressing InfoCubes
    Use
    When you load data into the InfoCube, entire requests can be inserted at the same time. Each of these requests has its own request ID, which is included in the fact table in the packet dimension. This makes it possible to pay particular attention to individual requests. One advantage of the request ID concept is that you can subsequently delete complete requests from the InfoCube.
    However, the request ID concept can also cause the same data record (all characteristics agree, with the exception of the request ID) to appear more than once in the fact table. This unnecessarily increases the volume of data, and reduces performance in reporting, as the system has to perform aggregation using the request ID every time you execute a query.
    Using compressing, you can eliminate these disadvantages, and bring data from different requests together into one single request (request ID 0).
    This function is critical, as the compressed data can no longer be deleted from the InfoCube using its request ID. You must be absolutely certain that the data loaded into the InfoCube is correct.
    Features
    You can choose request IDs and release them to be compressed. You can schedule the function immediately or in the background, and can schedule it with a process chain.
    Compressing one request takes approx. 2.5 ms per data record.
    With non-cumulative InfoCubes, compression has an additional effect on query performance. Also, the marker for non-cumulatives in non-cumulative InfoCubes is updated. This means that, on the whole, less data is read for a non-cumulative query, and the reply time is therefore reduced. See also Modeling of Non-Cumulatives with Non-Cumulative Key Figures.
    If you run the compression for a non-cumulative InfoCube, the summarization time (including the time to update the markers) will be about 5 ms per data record.
    If you are using an Oracle database as your BW database, you can also carry out a report using the relevant InfoCube in reporting while the compression is running. With other manufacturers’ databases, you will see a warning if you try to execute a query on an InfoCube while the compression is running. In this case you can execute the query once the compression has finished executing.
    If you want to avoid the InfoCube containing entries whose key figures are zero values (in reverse posting for example) you can run a zero-elimination at the same time as the compression. In this case, the entries where all key figures are equal to 0 are deleted from the fact table.
    Zero-elimination is permitted only for InfoCubes, where key figures with the aggregation behavior ‘SUM’ appear exclusively. In particular, you are not permitted to run zero-elimination with non-cumulative values.
    For non-cumulative InfoCubes, you can ensure that the non-cumulative marker is not updated by setting the indicator No Marker Updating. You have to use this option if you are loading historic non-cumulative value changes into an InfoCube after an initialization has already taken place with the current non-cumulative. Otherwise the results produced in the query will not be correct. For performance reasons, you should compress subsequent delta requests.
    Edited by: Allu on Dec 20, 2007 3:26 PM

  • Changing the report displayed on the basis of value selected frm the prompt

    Hi,
    I have requirement in which there is dashboard prompt which has three columns namely year, month and report name.
    The user will select the report name from the prompt, once done the report that has been selected should show up
    on the dashboard page and he should be able to select data on the basis of month and year from it.
    Also, if the user wants to go to the other report he should be able to select it from the prompt and view it.
    Pls shed some light on how to progress about it. As of now think if something like this is possible then it would definitley
    need two prompts one for report name and the other for month and year.
    Thx :)

    Hi Kishore,
    When i click on the link given by you it takes me to a page where a link is given with text as under
    Oracle BI 10.1.3.3/2 - Selecting Reports from Dashboard Prompts and Guided Navigation Sections
    And when i click on this nothing opens up.
    Thx
    Edited by: Phantasm on Jun 22, 2010 3:05 AM

  • Using web link to call the report by passing the parameter but report blank

    Hi,
    I have using web link to prompt to generate the report(Quotation Format) by passing SR number in Service Request object.
    The result return is blank report, the URL link that i put in as below :-
    https://secure-ausomxega.crmondemand.com/OnDemand/user/analytics/saw.dll?Go&Options=rfd&Path=/shared/Company_AEGA-3V6GLL_Shared_Folder/SR%20Quotation&Action=Navigate&P0=1&P1=eq&P2="Service Request"."SR Num"&P3=%%%SR_Number%%%
    If preview in report folder, the report is generated with the output.
    Is my syntax having problem or the method cannot be done this way?
    Please advise

    Hi Alex,
    I manage to get the report output but the result is always same.
    i have checked the filter, the filter is calling the SR number.
    When i try to output to PDF an error prompt :-
    Sax parser returned an exception. Message: Expected entity name for reference, Entity publicId: , Entity systemId: , Line number: 335, Column number: 12
    Error Details
    Error Codes: UH6MBRBC
    Thanks
    SK

  • How to Sort the report by clicking the column_header at runtime?

    Hi,<br /><br />Im New to Crystal Reports.<br /><br />Im Using Crystal report server XI. and JSP<br /><br />I need to  <strong>Sort</strong> the report by clicking the<strong> column_header</strong> at runtime.<br /><br />How to implement this ?<br /><br />Please help me.<br /><br />- Venkat.<br />

    <p>Hi Venkat</p><p>I don&#39;t believe there is a way to do this out of the box.  I believe you would have to do a custom code solution so that when you click on the header the report is re-run with a different sort order.  This may not be that easy to implement.</p><p>I&#39;m going to check with the new WebElements custom functions that were released on this site.  They may provide for this functionality. <br /></p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

  • Unable to filter the report by clicking the last column's name

    Hi,
    I have interactive report page having lots of column. All columns were not fitting in the screen so I added a code in the region--- header and footer section---
    <div style="overflow: auto; width: 1220px; height: 700px;">
    I got a scroll bar at the bottom. But a new problem arised. When I am trying to filter the report by clicking the column name in the report page , a popup is opening for the first column but the pop up is not opening for the last column. For the middle columns, the popup is opening but not below its name. This pop is for filtering the report based on that columns.
    Please give some idea to fix this bug.
    Thanks,
    Chandra Bhanu

    You could try to display as many columns as fit your screen, and put the rest of your columns as form fields in a detail view, somewhat like this:
    http://apex.oracle.com/pls/apex/f?p=vincentdeelen:report_details_in_iframe_v1
    Please tell the steps how to do it.
    Thanks,
    Chandra Bhanu

Maybe you are looking for

  • Create/drop index on a busy table

    Hello, It's kind-a of a funny question but how do you create or drop a index on a very busy table? (by making the users wait...) I tried: lock table <table> in exclusive mode then in another session (session2) update <table> set col1 = 'a'; (this ses

  • I am unable to sync my windows iTunes to my iPhone5 or my iPad air

    I have been trying for days to sync my iTunes to my iPhone 5 and my iPad air with no success. Help please

  • I forgot my ipod's code when logging on it

    I lost my Ipod in about 6 months ago, and i found it back now. Then i forgot my code to get in. <Email Edited by Host>

  • Submit Form as PDF

    Hi folks, I need the ability to submit my form to ASPX file which will process its data and also save it as PDF file in the server. As for the data processing(Submit as XML) - no problem, the form is submitted and I get XML and parser it. As for the

  • Clean up House Bank master data

    Dear experts, Our company did not use auto-payment and bank statement, the open item clearings are done directly use the Bank G/L accounts, it seems the House Banks are never used. Now we want to clean up the old House Banks because these data are to