cancel
Showing results for 
Search instead for 
Did you mean: 

SRM 7.0 Account assignment adding new field Profit_ctr

Former Member
0 Kudos

Hello All

I am hoping that someone has done this in SRM 7.0 and can help me out.

I have added PROFIT_CTR field to Account Assignment tab for SC.

We have already followed the instructions in OSS note 1082243 and added PROFIT_CTR field to the 2 tables BBP_C_ACCF and BBP_C_ACCFD. The field is available in configuration for creating a new account assignment category using PROFIT_CTR field.

In WDC, implicit enhancement was created and layout changed to make the field available in the view. The field already exists in the context so no other development was done.

The PROFIT_CTR field is now available in Assignment tab for input SC is created.

Also, configuration is done in PPOMA to default u201CProfit Centeru201D as the account assignment category.

The problem is that during the SC creation , in the Account Assignment line, field u201CAssign Numberu201D is still pointing at GL account (it is defaulted to GL Account) and not Profit Center value. I would have expected u201CAssign Numberu201D field to contain profit center value and not GL Account.

What further changes are needed?

Looking forward to any suggestions..

Thank you

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Raj,

Here is the documentation on how we did this when we were in 7.01.

Version 20.0 - :

    The new requirement needs Profit center as one of the Account assignment category.

                  In order to get the profit center an implicit enhancement is required as SAP suggested.
                                    Please see SAP’s response at the bottom of this version.

           

Enable Profit Center Field:

      1.) Enhance the class /SAPSRM/CL_PDO_ACCT_ASSGT_HLPR by creating a new post-exit for method GET_ACCCAT_TECHFIELDS.

   2.) Within the post-exit modify the field (ACC_FIELD) with new value

‘PROFIT_CTR’ of internal table ET_ACCCAT_TECHFIELD where ACC_CAT = ‘PR’.

      3.) This enables Profit center as one of the Account assignment Category.

Version 22.0 - :

     

Enable Profit Center F4 in UI:

  1. 4.)  Enhance view V_DO_ACCOUNTING of component /SAPSRM/WDC_UI_DO_ACC.

  1. 5.) Create a post-exit for method WDDOINIT of view V_DO_ACCOUNTING.

                                    6.) Within the post-exit set the value help to Application Defined. See below code.

                                               

                                                CALL METHOD lo_nd_info->set_attribute_value_help
EXPORTING
name
= 'PROFIT_CTR' " ContextAttribute Name                                 
value_help_mode
= '141' " value help mode–Application Defined.
value_help
= 'USAGE_SH_F4'. " Search help component usage.

   This enables the F4 input help for field Profit Center. Since it’s a search help in ECC and wanted to be displayed in SRM, additional development is required to bring in the F4 Popup screen.

Enable Profit Center F4 Pop-up Screen:

  1. 7.) Enhance the component controller of component /SAPSRM/WDC_UI_BACKEND_SH.
  2. 8.) Create a post-exit for method SET_BAPI_PARAMETER of the component controller.
  3. 9.) Within the post-exit set the Business objects parameters as follow

DATA ls_bapi_parameter TYPE if_componentcontroller=>element_bapi_parameter.
DATA lr_node           TYPE REF TO if_wd_context_node.
lr_node
= wd_context->get_child_node( 'BAPI_PARAMETER' ).

IF iv_field EQ 'PROFIT_CTR'.                                       

ls_bapi_parameter
-objtype   = 'BUS0015'.
ls_bapi_parameter
-objname   = 'BUS0015'.
ls_bapi_parameter
-param     = 'PROFITCENTER'.
ls_bapi_parameter
-method    = 'GETLIST'.
ls_bapi_parameter
-field     = 'PROFITCENTER'.
ls_bapi_parameter
-shlpname  = 'PRCTR_EMPTY'.
ls_bapi_parameter
-shlpparam = 'PRCTR'.
ls_bapi_parameter
-FIELD_DESC = 'TXT50'.

ENDIF.

IF ls_bapi_parameter IS NOT INITIAL.
lr_node
->bind_structure( new_item = ls_bapi_parameter ).
ENDIF.

Setting these values enables the F4 Popup screen.

Move Selected Value from Pop-up to profit center field in screen.

10.) Once value is selected from the pop-up it should be moved to the

profit center screen field.

11.) In order to do that read the context Node ‘SELECTION’. This node contains

the selected value.

  1. 12.) Now move the selected value to the profit center field in context node

       ‘COMP_CONTEXT.’     

  lr_node = wd_context->get_child_node( 'SELECTION' ).
lr_node
->get_static_attributes( IMPORTING static_attributes = ls_selection ).
lr_node
= wd_context->get_child_node( 'COMP_CONTEXT' ).
lr_node
= lr_node->get_child_node( ls_selection-node_name ).
lr_node
->get_static_attributes( EXPORTING index = ls_selection-index
IMPORTING static_attributes = ls_content ).

Version 23.0 - :

        1.) Need to raise a warning message in Shopping cart whenever the profit center is

Set to “PCDUMMY”.

2.) Edit BAdI Implementation ZCL_IM__SRM_SEI_ITEM_CHECK. Add the warning message in method IF_EX_BBP_ITEM_CHECK_BADI~BBP_ITEM_CHECK by appending a new line with error message to export table ET_MESSAGES.

Version 23.0 -

  1.) Create a customer field called ZPR_DESCRIPTION for accommodating profit center description. This is done by appending the field to structure INCL_EEW_PD_ACC_CSF.

2.)  Create a RFC in ECC which would read table CEPCT to read profit center text. This Function module is called Z_FI_GET_PROFIT_CENTER_TEXT.

       

        SELECT SINGLE MCTXT FROM cepct
INTO EV_PROFIT_CTR_TEXT WHERE spras = sy-langu
AND   prctr = IV_profit_ctr
AND   datbi >= sy-datum
AND   kokrs = IV_controlling_area.
IF sy-subrc NE 0.
RAISE PROFIT_CTR_NOT_FOUND.
ENDIF.

3.) Within BAdI  ZCL_IM__SRM_DOC_CHANGE_BAD call the function module

      Z_FI_GET_PROFIT_CENTER_TEXT. Read profit center text and fill the

Customer field ZPR_DESCRIPTION.

SAP's Response for when I raised a message about profit center.  This is what helped us to start.

Dear Customer,

In the account overview screen, for custom account assignment
categories, the GL account field would be shown in the 'Assigned to'
column by default. However, if you go to the account assignment detail,
you are able to use the search help for the profit_ctr field.

As the fields are binded dynamically, only through a modification you
would populate profit_ctr automatically.

From the SRM 6.0 release onwards, the account assignment overview screenwas changed such that for the custom account leading fields, always the
GL account would be shown. This was changed because, earlier when the
leading field was a customer field, it was not possible to show the
account description in the overview screen and it remained empty. This
was creating confusion for the users.

For the new releases, it was decided that when the leading field is a
customer field, the GL account and its description would be shown in theoverview screen. The coding for the same has been implemented in the
method /SAPSRM/IF_PDO_ACCT_ASSGT_HLPR~GET_ACCCAT_TECHFIELDS(class
/SAPSRM/CL_PDO_ACCT_ASSGT_HLPR).
....
WHEN OTHERS.
ls_accf-acc_field =
/sapsrm/if_pdo_action_c=>gc_acc_obj_gl_account.
ls_acc_cat_techfield-desc_field =
/sapsrm/if_pdo_action_c=>gc_acc_cat_gl_desc.
ENDCASE.

bharathi_ponnusamy
Active Participant
0 Kudos

Hi Jeff Miller,

Thanks for your step by step explanation. We have followed the Version 20 to enable the profit center field in account assignment category.

Unfortunately the field is not being shown up upon doing the enhancement. Please find the below screen shot for same where the enhancement being done since the profit center field is PC not PR.

Enhancement:

Could you please advise. Thanks in advance for your help.

Best Regards,

Bharathi

Former Member
0 Kudos

Hi Raj,

You can use doc_change badi to default the value.

Thanks

Smita

Former Member
0 Kudos

Hi Raj,

Have you resolved this issue? If yes, please let me know, how can we achieve this?

Thank you

Former Member
0 Kudos

Hi Rudresh

Sorry but I don't remember how this was resolved. Since then  I have moved on from SRM so I can not check what was done 2 years ago.

Former Member
0 Kudos

Thank you Raj for your response.

It seems, we need to go for an enhancement and we are working on the same.

Former Member
0 Kudos

Rudresh,

Yes you must do an enhancement.  Please see my thread below on what we had to do.

Thanks,

Jeff

Former Member
0 Kudos

Yes Jeff,

I referred the same. Thank you so much for explaining this in details.


Former Member
0 Kudos

Hi, I do have the same issue, can you share your resolution on how did you fix this problem?

Thanks a lot!