on 2022 Aug 15 11:44 AM
Hello everyone,
I want to use Accounting Indicator in substitution rules for Profit Center or change the Profit Center manually in service orders. Therefore I enhanced the PCASUB structure by adding the field "BEMOT" (accounting indicator) using the following SAP note:
111271 - Add new field to condition list in PCA substitution
I am also using the SAP enhancement "PCACRM01" to fill the PCASUB structure. The following SAP note forms the basis for this procedure:
386391 - CRM: Determination of profit center
But filling the "PCASUB" structure with "BEMOT" content hasn't been that successful yet, since "BEMOT" is item based and additionally the User-Exit happens before save event. Therefore accessing the local variable "BEMOT" content from items in SRVO is an issue (see half pseudo-code):
*&---------------------------------------------------------------------*
*& Include ZXKECRM40PCAU01
*&---------------------------------------------------------------------*
DATA: ls_service TYPE crms4d_serv_i,
it_chartab TYPE TABLE OF iaom_object_attribute WITH HEADER LINE,
wa_chartab TYPE iaom_object_attribute.
LOOP AT t_chartab[] INTO it_chartab
WHERE data_element = 'CRMT_OBJECT_ID_CO'.
ENDLOOP.
LOOP AT it_chartab INTO wa_chartab.
ENDLOOP.
SELECT object_id, ac_indicator
FROM crms4d_serv_i
INTO @ls_service
WHERE object_id = @it_chartab-value.
ENDSELECT.
ch_pcasub-bemot = ls_service-ac_indicator.
So do you have any ideas how to either change the Profit Center manually or how to fill "BEMOT" in "PCASUB" to use this in further substitution rules?
Thanks a lot!
Best regards
Thomas
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello Thomas
field profit center is not manually changeable even in the latest version 2022. I don't know the technical reasons of this restriction in S/4HANA On Premise .
I'd create a custom field Z-PROFIT ( header ) and I'd use to update the profit center as characteristic in IAOM0001 adding this z-field to BAPI_CO_SERVICE_CUSTOMER...
I didn't check it. Simply I think that it would be easier
Best regards
Silvia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas
nein nein nein :-)...I didn't remember that S/4HANA doesn't use BADIs like the old ones SRV_CONF_MOVE_TYPE or CRM_UPLOAD_CO . They are not longer called so the only way to add some custom code is to redefine the standard handler classes, some methods are private/protected.
In this case, you could redefine some method of class
CL_CRMS4_PROC_ACCOUNTING_FWD → Called for data exchange of service orders, transfers service characteristics to S/4 core to be posted on internal order and substitute this standard class by your own subclass in
I'm not sure if I'm being really useful in this case. I understand that is quite complicated to help with this kind of things in a Community.
Well, let me know if you find the light at the end of the tunnel
Best regards
Silvia Ventura
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Octavian,
the accounting indicator was initially planned to be used for profit center determination (which works perfectly fine but we are assigning profit center manually now). Therefore I never tried to pass the accounting indicator itself to an internal order. I pass the manually assigned profit center as custom field to the internal order. So it should be possible to do the same with accounting indicator.
Best regards,
Thomas
User | Count |
---|---|
2 | |
2 | |
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.