cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate variable values when execute the GPS in the background

Former Member
0 Kudos

Hi Friends,

I added diffrent planning functions in the Gloabl planning sequence. I used dirrenet variables in the planning level.

when i execute this GPS in the foreground i can assign the diffrent values to vaibles but how to assign the values to these variables when we execute the GPS in the background.

what are the steps to execute to GPS in the background

i need to exuecte the upc_bundle_exuecte se38 program and enter the GPS name and any other steps we needto do for executing the GPS in the background

thanks in advance.

Best regards

SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

<Font Face="Tahoma" Color="Blue">

Hi,

1. You would like to execute the GPS in background

2. There are some variables in some planning functions of GPS that user has to assign values to. If you know what these values are going to be then you may hard-code those values in variable definition...but I guess this is not your exact requirement else life is simple!

Now the last possibility which I think is quite tricky but definitely possible to achieve:

3. However if these variable values can differ at every instant and every user may select different value then -

a. I would suggest you use a Web Interface and in the Web Interface first put a variable selection box at the top of web interface where user would have to enter all required variable values.

b. Make a Planning Function of type EXIT. Write a Function Module for this Exit Function so that you can use this FM to fire GPS in background. Don't worry...this is not very difficult. Anybody who is good in ABAP in your team should be able to help you on this.

c. Parameter Group of this Planning Function would require 2 paramaters viz., GPS Technical Name and Background Job Name. So that you can specify what will be the background job name (SM37 job name) of a job which will fire your GPS in background

d. In your web interface, make a button..something like "Exceute GPS in Background". And specify the EXIT Planning Function and Parameter Group created earlier in steps b and c as values for that web element

4. It should work now. Users can make desired variable value selections in the frontend. And when they press on the button "Execute GPS in Background" (use something making more business sense as this button description), the specified GPS would be executed in background.

PS: If you are using Planning Folders, then also above solution would work for you. Simply read Web Interface as Planning Folder and things will make sense.

Regards,

Abhijit

<removed request for points as it is against the rules>

</Font>

Edited by: Siegfried Szameitat on Nov 5, 2008 10:03 AM

Former Member
0 Kudos

Hi Abhijit

Thanks for ur reply. But my requirement is i need to execute the GPS in background from BPS0 transation.

when i select GPS in the context menu we will get option "Execute GPS in the background".

when i am execting GPS from here we can see "set variables" option in the application toolbar.

I assigned the varaible values from here and after that i selected the "Execute GPS in the background"

after execution this i can see the message like "Job BUNDLE_EXECUTE was scheduled for background processing"

but when i go into SM37 the same job is getting cancelled

why it is happening like this.

do i need to do any other settings apart from set variables.

if i am missing something please sugeest me.

anybody had the same experience. Please share ur expeirence.

Thanks in advance

best regards

SAP

Former Member
0 Kudos

Hi,

Any background job gets cancelled only when any of the job step needs user-inout. If there are any variables in your GPS which requires user to input some values then you will not be able to execute the GPS in background.

You can use only those variables and planning functions in GPS (which has to be executed in background) which can be determined automatically and doesn't need any manual intervention.

Regards,

Deepti

Answers (1)

Answers (1)

manish_jain7
Active Participant
0 Kudos

Hi there

It is important to understand- How variable works in BPS.

You need to set (save) the variables in planning front end. It is saved for a specific user.

There are two ways to pass variable selection to GPS.

1 ) a ) Set up Admin user who always set the variable, probably create a folder with the required variables

b ) Set up a process chain to excute the planning function in background, calling program with variant

c ) Execute the process chain using the admin user (it is in attribute of process chain)

d ) process chain uses the variable set by Admin user

2 ) By default process chain is executed using the RFC user

a ) before running process chain (with planning functions), upload the variable selection in BPS for RFC user. There is how to paper available for loading variable selection "How to Upload User-Specific Variable Selections in BW-BPS"

b ) uploaded variable selection for RFC user is used in process chain.

Finally, last option is pass variable selection is to create a custom program calling method cl_sem_variable and cl_save_all with parameters user name which will replace the rfc user with parameterised user, so flexibly you can set up to pass the any user variables values.

Regards,

Manish Jain