Skip to Content

HR Reporitng

Hi all i am first time working on HR report .....

my requirment are as follows

1.Last Name of Immediate Supervisor/Manager

Use PA0001-ORGEH as OBJID to read HRP1001with OTYPE 'O'. Find related object HRP1001-SOBID where SCLAS='S' and RSIGN='B' and RELAT='012'. Use SOBID as OBJID to read table HRP1001 with OTYPE='S'. Find related object HRP1001-SOBID where SCLAS='P' and RSIGN='A' and RELAT='008'. Use SOBID to output PA002-NACHN.

2.JOB_DESC

Use PA0001-PLANS as OBJID to read HRP1001with OTYPE 'S'. Find related object HRP1001-SOBID where SCLAS='C' and RSIGN='B' and RELAT='007'. Use SOBID as OBJID to read table HRP1000 with OTYPE='C'. HRP1000-STEXT is Job Desc.

i am unable to write the query...

Remember no 'SELECT' query..

plz help me

Thnx

Rohit

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2007 at 11:36 AM

    1.Last Name of Immediate Supervisor/Manager

    First get ORGEH for the personnel number PERNR.

    select ORGEH from PA0001 into gv_orgeh where PERNR = selection screen PERNR.

    then fetch from HRP1001.

    select SOBID

    from HRP1001

    into gv_sobid

    where OBJID = gv_orgeh and

    SCLAS = 'S' and

    RSIGN = 'B' and

    RELAT = '012'.

    then,

    select SOBID

    from HRP1001

    into gv_sobid1

    where OBJID = gv_sobid and

    SCLAS = 'P' and

    RSIGN = 'A' and

    RELAT = '008'.

    then,

    select NACHN

    from PA0002

    into gv_nachn

    where pernr = gv_sobid1.

    For job description, follow the same select syntax..

    hope it is helpful

    Cheers

    Shakir

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2007 at 11:36 AM

    Try using logical databases like PNP.

    regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2007 at 11:44 AM

    Hi Rohith

    Here's the asnwer for your queries,

    1.Last Name of Immediate Supervisor/Manager

    call function 'RH_STRUC_GET'

    exporting

    act_otype = 'O'

    act_objid = PA0001-ORGEH

    act_wegid = 'BOSSONLY'

    act_plvar = '01'

    act_begda = sy-datum

    act_endda = sy-datum

    tables

    result_tab = i_result.

    delete i_result where otype <> 'P'.

    Select nachn into table i_nachn from pa0002 for all entries in i_result where pernr = i_result-objid.

    2.JOB_DESC

    call function 'RH_STRUC_GET'

    exporting

    act_otype = 'S'

    act_objid = PA0001-PLANS

    act_wegid = 'B007'

    act_plvar = '01'

    act_begda = sy-datum

    act_endda = sy-datum

    tables

    result_objec = i_result_objec.

    You i_result_objec-STEXT will hold the job desc.

    ~ Ranganath

    PS : Reward points for all useful answers !

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2007 at 11:40 AM

    to get Immediate Supervisor

    select single sobid into v_sobid1

    from hrp1001 where otype = 'O'

    and objid = PA0001-ORGEH

    and rsign = 'B'

    and relat = '012'

    and sclas = 'S'.

    next ..

    select single sobid into v_sobid2

    from hrp1001 where otype = 'S'

    and objid = v_sobid1

    and rsign = 'A'

    and relat = '008'

    and sclas = 'P'.

    Use this SOBID(v_sobid2) to write select single on PA0002 to get NACHN ..

    select single sobid v_sobid1

    from hrp1001 where otype = 'O'

    and objid = PA0001-ORGEH

    and rsign = 'B'

    and relat = '012'

    and sclas = 'S'.

    To get JOB_DESC

    select single sobid into v_sobid1

    from hrp1001 where otype = 'S'

    and objid = PA0001-PLANS

    and rsign = 'B'

    and relat = '007'

    and sclas = 'C'.

    select single stext into v_stext

    from hrp1000 where otype = 'C'

    and objid = v_sobid1.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2007 at 08:48 AM

    one more query...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 04, 2007 at 08:16 AM

    thnx

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.