Some times we have to show error message when the form is 1st displayed. In HCMPF its bit tricky to show the error message from IF_HRASR00GEN_SERVICE~INITIALIZE of generic service. It never displays the error message when form is displayed even after filling the message_handler with the error message. Once form is initialized, from the do_operations we can show the error all messages.

There are at least two different ways to show the error message in the initialization of form.

1. Restriction using BADI

From the process of hrasr_dt transaction, we can use the BADI to restrict and show the appropriate error message to end users.

/wp-content/uploads/2014/02/restriction_using_badi_383307.jpg

After implementing the badi, users will see the screen like this:

/wp-content/uploads/2014/02/error_message_using_badi_383308.jpg

 

2. By Implementing post exit for method INITIALIZE_FORM of class CL_HRASR00_PROCESS_EXECUTE

The error message thrown by the INITIALIZE method of generic service has to be passed to  et_messages in the INITIALIZE_FORM method. Passing error message to et_messages will show the error messages on the WD From.

/wp-content/uploads/2014/02/code_screen_shot_383339.jpg

After implementing the post method, users will see the screen like this:

The advantage of this way is, the WDA HCMPF form will be displayed and it will show the error message.

/wp-content/uploads/2014/02/error_message_using_enhancement_383340.jpg

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Srikanth Naidu Akula

    Hi Yugandhar,

    I am neither belong to HCMPF nor a technical guy, still I got benefited from many of your replies for my threads. I am here to thank you for your contributions to SCN and boomers like us.

    Why don’t you maintain a profile picture ? I believe it really gives us a familiar feel.

    Srikanth

    (0) 
    1. Yugandhar Reddy Post author

      Hi Srikanth,

      Good to know that its helping. When ever I do need any help, I do search in this forum, it has helped me a lot. As a give back I too try to give back and share the info.

      Some how I never put pictures anywhere on net, might be I need to think about it.

      Regards

      Yugandhar Reddy

      (0) 
  2. MALYADRI JWALA G

    hi yugandar ,

    I too never worked on HCMPF but in initial stages of my ESS WDA implementation project  I saw ur replies it helped me a lot too much.if ur not keeping ur pic its ur wish… but send it my maild id i will see as we are part of one community i.e.,  SCN

    (0) 

Leave a Reply