07-22-2015 9:10 AM
Hi
I need read infotype 2010. But there is problem because is there cost assigment and I don't read this data from PA2010.
I try method:
CL_HRPA_MASTERDATA_FACTORY=>GET_MASTERDATA_BUFFER
or
CL_HRPA_MASTERDATA_FACTORY=>GET_BUSINESS_LOGIC
or
cl_hrpa_masterdata_factory=>GET_READ_INFOTYPE (but there I can't see cost assigment)
This work fine. But problem is, when my program running and someone edited employee using PA30. When I read data after editing, data contain all data. It is like before editing
When in my program use BACK(F3) and jump to SELECTION SCREEN and then I run (F8) program again, data is correct (I see edited data).
Where I have mistake or what I must do for read edited data?
Thank you
07-22-2015 9:32 AM
Hello!
1. Try to use functional module HR_READ_INFOTYPE providing the parameter BYPASS_BUFFER = 'X'.
2. You could get the cost assignment for infotype 2010 record from tables ASSHR and ASSOB
07-22-2015 9:32 AM
Hello!
1. Try to use functional module HR_READ_INFOTYPE providing the parameter BYPASS_BUFFER = 'X'.
2. You could get the cost assignment for infotype 2010 record from tables ASSHR and ASSOB
07-22-2015 9:58 AM
Hi
Thank you very much. You very help me.
I create JOIN
ASSRH~PDSNR = ASSOB~PDSNR
There I read (AUFNR, KOSTL, NPLNR, VORNR and SUBTY)
How I connect ASSRH to PA2010 (because from this table I need STDAZ - if ENDDA, BEGDA and SUBTY will be same)?
Thank you
07-22-2015 10:12 AM
To connect PA2010 and ASSHR, ASSOB:
1. Read value PDSNR from table ASSHR using infotype full key (sub-structure PSKEY from P2010)
2. Read table ASSOB using previously found value PDSNR to get cost assignment values that you need.
07-22-2015 10:25 AM
Hi
I create this select. But when in same day will be same (ENDDA, BEGDA and SUBTY), will be a problem.
SELECT ASSHR~PERNR
PA0002~NACHN
PA0002~VORNA
PA2010~LGART
PA2010~STDAZ
PA2010~BETRG
ASSOB~KOSTL
ASSOB~NPLNR
ASSOB~VORNR
ASSOB~AUFNR
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ASSHR
INNER JOIN ASSOB ON ASSHR~PDSNR = ASSOB~PDSNR
INNER JOIN PA2010 ON ASSHR~PERNR = PA2010~PERNR
AND ASSHR~BEGDA = PA2010~BEGDA
AND ASSHR~ENDDA = PA2010~ENDDA
AND ASSHR~SUBTY = PA2010~SUBTY
INNER JOIN PA0002 ON ASSHR~PERNR = PA0002~PERNR
WHERE
ASSHR~BEGDA >= '20150601'
AND ASSHR~ENDDA <= '20150801'
.
I you would like, can you explain me 1 point (sub-structure PSKEY from P2010). Because when I use HR_READ_INFOTYPE I can't see ...
Thank you
07-22-2015 10:40 AM
The sub-structure PSKEY contains an infotype full-key: PERNR, INFTY, SUBTY, OBJPS, SPRPS, ENDDA, BEGDA, SEQNR. You should read table ASSHR using all this fields as WHERE-condition.
This approach will help you to solve the issue when fields BEGDA, ENDDA, SUBTY are the same, because in this case the values of fields OBJPS, SEQNR will be different.
Therefore you should use full infotype key to join tables PA2010 and ASSHR.