Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Enhancment of ERC_C_REQ_MGMT_UI compoent

Hi Experts,

I was doing enhancement for ERC_C_REQ_MGMT_UI. In the view V_GEN_JOB_INFO, I want to populate default values to ORGANIZATION UNIT section ( Org.unit for position, Job for position ) and ACCOUNT ASSIGNMENT section ( Cost center) when i create requisition for position.


For this, I created a post exit for SET_POS_AND_HRM method and written the logic as follow.

   DATA: ls_1001 TYPE hrp1001.

   DATA: lv_org_objid  TYPE rcf_s_pos_basic_info_pl-org_objid,

         lv_job_objid  TYPE rcf_s_pos_basic_info_pl-job_objid,

         lv_costcenter TYPE kostl.

   DATA: lv_objid TYPE hrp1001-objid.

   lv_objid = ls_position-pos_hrobject-objid.

   CLEAR ls_1001.

   SELECT SINGLE * FROM hrp1001 INTO ls_1001

                               WHERE otype = 'S'

                                 AND objid lv_objid

                                 AND rsign = 'A'

                                 AND relat = '003'

                                 AND sclas = 'O'

                                 AND endda = '99991231'.

   IF sy-subrc = 0.

     MOVE ls_1001-sobid TO ls_org_unit-org_objid.

   ENDIF.

   lv_org_objid = ls_org_unit-org_objid."'80026042'.

   SELECT SINGLE * FROM hrp1001 INTO ls_1001

                               WHERE otype = 'S'

                                 AND objid lv_objid

                                 AND rsign = 'B'

                                 AND relat = '007'

                                 AND sclas = 'C'

                                 AND endda = '99991231'.

   IF sy-subrc = 0.

     MOVE ls_1001-sobid TO ls_org_unit-job_objid.

   ENDIF.

   lv_job_objid ls_org_unit-job_objid.

   SELECT SINGLE * FROM hrp1001 INTO ls_1001

                               WHERE otype = 'S'

                                 AND objid lv_objid

                                 AND rsign = 'A'

                                 AND relat = '011'

                                 AND sclas = 'K'

                                 AND endda = '99991231'.

   IF sy-subrc = 0.

     MOVE ls_1001-sobid TO ls_org_unit_nopos_cost-costcenter.

   ENDIF.

   lv_costcenter = ls_org_unit_nopos_cost-costcenter.

   lo_el_org_unit->set_attribute(

     EXPORTING

       value '10000'"lv_org_objid "ls_org_unit-org_objid   " Attribute Value

       name  'ORG_OBJID'   " Web Dynpro: Name of Context Element

   ).

   lo_el_org_unit->set_attribute(

     EXPORTING

       value = '10000'"lv_job_objid    " Attribute Value

       name  = 'JOB_OBJID'    " Web Dynpro: Name of Context Element

   ).

   lo_el_org_unit_nopos_cost->set_attribute(

     EXPORTING

       value = 'CC'"lv_costcenter    " Attribute Value

       name  = 'COSTCENTER'    " Web Dynpro: Name of Context Element

   ).

But, when i set the attributes, the data is not displaying into those corresponding fields(org.unit for position, job for position, costcenter).

Please suggest me which method should i enhance it.

Best regards,

Narasimha.

Not what you were looking for? View more on this topic or Ask a question