Description
Customer has a scenario for creating/adding new Profit Center Groups on Lower levels when the first level is already created in KCH1 as per below screenshot.
Applies To
Transaction 10x, Studio 11x, 12x.,
Recording Mode - GUI scripting as with Batch and Non-Batch mode of recordings the search option doesn't appear and also the option to assign the Profit Center to Lower Level doesn't appear either.
Reason for this is there are no SAP screens defined in SAP configuration for these fields hence failing with Batch and Non Batch Mode of recording.
Solution
There are below steps to follow for the purpose of script recording.
1. Make sure the first level is created in KCH1 with the description.
2. Use transaction code KCH2 to add more levels.
- Launch KCH2
- Click F6 or Enter
- Click “Binoculars” button and find the main level “SLATTEST5” (untick “Start at current line” and put 999 in “Cancel search after hits”.
- Pick the level
- Click on “Lower level” button and create the next level.
- Save the changes and log off from SAP.
- In mapping “Basic View” change the name of the line 7 to “Level” and the name of the line 8 to “Description” to make it more user-friendly.
- The Group name (line 3) and Search string (line 5) are mapped to column A, Level (line 7) to column B and Description (line 8) to column C.
- If Condition (If First Transaction) is included for the Controlling area.
- Currently the below structure exists directly in SAP.
- The levels SLATTEST8 and SLATTEST9 under the main level SLATTEST5 will be added.
- The structure now looks as follows in SAP.
- If more levels need to be added under the level SLATTEST9 (as an example), the data will look as follows.
- Below is the result after the script run for the line 4.
- Two additional levels will be added now under the level SLATTEST6 for further testing. Below is the result and how the structure looks like now after the script run.
Additional Information
Main points to bear in mind when recording and mapping KCH2 script.
- The first main level should already exist in KCH1 with the description. All other levels are added via transaction KCH2.
- The search function is used to find the level that requires adding new PC Groups on "Lower Levels".
- There is no need for the loop.
- Attached are the script and data files for the reference.
Comments
0 comments
Please sign in to leave a comment.