cancel
Showing results for 
Search instead for 
Did you mean: 

How to get active plan version dynamically

Former Member
0 Kudos

Hi all,

I am making some HR reports in which I am pulling up position long text from hrp1001 by giving condition - where plavr = '01' . Now if the active plan version is not 01, my condition becomes vague.

Please let me know how to determine the active plan version dynamically in my sample code below

SELECT APERNR AOTYPE B~STEXT INTO CORRESPONDING FIELDS OF TABLE ITAB_EMP_DEATILS3 FROM PA0001 AS A

INNER JOIN HRP1000 AS B ON BOTYPE = AOTYPE AND BOBJID = APLANS WHERE ( BOTYPE = 'S' AND BPLVAR = '01' AND AENDDA = '99991231' AND BENDDA = '99991231') AND A~PERNR IN PNPPERNR.

SORT ITAB_EMP_DEATILS3 BY PERNR.

DELETE ADJACENT DUPLICATES FROM ITAB_EMP_DEATILS3.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello!

In our project, we use cl_lso_const=>plvar. Look for a similar class for storing constants in your module.

Regards,

Neha