1、eCATT Step by Step GuideeCATT - Step by Step GuideBusiness Process: Order to Cash (O2C)Tables of ContentSystem environment:System Name:QPTY55AO5Purpose:Main test system ERP 2005ECC 6.0- Hotline Reference SystemSAP Solution ManagerApp Server:usai1qpt.wdf.sap.corpiwdf2243.wdf.sap.corppwdf6341.wdf.sap.
2、corpSystem Nr:775577System ID:QPTY55AO5Client:004800User:WEFERSMWEFERSMPassword:Language:ENEN1Create RFC ConnectionFor every system that we want to run the script on, a specific RFC connection must be created.Transaction SM59:Hit button to create a brand new RFC connection:Input:FieldsInputCommentsN
3、ame:QPT004_O2CRecommendation: Begin with System ID + ClientConnection Type:3Connection to ABAP systemDescription 1-3:QPT/004/O2COptional, search itemPress ENTER:Tab Technical Settings:Input: (System Information)FieldsInputCommentsLoading Balance:YesThis can improve performanceTarget System:QPTInform
4、ation Available in Sap LogonMsg. Server:usciqptGroup:SPACESave to database as:IP AddressAccept defaultTab Logon & Security:Input: (Logon Information)FieldsInputCommentsLogon Screen Status:CheckedLogon screen will pop up for each connecting timeLanguage:ENClient:004Hit save We can test the connectivi
5、ty by hit.If everything is OK, we may see the following log on window:2Create System Data ContainerWe register RFC connections here and assign Target System names for the test.Transaction SECATTHit Radio Button No.4 - Create System Data Container: ZO2C_SYS:Hit button.Input:FieldsInputCommentsTitle:O
6、2C Test System DataDescription 1-10:O2COptional, search itemTab System Data:Hit button to add new Target System.Input:FieldsInputCommentsTarget System:QPTLogical name, can be everythingDescription:QPTOptionalRFC Connection:QPT004_O2CThe mapped RFC connectionPress save.We can save it as local object,
7、 or assign it to a specific package globally: 3Create Test ScriptTransaction SECATTHit Radio Button No.2 - Create Test Script: ZO2C_CREATE_SO:(Set version to 1 for later maintenance)Hit button.Input:FieldsInputCommentsTitle:O2C : Create Sales OrderComponent:SD-SLS-SOApplication ComponentSystem Data
8、Container:ZO2C_SYSTarget System:QPTDescription 1-10:O2C/Sales OrderOptional, search itemTab Editor:Record Transactional Script:Hit Button.Make the following choice in the Insert Statement dialog:FieldsInputCommentsGroup:UI ControlHere contains all script record commands Command:SAPGUI(Record)Use SAP
9、GUI driver for transaction with controlsInterface:GeneratedSpecify command interface name, here use defaultTarget System:QPTSpecify the system to record the scriptHit Button.Make the following choice in the Record SAP GUI command dialog:FieldsInputCommentsManual Generation:UncheckedWe do not use man
10、ual generation.After Every Screen Change:CheckedHere sets the recording granularityStart Record with Transaction:VA01Hit Button.A moment later, we can see one session opened in the target system and also, the following dialog will appear:Do not change anything and hit Yes.The Recording Running dialo
11、g will appear:(It serves as the control panel for the record)At anytime during the record, we can go back to this dialog box and insert command or stop recording to the script. (I will demonstrate these later.)Now, just navigate to the opened transaction session and start the record.Data used in Sys
12、tem QPT for Transaction VA01:T-Code:VA01Document Type:ORSales Organization:1000Distribution Channel:10Division:00Sold-to-Party:T-L67A01Ship-to-Party:T-L67A01Material:T-AT101Order Quantity:1Storage Location:0003Price:400Here is the screen flow:Screen 1:Press Enter.Screen 2:Press Enter.Before we go in
13、to next screen, we need to capture one field value (namely the required delivery date) in this screen;Insert GETGUI commandGo back to the Recording Running dialog and hit Then we will go back automatically to the recording session, where we can choose the field that we are interested in.Here we want
14、 to capture the Req. Deliv. Date field, which later we can use it as an export parameter for our script. So just click on it: (you can see a red rectangle outside it indicating selected)In the popup dialog, navigate to the text field that we want to catch.Get - General State - TextCheck it and hit O
15、K, its done. Later we can see the result in the script.Now we can continue our recording procedure.Double-click material name T-AT101. Tab Shipping:Screen 3:Tab Conditions:Screen 4:Hit save .Go back to the Recording Running dialog, and hit to end the recording.Now we can see six statements added to
16、the script, one GETGUI and five SAPGUI.Also, in the command interface list, we can see these entire six interfaces.Hit save .4Create Import and Export parameters We create import and export parameters to transfer data into and out of the script. 4.1Import Parameters Step 1: Navigate to the location
17、of the input text:Manual Navigation:Double-click one command interface in the list, and navigate into every sub-node. Usually, input texts are under ProcessedScreen# - UserChangedState - GuiElememt#. If we see, it means there is an input text here and we can generate it into an import parameter as n
18、eeded:Use Text Search Functionality:(This is very effective, if we are searching for some uncommon words like the Material name, etc.)Hit on the toolbar.Enter the search item (e.g.: T-AT101)Only search in the structure editor for parameters:Hit to begin the search.Double-click on one of the result i
19、tems and you will be targeted directly to this item in the structure editor:Attention;If we search for a more generic item (like 1000 as sales organization), there may be a lot of items in the result. We have to fix out which one is the one we are expecting. It may be then not so efficient at those
20、situations.Step 2: Replace text with parameters.Double-click on. On the right side, we can see its real value. Just replace it in the Value column with a parameter name and press Enter. Then, we can see the popup dialog:Choose import and press Yes.Now, navigate to the parameter list, we can see the
21、newly created import parameter there. We can also add descriptions to this parameter for clarification sake.(Also we can see blue trianglesappearing on path of the hierarchy, which indicating a parameter injection.)4.2Export Parameters Step 1: Navigate to the location of the output text:Output text
22、can only be generated by GETGUI command. They are usually under the GuiElememt# part of a GETGUI command interface. A indicates a source of text export.Step 2: Replace text with parameters.In the Value column, input the parameter name and choose Export as its type.Press Yes.Like import parameters, w
23、e can also see it in the parameter list. Please add descriptions for clarification.4.3Parameter ListFormer methods are used for changing input / output text into import / export parameters. Actually we have done two things at the same time: one is creating a parameter and the other is assigning it t
24、o certain part of the script. But in some situations, we only want to do the first. This is easy to finish in the parameter list.Switch to parameter list. Hit to insert a new item. We can manually decide its name, description, parameter type (I/E/V), ABAP Type and length, etc.Here we create a new ex
25、port parameter E_SONR for latter use.(For removing items, just hit.)OK now we can create all import and export parameters for this script.Here is the list:5Dealing with MessagesWe can control the execution of our script and capture useful information from system messages. This operation is optional,
26、 but doing this will make the script more flexible.To add MESSAGE command to the script, hit and input:FieldsInputCommentsGroup:Script ControlHere contains all script control commands.Command:MESSAGEInsert Message command.Interface:MSG_1Specify message filter table name, here use defaultHit Button.P
27、ut the SAPGUI commands inside the MESSAGE block:Here, command MESSAGE enables us to add message-control rules in table MSG_1.Command ENDMESSAGE transfers all messages happened during the script execution to table E_MSG_1.Set Message-Control Rules:Now, we want to register message-control rules in the
28、 MSG_1 table.For our script, we want to make sure that our sales order is successfully created. So the message “Standard order # has been saved” must happen.Firstly, we must get certain information that describes the message. Find the message in the structure editor:Keep in mind the message type S,
29、message ID V1 and message number 311.Also we may notice that parameter2 contains the information of sales order number.Now, we have got all the information we need. Double-click MSG_1 in the script editor.In the right hand, press to add a rule and input:FieldsInputCommentsMode:RThe occurrence of thi
30、s message is obligated. MSGTYP:SThe information we got form above.MSGID:V1MSGNR:311Transfer Message Parameter ValueAnother thing we want to finish is to store the Sales Order number from the message to export parameter E_SONR.To do this, please add the hereinafter codes to the script:E_SONR = E_MSG_1&TFILL-MSGV2.LOG (E_S
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1