on 10-22-2008 2:25 PM
Hello,
I am implementing the BADI GCC_PS_PROJECT_LABEL to synchronise values between cProject an PS.
On the one hand I would like to get the details (in my case values of user defined fields implemented as CI and not as append structure) of the cProjects element to be able to read the fields.
On the other hand I would like to set the values of this fields in the wbs-element.
Unfortunately I am completly new to this topic and have no glue whether to find the cProject-fields nor to set the values of the wbs elements.
Could someone help me?
Thank you,
Vanessa
Hi Vanessa,
You can have a look to the standard implementation CPRO_PROJECT_LABEL~GET_WBS_ELEMENT.
It's possible to read the data sent from cProject with this kind of code (it is in the standard implementation):
read table ATTRIBUTES_OF_EXT_OBJ
into ls_attribute
with key data_element = 'DPR_TV_OBJECT_TYPE_CO'.
(replace 'DPR_TV_OBJECT_TYPE_CO' with your custom data element)
A pre-requisite is to implement BADI DPR_FIN_GECCO_CALC with your custom fields (method IF_EX_DPR_FIN_GECCO_ATTR~MODIFY_ATTRIBUTES for WBS-ELEMENTS).
You can then add an enhancement at the end of the method with your logic.
However, just a question: if you want to update fields from CI* includes, why don't you do it in DPR_FIN_GECCO_CALC on cProjects side only? It should work from this point.
Matthias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Matthias,
if you want to update fields from CI* includes, why don't you do it in DPR_FIN_GECCO_CALC on cProjects side only? It should work from this point.
That is a good question and I can give just a poor answer: I am using it to set the field USER_FIELD_CHAR20_1 for testing purpose to see if it works... and it works. Unfortunately this didn't work for the WBS_ACCOUNT_ASSIGNMENT_ELEMENT. This field is overridden in the GCC_PS_PROJECT_LABEL BADI (for testing purposes I was using this BAPI to change the fields and this works at this place.) Regarding this topic there is a hint 993642.
The other point is that I have no glue how to use my CI* fields. So I skipped this and was looking for a better solution.
A pre-requisite is to implement BADI DPR_FIN_GECCO_CALC with your custom fields (method IF_EX_DPR_FIN_GECCO_ATTR~MODIFY_ATTRIBUTES for WBS-ELEMENTS).
You can then add an enhancement at the end of the method with your logic.
Could you please give some additional advice on this? I think that you are right when you say that the IF_EX_DPR_FIN_GECCO_ATTR~MODIFY_ATTRIBUTES is the best place for my coding). The combination of my implemented BADI GCC_PS_PROJECT_LABEL that is not setting the accounting flags to true and the implementation of BADI DPR_FIN_GECCO_CALC with my custom fields will make my day.
Thank you very very much,
Vanessa
P.S. Are you really talking about DPR_FIN_GECCO_CALC and not DPR_FIN_GECCO_ATTR? If yes, I am lost because again I wouldn't get the point but DPR_FIN_GECCO_ATTR would give a good feeling.
Edited by: Vanessa Martinez on Oct 22, 2008 5:03 PM
Yes you're right, I did a spelling mistake: it's DPR_FIN_GECCO_ATTR.
I never tried to set the accounting flags from cProjects, so I trust you when you say it does not work.
Then, I would advise to try the enhancement I mentionned just above.
In DPR_FIN_GECCO_ATTR, add your accouting fields+value in the ct_attributes table.
ls_attribute-data_element = space.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
ls_attribute-fldname_receiver = space.
ls_attribute-struc_name_copa = space.
ls_attribute-field_name_copa = space.
ls_attribute-ext_attr_name = space.
ls_attribute-ext_attr_value = space.
INSERT ls_attribute INTO TABLE ct_attributes.
You should retrieve them in ERP side, in BADI GCC_PS_PROJECT_LABEL (CPRO implementation).
A sample read of this attribute could be:
read table ATTRIBUTES_OF_EXT_OBJ
into ls_attribute
with key data_element = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
Matthias
Hello,
somehow it doesn't work. I don't see any of my additional field when I am debugging IF_EX_GCC_PS_PROJECT_LABEL~CHANGE_WBS_ELEMENT or is this the wrong method?
The fields are not passed if I use
ls_attribute-data_element = space.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
nor if I use
ls_attribute-data_element = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = space.
Something is there going wrong and I cannot find out what.
cu, Vanessa
Vanessa,
You should not deactivate the standard one, and not create your own implementation. Becuase of the unique Business Key "CPROJECTS", only the standard one can be used. That's why your code is never called.
That's why I said before to build an enhancement at the end of the standard implementation.
Matthias
Hello,
The fields are not passed if I use
ls_attribute-data_element = space.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
and if I use this code
ls_attribute-data_element = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = space.
There is written in the controlling cockpit messages that
Component VANESSA_TEST in structure OREXT or BAPI_BUS2054_DETAIL not
available
Message no. IAOM024
Diagnosis
During creation or changing of a Controlling object a value was also
entered for component VANESSA_TEST of structure OREXT or
BAPI_BUS2054_DETAIL. However, component VANESSA_TEST is not contained in
the active structure OREXT or BAPI_BUS2054_DETAIL in the Dictionary .
-
In DPR_FIN_GECCO_ATTR, add your accouting fields+value in the ct_attributes table.
ls_attribute-data_element = space.
ls_attribute-value = 'X'.
ls_attribute-field_name_orext = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
ls_attribute-fldname_receiver = space.
ls_attribute-struc_name_copa = space.
ls_attribute-field_name_copa = space.
ls_attribute-ext_attr_name = space.
ls_attribute-ext_attr_value = space.
INSERT ls_attribute INTO TABLE ct_attributes.
You should retrieve them in ERP side, in BADI GCC_PS_PROJECT_LABEL (CPRO implementation).
A sample read of this attribute could be:
read table ATTRIBUTES_OF_EXT_OBJ
into ls_attribute
with key data_element = 'WBS_ACCOUNT_ASSIGNMENT_ELEMENT'.
Means that you are writing in the ls_attribute-field_name_orext and later on you are reading "with key data_element = ....".
Should it be mapped between the BADIs? Which one would be good to transfer my own fields between the BADIs?
Some suggestions?
Have a really nice weekend,
Vanessa
From the message you get in the cockpit, we could guess that you tried to set somewhere the orext field with value 'VANESSA_TEST'. Did you check your code that there is no test lines like this?
Then, to be honnest, I don't remember exactly what I did a few months ago. But you might be right, in ERP system, we should not read data_element, but orext field.
I will have a look on Monday in our system to check this, and will come back to you.
Matthias
Hi,
Here is a sample code from note 925883. object type is retrieved in variable lv_object_type_co.
Matthias
read table ATTRIBUTES_OF_EXT_OBJ
into ls_attribute
with key data_element = 'DPR_TV_OBJECT_TYPE_CO'.
if sy-subrc = 0.
lv_OBJECT_TYPE_CO = ls_attribute-value.
else.
lv_OBJECT_TYPE_CO = space.
endif.
if lv_OBJECT_TYPE_CO eq 'PPO'. "Phase
WBS_ACCOUNT_ASSIGNMENT_ELEMENT = ' '.
endif.
Edited by: Matthias BRISSEAU on Dec 3, 2008 1:42 PM
Okay, new question
This things work great. But when I read my neccessary values (my CI-Fields) out of the table the are not written yet....
In an previous threat you told about that you are writing your values with a little time difference to the database. I think that would be the best for me also. How can I call my FM with a delay? I have seen that I can call a function "in update task" but I don't know how to do it.
I think that I need a separat task to have it asynchron and then it should be delayed ...
Could someone help with some informations?
Thanks a lot, Vanessa
Hi,
We are using the standard business key 'CPROJECTS' and the standard implementation of the badi GCC_PS_PROJECT_LABEL. We have both cProjects and PS in the same instance.
I have observed that the badi is not being called when creating the PS Project from cProject.
In the controlling scenario we are using roles of cProject for creating the WBS element and the transfer type in Project is Flag for Transfer. Please suggest me how to call the badi so that the WBS ID can be changed during creation time.
Thanks in Advance,
Priyatham
Hello Matthias,
Please help me. I implemented BADI DPR_FIN_GECCO_ATTR to automatic generated number into client Requirment for Project, phase, task. Its working Properly. But for every task "-TT-O" is getting suffixed. How to avoid this.please help me to synchronise values between cProject an PS.
Regards
CVA
Hi Siva,
Method – GET_WBS_ELEMENT
Development –Outline:
IF lv_object_type_co NE 'DPO'.
READ TABLE attributes_of_ext_obj INTO ls_attribute
WITH KEY data_element = 'DPR_TV_PROJECT_ELEMENT_ID_CO'.
IF sy-subrc = 0.
IF lv_object_type_co EQ 'TTO' .
<Remove TTO from WBS number if needed. You can use Find and Replace or remove 5 chars from the last>
wbs_element = ls_attribute-value.
ENDIF.
ELSE.
wbs_element = ls_attribute-value.
ENDIF.
ENDIF.
User | Count |
---|---|
8 | |
7 | |
3 | |
2 | |
2 | |
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.