19 Replies Latest reply: Jun 21, 2012 3:48 AM by Tamil Tamil RSS

Implementing BADI GCC_PS_PROJECT_LABEL      GET_WBS_ELEMENT

Vanessa Martinez
Currently Being Moderated

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

  • Re: Implementing BADI GCC_PS_PROJECT_LABEL      GET_WBS_ELEMENT
    Matthias Brisseau
    Currently Being Moderated

    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

    • Re: Implementing BADI GCC_PS_PROJECT_LABEL      GET_WBS_ELEMENT
      Vanessa Martinez
      Currently Being Moderated

      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

      • Re: Implementing BADI GCC_PS_PROJECT_LABEL      GET_WBS_ELEMENT
        Matthias Brisseau
        Currently Being Moderated

        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

Actions