Application Development 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: 

Function to find cost center for pernr

Former Member
0 Kudos
1,964

hello,

I looke for a function to find pernr's cost centeres from infotype 0027 (not from infotype 0001).

Thanks in advance,

Fariba

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
1,420

Do you need a function module? Can you not just do a select statement against the table?

Select * into xpa0027 from pa0027
            where pernr = p_pernr
              and endda = '99991231'.

Regards,

Rich Heilman

former_member188685
Active Contributor
0 Kudos
1,420

Hi,

why do you need FM for that

you can select the data directly from PA0027.


select * from PA0027 into X_0027 where pernr = pernr
                                  and begda ge date
                                  and endda le date.

regards

Vijay

Message was edited by: Vijay Babu Dudla

Former Member
0 Kudos
1,420

Actualy I need a function m. if there is one!!

Of course I can have it from database....