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: 

Joining HRP1001 and PA0002 with SQ02

Former Member
0 Kudos
631

Hi all,

I'm new to SQ02, I'm used to create report with ABAP.

I'm trying to create a simple query using HRP1001 and PA0002 joined by hrp1001-sobid and pa0002-pernr.

The fields are different so it's not possible to do it with the graphical join interface.

I know I should put some ABAP somewhere in the infoset but I don't know what code and in which code section.

Please provide me with step by step instructions to achieve this.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos
355

Hi,

Below are the necessary steps.

1. InfoSet based on LDB PNPCE.

2. Infotype selections for InfoSet

3. For data from HRP1001 you can use group “Infotypes of related objects”

which includes objects related to employee ( S – position, C – job …. )

Regards

5 REPLIES 5

Former Member
0 Kudos
356

Hi,

Below are the necessary steps.

1. InfoSet based on LDB PNPCE.

2. Infotype selections for InfoSet

3. For data from HRP1001 you can use group “Infotypes of related objects”

which includes objects related to employee ( S – position, C – job …. )

Regards

0 Kudos
355

This seems to work, but I'm getting all the employees with their positions.

I need to have all positions with the employee assigned to it and even position without assignments.

0 Kudos
355

It's not possible without ABAP custom code. With SQ02 you only will archive this way.

0 Kudos
355

OK then, that's what I'll do.

Thanks all

0 Kudos
355

you can join between the tables on filed HRP1001-SOBID and PA0002-PERSNO

because all of them the personal number

thank you.