

How can I add custom fields (CI_PRPS fields) to CN... - SAP Community
source link: https://community.sap.com/t5/application-development-discussions/how-can-i-add-custom-fields-ci-prps-fields-to-cnmass/td-p/12783209
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hello Expert,
We add zz fields to ci_prps. Those fields are displayed in CJ20N )in 'Cust. Enhancement' tab).
The problem is that those fields are not displayed in CNMASS and therefor can not be updated via CNMASS.
I tried the following without success
1. Append new structure with the zz field to CNMASS_WBS_ELEMENT structure
2. Run the program RCNCT001 .
Thankyou in advanced
Hagit
- SAP Managed Tags:
- ABAP Development

10-22-2023 2:51 PM
Did you read 2358046 - CNMASS - Change customer fields?
(also, the question has been asked and answered already several times in the forum)
- SAP Managed Tags:
- ABAP Development

10-23-2023 6:33 AM
You could
- Implement required corrections of 2764773 - CustConn: CNMASS supports the mass change of the custom specific fields for projects and w... (and at least a following note, check referenced notes)
- Implement BAdI PS_FUNCTION_SWITCH with a code such as
SWITCH_VALUES-CNMASS_CUSTOM_FIELD = ’X'. <br>
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi Thank you for your answer
I will try to do as you suggested and will notify you about the results.
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi
In note 2764773 it is witten:
Part1:
For structure 'CNMASS_PROJECT_DEFINITION'.
Step1: Enter transaction SE11.
Step2: Enter structure name
'CNMASS_PROJECT_DEFINITION'.
Step3: Choose option 'change'.
Step4: Enter the components and use the component
types as below:
Component
names Component
types
.INCLUDE CI_PROJ
Step5: Save and Activate the above
structure in package 'CNMASS'.
But if I try to change CNMASS_PROJECT_DEFINITION via SE11 then it asks for access key.
How can I include CI_PROJ in CNMASS_PROJECT_DEFINITION without access key?
Thank you
Hagit
- SAP Managed Tags:
- ABAP Development
hagit-1 "How can I include CI_PROJ in CNMASS_PROJECT_DEFINITION without access key?"
You can't. Why don't you want to request an access key? Your organization should allow it easily.
- SAP Managed Tags:
- ABAP Development
As you are implementing an OSS note, your admin should provide you the requested acces key without problems.
When were your systems last updated (SPS)
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi and sandra.rossi thank you for your response.
I asked my admin to provide the requested access key & and When were our systems last updated (SPS).
I will update.
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi ,
I got the access keys.
My admin says that our system version is NetWeaver 7.4 SPS 7. He does not know when it was updated.
I tried to activate method GET_SWITCH

And received an error

So I tried to implement note 2805922. In the note it is written:
Please note that all the steps
described below have to be done in
English logon.
Steps to create data element:
1. Go to transaction SE11 and select radio
button for data type.
2. Create data element 'DEACT_AUT_WORK'.
Enter:
A. 'DEACT_AUT_WORK' as the name of
the Data Element.
B. Short Description as
'Deactivate Actual Work Calculation'.
C. Domain as 'PS_SWITCH_FLAG'.
D. Following field labels:
Short : Work
Time
Medium
: Actual Work Time
Long : Deactivate
Actual Work Time
Heading : Deactivate
Actual Work Time Calculation
E. Assign the data element to package
'CN' and Activate the same.
The problem is that the above can not be activated because domain 'PS_SWITCH_FLAG' does not exist.
The error is:
No active domain PS_SWITCH_FLAG available
No domain with this name exists in the ABAP Dictionary or the domain was not yet activated there.
My question is how to create PS_SWITCH_FLAG ?
Thank you in advanced
Hagit
- SAP Managed Tags:
- ABAP Development
Read (again) Note 2764773 it contains a prerequiosite note Note 2805922 which 'describes the process of creating new flags which have been added to the interface of the BAdI PS_FUNCTION_SWITCH'
- Basically PS_SWITCH_FLAG is a one character domain with values initial and 'X' (inactive, active) in package CN created within SAPKH61711 'SAP_APPL 617' of 2016...
- Did you get any error in SNOTE, if 'No' you can raise an incident to SAP
- Read also SAP PS - Assigning project types to the project profile not working | SAP Community (snapshot of the domain available)
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi
This part (which raised the activation error) of the note is valid for
------------------------------------------------------------------------
|Manual
Activity
|
------------------------------------------------------------------------
|VALID
FOR
|
|Software Component
SAP_APPL SAP
Application |
| Release
617 Until
SAPKH61719 |
| Release
618 Until
SAPK-61813INSAPAPPL
|
------------------------------------------------------------------------
Our system is:

So it seems that this part (which raised the activation error) is valid for our system. Is that so?
Thank you
Hagit
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi
Now I see that later in the NOTE there are once again instructions on how to create 'DEACT_AUT_WORK'. The instructions are the same as the beginning but before this part it says:
------------------------------------------------------------------------
|Manual
Activity
|
------------------------------------------------------------------------
|VALID
FOR
|
|Software Component
S4CORE
|
| Release
100 Until
SAPK-10009INS4CORE |
| Release
101 Until
SAPK-10107INS4CORE |
| Release
102 Until
SAPK-10205INS4CORE |
| Release
103 Until
SAPK-10303INS4CORE |
| Release
104 w/o Support
Packages |
------------------------------------------------------------------------
In our system we do not have the component S4CORE . Maybe this is the problem?


If so, what can be done?
Thank you
Hagit
- SAP Managed Tags:
- ABAP Development
hagit-1 If you don't have S4CORE, it means you are still on ECC? ECC is SAP_APPL software component. You should apply only the SAP_APPL instructions of the note:
------------------------------------------------------------------------|Manual Pre-Implement. |------------------------------------------------------------------------|VALID FOR ||Software Component SAP_APPL SAP Application || Release 617 SAPKH61701 - SAPKH61719 |------------------------------------------------------------------------
- SAP Managed Tags:
- ABAP Development
sandra.rossi thank you for your answer.
We are still in ECC.
- SAP Managed Tags:
- ABAP Development
- Yes the note is relevant, you should raise an incident (so SAP could provide solution and even correct the note too)
- As written by sandra.rossi, only apply the corrections relevant to your system "VALID FOR" (many notes apply to multiple versions with different taks/sources)
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi , thank you for your answer
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi ,
Somehow I missed your reply:

In SNOTE I click on the check button

And received:
SAP Note 0002805922 can be implemented
You suggested to raise an incident to SAP. I assume it will take quite a bit of time and on the other hand the implementation of the NOTE is urgent.
Also the option to install SAPKH61711 'SAP_APPL 617' of 2016 will take a long time.
Is it worth creating the domain PS_SWITCH_FLAG manually according to the instructions you gave?
Thank you
- SAP Managed Tags:
- ABAP Development
You can create the domain, but be ready to reverse your change when SAP will answer, and test carefully as other objects may be missing. Did you already create the incident/case (don't wait too long)
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi , thank you for your replay.
I want to open an incident. What should I write in the product field?

thank you
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi thank you for your reply.
I already opened an OSS (not answered yet).
In any case I look at note 2805922 (for the following cases), but the second tab is Software Components (and not system/status) . I tried to insert SAP_APPL in the product field but it was not accepted.

I looked at the attributes tab, but it did not help.

What did you mean?
Thank you.
Hagit
- SAP Managed Tags:
- ABAP Development
System, Status should be performed on a SAP GUI screen menu, not in the OSS note display 🙂
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi
SAP answered to my OSS:

I created PS_SWITCH_FLAG as written in note 2229946.
Now I can activate 'DEACT_AUT_WORK ' successfully. But CNMASS still does not update the Z fields.
When trying to update Z field via CNMASS, the following message is displayed.

Thankyou Hagit
- SAP Managed Tags:
- ABAP Development
Did you also implement every relevant notes mentionned in the previous one, such as 2946081 - CNMASS : Issues in mass change of custom include fields?
You could also use the old trick of adding a "." at some standard text field (then removing it) to check if SAP correctly detect changes when only customer fields are provided
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi Thank you for your replay
a. Where is note 2946081 - CNMASS : Issues in mass change of custom include fields mentioned?
b. I implemented note 2040656 which is a Prerequisite of 2764773.
c. I could not implement note 1941657 (which is a Prerequisite of 2040656) because the check in SNOTE alerts: ' SAP Note 0001941657 cannot be implemented' (even though the note is valid for our version).
d. I could not implement note 1128112 (which is a Prerequisite of 1941657) because the check in SNOTE alerts: 'SAP Note 0001128112 cannot be implemented' (the note is not valid for our version)
e. I implemented note 2805922 (which is a Prerequisite of 2764773)
f. I created PS_SWITCH_FLAG as written in note 2229946. This note has no prerequisites. (I did not implement the whole note because I only need PS_SWITCH_FLAG )
2. Could you please clarify what you have written:
You could also use the old trick of adding a "." at some standard text field (then removing it) to check if SAP correctly detect changes when only customer fields are provided
3. Now I realized that I only implemented the manual part of note 2764773 - CustConn: CNMASS supports the mass change of the custom specific fields for projects and w....
There for:
1. Via SNOTE I implemented note 2040656 which is a Prerequisite of 2764773. The activation of the changed/ new objects succeeded
2. Via SNOTE I implemented note 2764773 . The activation raised an error

3. I found note 2116953 - PS: Usage Measurement Objects, which creates the missing class 'CL_PS_USAGE_MEASUREMENT'. The problem is that the note is valid for SAPKH61708, but our system's version is SAPKH61705. However, I implemented the note via SNOTE. The missing class was created but the activation of the new/changed objects raised an error in program RCNMASSCHANGE (line 99): Field "CO_NEMO-MASS_CUSTFIELD" is unknown.
I asked in the incident - How can I add CO_NEMO to CL_PS_USAGE_MEASUREMENT but I still haven't received an answered. Maybe you know the answer?
Line 99 is: cl_ps_usage_measurement=>co_nemo-mass_custfield )->count( ).
Thank you
Hagit
- SAP Managed Tags:
- ABAP Development
Technically you may require now some corrective OSS notes delivered between SP5 and SP8.
My ECC systems are nowadays at SP 26, SAPKH61726, so I was not concerned by this problem.

Look for suitable notes containing the class.
- SAP Managed Tags:
- ABAP Development
hagit-1
Remark concerning your question "a. Where is note 2946081 - CNMASS : Issues in mass change of custom include fields mentioned?"
There's no reason to be mentioned anywhere. If you have a problem with SAP stuff, you always look first at the SAP notes, and second you look at the forum, third you contact SAP support.
- SAP Managed Tags:
- ABAP Development
raymond.giuseppi thank you for your answer.
I will wait for a response in the incident.
- SAP Managed Tags:
- ABAP Development
sandra.rossi Thank you for your comment.
I know that the question has been asked and answered already several times in the forum. I tried to as I read in the forum , but it did not help (In my question I mention 2 solutions that I tried to implement without success.) I will look at the note that you mentioned.
- SAP Managed Tags:
- ABAP Development

10-23-2023 8:56 AM
The other answers also said to do it via BAPI because it was supported, it's why I was referring to them.
Please search also the SAP notes before posting.
Hopefully, Raymond find them for you.
- SAP Managed Tags:
- ABAP Development

10-23-2023 8:58 AM
Upvoting the question in order to make Raymond answer appear high ranked to help future visitors using the forum search.
- SAP Managed Tags:
- ABAP Development
Does the option to mark a correct answer no longer exist?
- SAP Managed Tags:
- ABAP Development
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK