cancel
Showing results for 
Search instead for 
Did you mean: 

How to update Z fields in project table (DPR_PROJECT)?

former_member202077
Participant
0 Kudos

Hello

I have added a Z field, say my_field to DPR_PROJECT table via CI (customer include) structure, but i din't placed any associated UI element on the webdynpro, its a standalone field, its updated by a standalone Z program.

I mean, i have developed a Z prog., wherein am determining the value of my_field, now i need to update it in DPR_ROJECT table, pls. suggest me how can i achieve my requirement?

My assumption is that the SUB_SYSTEM (CL_DPR_DEMO_SUBSYSTEM) class will only help us in updatig the custom tables, but not custom fields of standard SAP table, DPR_PROJECT

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi MSR,

One way you can do this is to modify the WDP application and configuration to include the custom fields.

However, the simplest way to expose a custom field is to have it appear in a special "Custom Fields" tab within the Object Detail screen.  It would look much like the User Fields in PS, where they exist in a tab page altogether.  To enable this, configuration activity is required.

Go to the following node in the IMG to include custom fields in the UI:

PPM  >  PRO  >  Global Enhancements to Project Elements  >  Set Up Field Control

In this activity, you will need to:

  1. Modify an existing field control profile (or create one from copy) to include your custom fields
  2. Specify the Proj Mgmt object type ("category") you want the field to be visible in (i.e. DPO - Project Def)
  3. Specify any conditions that influence field control
  4. And assign fields to field groups  (defines behavior of UI field based on conditions and security context)

Additionally, you can create more tab pages with custom fields via the following activities also within the above SPRO node:

  • Show Additional Tab Pages in Project Mgmt - allows you to add WDP applications (standard or custom) in a unique tab page, by object type
  • Define Field Groups for Customer Fields - allows you to add and organize custom fields in the custom fields tab page, by object type

Lastly, you MUST specify a field control profile for a specific project type for these settings to be enabled within Project Management:

PPM  >  PRO  >  Structure > Define Project Types

In the activity, one specific field control profile can be selected from a dropdown for each unique project type.  And voila!  You should have custom fields in the cProjects UI  --- all via configuration!

I hope this helps, and good luck.

- Lawrence

former_member202077
Participant
0 Kudos

Thank you, but bcz of some reaons i don't want to go w/ webdynpro (as you suggested) approach.

Pls. let me know do we hv any other approach?

Regards

Former Member
0 Kudos

Hi MSR,

That's what I just outlined above --- you can expose custom fields (Z-fields) that you've added in the relevant standard tables in the standard UI via configuration.  SPRO.

I've outlined the steps for you above.

Answers (1)

Answers (1)

former_member201206
Active Contributor
0 Kudos

Hi,

if the field is editable in the UI, then no additional codes is needed to get it possted in the database accordingly.

If you would like to determine the field value according certain logic 'in dark', the BAdI may the solution. Please check the BAdI DPR_ATTRIBUTES following methods, depends on when you would like to determin the value:

SET_DEFAULTS_UPON_COPYING

SET_DEFAULTS_UPON_CREATION

SET_DATA_EXT

What you can consider, if above BAdI does not fit your requirement, then the BAdI DPR_EVENTS is auch eine possibility.

Kind regards,

Zhenbo