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

BAPI HR_INFOTYPE_OPERATION

Former Member
0 Likes
1,509

Hi,

I use Bapi HR_INFOTYPE_OPERATION to modify the infotype 0001.

for that i use this function with in import : pernr :


data:  w_return  like  bapireturn1,
        w_key like  bapipakey.
data: VALIDITYEND type pa0001-endda.
data: VALIDITYBEGIN type pa0001-begda .

data:fs_pa0001 type p0001.

select single *
from pa0001
into  corresponding fields of fs_pa0001
where pernr = pernr.


VALIDITYEND = fs_pa0001-endda.
VALIDITYBEGIN = fs_pa0001-begda.

clear fs_pa0001-KOStl.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = fs_pa0001-pernr.


call function 'HR_INFOTYPE_OPERATION'

    exporting
      infty                  = '0001'
      number                 = pernr
*   SUBTYPE                =
*   OBJECTID               =
*   LOCKINDICATOR          =
   validityend            = VALIDITYEND
   validitybegin          = VALIDITYBEGIN
*   RECORDNUMBER           =
      record                 = fs_pa0001
      operation              = 'INSS'
   TCLAS                  = 'A'
   DIALOG_MODE            = '0'
    NOCOMMIT               = X
*   VIEW_IDENTIFIER        =
*   SECONDARY_RECORD       =
 importing
   return                 = w_return
   key                    = w_key.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = fs_pa0001-pernr.

This function work and the pernr-KOSTL is empty but I need to refresh in PA30 the Personnel Number ( Enter to take the modification )

All that is a test because i need to use that when i am in the transaction PA40. but the personnel number must be refresh to take the modification. Can i refresh Personnel Number to take the modification in my program (my program is in an badi : HRPAD00INFTY)?

Hope it's clear

Thanks

1 ACCEPTED SOLUTION
Read only

rainer_hbenthal
Active Contributor
0 Likes
956

Hope it's clear

Not really. But sounds that you have the intgration active and in that case the costcenter shouldnt be updated in the PA area but in the org structure.

Hi,

I use Bapi HR_INFOTYPE_OPERATION to modify the infotype 0001.

for that i use this function with in import : pernr :


data:  w_return  like  bapireturn1,
        w_key like  bapipakey.
data: VALIDITYEND type pa0001-endda.
data: VALIDITYBEGIN type pa0001-begda .

data:fs_pa0001 type p0001.

select single *
from pa0001
into  corresponding fields of fs_pa0001
where pernr = pernr.


VALIDITYEND = fs_pa0001-endda.
VALIDITYBEGIN = fs_pa0001-begda.

clear fs_pa0001-KOStl.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = fs_pa0001-pernr.


call function 'HR_INFOTYPE_OPERATION'

    exporting
      infty                  = '0001'
      number                 = pernr
*   SUBTYPE                =
*   OBJECTID               =
*   LOCKINDICATOR          =
   validityend            = VALIDITYEND
   validitybegin          = VALIDITYBEGIN
*   RECORDNUMBER           =
      record                 = fs_pa0001
      operation              = 'INSS'
   TCLAS                  = 'A'
   DIALOG_MODE            = '0'
    NOCOMMIT               = X
*   VIEW_IDENTIFIER        =
*   SECONDARY_RECORD       =
 importing
   return                 = w_return
   key                    = w_key.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = fs_pa0001-pernr.

This function work and the pernr-KOSTL is empty but I need to refresh in PA30 the Personnel Number ( Enter to take the modification )

All that is a test because i need to use that when i am in the transaction PA40. but the personnel number must be refresh to take the modification. Can i refresh Personnel Number to take the modification in my program (my program is in an badi : HRPAD00INFTY)?

Hope it's clear

Thanks

2 REPLIES 2
Read only

rainer_hbenthal
Active Contributor
0 Likes
957

Hope it's clear

Not really. But sounds that you have the intgration active and in that case the costcenter shouldnt be updated in the PA area but in the org structure.

Read only

Former Member
0 Likes
956

it's not clear too but you have give me an idea thanks a lot