cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the value into DPR_TASK

Former Member
0 Kudos

Hi Experts,

I am enhancing the webdynpro component DPR_DET_DATA_TASK_O with two checxboxes. I added two fields in  CI_DPR_TASK for that and binded these to the atrribute in webdynpro component with checkboxes.

I need to save the value of these checkboxes (If checked then 'X') into the table DPR_TASK. But the value is not getting updated into the table DPR_TASK.

I am setting the value of check box like :

 

lo_el_viewdata

->set_attribute(
name
= `YY_TRAVEL`
value = ls_travel_ncc-travel

).

Please suggect me the solution to update the table with  the value of checboxes.

Thanks ,

Akhilesh Bhagat

Accepted Solutions (1)

Accepted Solutions (1)

schneidertho
Advisor
Advisor
0 Kudos

Hi Akhilesh

I have not done this for quite some time. I recall that you have to do some additional enhancements in the component controller. See note 1471647.

The symptom in the note does not match exactly your description. But I recall that it might also your problem (and if not, it will be necessary anyway to get the functionality properly working.

Best regards

Thorsten

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Akhilesh,

  • You have to populate your vales in the componentcontroller, not in the view.
  • Update Mapping in both controllers
  • PPM Webdynpros are a little tricky. You have to come behind the data model and SAPs peristence classes.
  • There is a BUG with default values in this Environment. If you populate values to the Webdynpro and the componentcontroller, they are nor reckognized by the change handler in the save event. You have to inform the change handler about your new fields by yourself

best reagrds

Christoph

Former Member
0 Kudos

Hi Christoph / Thorsten,

Thanks , Now the valve is updating into tha table DPR_TASK.

But now I am facingthe another problem.

Based on check box the value is updaing the table but when I closing project and then again reopening this the check boxes are unchecked????

Checkbox should be checked based on the table DPR_TASK.

If value is 'X'  in the table then the check box should be checked in the Cpro subtask lavel.

Please help me.

Regards,

Akhilesh Bhagat.

schneidertho
Advisor
Advisor
0 Kudos

Hi Akhilesh,

for the first problem (checkbox unchecked): I don't have any immediate suggestion. If you have updated the mapping etc, it should work.

for the second problem: Do I understand it correctly that you want to set the flag for all subtasks of a given task automatically (and also revoke it)?

For that requirement you could create a BAdi implementation for DPR_EVENTS and react on the event that a task has been changed. In the event handler for the event you can determine all subtasks (and the subtasks for those again) and set the flag. Disadvantage is that you do not have the information what was changed. So you might have a bit of "overhead". That should not be a problem for small projects. But you should nevertheless keep it in mind (especially if the projects are not small, but big). I guess you will find some way to avoid the "overhead", but not straight forward. The other idea would be to "inherit" the flag only during save in an implementation of a subsystem (see CL_DPR_DEMO_SUBSYSTEM). But then the user would not immediately see the change on the UI.

Best regards

Thorsten