Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a new variant and a job sheduled to use it for the ......

Former Member
0 Kudos

How to create a new variant and a job sheduled to use it for the exisisting programs

1 ACCEPTED SOLUTION

Former Member

Hi

Goto SE38

execute

in selection screen enter the field values

press SAVE or (Control +S)

You will get a screen

enter some name and save the variant

check the checkbox for Background processing

then goto SM36 and schedule the Job with variant.

Create a Variant for the Program and

Schedule JOB in background:

Go to SM36 create a Job

click on Start Condition

Click on DATE and TIME enter date scheduled Start and END times

click on Period Values

Click on HOURLY/WEEKLY etc

CLick on RESTRICTIONS also to use further criteria.

so your job will be scheduled and run as per your requirement.

and in SM37 Transaction check the status of that JOB

Check this link for scheduling jobs..

http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm

<b>Reward points for useful Answers</b>

Regards

Anji

4 REPLIES 4

Former Member

Hi

Goto SE38

execute

in selection screen enter the field values

press SAVE or (Control +S)

You will get a screen

enter some name and save the variant

check the checkbox for Background processing

then goto SM36 and schedule the Job with variant.

Create a Variant for the Program and

Schedule JOB in background:

Go to SM36 create a Job

click on Start Condition

Click on DATE and TIME enter date scheduled Start and END times

click on Period Values

Click on HOURLY/WEEKLY etc

CLick on RESTRICTIONS also to use further criteria.

so your job will be scheduled and run as per your requirement.

and in SM37 Transaction check the status of that JOB

Check this link for scheduling jobs..

http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

Hi,

For the program,goto the selection screen and enter the values.Press SAVE and it will create a variant.Now you can goto SM36 and then use the job wizard to schedule the job.In one of the steps it will ask for the variant.Give the same variant name with which you saved the values entered in the program selection screen.

Hope it was useful.

Thanks,

Sandeep.

Former Member
0 Kudos

Hi

1. The ALV Grid Control is a tool with which you can output non-hierarchical lists in a

standardized format. The list data is displayed as a table on the screen.

The ALV Grid Control offers a range of interactive standard list functions that users need

frequently (find, sort, filter, calculate totals and subtotals, print, print preview, send list,

export list (in different formats), and so on. These functions are implemented in the

proxy object class. You as the programmer have the possibility to turn off functions not

needed. In most cases the implementations of the standard functions provided by the

control are sufficient. However, if required, you can adjust these implementations to

meet application-specific needs.

You can add self-defined functions to the toolbar, if necessary.

The ALV Grid Control allows users to adjust the layout of lists to meet their individual

requirements (for example, they can swap columns, hide columns, set filters for the

data to be displayed, calculate totals, and so on). The settings (list customizing) made

by a specific user are called a display variant. Display variants can be saved on a userspecific

or on a global basis. If such display variants exist for a list, they can be offered

to the user for selection. If a display variant is set as the default variant, the associated

list is always displayed based on the settings of this variant.

2. REUSE_ALV_LIST_DISPLAY

REUSE_ALV_GRID_DISPLAY

REUSE_ALV_FIELDCATALOG_MERGE

REUSE_ALV_COMMENTARY_WRITE

3. Use of Field Catalog is to determines the technical properties & add formating information of the column.

6. all the definition of internal table, structure, constants are declared in a type-pool called SLIS.

7.fieldcat-fieldname

fieldcat-ref_fieldname

fieldcat-tabname

fieldcat-seltext_m

5. Form user_command using r_ucomm like sy-ucomm rs_selfield type slis_selfield.

Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.

In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.

The report output can contain up to 90 columns in the display with the wide array of display options.

<b>The commonly used ALV functions used for this purpose are;</b>

1. REUSE_ALV_VARIANT_DEFAULT_GET

2. REUSE_ALV_VARIANT_F4

3. REUSE_ALV_VARIANT_EXISTENCE

4. REUSE_ALV_EVENTS_GET

5. REUSE_ALV_COMMENTARY_WRITE

6. REUSE_ALV_FIELDCATALOG_MERGE

7. REUSE_ALV_LIST_DISPLAY

8. REUSE_ALV_GRID_DISPLAY

9. REUSE_ALV_POPUP_TO_SELECT

Purpose of the above Functions are differ not all the functions are required in all the ALV Report.

But either no.7 or No.8 is there in the Program.

<b>

How you call this function in your report?</b>

After completion of all the data fetching from the database and append this data into an Internal Table. say I_ITAB.

Then use follwing function module.


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' 
EXPORTING 
I_CALLBACK_PROGRAM = 'Prog.name' 
I_STRUCTURE_NAME = 'I_ITAB' 
I_DEFAULT = 'X' 
I_SAVE = 'A' 
TABLES 
T_OUTTAB = I_ITAB. 
IF SY-SUBRC <> 0. 
WRITE: 'SY-SUBRC: ', SY-SUBRC . 
ENDIF. 
ENDFORM. " GET_FINAL_DATA

The object F_IT_ALV has a field, the activity ACTVT, which can

contain four permitted values: 01, 02, 03 and 70. Each of the

activities 01, 02 and 70 controls the availability of particular

functions (in the menu and the toolbar) of the ALV line item list:

a) 01: "Settings -> Display variant -> Save..."

b) 02: "Settings -> Display variant -> Current..." and

"Settings -> Display variant -> Current header rows "

c) 70: "Settings -> Display variant -> Administration..."

Activity 03 corresponds to the minimum authorization, which is the

most restricted one: The user can only select layouts which have

been configured already. In particular, all of the other functions

named above are inactive with activity 03.

Now if you want to permit a user to change the column selection and

the headers as well as to save the layout thus created, for example,

but if you do not want to permit the user to administrate the

layouts, you grant him or her the authorization for activities 01

and 02.

Check this link it will be mosty usefull for u

http://www.sap-img.com/fu017.htm

Reward all helpfull answers

Regards

Pavan

Former Member
0 Kudos

HI kitty,

1. It has to be done in two steps.

a) create a new variant

- goto se38

- open that program

- execute it

- fill in the required fields

- save the variant with a name (by pressing Ctrl S)

b) job sheduled

- goto sm36

- enter the details for program name as well as the variant name

- schedule as required (immediate, pre determined date and time etc)

2. U may also take help of basis team for scheduling.

regards,

amit m.