cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

E-Recruitment: New Field on Requisition Approval Page

former_member455947
Participant
0 Likes
420

Dear Experts


I want to add field for comments on requisition approval pages. As shown below:


I make the z-copy of BSP application “HRRCF_APPROVAL” and add the comment field “COM” in view “approve_m.bsp”. Now when user clicks on “Approve”, “Reject” or “Put on Hold” button, comments should be save.


My question is, in which method we have to write the code the save the comments? If it is in Event Handlder of view “application.bsp”, then how can we get the field “COM” in this view?

Best Regards
Iftikhar Ali

Accepted Solutions (1)

Accepted Solutions (1)

former_member455947
Participant
0 Likes

I am still waiting the response from experts.

Regards

Iftikhar Ali

former_member455947
Participant
0 Likes

I have solved the problem. I done following.

  1. Add page attribute “COMM” of type “string” in view “approve.bsp”
  2. Add long text field in view “approve.bsp” by using following code.

"

    <phtmlb:formLayoutTextEdit id       = "COMM"
                               label    = "Comments"
                               pos      = "rowspan=4"
                               wrapping = "<%= controller->text_edit_wrapping %>"
                               text     = "<%= controller->COMM %>" />

"

   3.  Add following code in “OnInitialization” event of view “application.bsp” to get the contents entered in long text fields “COMM” added in step 3.

"

DATA: lw_fields TYPE ihttpnvp,
            lt_fields TYPE tihttpnvp.

CALL METHOD request->get_form_fields
  CHANGING
    fields = lt_fields.
"

  4.Use Function module “SAVE_TEXT” to save the comments.

Regards

Iftikhar Ali

Answers (1)

Answers (1)

NicoleGeischnek
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ifthikar,

You need to add the comments field first in the view of the BSP application and then add the logic in the controller responsible (CL_HRRCF_APPROVAL_APPROVE_V).

In standard we store such text in the knowledge warehouse. So you can check that in class CL_HRRCF_HRKWF_STORAGE. Of course you can store it also differently.

Best regards,

Nicole

former_member455947
Participant
0 Likes

Dear Nicole

I already insert the long text field in view “approve.bsp”. I am able to write the code to save the comments. I already make the z-copy of class “CL_HRRCF_APPROVAL_APPROVE_V”. But I want to know is which method of class “CL_HRRCF_APPROVAL_APPROVE_V” I have to put the code?

Best Regards
Iftikhar Ali

NicoleGeischnek
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Ifthikar,

If you mean the saving of the new status and so on, this is done in the workflow itself - task 51807971 which executes method UPDATESTATUS of BOR object type ERC_REQUI.

Best regards,

Nicole Geischnek

former_member455947
Participant
0 Likes

Dear Nicole

Thanks for helping me by replying to my post.

Let me to explain my requirement in more detail.

I am working on Personal Requisition approval BSP application “HRRCF_APPROVAL”.

There is a requirement that approver should insert his comments at the time of approving or rejecting the requisition. So there is need of new long text field on approval page.

  1. For this purpose I make the z-copy of application “HRRCF_APPROVAL” and controller class “CL_HRRCF_APPROVAL_APPROVE_V”.
  2. I insert the long text field in the view “approve.bsp” and re-define the methods “DO_HANDLE_EVENT” and “DO_HANDLE_DATA” and put the code to save the comments there.

But these methods are not triggers/ called and hence comments are not saved.

So my question is how to save the comments? And if it should be done in workflow then how comment will be available in workflow?

I have very little experience of BSP so detailed answer will be highly appreciated.

Best Regards

Iftikhar Ali