cancel
Showing results for 
Search instead for 
Did you mean: 

YTD Data Pull issue's in PaPM via Process

afsarsap
Discoverer
880

Dear Expert,

Requirement - Pull Multiple period data based on current date. For eg , if Current date is 05-12-2022 then Period is determined as 012.2022. Since we run the calculation/allocation in current period for previous period so it has to be 011.2022 on date 05-12.2022.

I have defined two Parameter field. T_PERIOD and T_YEAR which is equal to line item field PERIOD and YEAR and maintained in complex selection of the join function for the input source, always to be less than current period. so if current period is 012.2022 then system should select all the period from11.2022.

in my process of calculation unit , I have selected above both parameter field and in T_PERIOD , I am deriving the period like 012.2022 from formula based on current date.

The real problem is , System is not able to read the formula and derive the value for Parameter field - T_YEARP

If it derives then I could have control the period selection based on Year.

Please advise if more than one parameter doesn't support formula in Process parameter? or let us know how to select the multiple period based on Year and it should always select excluding current period as calc is executed for previous month.

Also , in Jan month , Year should be previous year.

Regards,

Afs

Former Member
0 Kudos

Afsar.

I find it odd as well that there is a Formula option in the Process Selections Parameter, but it does not allow a formula to derive the Parameter value from, say CURRENT_DATE. The only value the "Formula" allows is an actual value for the Parameter. For example, if you have a P_YEAR parameter created as a Characteristic, CHAR, 4 and you enter formula YEAR(CURRENT_DATE) in the Parameter Selections, it returns an error as it treats the formula as a Text String and you get a overflow error because the formula is longer than 4 characters. Where if the Parameter executed the formula, then it woudl have been fine. The Formula field for Parameters should really be renamed to "Selection".

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I agree that this is a lot more complicated than it should be. A "feature request" would be to have the ability to use a standard HANA SQL function like CURRENT_DATE to dynamically derive the selection Conditions or a Parameter in the Calculation Unit Processes. We have tried, this but never found a way to make it work.

The way we have tackled the need for dynamic selection conditions is to use a variant that is defined in the TVARC table in the BW backend. There is an ABAP program that was written update the TVARC variant using the current date. When the process chain is executed using the the /NXI/P1_FW_RUN program it references the variant that was defined in TVARC.

I don't claim to understand these technical details for how to implement this on the BW backend, but I but hopefully this at least points you in the right direction. There is likely other forum members who can help fill in the blanks on how to implement this TVARC process on the BW backend.

ZYT
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi afsarsap

the parameters in PaPM are static and can't be updated by a formula by users during the process. I'd recommend you to use following condition to select the right period:

where YEAR||PERIOD = YEAR(ADD_MONTHS(TO_DATE(<CURRENT DATE FIELD>) / CURRENT_DATE, -1)) || LPAD(MONTH(ADD_MONTHS(TO_DATE(<CURRENT DATE FIELD>) / CURRENT_DATE, -1)), 3,'0')

Remark: CURRENT_DATE is the HANA function which returns the current local system date.

Best regards,

Zhiyi Tang

afsarsap
Discoverer
0 Kudos

Hi Zhiyi,

Thank you for your reply.

This is automatic extract without user involvement hence period determination via PaPM Process parameters were used and formula were written to determine the period and year. so in T_PERIOD , we were able to derive the value but another parameter field formula is not working whereas direct input value is working fine.

I will check the above condition and update you.

Thank you so much for theresponse.

Regards,

Afsar