on 03-05-2014 3:08 PM
Hello
Pls. let us know PROGRAMITICALLY (from a stnadalone Z report prog.) how can we populate the RESPONSIBLE field (as shown below) at TASK level in the BASIC DATA tab?
Pls. see the RESPONSIBLE field is blank at task's basic data tab, even though the respource is assigned to it, bcz we can see the resource name under RESOURCES tab
Thank you
Hello again
I'm not sure I understand your problem.
The general functionality of PPM is, you select a responsible role, and then all stuffed resources will be available in the drop-down "Responsible Resource". If you choose not to select one, then all the resources stuffed to the role will appear concatenated in the "Responsible" field bellow. This is how it works on our system, but I'm not sure if this was enhanced or is it standard functionality.
Try to see if you staff a resource for the "Product Technical Advisor (PTA)" and select it as a "
"Responsible Resource", if the "Responsible" fields is filled.
If not, I'll have a look how we did it. Nevertheless, it's definitely possible!
Tudor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, yes, your assumption/suggestion is absolutely correct and seems its stadard as well.
But, say for example, under the drop-down field of 'Responsible Resource:' there are A, B, C
Now, programitically from a standalone report I want to populate the Responsible: field with B
By chance do you have any clue to update a task in terms of updating 'Responsible' field
Ah, I saw your skillset in your SCN/SDN Bio tab, its awesome to have multi skill hence you will be hot in market
Regards
Good morning,
Please try the following code:
data:
lo_task type ref to cl_dpr_task_o,
lt_participants type dpr_tt_participants,
lt_responsibles type dpr_tt_participants,
lt_bupa_links type dpr_tt_bupa_links,
lv_bupa_guid type bu_partner_guid,
lv_username type syuname,
lv_name type emnam.
field-symbols:
<fr_participant> type ref to cl_dpr_participant,
<fr_bupa_link> type ref to cl_dpr_business_partner_link.
lt_responsibles[] = lo_task->mr_participant_links->get_responsibles( ).
if lt_responsibles[] is initial.
lt_participants[] = lo_task->mr_participant_links->get_participants( abap_false ).
loop at lt_participants[] assigning <fr_participant>.
lt_bupa_links[] = <fr_participant>->mr_bupa_links->get_all( ).
loop at lt_bupa_links[] assigning <fr_bupa_link>.
<fr_bupa_link>->get_bupa_data(
importing
ev_bupa_guid = lv_bupa_guid ).
call function 'BP_CENTRALPERSON_GET'
exporting
iv_bu_partner_guid = lv_bupa_guid
importing
ev_username = lv_username
ev_name = lv_name
exceptions
no_central_person = 1
no_business_partner = 2
no_id = 3
others = 4.
if not sy-subrc is initial.
continue.
endif.
if lv_username eq `B` or
lv_name eq `B`. "your conditions should come here...
try.
lo_task->mr_participant_links->add_responsible(
exporting
ir_participant = <fr_participant> ).
return. "exit method...
catch cx_dpr_object_creation_error.
"if the case, handle the error
endtry.
endif.
clear:
lv_bupa_guid,
lv_username,
lv_name.
endloop.
endloop.
endif.
I'm not sure it works, maybe you'll have to make some small corrections.
Cheers,
Tudor
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.