on 10-31-2008 6:12 AM
Hi all,
I have a small problem and i am wondering whether you can help me.
I have created a new custom field having 3 drop down values in cprojects custom fields tab. Now, the business wants me to have a default value for the drop down ( one of the 3 values )every time a new project is created.
I think that there is some custom coding involved. But, i don't know where to code. Can someone please help?
Thanks
Mazin.
Hi Vanessa,
Thanks for the prompt answer.
I found the implementation for that badi dpr_attributes in transaction SE19 and i placed an external breakpoint for the same in the method SET_DEFAULTS_UPON_COPYING. I found out that this method is executed once when a new project is created.
This is perfect. But, since i am a newbie, i would like to know how to find the element to assign the default value i am trying for. Please let me know.
Best Regards,
Mazin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello mazin,
you have to modify CS_ATTRIBUTES in order to change your attributes. You can see the example source code for this.
FIELD-SYMBOLS:
<ls_attributes_phase> TYPE dpr_ts_phase_int.
ASSIGN cs_attributes TO <ls_attributes_phase>.
and then change the values in ls_attrubtes_phase (or the other corresponding things like projectdefinition or task)
For some other things regarding this topic just have a look at my latest postings or the postings of https://forums.sdn.sap.com/profile.jspa?userID=3716740 because there I am asking similiar questions and Matthias is really familiar with stuff like this.
cu, Vanessa
Hi Vanessa,
Thanks a lot, i solved my issue. A well deserved 10 points have been awarded.
I made my code changes in the method set_defaults_upon_copying. This gets activated whenever a project is created from a template .
Best Regards,
Mazin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mazin,
I think you could try the BADI DPR_ATTRIBUTES there are two methods to set default values. One is SET_DEFAULTS_UPON_CREATION and the other is SET_DEFAULTS_UPON_COPYING.
Hope that helps,
Vanessa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
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.