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: 

PA30 Screen is not getting refresh data for infotype 0105 subtype 9999?

former_member197696
Participant
0 Kudos
802

HI All,

            In a report i create/update communication details infotype-1015 subtype-9999 in PA30 using BAPI BAPI_EMPLCOMM_CREATE . In PA30 When i click display i get the previous result, but when i click on change  i see the new/modified record.when i come out from PA30 and reopen PA30 at that time it is showing the updated information for infotype 0105 and subtype 9999.

                                                         

                                                                                        When clicked on  Display

                                                         Inline image 1

                                                                                       After clicking Change or re-entering PA30

After reading similar discussions on this topic i have used FM HR_INITIALIZE_BUFFER and FM HR_PSBUFFER_INITIALIZE but this does not serve the purpose nor commit work .

Below is my code snippet.

  DATA: BEGIN OF 0105_return OCCURS 0.

           INCLUDE STRUCTURE bapiret1.

   DATA: END OF 0105_return.

   data: ld_value type ad_smtpadr,

         ld_pernr type pernr-pernr,

         ld_date  type datum.

   ld_value = '95039'.

   ld_pernr = '30001190'.  "enter pernr value here

   ld_date  = sy-datum.  "start date

   CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

     EXPORTING

       number = ld_pernr.

  CALL FUNCTION 'HR_INITIALIZE_BUFFER'.

  CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.

   CALL FUNCTION 'BAPI_EMPLCOMM_CREATE'

     EXPORTING

       employeenumber  = ld_pernr

       subtype         = '9999'

       validitybegin   = ld_date

       validityend     = '99991231'

       communicationid = ld_value

     IMPORTING

       return          = 0105_return.

   read table 0105_return with key type = 'E'.

   if sy-subrc ne 0.

     write:/ 'Infotype 0105 updated to new Username'.

   endif.

   CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

     EXPORTING

       number = ld_pernr.

   commit work.

Is there any way such that

1) Force the update/modify infotype.

2) Fetch information from DB bypassing the buffer.

regards,

Kishore Vishwakarma

1 ACCEPTED SOLUTION
17 REPLIES 17

Former Member
0 Kudos
209

Hi,

Try using the function module HR_INFOTYPE_OPERATION .

0 Kudos
209

Hi Preethi,

                      FM HR_INFOTYPE_OPERATION gets called inside the BAPI .

Regards,

Kishore Vishwakarma

0 Kudos
209

Values are not getting reflected in my case .

former_member184569
Active Contributor
0 Kudos
209

Did you try this refresh operation in the user exit of PA30?

ZXPADU01(User exit for PBO)

ZXPADU02 (User exit for PAI)

I think it will work if you refresh the data in the corresponding include.

0 Kudos
209

Hi Susmitha,

                          No , i did not try refresh in user exit of PA30. Can u please list the steps to be followed to achieve this.

Any hint would be very helpful.

Regards

Kishore

0 Kudos
209

Thank you for the quick reply . I have already seen that link but was struck at

change infotype buffer by reading PAXXXX and restoring to infotype buffer ( internal table name is PS ).

Trying to update the buffer.


0 Kudos
209

Hello Susmitha,

                                I think by using

PERFORM update_ps(sapfp50p) USING pskey_1 ps_1.   will serve the purpose but i am not able to use it .

Not sure of using this update_ps subroutine , could u please help me on how to use this subroutine.

regards

kishore

0 Kudos
209

Try this.

INCLUDE ZXPADU01.

case innnn-infty.

when '0105'.

  data: l_p0105   type p0105.

if innnn-subty = '9999' and ipsyst-ioper = 'DIS'

  call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn

    exporting

      prelp = innnn

    importing

      pnnnn =  l_p0105.

" Give the conditions to fetch the valid record from database.

select single * from pa0105 INTO l_p0105
                   WHERE pernr = innnn-pernr AND

                                 subty = '9999'
                              begda <= innnn-begda AND
                           endda >= innnn-begda.

if sy-subrc = 0.

  call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp

    exporting

      pnnnn = l_p0105

    importing

      prelp = innnn.

endif.

endif.

0 Kudos
209

Hi Susmitha,

Thanks for your  help.

I tried this code in the both include ZXPADU01 and ZXPADU02 . But the problem is this exit is not triggering while clicking on display  button .It is not triggering while PBO or PAI .

can you please suggest me if i am doing anything wrong to implement your above logic .

Thanks

Kishore

0 Kudos
209

Hi Sriramula,

You can try initializing your buffer in an implementation of the BEFORE_OUTPUT method of BADI HRPAD00INFTY - this will be called regardless of the operation whereas the PBO user exit is only called for COPY or INSERT

Regards,

Ian

0 Kudos
209

Hi Ian,

            what is initializing the buffer mean shall i

CALL FUNCTION 'HR_INITIALIZE_BUFFER'.

CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.

or shall i proceed with writing sushmita's logic in my PBO in BADI HRPAD00INFTY .

regards

kishore

0 Kudos
209

Hi Kishore,

Call the functions you mention, the method (IF_EX_HRPAD00INFTY~BEFORE_OUTPUT) has only importing parameters and is not intended for setting values.

You still probably want to add some conditional logic so that your buffers are only refreshed in certain circumstances (for example when infotype is 0105 and subtype 9999), otherwise it kind of defeats the purpose of buffering.

Regards,

Ian

0 Kudos
209

Thank you

0 Kudos
209

Thank you so much

Former Member
0 Kudos
209

Hi Kishore,

       I have the same issue, i tried with the updating infotype but still the same issue.

Regards

Harish

0 Kudos
209
Follow steps given by @Ian MacGregor and

  and see if you can rectify ur issue