on 09-09-2015 1:02 PM
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.
Hi Kiran & Ram,
Now its working fine.
I wrote logic in method SET_POS_AND_HRM which is located in COMPONENTCONTROLLER/PROCESS_EVENT method. Now the default values are coming.
Earlier, in method SAVE_GEN_JOB_INFO, they were clearing the organization unit section values if the organization unit text initial. So i fetch the Org.unit text and binded it.
Now, I am facing a issue in same application. I have a requirement to default the salary range field.
the salary range field values in the format like 10.000,00 - 20.000,00. i need to compare the value 15000.00 with salary range field.
But the format is different. it should be 15.000,00. How would i achieve it?
How to achieve the value from 15.000,00 to 15000?
Best regards,
Narasimha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narasimha,
Have you tried debugging????
Check whether the corresponding attribute holds the value at run time.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Don't have access to this Application Environment. Is this method SET_POS_AND_HRM calling in WDDOINIT method?
Please check if the initialization/ clearing is happening in WDDOMODIFYVIEW method.
To set default values, you could create a Post Exit for WDDOMODIFYVIEW method,
IF first_time = abap_true.
*Set default values.
endif.
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.