Application Development 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: 

HR_INFOTYPE_OPERATION is not working in user exit ZXPADU02

Former Member
0 Kudos

Hi frndz,

i want to delimit/modify record in infotype 0014 after checking some condition when user clicks on SAVE in infotype 0008.

For this i'm using the code like below.

In Include ZXPADU02.

when '0008'.

IF sy-ucomm = 'UPD'.

chek <condition>

if sysubrc = 0.

Lock employee.

Delimti(LIS9) record in IT0014 using HR_READ_INFOTYPE_OPERATION.

Unlock employee.

endif.

Here every thing working fine but record is not getting delimitted.

Could anybody please help me any other possibilities to solve it.

Thanks and Regards,

Venkat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I tried to use the FM HR_INFOTYPE_OPERATION in ZXPADU02 but I found that it will

not update data in the real DB table(PAXXXX).I found that in FM 'HR_MAINTAIN_MASTERDATA' from FM 'HR_INFOTYPE_OPERATION' will set the field 'PSPAR-PBPFL' as 'X'.

In standard program, it looks like if this field is set it will not do the logic to update the DB table. So I put the code in other report and then call in the ZXPADU02. I think it's about LUW.

Code as follows to understand.

data:
      lw_p0008      LIKE p0008,
      lw_pskey      LIKE pskey,
      lv_option,

          EXPORT lw_p0008 lw_pskey lv_option
            to memory id 'ZXPADU02_0008'.


          submit ZHRR_PA_ZXPADU02_0008
                 and return.

Inside program ZHRR_PA_ZXPADU02_0008

IMPORT w_p0008 lw_pskey lv_option
    FROM MEMORY ID 'ZXPADU02_0008'.

  CALL FUNCTION 'ENQUEUE_EPPRELE'
        EXPORTING
          pernr          = lw_p0008-pernr
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.

  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty                  = '0008'
      number                 = lw_p0008-pernr
      subtype                = lw_pskey-subty
      objectid               = lw_pskey-objps
      lockindicator          = lw_pskey-sprps
      validityend            = lw_pskey-endda
      validitybegin          = lw_pskey-begda
      recordnumber           = lw_pskey-seqnr
      record                 = lw_p0008
      operation              = lv_opera
*      TCLAS                  = 'A'
*      DIALOG_MODE            = '1'
*      nocommit               = 'X'
*     VIEW_IDENTIFIER        =
*     SECONDARY_RECORD       =
    IMPORTING
      return                 = lw_return
*      KEY                    =
          .

  IF NOT lw_return IS INITIAL AND
     lw_return-type EQ 'E'.
    MESSAGE e000(38) WITH lw_return-message.
  ENDIF.

  CALL FUNCTION 'DEQUEUE_EPPRELE'
    EXPORTING
      pernr = lw_p0008-pernr.

If this not works, then go for dynamic action from V_T588Z as suggested by Suresh.

Regards

Eswar

7 REPLIES 7

suresh_datti
Active Contributor
0 Kudos

Why don't you go in for Dynamic Actions instead?

~Suresh

0 Kudos

Hi Suresh,

while creating a record in IT0008..If there is any record in IT0014 for the same period,then we have to delimit that record(0014).Whether dynmic cations will support my requirement?.

could you please give me some explanation how to proceed?

Thanks and Regards,

Venkat

0 Kudos

Hi Venkat,

Before resorting to Dynamic actions I suggest you to give insert(INS) as the parameter in HR_INFOTYPE_OPERATION. This will automatically delimit the record as the time constraint of Infotype 0008 is 1. I have worked on a similar requirement to delimit records in Infotype 0008 and this way worked. So try it out.

Regards,

Sakkthiss.R

P.S. If still you are not able to do it try with HR_MAINTAIN_MASTERDATA with INS as the parameter. If all these ways fail then u try for dynamic actions.

Edited by: SAKKTHISS KUMAAR on Dec 18, 2008 4:56 AM

Former Member
0 Kudos

Hi,

I tried to use the FM HR_INFOTYPE_OPERATION in ZXPADU02 but I found that it will

not update data in the real DB table(PAXXXX).I found that in FM 'HR_MAINTAIN_MASTERDATA' from FM 'HR_INFOTYPE_OPERATION' will set the field 'PSPAR-PBPFL' as 'X'.

In standard program, it looks like if this field is set it will not do the logic to update the DB table. So I put the code in other report and then call in the ZXPADU02. I think it's about LUW.

Code as follows to understand.

data:
      lw_p0008      LIKE p0008,
      lw_pskey      LIKE pskey,
      lv_option,

          EXPORT lw_p0008 lw_pskey lv_option
            to memory id 'ZXPADU02_0008'.


          submit ZHRR_PA_ZXPADU02_0008
                 and return.

Inside program ZHRR_PA_ZXPADU02_0008

IMPORT w_p0008 lw_pskey lv_option
    FROM MEMORY ID 'ZXPADU02_0008'.

  CALL FUNCTION 'ENQUEUE_EPPRELE'
        EXPORTING
          pernr          = lw_p0008-pernr
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.

  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty                  = '0008'
      number                 = lw_p0008-pernr
      subtype                = lw_pskey-subty
      objectid               = lw_pskey-objps
      lockindicator          = lw_pskey-sprps
      validityend            = lw_pskey-endda
      validitybegin          = lw_pskey-begda
      recordnumber           = lw_pskey-seqnr
      record                 = lw_p0008
      operation              = lv_opera
*      TCLAS                  = 'A'
*      DIALOG_MODE            = '1'
*      nocommit               = 'X'
*     VIEW_IDENTIFIER        =
*     SECONDARY_RECORD       =
    IMPORTING
      return                 = lw_return
*      KEY                    =
          .

  IF NOT lw_return IS INITIAL AND
     lw_return-type EQ 'E'.
    MESSAGE e000(38) WITH lw_return-message.
  ENDIF.

  CALL FUNCTION 'DEQUEUE_EPPRELE'
    EXPORTING
      pernr = lw_p0008-pernr.

If this not works, then go for dynamic action from V_T588Z as suggested by Suresh.

Regards

Eswar

0 Kudos

Hi Guyz,

Thanks for all your valuable inputs.

Thanks and Regards,

Venkat.

0 Kudos

Thank you for the post.. It helps me a lot.

Former Member
0 Kudos

Hi,

In the BADI HRPAD00INFTY has the same problem ?

I do that in the BADI HRPAD00INFTY but dont work.

Regars,

Priscila Ramos.