Create Test script to create a Sales Order

By Rama Jyothi P

Purpose: This document details on how to create a Test Script to Create a Sales Order. We can call this script as Unit Script as it deals with a single transaction. If the script is a combination of multiple unit scripts then we can call it as an Integration Script.  

Transaction: SECATT 

Here are the steps to follow. 

Step 1: Go to transaction SECATT 

Choose Radio Button Test Script and give some name like ZSD_CREATE_SALESORDER_TS (In general we will follow the naming convention Z<module>_desc. of script_TS (TS for test script)). 

 

Click the create button as shown in above screen shot. 

Step 2: In the next screen give some description for the Script. Also specify a Component. We can choose the area related to the transaction we are using from F4 help. In this case I have chosen Sales Orders component. 

We can specify a System Data container (not mandatory). We can choose one of the options from F4 help. 

 

Now save the script. Save as Local Object. 

Step 3: Now select the tab Editor. 

Write proper comments and place the cursor in the next line and click the button as shown in the below screen shot.  

 

Or we can choose Pattern and use SAPGUI REC (SAPGUI Recording).

The below pop-up will come. Un-check Manual Generation and check other check boxes.

Click Start Recording. 

 

Step 4:  

Click OK in the below pop-up. 

The below message will come in the status bar. 

 

Now generate a new Session. 

 

Step 5: Wait for a while. The below pop-up will come. 

 

Click Yes and wait for the below pop-up to come. 

 

Leave the pop-up as it is and go to the new session created. 

Step 6: Enter the T-Code and press Enter. 

Step 7: Enter the below details and press Enter. 

 

Step 8: Enter the below header details (before you are recording try to create one Order manually and note down all the mandatory and other useful fields and note the values. Then create the recording using SECATT. This will save us lot of time. If we encounter any errors while recording the eCATT, we have to re-record the entire thing.  

 

Enter data and press Enter. 

Step 9: Now we need to fill item details. At anytime try to use only one item as it will simplify parameters list and is less prone to errors. 

 

Enter data and press Enter.

Click here to continue...

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image