Powered By

Free XML Skins for Blogger

Powered by Blogger

Saturday, October 11, 2008

SAP ABAP SAVING LISTS AND BACK GROUND PROCESSING

SAVING LISTS AND BACK GROUND PROCESSING:


There are three ways to save a list that you have generated:

1.) In SAPoffice
2.) As a local file on your PC
3.) In the area menu

You can always use menu sequence STL-1 in the System menu to save the list, or use the List menu in the standard list status.

You can also create folders in SAPoffice. You can use these folders to store the lists. When a list is placed in the outbox of the personal folders, it can also be sent to other users.

You can save a list to a PC as a local file in four different formats:

1.) Unconverted (ASCII)
2.) Spreadsheet format (-> Microsoft Excel)
3.) RTF (Rich Text Format -> Microsoft Word)
4.) HTML (Web Browser)

You can use the program RSSOPCDR to specify the default file that the system proposes when the user chooses to save a file to the local PC.

The area menus have been converted to tree navigation in Release 4.6A. Type 1 programs and SAP queries can now be added to the area menus in addition to the previously contained transactions. Any programs that do not have a transaction code are allocated one automatically.

The report trees have been integrated in the area menus in Release 4.6. The report trees are now maintained using the maintenance tools for area menus. You can maintain area menus in the Workbench menu path STL-1.

Saved lists are saved with the program itself. If the program has been integrated in the area menu, then the saved lists will also appear there. You can also use standard program RSRSSLIS to display saved lists.

A user can access an area menu whenever that area menu has been allocated to an activity group to which the user belongs. You can use the profile generator to allocate an area menu to an activity group.

There are 4 options for printing a list:

1) From the selection screen

The list is printed when it is generated (adjusted to print format) and does not appear on the screen.

The list is generated in a dialog work process

2) From within the program

The first two points of 1, above
This procedure is suitable for interactive lists: printing details lists

3) After the list has been generated
The list has already been generated (visible on the screen) and can be formatted within limits.

For example, the number of columns in the list cannot be changed after the list is generated.

The list is generated in a dialog work process

4) In the background

The list can be printed after it has been generated (as described in 1 above)
The list is generated in a background work process. This procedure is particularly suitable for long lists, since it does not block a dialog work process during processing.

To print a list, you must enter print parameters. The print parameters control list output and are divided into the following areas:

1) Output device and number of copies
2) Spool request
3) Spool control
4) Cover sheets
5) Output format

You can enter print parameters on the screen or set them directly in the program. Setting print parameters in the program is treated below (NEW-PAGE PRINT ON).

You can use the function module SET_PRINT_PARAMETERS to set default values for printing an online list; you can execute print from the selection screen or after generation of the list.

NEW-PAGE PRINT ON triggers a page break, and all the subsequent output is redirected to the spool.

The print parameters can either be passed on to the system as a structure with the PARAMETERS attribute or - as shown in the above example - specified individually.

Individual entry of print parameters is not recommended. Consider the case where the user arrives at the print parameter screen and decides not to print; the only option in this case would be to terminate the entire program.

In contrast, if you use the PARAMETERS attribute, the user can cancel printing without having to terminate the program.

If you enter parameter NO DIALOG, the list is placed directly in the spool without giving the user any opportunity to change the print parameters at runtime.
If you do not enter NO DIALOG, the user is presented with a print parameters screen containing default values at runtime.

NEW-PAGE PRINT OFF triggers a page break, ends the spool request (sy-spono is assigned), and all subsequent output is once again output on the screen.

The structure for the PARAMETERS attribute of the NEW-PAGE PRINT ON statement must be filled using function module GET_PRINT_PARAMETERS. The structure contains an internal checksum that is calculated by NEW-PAGE PRINT ON. If the checksum is incorrect, the program terminates. Function module GET_PRINT_PARAMETERS calculates the checksum and returns it with out_parameters.

Function module GET_PRINT_PARAMETERS provides users with a print parameters screen that can be used to modify the print parameters and then determine a complete new set of print parameters. The set is returned using output parameter out_parameters. In successful cases, output parameter "valid" contains the value 'X'. If the system cannot create a complete set record of print parameters, the structure transferred with out_parameters is empty and valid contains the value "space".

You can transfer print parameters to the function module GET_PRINT_PARAMETERS. The print parameters appear as default values in the print parameters screen.

The print parameters screen of function module GET_PRINT_PARAMETERS offers the option of canceling the filling of print parameters. In this case, the structure transferred with out_parameters is empty and valid contains the value "space".

One application could be to send a list to several recipients.

This has been implemented in the above example. To send a list to several recipients, you have to distribute it among several spool requests. To do this, you use parameter NEW_LIST_ID and then NEW-PAGE PRINT OFF to end the spool request.

When a program converts large datasets and requires a long runtime, it makes sense to start it in the background.

Background runs take place without user dialogs, and can take place in parallel to online operations.

The dialog work processes are available for online processing. Background job runs are performed by special work processes (background processes), which enables distributed processing.

To start a program in the background, you must first add it to a job.

Use the job definition to determine which programs (steps) will run during this job. You can specify print parameters and set the start time for the job.

The job overview tells you the current status of the job.

Define job is located under menu path STL-2. First assign a name (of your choice) and define the priority (job class) and the destination (F4 help).

Then determine the individual steps of the job. If you want the program to run with a
selection screen, you also have to specify a variant. The list can be stored in the spool or printed immediately.

This depends on the specified print parameters. When you have defined all the steps, save them and return to the initial screen of the job definition.

Once you have defined the steps, you can determine the start date for the job. For example, you can start the job on a certain day at a certain time.

Once you have defined the start date, save your entries and return to the initial screen of the job definition. Now save the job, which releases it to run at the specified time.

No comments:

Archives