cancel
Showing results for 
Search instead for 
Did you mean: 

HR_Maintain_Masterdata error in webdynpro application?

Former Member
0 Kudos

HI Experts,

I have developed webdynpro application for the hiring in which enduser gets the various screen to capture the user details like(personal data,address,Position,dependents...etc) .......when the enduser confirms the inputs it triggers the SAVE method and commit with backend(It creates 0000,0001,0002,0003,0006,0008,HRP1001........etc)I am using the HR_Maintain_masterdata

Now due to structural authorization our infotype update order was changed from 0000and 0001 (one update),0002(separate)...followed by other infotype updates... TO 0000,0002&0001 (oneupdate,I have declared all 0000,0002 and 0001 as one structure and passed into HR_MAINTAIN_MASTERDATA ) remaining will be a separate updates......

When i changed the infotype update order it is dumping in method CHECK_ENAME_CHANGED .........

Dump Details:

What happened? |

| Error in the ABAP Application Program |

| |

| The current ABAP program "CL_HRPA_SAPUP50R_ADAPTER======CP" had to be |

| terminated because it has |

| come across a statement that unfortunately cannot be executed. |

----


----


|Error analysis |

| An exception occurred that is explained in detail below. |

| The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not |

| caught in |

| procedure "CHECK_ENAME_CHANGED" "(METHOD)", nor was it propagated by a RAISING |

| clause. |

| Since the caller of the procedure could not have anticipated that the |

| exception would occur, the current program is terminated. |

| The reason for the exception is: |

| You attempted to use a 'NULL' object reference (points to 'nothing') |

| access a component. |

| An object reference must point to an object (an instance of a class) |

| before it can be used to access components. |

| Either the reference was never set or it was set to 'NULL' using the |

| CLEAR statement.

Thanks in Advance,

Dharani

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Did you received any valid answer of above mentioned issue ? Please share the solution.

I am getting same issue while using HR_MAINTAIN_MASTERDATA, It01 records are not gettinginto some buffer and dump coming for ENAME conversion method.

We also cant use class based approach as class based approach can not perform Dynamic actions and also in Ehp2 (At which level My client is now), class based framework is not mature enough for hiring action.

Please suggest how you have resolved this issue. We are passing all required values in proposed tab and no errors are coming from CALL DIALOG module inside. Dump is coming on COMMIT WORK where SAP executes put_infotyp_buffer_commit(sapfp50p) perform.

Former Member
0 Kudos

Hi,

When Hiring an employee using FM HR_MAINTAIN_MASTERDATA we need to maintain all the infotypes data in that infogroup at a single shot. PROPOSED_VALUES parameter is used to pass the data. INFTY FNAME FVAL SEQNR field to be maintain. Try to debug the FM by changing the DIALOG_MODE parameter value to 1.

Regards

vijay

ChrisPaine
Active Contributor
0 Kudos

Hi Dharani,

I'd guess that the system is having difficulties creating the CP record for the employee (either it doesn't exist when it should or that some reference to the CP handler has not been created). This is certainly one of the tricky bits about creating new employees. as the FM you are using basically replicates the PA30 screens, you need to drive it as per a user creating new infotypes, committing all the data infotype by infotype.

can I suggest that perhaps you might want to use the class based methods for maintaining HR data - These are used by ESS and the ASR framework and allow you to create and test creation of all records before finally flushing to DB.

Hiring a new employee is particularly tricky - I suggest you look to the ASR framework which can do this, I have done it using the class based methods - but that's probably a blog post I'll put up in the future...

The class based logic provides a MUCH nicer and richer interface for dealing with updating HR infotypes.

There are plenty of examples of use in the PA space, but not as much in the OM space. But look around and you will find a few, and I'd imagine more and more...

Hope this helps,

Cheers,

Chris

ChrisPaine
Active Contributor
0 Kudos

examples of using the class based methods to maintain data

call method cl_hrpa_masterdata_factory=>get_plain_infotype_access
    importing
      plain_infotype_access = ao_pa_plain_access.


* OM Access
* Get the default INFTY buffer (SINGLETON)
  call method cl_hrbas_rhombuffer=>get_instance
    importing
      infty_buffer = ao_infty_buffer.
  assert ao_infty_buffer is not initial.

* We also need a Plain Buffer (e.g. for INFOTYPE_READER):
  ao_infty_plain_buffer ?= ao_infty_buffer.

* Get the instance of PD ITF (SINGLETON)
  call method cl_hrbas_dispatch_bl=>get_instance
    exporting
      infty_buffer = ao_infty_buffer
    importing
      dispatch_bl  = ao_dispatch_bl.
  assert ao_dispatch_bl is not initial.

* Get an instance of PLAIN_ACCESS
  create object ao_plain_access
    exporting
      dispatch_bl = ao_dispatch_bl.
  assert ao_plain_access is not initial.

and then:

call method ao_pa_plain_access->insert
            exporting
              tclas           = cl_hrpa_tclas=>tclas_employee
              massn           = space
              massg           = space
              no_auth_check   = abap_false
              message_handler = lo_messages
            importing
              is_ok           = l_is_ok
            changing
              pnnnn           = ls_0002.

and

call method ao_plain_access->if_hrbas_plain_infotype_access~insert
        exporting
          no_auth_check   = abap_true
          message_handler = lo_om_message_handler
        changing
          pnnnn           = ls_1001.

and finally

ao_pa_plain_access->if_hrpa_buffer_control~flush( no_commit = abap_false ).

    call method ao_plain_access->if_hrbas_buffer_control~flush
      exporting
        no_commit = abap_false.

Former Member
0 Kudos

Hi Chirs,

1) Can ASR framework methods perform all dynamic actions which PA40 program does ?

2) Can these methods be used in EHP2 system ?

3) I think ASR framework is associated with New Badis (HRINFTYPADUI and HRINFTYPADBL) instead of old Badi which classical framework uses.

I am facing same dump issue in HR_MAINTAIN_MASTERDATA which Dharani faced. It would be great if you can confirm me above questions. In that case, we can try this.

Former Member
0 Kudos

hi,

go to the transaction st22 and there you can find the description and you can realise why the runtime error is coming.

regards,

Amit

Former Member
0 Kudos

HI Amit,

Thanks for your reply.

Dump dteails which i have mentioned in the post is copied from ST22 only,I have referred the same but couldn't understand the root cause of the issue.

If you come across such issue please share the views.

Thanks in Advance,

Dharani