eCATT Step by Step GuideWord文件下载.docx
《eCATT Step by Step GuideWord文件下载.docx》由会员分享,可在线阅读,更多相关《eCATT Step by Step GuideWord文件下载.docx(49页珍藏版)》请在冰豆网上搜索。
User:
WEFERSM
Password:
Language:
EN
1CreateRFCConnection
Foreverysystemthatwewanttorunthescripton,aspecificRFCconnectionmustbecreated.
TransactionSM59:
Hitbutton
tocreateabrandnewRFCconnection:
Input:
Fields
Input
Comments
Name:
QPT004_O2C
Recommendation:
BeginwithSystemID+Client
ConnectionType:
3
ConnectiontoABAPsystem
Description1-3:
QPT/004/O2C
Optional,searchitem
PressENTER:
TabTechnicalSettings:
(SystemInformation)
LoadingBalance:
Yes
Thiscanimproveperformance
TargetSystem:
InformationAvailableinSapLogon
Msg.Server:
usciqpt
Group:
SPACE
Savetodatabaseas:
IPAddress
Acceptdefault
TabLogon&
Security:
(LogonInformation)
LogonScreenStatus:
Checked
Logonscreenwillpopupforeachconnectingtime
Hitsave
Wecantesttheconnectivitybyhit
.
IfeverythingisOK,wemayseethefollowinglogonwindow:
2CreateSystemDataContainer
WeregisterRFCconnectionshereandassignTargetSystemnamesforthetest.
TransactionSECATT
HitRadioButtonNo.4-CreateSystemDataContainer:
ZO2C_SYS:
Hitbutton
Title:
O2CTestSystemData
Description1-10:
O2C
TabSystemData:
toaddnewTargetSystem.
Logicalname,canbeeverything
Description:
Optional
RFCConnection:
ThemappedRFCconnection
Presssave
Wecansaveitaslocalobject,orassignittoaspecificpackageglobally:
3CreateTestScript
HitRadioButtonNo.2-CreateTestScript:
ZO2C_CREATE_SO:
(Setversionto1forlatermaintenance)
O2C:
CreateSalesOrder
Component:
SD-SLS-SO
ApplicationComponent
SystemDataContainer:
ZO2C_SYS
O2C/SalesOrder
TabEditor:
RecordTransactionalScript:
HitButton
MakethefollowingchoiceintheInsertStatementdialog:
UIControl
Herecontainsallscriptrecordcommands
Command:
SAPGUI(Record)
UseSAPGUIdriverfortransactionwithcontrols
Interface:
[Generated]
Specifycommandinterfacename,hereusedefault
Specifythesystemtorecordthescript
MakethefollowingchoiceintheRecordSAPGUIcommanddialog:
ManualGeneration:
Unchecked
Wedonotusemanualgeneration.
AfterEveryScreenChange:
Heresetstherecordinggranularity
StartRecordwithTransaction:
VA01
Amomentlater,wecanseeonesessionopenedinthetargetsystemandalso,thefollowingdialogwillappear:
:
DonotchangeanythingandhitYes.
TheRecordingRunningdialogwillappear:
(Itservesasthecontrolpanelfortherecord)
Atanytimeduringtherecord,wecangobacktothisdialogboxandinsertcommandorstoprecordingtothescript.(Iwilldemonstratetheselater.)
Now,justnavigatetotheopenedtransactionsessionandstarttherecord.
DatausedinSystemQPTforTransactionVA01:
T-Code:
DocumentType:
OR
SalesOrganization:
1000
DistributionChannel:
10
Division:
00
Sold-to-Party:
T-L67A01
Ship-to-Party:
Material:
T-AT101
OrderQuantity:
1
StorageLocation:
0003
Price:
400
Hereisthescreenflow:
Screen1:
PressEnter.
Screen2:
Beforewegointonextscreen,weneedtocaptureonefieldvalue(namelytherequireddeliverydate)inthisscreen;
InsertGETGUIcommand
GobacktotheRecordingRunningdialogandhit
Thenwewillgobackautomaticallytotherecordingsession,wherewecanchoosethefieldthatweareinterestedin.
HerewewanttocapturetheReq.Deliv.Datefield,whichlaterwecanuseitasanexportparameterforourscript.Sojustclickonit:
(youcanseearedrectangleoutsideitindicatingselected)
Inthepopupdialog,navigatetothetextfieldthatwewanttocatch.
Get->
GeneralState->
Text
Checkitandhit
OK,it’sdone.Laterwecanseetheresultinthescript.
Nowwecancontinueourrecordingprocedure.
Double-clickmaterialname‘T-AT101’.TabShipping:
Screen3:
TabConditions:
Screen4:
GobacktotheRecordingRunningdialog,andhit
toendtherecording.
Nowwecanseesixstatementsaddedtothescript,oneGETGUIandfiveSAPGUI.
Also,inthecommandinterfacelist,wecanseetheseentiresixinterfaces.
4CreateImportandExportparameters
Wecreateimportandexportparameterstotransferdataintoandoutofthescript.
4.1ImportParameters
Step1:
Navigatetothelocationoftheinputtext:
ManualNavigation:
Double-clickonecommandinterfaceinthelist,andnavigateintoeverysub-node.Usually,inputtextsareunderProcessedScreen[#]->
UserChangedState->
GuiElememt[#].Ifwesee
itmeansthereisaninputtexthereandwecangenerateitintoanimportparameterasneeded:
UseTextSearchFunctionality:
(Thisisveryeffective,ifwearesearchingforsomeuncommonwordsliketheMaterialname,etc.)
Hit
onthetoolbar.
Enterthesearchitem(e.g.:
T-AT101)
Onlysearchinthestructureeditorforparameters:
tobeginthesearch.
Double-clickononeoftheresultitemsandyouwillbetargeteddirectlytothisiteminthestructureeditor:
Attention;
Ifwesearchforamoregenericitem(like1000assalesorganization),theremaybealotofitemsintheresult.Wehavetofixoutwhichoneistheoneweareexpecting.Itmaybethennotsoefficientatthosesituations.
Step2:
Replacetextwithparameters.
Double-clickon
.Ontherightside,wecanseeitsrealvalue.JustreplaceitintheValuecolumnwithaparameternameandpressEnter.Then,wecanseethepopupdialog:
ChooseimportandpressYes.
Now,navigatetotheparameterlist
wecanseethenewlycreatedimportparameterthere.Wecanalsoadddescriptionstothisparameterforclarificationsake.
(Alsowecanseebluetriangles
appearingonpathofthehierarchy,whichindicatingaparameterinjection.)
4.2ExportParameters
Navigatetothelocationoftheoutputtext:
OutputtextcanonlybegeneratedbyGETGUIcommand.TheyareusuallyundertheGuiElememt[#]partofaGETGUIcommandinterface.A
indicatesasourceoftextexport.
IntheValuecolumn,inputtheparameternameandchooseExportasitstype.
PressYes.
Likeimportparameters,wecanalsoseeitintheparameterlist.Pleaseadddescriptionsforclarification.
4.3ParameterList
Formermethodsareusedforchanginginput/outputtextintoimport/exportparameters.Actuallywehavedonetwothingsatthesametime:
oneiscreatingaparameterandtheotherisassigningittocertainpartofthescript.Butinsomesituations,weonlywanttodothefirst.Thisiseasytofinishintheparameterlist.
Switchtoparameterlist
.
Hit
toinsertanewitem.Wecanmanuallydecideitsname,description,parametertype(I/E/V),ABAPTypeandlength,etc.
HerewecreateanewexportparameterE_SONRforlatteruse.
(Forremovingitems,justhit
.)
OKnowwecancreateallimportandexportparametersforthisscript.
Hereisthelist:
5DealingwithMessages
Wecancontroltheexecutionofourscriptandcaptureusefulinformationfromsystemmessages.Thisoperationisoptional,butdoingthiswillmakethescriptmoreflexible.
ToaddMESSAGEcommandtothescript,hit
andinput:
ScriptControl
Herecontainsallscriptcontrolcommands.
MESSAGE
InsertMessagecommand.
MSG_1
Specifymessagefiltertablename,hereusedefault
PuttheSAPGUIcommandsinsidetheMESSAGEblock:
Here,commandMESSAGEenablesustoaddmessage-controlrulesintableMSG_1.
CommandENDMESSAGEtransfersallmessageshappenedduringthescriptexecutiontotableE_MSG_1.
SetMessage-ControlRules:
Now,wewanttoregistermessage-controlrulesintheMSG_1table.
Forourscript,wewanttomakesurethatoursalesorderissuccessfullycreated.Sothemessage“Standardorder#####hasbeensaved”musthappen.
Firstly,wemustgetcertaininformationthatdescribesthemessage.
Findthemessageinthestructureeditor:
Keepinmindthemessagetype–‘S’,messageID–‘V1’andmessagenumber–311.
Alsowemaynoticethatparameter2containstheinformationofsalesordernumber.
Now,wehavegotalltheinformationweneed.Double-clickMSG_1inthescripteditor.
Intherighthand,press
toaddaruleandinput:
Mode:
R
Theoccurrenceofthismessageisobligated.
MSGTYP:
‘S’
Theinformationwegotformabove.
MSGID:
V1
MSGNR:
311
TransferMessageParameterValue
AnotherthingwewanttofinishistostoretheSalesOrdernumberfromthemessagetoexportparameterE_SONR.
Todothis,pleaseaddthehereinaftercodestothescript:
E_SONR=E_MSG_1[&
TFILL]-MSGV2.
LOG(E_S