Application Development and Automation 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: 
Read only

SM36 - Job with variable fields

Former Member
0 Likes
1,411

Hi Gurus!

I'd like to know if its possible to schedule a job with a dynamic variable field. For example: I have to schedule a job monthly for a transaction and the field PERIOD should change according to the current period, automatically.

Is it possible?

Thanks!

rnishi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
908

Hi,

Yes you can when you would be creating a step in your job you would be using a variant now why dont you create a variant with dynamic values for the field that you want have a look at the below steps and you should be able to set a dynamic variant:


1. Enter the values in the selection screen
2. Save the variant using the SAVE button
3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
5. Click on the down arrow button and select the option 'Current Date'.
6. Save the variant.

Regards,

Himanshu

4 REPLIES 4
Read only

Former Member
0 Likes
909

Hi,

Yes you can when you would be creating a step in your job you would be using a variant now why dont you create a variant with dynamic values for the field that you want have a look at the below steps and you should be able to set a dynamic variant:


1. Enter the values in the selection screen
2. Save the variant using the SAVE button
3. In the next screen for the date variable select the 'Selection variable' checkbox (L) and click on the button 'Selection variable' in the toolbar.
4. Now you will see this variable in the next screen with 3 types of buttons. Click on the middle button (i.e. D - Dynamic date calculation).
5. Click on the down arrow button and select the option 'Current Date'.
6. Save the variant.

Regards,

Himanshu

Read only

Former Member
0 Likes
908

Hi, thanks for your help! But im using a field that does not support that. This configuration is not available...

Do you hav any other idea???

Thanks in advance!

rnishi

Read only

Former Member
0 Likes
908

hello.

this is how a demo goes.

parameter: p1 type sy-datum.

now in selection screen. click save. its take you to variant..

-click copy screen assignments

-then in objects for selection screen:-

===press F4 on selection variable,select the date one(D)

====name of variable, click F4 and choose current date,

from this in the report you can choose the period.

Read only

Former Member
0 Likes
908

We've solved this demand creating a program. The variant for this transaction should be the last open period in CO module (OKP1), so it was impossible to create by standard procedures....

Thanks for your help!

rnishi