Former Member

# PDATE User Exit & Updation of Offset in Dataview

Hi Experts,

How Does the User Exit PDATE works.?As i tried with the ABAPER with this regard to PDATE , as he suggested that for back ground processing the PDATE User Exit works but in our planning Users foregroundly runs the forecast.

Ours is the Yearly Planning.

We expect that each year the user enters the dataview (independent of the time the user enters) it should start from the 01st of January of the following year.

If i give the planning start date then Data View would be Static.

We want to keep planning start date as empty to keep it rolling . However when we keep it empty the planning horizon starts from the system date. If the user enter it in October the planning horizon will start in October instead of 01st of following year. We could solve this problem with the field "offset" if the user enters each year in the same month. However they can enter this dataview one year in October the other in November so fixed offset figure will not solve the problem. If we set "3" for offset field and he enters the dataview in November then our planning horizon will start in February following year.

How does the "PDATE" user exit can solve this problem?

Is there any other Method to solve this Issue.

The logic to Update the Offset is as follows:

Current Month= X

Total Months in a year = Y

Offset = A

Variable Offset Start From = Z

Z= X-1

Assume Current Month X = 3

Z= 3-1=2

Offset A = Y - Z

A= 12 - 3 = 10

So Offset is 10.

I dont know where to put this logic.

How to update Offset automatically in Data View?

Regards

Mani

Edited by: Mani4690 on Mar 14, 2009 4:31 PM

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Mar 16, 2009 at 07:29 AM

Hi,

I had done this by implementing an enhancement spot in Fm /SAPAPO/SDP_TB_CREATE_COLS.

Basically there is a field in ET_COLS_INT called FIRSTFUTURE..The period which has this indicator set appears as the first period in the screen.

So you need to write your logic in the enhancement spot to remove the indicator from the defaulted period and set it at the first period of the next year.

10|10000 characters needed characters exceeded
• Former Member Former Member

1) If i write the logic in enhancement spot will the Offset value will automatically update?

No this logic doesnot really update the offset value. The offset value continues to remain blank

2)I have seen your thread in which you have mentioned the following:

I have never done this earlier. However i know that planning start date is stored in table /SAPAPO/PBDVWHDR-TBID_START. I tried changing this entry in the table and it correctly updated the dataview plannig start date.

So you may write a small program to update this field and it shall update the dataview.

Will this works me in my case.

My case was as folows:- I had to have the planning start date as 1st jan 2009.Assume that the current week is 50th week.By default SAP would default the first week of display as 50th week.And the reqt for me was to display current week - 4 as the first week. So in my case when i open the plannig book, the first week would be 46th week whereas the weeks between planning start date and 46th week would be still available for display but i would have to scroll to the left.So in your case if you wish to see the weeks betwen the plannig start and your first week, you may go for the enhancement spot approach. But if you are not intrested in the earlier weeks then you could go for the planning start date update by a small program approach

3)Planning start remians the same...i had kept offset blank

So if your planning start date is April 2008, and you set Jan 2009 as the first period..then Jan 2009 will be the first period defaulted in the dataview and the periods from April 2008 to jab 2009 will be available on the left hand side ..so you have to scroll to left to see this data.

In the above scenario, if i put planning start date , will the macros and time bucket scrolls?

If you set the planning start date, the macro's and time bucket willl not scroll