09-16-2009 12:06 PM
Dear Experts,
I am trying to modify infotype P9002 using FM 'HR_INFOTYPE_OPERATION.....
and I getting my dump error while uploading text format.
some times I get message : No data stored for 9002 in the selected period.
my requirement is: I need to modify amount fields in P9002 for some existing records in PA9002.
My question is :
1. how should be my ( notepad ) text format which is to be uploaded, should I include all the fields in P9002 in my notepad trext or just include all the fields in my internal table or only the fields which needs to be modified.
2. If I modify infotype P9002 will the data gets modified in PA9002.
Please advice
Karthik
09-16-2009 12:55 PM
TRY TO HANDLE FUNCTION MODULE LIKE THIS
IT_P0003-INFTY = '0003'.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'
pernr = p_pernr
infty = l_infty
BEGDA = '18000101'
ENDDA = '99991231'
BYPASS_BUFFER = ' '
LEGACY_MODE = ' '
IMPORTING
SUBRC = SUBRC
TABLES
infty_tab = l_infty_tab
EXCEPTIONS
INFTY_NOT_FOUND = 1
.
read table l_infty_tab index 1 into wa_infty.
CLEAR:IT_P0003.
IT_P0003 = wa_infty.
IT_P0003-ABWD1 = SY-DATUM.
09-16-2009 12:55 PM
TRY TO HANDLE FUNCTION MODULE LIKE THIS
IT_P0003-INFTY = '0003'.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'
pernr = p_pernr
infty = l_infty
BEGDA = '18000101'
ENDDA = '99991231'
BYPASS_BUFFER = ' '
LEGACY_MODE = ' '
IMPORTING
SUBRC = SUBRC
TABLES
infty_tab = l_infty_tab
EXCEPTIONS
INFTY_NOT_FOUND = 1
.
read table l_infty_tab index 1 into wa_infty.
CLEAR:IT_P0003.
IT_P0003 = wa_infty.
IT_P0003-ABWD1 = SY-DATUM.
09-16-2009 1:08 PM
Use FM 'HR_READ_INFOTYPE' to read data from the said infotype (PA9002) ..
Populate P9002 as follows
DATA: p9002 type table of pa9002 with header line.
l_infty = '9002'.
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
TCLAS = 'A'*
pernr = p_pernr
infty = l_infty
BEGDA = '18000101'*
ENDDA = '99991231'*
BYPASS_BUFFER = ' '*
LEGACY_MODE = ' '*
IMPORTING*
SUBRC = SUBRC*
TABLES
infty_tab = p9002
EXCEPTIONS*
INFTY_NOT_FOUND = 1*
.
.. and change the fields U wanted to change in structure P9002 .. (amount fields) .. from your notepad
now call FM 'HR_INFOTYPE_OPERATION' with the OPERATION you want
2. If I modify infotype P9002 will the data gets modified in PA9002.
A . It will modify PA9002.
Check this link ....
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=77006086
Let me know if you need anything more ...