cancel
Showing results for 
Search instead for 
Did you mean: 

Amount restriction

Former Member
0 Kudos

Hi Guys,

I do have One issue.I want the Restrict the Amount using date fields in Query level.

For Ex: By default i have to run the query for Last fiscal year/period (ex:008/2014).I have to restrict the amount using the below Conditions.

I have to get the Period end date for the last fiscal year/period and also apply the below date condition

Period end date = Amount (start date <= period end date and posting date is > period end date)

Help me out!

Thanks

Niranjan

Accepted Solutions (0)

Answers (1)

Answers (1)

yasemin_kilinc
Active Contributor
0 Kudos

Hi Niranjan,

You can follow this procedure for thisrequirement.

Add a characteristic restriction for 0fiscper. You can use 0FPER for the last fiscal period.

Then you can create a customer exit variable for start date.

In the exit, read the value of 0FPER, when you know 0FPER you can also know year and fiscal year variant. then you can use the function LAST_DAY_IN_PERIOD_GET giving the inputs year for I_gjahr (like 2004),  fiscal year variant (like K4) for I_PERIV and fiscal period for I_POPER (like 008). You can set the result to this variable. I have given examples for this kinds of codes in many threads. You can just search for them, if you have difficulty writing the code I can also assist on that. But please try yourself first.

In the amount restriction add the filter for start date as <= to this variable.

Create another variable for posting date with customer exit. Add the same code to this variable (We can't use the same variable for two characteristics in the query designer, that is why we do it like this).

Add the filter for posting date as > to this variable.

This will solve your problem.

Hope it helps.

Regards

Yasemin...

Former Member
0 Kudos

Hi Yasemin,

I am able to resolve this.

Thanks for your quick reply!

Thanks

Niranjan