17
5 Execute reports in background Make better use of selection criteria to run reports Send report output through electronic mail Download report data to spreadsheets or other file formats In this chapter you will learn how to: Chapter 5: Using R/3 Reports: Advanced Topics Contents Downloading Report Data to Spreadsheets or Other Files ................................ 5–2 Sending Report Results Through Electronic Mail............................................... 5–5 Making Better Use of Selection Criteria ............................................................... 5–6 Executing Reports in the Background ............................................................... 5–12 Setting Up Jobs to Execute Reports in the Background.................................. 5–15 Review ................................................................................................................... 5–17 Fundamentals of Reporting 5–1

Using R3 Reports Advanced Topics

Embed Size (px)

DESCRIPTION

Using R3 Reports_ Advanced Topics

Citation preview

  • 5

    Execute reports in background

    Make better use of selection criteria to run reports

    Send report output through electronic mail

    Download report data to spreadsheets or other file formats

    In this chapter you will learn how to:

    Chapter 5: Using R/3 Reports: Advanced Topics

    Contents

    Downloading Report Data to Spreadsheets or Other Files................................52

    Sending Report Results Through Electronic Mail...............................................55

    Making Better Use of Selection Criteria ...............................................................56

    Executing Reports in the Background ...............................................................512

    Setting Up Jobs to Execute Reports in the Background..................................515

    Review ...................................................................................................................517

    Fundamentals of Reporting 51

  • Chapter 5: Using R/3 Reports: Advanced Topics Downloading Report Data to Spreadsheets or Other Files

    In the last chapter you were introduced to the basics of using R/3 reports: < Entering selection parameters < Executing reports < Using variants (to memorize selection screen parameters for future use) < Sending report out to a printer In this chapter you learn some advanced functions to help you optimize your use of reports in the R/3 System.

    Some of the advanced topics covered in this chapter include: < Downloading reports to PC applications < Sending report output to other users via electronic mail < Making better use of the report selection screen, including advanced use of variants < Processing reports in the background We begin our discussion of advanced topics by showing how to work with report output. In the next few pages we explain how you can download report output to a file or send it through electronic mail.

    Selection screen

    Enter parameters

    Use variants (optional)

    Download to file(optional)

    Print(optional)

    Send via e-mail(optional)

    Execute reportExecute report

    Downloading Report Data to Spreadsheets or Other Files

    The R/3 System allows users to export report data to commonly used PC applications such as Microsoft Excel. Data from R/3 reports can be easily downloaded as spreadsheets or other file formats.

    Reporting Made Easy 52

  • Chapter 5: Using R/3 Reports: Advanced Topics Downloading Report Data to Spreadsheets or Other Files

    Some of the reasons why users may want to download the report data to external applications are: < Data from R/3 reports may be required input for external systems which do not have a

    programmed interface to the R/3 System < Users may seek greater control and flexibility over the format or organization of the

    report data < Data from R/3 reports may need to be shared with users who do not have access to the

    R/3 System

    Potential risks of working with downloaded data While downloading data to local files or spreadsheet applications offers certain benefits, users and security administrators should carefully consider the following risks:

    < Local data may be less secure; it may be more difficult to impose security control on data after it has been downloaded to a local file.

    < Downloaded data is no more than a snapshot in time. Unlike the data in R/3, local data quickly loses its real-time character.

    < Integrity of the downloaded data may be compromised. While the R/3 System keeps track of all data changes, an external system may not offer similar protection.

    To download report data to a file, follow these steps:

    Steps for downloading report data to a local file

    1. Execute the report of your choice. For more information on executing reports, refer to chapter 4.

    2. From the output display, use the menu path: System List Save Local file. 3. When the Save list in file window prompts you for a file type, select the desired format

    for the report you want to download. Since spreadsheets are often the most appropriate format for downloading report list output, we choose Spreadsheet.

    3

    4

    4. Choose Enter.

    Fundamentals of Reporting 53

  • Chapter 5: Using R/3 Reports: Advanced Topics Downloading Report Data to Spreadsheets or Other Files

    5. You will then be asked to enter a file name and path (for example, C:\Reports\Inventory_Status.xls) for the report you are downloading. Be sure to note the location where the list is being downloaded. For best results, include the appropriate file extension (for example, .xls for an Excel spreadsheet).

    5

    6

    6. Choose the Transfer button.

    7. Once the transfer is complete, launch the application (in this case, Microsoft Excel) and open the file. An example of a report downloaded into Excel is shown below.

    Note: When using the file within the given application, you will probably have choices on how the data can be organized. In some cases, you may wish not to manipulate the data. However, in other cases, you can configure the file with such features as tab delimitation, fixed width columns, and various fonts.

    7

    Note: Above example shows how a downloaded warehouse bin physical inventory report would look. Some users find using macros (linked programmable spreadsheet functions) efficient for output formatting.

    Reporting Made Easy 54

  • Chapter 5: Using R/3 Reports: Advanced Topics Sending Report Results Through Electronic Mail

    More information on XXL For more information about programmable spreadsheet functions, see the Extended Export of Lists (XXL). Programmable downloading to the Microsoft Excel spreadsheet program is described in book 2, Report Development Tools, of this guidebook series.

    Sending Report Results Through Electronic Mail

    If you regularly use R/3 s SAPoffice features you may find it useful to send report results to other users through electronic mail.

    To send report output through electronic mail, follow these steps:

    1. Execute the report of your choice.

    2. From the output display, use the menu path: System List Send. Using the Create Document and Send screen you can do the following:

    Change the title of the mail Create new

    attachments View mail attachments 3

    Enter text with the attachment

    Express mail Enter name(s) of the recipient

    (external or internal)

    3. Choose the Send button to send the mail.

    Note: To immediately notify the recipient that you have sent the e-mail, select the Express attribute before sending the mail. Internal users will find a notification of a received mail displayed on their screen even if they do not regularly check their mail.

    Fundamentals of Reporting 55

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    Making Better Use of Selection Criteria

    Building further on the concepts introduced in chapter 4, we now discuss some of the functions related to the selection screen.

    The selection features (or functions) covered in this section include: < Selection options < Dynamic selections < User variables The features listed above can be used in conjunction with those discussed in chapter 4.

    Selection screen

    Enter parameters

    Use variants (optional)

    Download to file(optional)

    Print(optional)

    Send via e-mail(optional)

    Execute reportExecute report

    Selection options

    Dynamic selections

    User variables

    Note: Selection options, dynamic selections, or user variables are not available with every report. However, we highlight these options here to help you make better use of these selection criteria when working with reports that offer them.

    Reporting Made Easy 56

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    Selection Options Before executing a report, you can choose selection options in the selection criteria screen. The selection options determine how values are applied for particular fields, and can improve the performance of the report generation.

    1. To access the purchasing document report shown, choose Logistics Materials managagement Purchasing Purchase orders List display By material.

    2. Place the cursor in the field (for example, Material) where selection options are to be applied.

    3

    2

    3. To select the options for a particular field (for example, Purchasing Documents), choose one of the following: Menu path: Edit Selection

    options Function key: F2 Screen button: Selection options

    4. Field values can be applied according to the criteria shown. For example, you can determine whether only the records greater than or less than a specific value should be displayed in the list.

    5. You can also use the Selection options function to indicate whether records meeting the selection criteria are to be excluded; that is, all records that do not meet the selection criteria should be displayed.

    6. Choose Enter to continue.

    4

    5

    6

    Fundamentals of Reporting 57

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    Dynamic Selections With some reports you can find dynamic selections as part of the selection screen before executing a report. Dynamic selections allow users to enter additional selection criteria (other than those shown on the basic selection screen) to further improve report performance.

    1. To illustrate the use of dynamic selections, call up a report that lists purchasing documents by PO number by choosing Logistics Materials managagement Purchasing Purchase orders List diaplays By PO number.

    2

    2. To access the dynamic selections, use one of the following: Menu path: Edit Dynamic

    selections Function key: Shift+F4 Screen button: Dynamic

    selections.

    The dynamic selections for the purchasing document header and item appear.

    33. Select Purchasing Document Header

    to choose additional fields.

    4. Choose Copy to continue. 4

    The fields contained in the header of purchasing documents are shown.

    5. Select the Company code and Purchasing document type.

    6. Choose Copy to continue.

    5

    6

    Reporting Made Easy 58

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    7. Enter the field parameters for the Company code and Purchasing document type (for example, 0001 and NB respectively).

    8. To check the field entries, choose Enter.

    7

    89. Choose Save to bring in the selections. 9

    10. Notice that two dynamically selected fields have now been activated (the dynamic selections button has changed to 2 active).

    Note: Dynamic selections are only active for the report you are executing. If you leave the report, and return to it later, your dynamic selections will not be available. However, if you create a variant of a selection screen with dynamic selections, the dynamic selections are automatically saved along with the variant.

    User Variables

    User-specific variables can be applied to affect the selection criteria of a report. User variables can be configured for individuals according to the user parameters associated with the user master record. Therefore, report output which is dependent on user variables can differ according to each users configuration.

    10

    1. To illustrate user variables, call up a report that lists material documents by material group by choosing Logistics Materials managagement Purchasing Purchase orders List displays By material group.

    2. To access user variables, use one of the following:

    2

    Menu path: Goto User variables

    Function key: Control+F6

    Fundamentals of Reporting 59

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    A screen containing possible user variables is shown at right.

    33. Every user variable has a three-character identifier (for example, WRK is an identifier for plant).

    4. Choose Get to bring the user variables brought into program execution.

    5. To display or change the variables, choose the Display or Change buttons respectively. In this example, we will choose the Change button.

    5 4

    Before you can change the user variables, you must specify which values are to be retrieved.

    6

    6. For this example, we will choose the Variable button to view the values of the user variable WRK in the user master record.

    Since no values have been configured for the user record in our example, no values were selected.

    7. In Values for selection criteria, enter a value (for example, 3000) for the plant.

    8. Choose Save to store the value.

    By entering and saving a value, we configure a user variable with the same field value for all programs related to this area (for example, Purchasing).

    7

    8

    You will now be prompted to confirm that you want to save this changed value. It is important to note that this change will effect all programs using this user variable.

    9. Choose Yes to save the changes.

    9

    Reporting Made Easy 510

  • Chapter 5: Using R/3 Reports: Advanced Topics Making Better Use of Selection Criteria

    You are now prompted to either save this user variable with no values (Save empty) or delete it (Delete).

    10. Choose Save empty to save the parameter contents.

    An information message confirms that the values for user variable WRK have now been saved.

    Note: The value was NOT saved to the user master record, but to the users personalized configuration associated with the purchasing area.

    10

    11

    11. Choose Enter to continue.

    We can, however, program user parameters for user master records. Typically, this task is performed by a security administrator.

    Shown at right is the list of parameter values for a user master record.

    1. From the SAP main menu, choose the following path to maintain user parameters: Tools Administration User maint. Users. Enter the user ID (for example, DEAN), then select Change.

    2

    2. Choose the Parameters tab.

    3. Note: The user parameter WRK (in the user master record) does not have a field value because it has not been configured.

    3

    As mentioned, the parameter configured in the previous example did not affect the user master record, but only affected the users configuration within purchasing along. To simplify processing for a user in general, the parameters can be set to values which are frequently used.

    Fundamentals of Reporting 511

  • Chapter 5: Using R/3 Reports: Advanced Topics Executing Reports in the Background

    Executing Reports in the Background

    Reports can be executed in the background to allow a user to continue working on other tasks while the report is being generated. Some reports can be executed without user involvement.

    Selection screen

    Enter parameters

    Use variants (optional)

    Download to file(optional)

    Print(optional)

    Send via e-mail(optional)

    Execute reportExecute report

    Execute report inthe background

    It is preferable to execute reports in the background if: < The report output is to be sent directly to a remote device and it is not necessary to view

    the report output online. < A variant is being used to execute the report and the user already knows what the report

    looks like. < A report is to be sent directly to the printer without requiring online viewing. < The report execution is to be spooled for later output, perhaps because the report output

    is large.

    Reporting Made Easy 512

  • Chapter 5: Using R/3 Reports: Advanced Topics Executing Reports in the Background

    To illustrate background report execution, we will call up a report which lists purchase orders for the materials bought through purchasing organization 3000. This report is to be run by the central office and is to be printed at an offsite location.

    2

    1. From the SAP main menu, choose Logistics Materials managagement Purchasing Purchase orders Material

    2. After you have entered the selection criteria, choose Program Execute in background.

    3. In the Output device field, enter the name of the offsite printer. Note: The output device must already be configured in the R/3 System.

    4. Select the Print immed. option to print the list as soon as the report execution is completed.

    5. Choose Save.

    3

    4

    5

    6. After the report has been executed, a message appears in the status bar indicating that the background job was created.

    6

    Fundamentals of Reporting 513

  • Chapter 5: Using R/3 Reports: Advanced Topics Executing Reports in the Background

    Next, we can monitor the processing of the newly created background job.

    7. From the SAP main menu, choose System Services Jobs Job overview (or enter transaction code SM37 in the Command field).

    Note: If you do not have the proper authorization to monitor such jobs, contact your system administrator. 7

    8. In the Job name field, enter the name of the background job you want to monitor. In this example we have entered a wildcard *.

    11

    9. In the User name field, enter your user name (for example, DEAN). 8

    10. Select the selection criteria to narrow your search for the desired background job.

    9

    11. Choose Enter to view the list.

    10

    12. An X in the Finished column indicates that the background processing is complete.

    14 13

    13. If the job had not been set to execute immediately, you could also choose Release to initiate it. 12

    14. To view the processing of the job, choose the Display button.

    Reporting Made Easy 514

  • Chapter 5: Using R/3 Reports: Advanced Topics Setting Up Jobs to Execute Reports in the Background

    Information related to the processing of the job is shown at right. In this example, the job RM06EM00 has a planned start date of 02/09/99.

    B EA C DIf necessary, choose any of the following for more information on the job: A Start date FB Steps C Job details D Predecessor job E Successor job(s) F Spool list recipient

    Setting Up Jobs to Execute Reports in the Background

    As shown in the previous section, background jobs can be configured to execute and print reports. However, certain parameters are needed to control the processing of the jobs.

    The parameters needed for configuration include the following: < Description of the background job < Priority of the background job (job class) < Computer on which the background job is executed < The number of "steps" in the background job (each step starts a new program) < Whether the background job processes ABAP programs or external programs < When and how often the background job is to be run

    Parameters for Background Processing To execute a report in background, you can select any of the following parameters: < Immediately: The system executes the job immediately after it has been released. < Date: You can enter a specific date and time when the job is to be run. It is also possible

    to have the background job repeated automatically. < After another job: You can enter the name of the job after which your job should be

    executed. In addition, you can determine whether this "linking" is dependent on the status. The indicator status-dependent means that the second job is only executed if the first job was finished successfully.

    Fundamentals of Reporting 515

  • Chapter 5: Using R/3 Reports: Advanced Topics Setting Up Jobs to Execute Reports in the Background

    Executereport

    inbackground

    Executereport

    inbackground

    ImmediatelyImmediately

    After another jobAfter another job

    Specific date and timeSpecific date and timeAfter a specific eventAfter a specific event

    Scheduling a job to follow another job is useful when the second job is dependent on the first job. For example:

    1. To create an evaluation

    2. To print the evaluation < After event: You can use a specific event as the trigger for the job to be run. Events are

    triggered by ABAP programs, external programs, and the R/3 System. An event is a signal indicating that a given status has been reached in the R/3 System, or in another program. If you choose the option After event, a job which is marked as periodic is restarted whenever the same event occurs again.

    Note: To print your list in background, all parameters for print control must be maintained. As previously suggested, you may want to execute the report with a variant in such cases.

    Setting Up Background Jobs

    Follow the steps shown below to configure a background job:

    1. From the SAP main menu, choose Systems Services Jobs Define jobs. Then, enter the following parameters: Name of the job. Job class to indicate the relative priority of the job (for example, A, B, or C for high,

    medium, or other respectively). Target computer name, if necessary.

    2. Choose Start date to enter the date on which you want to start your job.

    3. If you want your job to repeat at regular intervals, you must select the Execute job periodically field.

    4. Mark the interval you have chosen for your job (for example, every hour or every day).

    Reporting Made Easy 516

  • Chapter 5: Using R/3 Reports: Advanced Topics Review

    5. Choose Steps to identify the programs to be processed in the background. Depending on

    the type of program to be executed, select one of the buttons and enter the appropriate data: ABAP Program External command (for example, jobs configured by your system administrator) External program

    6. Save your background job.

    Review

    < Report output can be downloaded to files for further processing if desired. Although there are advantages to downloading data, users should carefully consider the following: Local data does not always have security control on who can see or manipulate it.

    Thus, sensitive information can get into the wrong hands. Downloaded data quickly loses its timeliness. The integrity of modified data may be compromised.

    < Depending on the degree to which you are using interoffice mail within R/3, you can take advantage of some of the mail functions. Included with interoffice mail is the ability to send report output to other users.

    < Refining selection criteria helps minimize the processing time of a report while ensuring that only the data you want is included in the report. To make better use of selection criteria use: Selection options Dynamic selections User variables

    < Background jobs can be executed so that you do not have to wait for a report to execute. You can have a report execute in the background and print the output (without having to go through the screens of the report).

    < You can schedule background jobs to execute reports (and print the output). Configuring background jobs is particularly useful for periodic report execution (for example, month-end billing, period closing, and income statements).

    Fundamentals of Reporting 517

    Chapter 5: Using R/3 Reports: Advanced Topics Downloading Report Data to Spreadsheets or Other Files Sending Report Results Through Electronic Mail Making Better Use of Selection Criteria Selection Options Dynamic Selections User Variables

    Executing Reports in the Background Setting Up Jobs to Execute Reports in the Background Parameters for Background Processing Setting Up Background Jobs

    Review