- Created by GONCALO, Ana Catarina, last modified by Miguel Rosa on Aug 18, 2021
Tasks to be completed when documenting an SAP Transaction, Report or Message code.
1. Title of the page = SAP Transaction code, SAP Report or SAP Message
2. Add the following Labels, respectively:
SAP Transaction => "sap_transaction", Transaction code "xxxx"
SAP Report => "sap_report"
SAP Message => "sap_msg"
3. On the left section, describe the steps. On the right section, insert respective print screens and additional guidelines, if needed (e.g. Main selections of the transaction...)
STEP 1
Use transaction code: ZCO_COPA_D43
ZCO_COPA_D43 - Create and Run Cycle for D43: Initial Screen
This program is only able to calculate the correct material/plant allocation to add in the cycle, for the previous month (not possible for 2 months ago, or more, or even for the current month). So, in the 1st and 2nd step, there is no option to select the month as it will be automatic.

STEP 2
This program is used to create/generate the COPA assessment cycle to allocate the amounts to value field D43.
In order to fulfill this requirement, the program has been classified into 3 parts like below:
Tracing Factor Table Update
Basic Set Generation
D43 Cycle Creation

STEP 3
First Step - Tracing Factor Table Update
Selection Parameters:
- Select “Tracing Factor Table Update” button
- Controlling area: defaults with CHEF
- Company code: Can give individual company code or multiple company codes or range
- Cost Center: Can give individual cost center or multiple cost centers or range
- Test Mode check box: By selecting Test mode, can see the results in the output but do not update the table: ZCO_COPA_D43_TAB
At selection parameters, either company code or cost center field are mandatory. If the c.code is selected, the program will pick automatically all CC XX843* from the selected company.
By this step, all the relevant data for creating the cycle with receiving tracing factors would be fetched from KSB1 report and stored in the table: ZCO_COPA_D43_TAB.

STEP 4
Output results:
When Test mode is selected: Results can be seen like below, but would not update the table
When Test mode is not selected
The results update into the table
This program will pick the data from KSB1 for every cost center and subtotal at Plant and Material combination in order to update receiver tracing factors in the table - Note: if the line items doesn't have plant and material, it will be ignored and can be a justification in case of deltas



STEP 5
Second Step - Basic Set Generation
Selection Parameters:
Select “Basic Set Generation” button
Controlling area: defaults with CHEF
Company code: Can give individual company code or multiple company codes or range
Cost Center: Can give individual cost center or multiple cost centers or range
Test Mode check box: By selecting Test mode, can see the results in the output but do not update the SETs (display using GS03)
By this step, the program creates separate sets for materials and plants of each cost center, based on the list of materials or plants found in KSB1 report for the period.

STEP 6
Output results:
When Test mode is selected: Results can be seen like below, but would not update the SETs
Observed the message as Value can be added in set, as it is test run only.

When Test mode is not selected
Observed the message as Value successfully added in set, as it is real run only. These SETs can be checked in GS03:



STEP 7
Third Step - D43 Cycle Creation
Selection Parameters:
Select "D43 Cycle Generation" button
Company code: If not entered, the program checks the company codes from table ZCO_COPA_D43_TAB. It would be better to run this step, each company code wise.
Posting period: This is by default would be period M.
Assessment CElem: The same assessment cost element will be passed into cycle segments. It is better to run all the company codes which use the same assessment CE. If no requested exception from the controllers, should be CE 9802000001.
Cost Center: If not given, then system checks the company codes, if not given company codes, system will fetch all the company codes and cost centers from the table: ZCO_COPA_D43_TAB
Cost Element: All CE to be read on the cost center.
OPTON1: Batch Input details (Generate Session): By this system creates a Batch input session, which has to be executed by transaction SM35. System creates session name as ZD43DDMMYYYY. This DD and MM would be the 1st day of period M.
OPTION2: Batch Input details (Call transaction): By this system directly calls the transaction code and creates the cycles. In case of any errors, the program creates an error session with the name mentioned here.
By this step, it creates allocation cycles. One cycle for each company code and based on the number sender cost centers in the company code, those many segments would be created.
Table: ZCO_COPA_D43_TAB and SETs created are the source for cycle creation.
This can be run in two ways, one by creating a Batch Input session and another by call transaction method.

STEP 8
Output results:
Once executed the session, then Assessment cycles are seen like below:
- Cycle code is CCCC43
- Start date is the 1st day of period M
- Text is D43 + company code
- Segment name: cccc43(cycle code)+01 (numbering for each segment)
- Segment description: As program creates each segment for one cost center, that cost center code is seen as segment description
- Assessment cost element: which is mentioned in the selection parameters
- Value field: VVD43 always
- Receiver tracing factor rule: Fixed amount (as receivers will be assessed either with positive or negative amount)
- Cost Center: This is the sender cost center
- Sender Cost element: Which are passed in the selection parameters
- Receiver (product): Product group/set created for the sender cost center
- Receiver (Plant): Plant group/set created for the sender cost center
- Observe the receiver tracing factors.
- Receiver currency: Company code currency
- Receiver combinations: from table: ZCO_COPA_D43_TAB, amounts (either positive or negative) only passed to the combinations identified in the table, otherwise, program passes zero.
- Cycle Run Group: the company code





STEP 9
Run the cycle
After the cycle is created it should be run in the same way as all other COPA cycles, in transaction KEU5 (important to select always the cycle with Start Date on the closing month, otherwise the CC cc843* will remain unbalanced).
STEP 10
Corrections and Re-runs
It's not possible to make any manual change in the tables automatic generated via this transaction.
If, by any reason, it's necessary to make any update to the cycle, it should be done via the usual transaction KEU2.
If it's necessary to rerun the cycle it's important to check the necessity of re-running all steps or only the last one: in a general way, the need to re-run the cycle is happening because there were some additional postings on materials. For these cases (including corrections on prices or quantities) it's necessary to repeat all steps, as the allocation of the amount to each material will change. It's also important to know that:
- If by these correction postings, program is expected to add any new segments, it is possible. (program does the changes to cycle-segment)
- If by these correction postings, program is expected to add/delete the receiver combinations or change the receiver amounts, it is also possible.
- If by these correction postings, program is expected to lock/delete a segment/cycle, it is not possible. (it has to be manually locked the segment, otherwise the CC will not be balanced)