Showing results for 
Search instead for 
Did you mean: 

Dynamic week calculation in updating info structure

Former Member
0 Kudos

SAP uses program RMCBDISP to update information structure S094 (requirement and stock analysis in inventory controlling). To automatically update the info. structure a variant of the program is created and scheduled in a background job. Usually in this type of update you want to fill up the info structure with data for current week and e.g. the next 20 weeks. However, your only choice of period in the original RMCBDISP is to choose a start week and end week.

To solve this problem I have just installed Note 769747, which is supposed to help on this issue. A new program has been installed, Z_RMCBDISP. Now you can create variants where you choose a start date and instead of a end date you specify the total number of weeks. According to the note the program now determines the week following the start date you entered and builds the S094 information structure for that week and for all subsequent weeks up to the total number you entered.

My problem is that this really does not help if you schedule a variant of the program as a background job and want a dynamic week calculation. This because the start date that you specify will not change unless you manually change it in the variant, it does not help if you specify the total number of weeks instead of the end date unless the start date changes automatically to e.g.. current date.

Does anyone have a proposal how to solve this?


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Andreas, Please find a step by step process for creating variants which are dynamic.

Step 1


Go to program Z_RMCBDISP, hit save on the initial screen to create a new variant. Now you will be in "Save as Variant" screen.

Step 2


In that screen enter Variant Name and Description.

additionally if you go down below you will see a block called "Field Attributes "

Required field

Switch GPA off

Save field without values

<i><u><b>Selection variable</b></u></i>

Hide field 'BIS'

Hide field

Protect field

Step 3


Try to choose the exact field that you want to be dynamic (for example from and to dates). mark the checkbox relevant to this date field and "Selection Variable" attribute.

Step 4


Once you have done that, on the top right hand corner you will see Selection variables Push button.

If you click that you will get another screen indicating if you are going to define

T: Table variable from TVARV

😧 Dynamic date calculation

B: User-defined variables

In your case you are going to need Dynamic Date calculation.

If you see a yellow light icon for your corresponding date field, please click on the yellow light and it will turn to green.

Once it turns to green, click on a small inverted triangle button, to pick how you want your dates. it can range from current date, or current date + 1 etc.

Answers (0)