Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get active plan version dynamically

Former Member
0 Likes
1,879

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.

1 ACCEPTED SOLUTION
Read only

franois_henrotte
Active Contributor
0 Likes
915

Simply call FM RH_GET_PLVAR

2 REPLIES 2
Read only

franois_henrotte
Active Contributor
0 Likes
916

Simply call FM RH_GET_PLVAR

Read only

0 Likes
915

great man..... solved.