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

ABAP HR

Former Member
0 Likes
1,242

Hi Experts,

I need to get posnr field from table hrt1018. How can I join tables HRP1018 and HRT1018 i.e the fields which should be used in join statement. I will really appriciate if any one can write this query for me. Or is there any fm which does this.

Thank you.

Rewards,

Admir.

Hi Experts,

I need to get posnr field from table hrt1018. How can I join tables HRP1018 and HRT1018 i.e the fields which should be used in join statement. I will really appriciate if any one can write this query for me. Or is there any fm which does this.

Thank you.

Rewards,

Admir.

8 REPLIES 8
Read only

suresh_datti
Active Contributor
0 Likes
1,176

Instead of a join, make it a two step process ie

1. call function 'RH_READ_INFTY'

2. Pass the p1018 from step 1 to 'RH_READ_INFTY_TABDATA'

this should give you back the rleveant HRT1018.

~Suresh

Read only

0 Likes
1,176

Hi Suresh,

When I am trying to read output from 2nd step i.e it_1018_tab-posnr its giving me a very big number like this 030006/445/11/sc03000101. But posnr in my table is only 8 digit number. I will appriciate your help.

Thank you.

Regards,

Admir.

Points will be rewarded.

Read only

0 Likes
1,176

If you have defined the itab <i>it_1018_tab</i> of structure<b> hrt1018</b>, the field <b>POSNR</b> can hold only 8 numbers/chars. Can you verify that?

~Suresh

Read only

0 Likes
1,176

data: it_1018_tab like hrt1018 occurs 0 with header line. This is how I defined.

I dont know why the output is this. I tried using CONVERSION_EXIT_ABPSP_OUTPUT this function and now my output is <<<PR03000101>>>.

Thank you.

Read only

0 Likes
1,176

Hi Suresh,

Can you please see what is wrong. I am struck here. please see the above message.

Thank you.

Regards,

Admir.

Points will be rewarded.

Read only

0 Likes
1,175

just strip the 1st two chars after the conversion_exit call ie

data w_posnr(8).

w_posnr = output+2(8).

~Suresh

Read only

0 Likes
1,175

Hi Suresh,

Can you please check this code, am I calling the functions in correct way. In 'RH_READ_INFTY_TABDATA' the INFTY = '1018' is correct or it should be output of 'RH_READ_INFTY' i.e it_1018.

call function 'RH_READ_INFTY'

exporting

plvar = '01'

otype = 'S'

objid = wa_p0001_plans

infty = '1018'

istat = '1'

begda = pnpbegda

endda = pnpendda

tables

innnn = it_1018

exceptions

all_infty_with_subty = 1

nothing_found = 2

no_objects = 3

wrong_condition = 4

wrong_parameters = 5

others = 6.

if sy-subrc = '0'.

CALL FUNCTION 'RH_READ_INFTY_TABDATA'

EXPORTING

INFTY = '1018'

  • DBMODE = ' '

  • RETURN_INITIAL = 'X'

TABLES

INNNN = it_1018

HRTNNNN = it_1018_tab

  • EXCEPTIONS

  • NO_TABLE_INFTY = 1

  • INNNN_EMPTY = 2

  • NOTHING_FOUND = 3

  • OTHERS = 4

.

IF SY-SUBRC = 0.

itab_con_data-fundid = it_1018_tab-posnr.

ENDIF.

endif.

Thank you.

Admir.

Points will be rewarded.

Read only

0 Likes
1,175

Thank you Experts.