SAP EHP2 FOR SAP NETWEAVER 7.0

Release 702

SP-Level 0017

A requirement to extend existing standard functionality for PSS when users register questions and answers. User input validation is necessary when saving – it is not to be allowed for users to duplicate answers for different questions.

In order to achieve this enhancement, the WebDynpro component GRAC_UIBB_USER_REGISTER is to be modified as per SAP recommendation as there are no Notes available to accommodate this requirement.

First you need to open the component in transaction se80.

Then open the Methods tab on the Component Controller and open the ‘Controller’ menu item and choose ‘Enhance’ or Ctrl+F4 (shortcut)

RegisterPSSWDC.JPG

Create the enhancement – this will create Pre Post and Overwrite Exit methods.

Because the table update method is called in the SAVE method, it is necessary to create the Overwrite exit method for the SAVE method.

Copy and paste the SAVE Method source code into the Overwrite Method and modify it as required.

To report this post you need to login first.

3 Comments

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

    1. Sharif Gool Post author

      Hi Zoltan,

      It’s pretty basic… I have included a check after the read from the context node in the standard ‘SAVE’ method.

      Another thing to note is that the UPDATE method is called based on an ERROR flag that is not set. When this error flag is set, the update is not triggered.

      So read the entries in the table, check for duplicates and display an error message if there are any, without writing the entries to the database table. Pass an ‘X’ to the error flag and then issue the error message.

         LOOP AT lt_n_security_question INTO ls_n_security_question1.

           ls_answeranswer = ls_n_security_question1answer.

           APPEND ls_answer TO lt_answer.

         ENDLOOP.

         IF lines( lt_answer ) > 0.

           SORT lt_answer.

           DELETE ADJACENT DUPLICATES FROM lt_answer.

         ENDIF.

         IF lines( lt_answer ) <> lines( lt_n_security_question ).

           lv_error = abap_true.

           CALL METHOD wd_this->mr_message_manager->report_t100_message

             EXPORTING

               iv_msgid     = ‘ZGRC’

               iv_msgno     = 001

               io_component = wd_this

               iv_severity  = if_fpm_message_manager=>gc_severity_error.

         ENDIF.

      (0) 

Leave a Reply