Friday, January 30, 2009

SAP Smart Forms

What is SAP Smart Forms?
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire form logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.

Advantages of SAP Smart Forms
SAP Smart Forms have the following advantages:
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)

A Simple Smartform Tutorial
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
• First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
• Main windows -> TABLE -> DATA
• In the Loop section, tick Internal table and fill in
• ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
* Calling SMARTFORMS from your ABAP program.
* Collecting all the table data in your program, and pass once to SMARTFORMS
* SMARTFORMS
* Declare your table type in :-
* Global Settings -> Form Interface
* Global Definintions -> Global Data
* Main Window -> Table -> DATA
*
* Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
* http://sapr3.tripod.com
*
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
* At the end of your program.
* Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
________________________________________
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes.
Difference with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
________________________________________
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
FAQ on Migrating SAPscript to SmartForms
Is it possible to migrate a SAPscript form to a Smart Form?
Smart Forms provides a migration tool for this purpose which migrates layout and texts of a SAPscript form to a Smart Form. It does not migrate SAPscript form logic of the print program. Using Smart Forms, this logic is described by the tree structure of the Form Builder. The effort involved in migrating it depends on the complexity of the print program.
Which Basis Release do I need to use SAP Smart Forms?
SAP Smart Forms is available as of R/3 Basis Release 4.6C.
I have heard that Smart Forms replaces SAPscript. What does "replace" mean?
It does not mean that SAPscript is removed from the Basis shipment. Even as of Basis Release 4.6C, SAPscript remains part of the SAP standard and there are no plans to remove it. Since Smart Forms is currently, and will continue to be, the tool for form maintenance for mySAP.com solutions, our further development efforts will focus on Smart Forms, not on SAPscript.
Do we have to migrate all SAPscript forms to Smart Forms?
There is no point in migrating all SAPscript forms already in use. Since SAPscript can still be used and will be available in the future, there is no need to. If you plan to migrate a SAPscript form, it is recommended that you check whether benefit is worth the effort involved.
Conversion of SAPSCRIPT to SMARTFORMS
SAP provides a conversion for SAPscript documents to SMARTforms.
This is basically a function module, called FB_MIGRATE_FORM. You can start this function module by hand (via SE37), or create a small ABAP which migrates all SAPscript forms automatically.
You can also do this one-by-one in transaction SMARTFORMS, under
Utilities -> Migrate SAPscript form.
You could also write a small batch program calling transaction SMARTFORMS and running the migration tool.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception ).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
Smart forms Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.
It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.

SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.

SmartForm Doublesided printing question
Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).

Transport Smart Forms
How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.

Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window) there is not enough space left for the paragraph, the entire paragraph appears on the next page.
Details information about SAP Barcodes
A barcode solution consists of the following:
- a barcode printer
- a barcode reader
- a mobile data collection application/program
A barcode label is a special symbology to represent human readable information such as a material number or batch number
in machine readable format.
There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
You can print barcodes from SAP by modifying an existing output form.
Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
Not to fear though, there are two ways to get around this:
- You can have your IT department do some research -
most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to support the printing of barcodes.
- Secondly, you can buy software that you can upload in your SAP print Server that will convert the barcode symbology as an image that will print on a regular laser printer. I found that this option results in less sharper barcodes. This option is really if you need to convert a large quantity of printers (>10) to support barcodes.
Now you have a barcode printed - what next?
Well there are two options, depending on your business requirements:
- You can use an existing SAP transaction on a regular workstation and get a barcode wedge reader to hook up between the keyboard and the PC. These wedge readers comes in a wand or scanner format. There are even wireless wedge scanners available that allows you to roam a few yards from the workstation to scan a label. This approach is mostly used where you want to prevent human errors in typing in long material, batch or serial numbers in receiving or issuing of material. The problem is that it's just replacing the keyboard input and you are basically locked down in one location and have to bring all the material to that location to process.
- Another solution is to use SAPConsole transactions
or write your own ABAP Dialog programs that will fit onto a barcode enabled wireless handheld terminal and that will follow the business logic as executed on the shop floor.
These programs are highly complex exercises in industrial engineering and ergonomics because of the limited screen sizes and limited ability to accept keyboard input. The user is instructed step-by-step and only scan and push F-keys to interact with the SAP system. Scan, scan, beep, beep, enter - highly automated.





SMARTFORMS



Steps to create a simple SMARTFORMS
Read the abap program in step 5 first to see how the data is begin pass to the internal table.
1. Create a new smartforms
2. Define looping process for internal table
3. Define table in smartforms
4. To display the data in the form
5. Calling SMARTFORMS from your ABAP program





1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
The followings screen format will appear :-
- Form ZSMART Form ZSMART
- Global settings Description New form
- Form attributes
- Form interface
- Global definitions General attributes Output Options
- Pages and windows
+ %PAGE1 New page
You can click at the Form Painter button to view the graphical display layout of your smartforms.









2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2


3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure


4. To display the data in Smartform
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&






5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
* Calling SMARTFORMS from your ABAP program.
* Collecting all the table data in your program, and pass once to SMARTFORMS
* SMARTFORMS
* Declare your table type in :-
* Global Settings -> Form Interface
* Global Definintions -> Global Data
* Main Window -> Table -> DATA
*
* Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
* http://sapr3.tripod.com
*
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
* At the end of your program.
* Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

SAP CRM Interview Questions

1. R3 adaptor exists in R3  


2. Business Partner category allows you to define number ranges


3. It is not possible to created your own business partner category


4. One role can have multiple data sets


5. In SAP,It is possible to identify duplicate BP master record


6. One relationship category can specify bidirectional relationship


7. Partner role in SAP R3 and classification in CRM used to define the interlinkage


8. Is it mandatory to define different org structure for sales and service


9. It is possible to transfer R3 org structure directly to CRM


10. R3 employee personal master can be transferred to CRM


11. It is possible to use distribution channel to define my CRM org structure
 
12. I can simultaneously use responsibility rule and org model rule
 
13. Org model is time dependent
 
14. Org model (HR) in R3 can be transferred to CRM
 
15. HR Master Record can be transferred to CRM
 
16. Terri and org mgt can be used simultaneously
 
17. User defined attributes can be used to define my CRM org models  
 
18. Both in territory and org mgt it is possible to create different labels
 
19. It is possible to store inactive BP in CRM system
 
20. It is possible to store inactive products in CRM
 
21. Attributes in Product Master is attached directly
 
22. Will Org determination be triggered first then partner determination?
 
23. Partner determination is done again after doc changes
 
24. Item cat can be made to be re-determined during copy control
 
25. Line item status as per R3 partial delivery will get updated in CRM doc
 
26. It is possible to do the billing of CRM service order in R3
 
27. In an activity journal template, can we really update material type
 
28. It is possible to create survey questions which will generate dynamic subsequent questions
 
29. It is possible to attach 2 alternative partner determination procedure to a transaction
 
30. When I am defining CRM access sequence, it is possible to refer business logic
 
31. It is not possible to handle free goods in CRM IPC ? through java codes
 
32. Is it possible that in partner determination procedure, different partner function can be determined at different times


33. In partner determination procedure, I can use multiple relationship levels


34. Is it possible to used preceding document’s org units during copy


35. Mandatory IPC data loader is needed to pull the data from R3 to CRM system


36. Is it possible to transfer specific objects from R3 to CRM


37. It is possible to combine both the CRM and R3 pricing conditions in one document


38. It is possible to do the same when document is going to R3


39. Is it possible to have CRM variant for 3 levels for products


40. Processing time for action is specified in scheduled conditions


41. Action can be used to trigger a workflow


42. Action can be used to take manual decision


43. Workflow can be used for date driven process


44. Customization from CRM to mobile data can be done through SBDOC


45. Customization from CRM can be pushed to R3 system


46. Consolidated Database is needed for every mBDOC


47. A BDOC can hold only modified fields


48. Hierarchical distribution of business data among CRM ecosystem


49. Publication and subscription are linked one to one


50. Middleware trace functionality can be used to monitor inbound queue


51. Flow context in middleware can be defined using a formula


52. In Solution Manager it is possible to initiate the integration testing


53. Internet Sales is an application that is built using JSP


54. Following application are used using JSP
a. Internet Sales
b. Win client
c. Web client
d. Collaborative Showroom
e. Partner Portal  


55. Blueprint table exists in Enterprise portal server


56. How R3 text objects are brought into CRM?


57. How do we integrate the CRM with SAP R/3? Where do we mention the IP address of SAP R/3 server? What else is required?


58. What is the difference between replication and realignment in CRM?


59. What is the difference between an activity and a task in CRM?


60. Can you point out some details of BP ownership in CRM?
Specifically, we will be loading channel partners from R/3. 
We would like to assign these partners to specific "channel managers." What constitutes this ownership?


61. Should clients implement both WinClient and WebClient for the IC or only one of them? Could you please explain this with supporting reasons?


62. Fully grown my SAP CRM is built on the following components
a. CRM central serve
b. SAP R/3 as a back end system
c. SAP BW system as a data ware house solution with comprehensive statistical and analytical possibilities
d. SAP APO as global ATP check and demand planning solution
e. SAP enterprise portal as a tool to provide integrated access to all the systems


63. Business partner category


64. Business partner group hierarchy
a. A business partner can be assigned to several hierarchies of different categories
b. The business partner GH allows you to group business partners in a multilevel GH
c. Time dependent
d. Groups business partners together in a hierarchy for statistical or analysis purposes


65. The mapping classification from CRM to R/3 in PIDE
a. Consumer (an organization or person)
b. Customer
c. Prospect
d. Competitor


66. What is the organizational unit used for
a. Sales organization is used for pricing
b. The organizational structure can be different from R/3 and has no restrictions regarding usable levels
c. Time stamp
d. You can assign scenario specific attributes to the relevant org units for org. determination, transaction processing, partner determination etc.,


67. Organization data determination can be done using
a. Transaction type
b. Organization structure
c. Business partner
d. Product master


68. Org. data profile is assigned to Transaction Type


69. A holder can be?
a. Occupy positions
b. Is an optional organizational unit


70. Organizational model can be maintained in CRM. Which of the following are true.
a. To assign a user to a position u also need to have master data maintained for the same
b. Can be mapped from CRM to SAP R/3
c. Additional levels in CRM are mapped into R/3 automatically 


71. Ways to determine the org units in a document


72. Responsible organizational unit is used for.
a. Derives all other org.units
b. For pricing 
c. Equivalent to R/3 plant 
d. Is in charge of a business transaction


73.
Territory
management is used for
a. Reflect the market view of an organization
b. Specifies which products can be offered in a territory
c. Who has the highest revenue
d. Which BP?s belong to a territory


74. Who is responsible for a territory
a. We must link employees with territories via the HR position in org. management
b. Can assign permanently or for a definite time period


75. True for territory management
a. Hierarchies can be time dependent
b. Can use hierarchies for representing territories
c. We can define our own attributes to define a territory
 
76. Following is true with regard to product categories
a. Initial assignment of products to product categories is done during download from OLTP
b. PC?s are assigned to Ptypes
c. PC can be assigned to many categories 
d. Can have hierarchy of product categories
e. If a product type is assigned to a category only products of this type can be assigned to a category


77. Following is true with regard to attributes and set types
a. Attributes are assigned directly to product master 
b. Set types are group of attributes or fields corresponding to various database tables
c. Attributes are assigned to set types
d. Set types and attributes can?t be transferred to R/3


78. Mapping of SAP R/3 to SAP CRM with regard to products
a. Material type to R3PRODSTYP
b. Material group to R3MATCLASS
c. Product hierarchy to R3PRODHIER


79. Sales Transactions are
a. Business activity 
b. Quotation
c. Sales Order
d. Leads 
e. Inquiry? 


80. Control attributes in a transaction type
a. BOM explosion 
b. Text determination procedure
c. Partner determination procedure
d. Object relation procedure 
e. Action profile
f. Number ranges


81. Business transaction category is a control attribute that controls
a. Item category determination
b. Subordinate transaction type
c. Control attributes of transaction type
d. Subordinate item category 


82. With regard to copying and creating a follow up document following is true
a. Copy survey 
b. Copy control
c. Copy item number
d. Copy pricing agreements


83. In copy control customizing what setting can influence transaction type and item category determination
a. Copy survey 
b. Copy control
c. Copy item number
d. Copy pricing agreements


84. Following is true for texts
a. You define the source text of text types within access sequence
b. The texts are automatically determined in a document or can be entered
c. Can be assigned to transaction type and item categories


85. Which statements are correct for status management
a. It?s controlled by status profile
b. You must assign at least one object type to the status procedure
c. System status can be controlled by system profile
d. User status is set internally by the system 
e. Header status is independent of item status except in case of status completed
f. Status profiles can be assigned to transaction type or item category
 
86. Following is true with regard to incompleteness check
a. Incompleteness check allows you to find out whether a document is complete or not
b. In customizing you define which fields are mandatory for which transaction type and/or item category
c. Incompleteness check is not available on the CRM mobile client


87. Which of these functions are possible on sales transaction in CRM
a. Change price at item level
b. ATP check
c. Document flow
d. Auto creation of delivery document 


88. Activity management is an important component of CRM.
Which of the following are true
a. Task is transaction replicated to R/3 and mobile client 


89. Business activity and task have the following in common
a. Needs a specific date
b. Includes a business partner 
c. Have org data 


90. Activities and calendar integration
a. Bidirectional data exchange between my SAP CRM middleware and groupware solutions
b. Activities appear in calendar if calendar flag is active for each partner functions and Activity type
c. Activities can be created or changed directly from calendar


91. Fact sheet


92. Order of customizing for partner determination


93. Partner functions necessary for uploading sales order into R/3
a. Sold to party
b. Ship to party
c. Payer
d. Bill to party
e. Employee responsible 


94. IPC is required to calculate pricing in CRM. Which of the following are true
a. It consists of SPE, SCE and TTE only.   as it also includes data loader and limited product master information
b. IPC accesses CRM database
c. IPC is JAVA based technology


95. Identify the correct statements regarding the pricing in CRM
a. Maintained in CRM. IPC accesses R/3 enterprise 


96. Tax calculation
a. The business partner and product tax classification is made by assigning tax groups to the tax types that must be determined in any given country
b. The tax groups indicate whether a business partner is liable for or exempted from respective tax type that is imposed
c. The combination of tax group, the country or region and the tax type determines the tax condition record
d. A business partner or a product has not been assigned a tax classification, the default tax group is used


97. True for actions


98. Schedule condition


99. Billing prerequisites
a. Billing unit
b. Number ranges
c. Billing types
d. Item categories
e. Item category determination


100. Data exchange between R/3 and CRM


101. Adapters


102. Main tasks of R/3 adapter


103. Administration console ?Replication Administration


104. Publisher-Subscriber Concept


105. Load filtering


106. What is a business scenario


107. What does the role definition determine
a. A task oriented content


108. SAP Net Weaver


109. Three layers of Web Application Server


110. What is business package


111. The delivery mechanism is in the iView studio.


Following are the primary functions
a. Informing customers about available packages, worksets, and iViews and making the content available for down load
b.  Supporting the develop community in creating new content and offering it to SAP portal customers
c. Delivering updates and patches


112. Functions of Blueprint Application Builder


113. Functions of CRM Designer


114. Blueprint tables


115. IViews are generally displayed through portal pages. You can import predefined pages or create your own.
What does the page definition include
a. iview bundles pages, worksets, roles 
b. Pages bundles iviews, worksets, roles 
c. List of the pages 
d. A list of iviews and associated pages


116. What is role editor needed for?


117. The collaborative business is used for?.

118. Is it possible to create condition record in both crm as well as in R/3. explain in more details

119. Can you give some example of business object, customizing object, conditon object


120. What are the different bdocs available in MW
.

121. How do you integrate R/3 with CRM


122. What are the different data update in crm through middle ware

123. If i create a new condition record in R/3 how do you sync with crm


124. what are the org.objects available in org.mgt.

125. What are the process of org.mgt

126. Can you tell me different rule for org.determination


127. How the vol/trade spend tab is determined in marketing planner, what are the important settings needed Can you tell me trade spend keys


128. What is the difference between Campaign and Trade Promotion


129. What is the difference between Action & Workflow


130. Do we need to assign workflow in Action


131 Organisation Management determination


132. What are the different organisational determination rule in CRM

133. How the objective and tactics are controlled in Marketing planner.

Actions In SAP CRM

You can create schedule condition which is two weeks( or whatever date you wish to give) before the contract date and assign it to an action definition which has processing type Smart Forms Mail or Workflow, which is meant to send a reminder mail to the business partner.

And to trigger creation of lead or opportunity use Processing type METHOD CALL and method COPY_DOCUMENT where you can specify the follow to be created.

There is a standard workflow available for contracts which send reminder email to the business partner Two weeks before the expiration date.
Define Action Profiles and Actions
All maximal allowed actions are defined for a transaction type. You also specify general conditions in the action profile for the actions contained in the profile, for example:

o The time period at which the system starts the action (for example, when saving the document)
o The way in which the system executes the action (workflow, method call or Smart Forms).

In this activity, you create an action profile and templates for actions. You can define the action templates more closely in the following step “Change action profiles and define conditions”.

For the action profile, the class which provides the attributes for your business object must be entered. These business objects can be used for planning actions.

When creating an action profile, note for which business transaction type you can use this action profile. You must assign the relevant business object type to the action profile. The assignment of the business object type makes sure that the attributes for the relevant business transaction type (for example, sales contract) can be used for defining and processing the conditions. If, for example, you wish to make the action depend on the net value of the transaction, the profile must be assigned to a business object type which contains the attribute net value. Only one business object can be assigned for each actionProfile. You can find out the business object type for the transaction type or the item category in Customizing for transactions under Define transaction types or Define item categories.
If you work with time-dependent conditions, you must also assign a date profile to the action definition. This makes sure that the date rules which you use for the action definitions are also available. You can also assign the date profile to the entire action profile. It is then inherited as the default value in every action definition you create for this profile. You also define here whether an action is to be partner-dependent.

When defining the follow-up documents, consider the copying control for the relevant transaction types.

Note also the copying control for the relevant transaction types, when defining subsequent documents.

You can enter several processing types for one action definition. Under processing, choose:

o Method call: If the action consists of one single step, for example, create subsequent document or create credit memo item. During the method call, processing is carried out via Business-Add-Ins (BAdIs). Standard methods (BAdIs) are available. You can also use actions to trigger alerts, for example, in the Enterprise Portal. For more information, see Using Actions to Trigger Alerts.

o When creating your own BAdI implementations, make sure that the method 'get_ref_object' is always called from the class 'CL_ACTION_EXECUTE', and the method 'register_for_save' always at the end. You can use the implementations 'COPY_DOCUMENT' and 'COPY_ITEM_LOCAL' as a template.

o Workflow: If the action consists of a process with several steps, for example, a subsequent document with approval procedure.

o Smart Forms for issuing documents via fax, printing or e-mail.


Requirements


In order to create action profiles, you must have defined the necessary transaction types or item categories.

If you are using time-dependent conditions, you need to have defined date profiles. You define date profiles in the IMG under Basic Functions -> Date Management.

Standard settings

SAP delivers the following standard action profiles:

o For activities: ACTIVITY Contains the following action definitions:

- ACTIVITY_FOLLOWUP: creates a task for the responsible employee if a business activity is overdue

- ACTIVITY_PRINT: makes it possible to print the activity

- ACTIVITY_REMINDER_MAIL: sends an e-mail to the responsible employee if a business activity is overdue

o For opportunities: OPPORTUNITY_SALES_ASSISTANT This action profile contains the actions necessary for sales methodology for opportunities.

o For quotations: QUOTATION Contains the action definition Complete quotation. When the validity period for the quotation has expired, the quotation is automatically
Set to 'completed'. This action profile is assigned to the transaction type quotation.

o For sales contracts: SALES_CONTRACT_HEAD Contains action template COPY_DOCUMENT. The action generates a follow- up document, and returns the number of the follow-up document to the original document. The transaction type for the follow-up document must be entered in the processing parameters.

o For sales contract items: SALES_CONTRACT_ITEM contains action template COPY_ITEM_LOCAL .

o VALUE_QUANTITY_CONTRACT_ITEM
o For Leasing contracts: LEASING_MESSAGES Contains action definitions for messages and subsequent documents. The subsequent documents include:

- CONT COPY DOCUMENT Generate subsequent document (activity) generates a telephone call two weeks before the contract end date.

- CONT COPY DOCUMENT SCHEDULED Generate subsequent document via
Selection report When a specific net value is reached, the system automatically
Creates a subsequent document. The net value is checked using a selection report.

o For complaints: COMPLAINT

o For complaints items: COMPLAINT_ITEM

We recommend that you do not change the delivered profiles, but copy and adapt them if necessary.



Recommendation


If you create your own action profiles and action definitions, these should begin with Y or Z, because this name range is not overwritten for a SAP import.

Activities

In order to create an action profile with action templates, you proceed as follows:

1. Choose new entries in the Change action profile view, and enter a name and a description for the action profile. Assign the context class CL_DOC_CONTEXT_CRM_ORDER in CRM Sales and Service in the field context class. If necessary, assign a date profile and a business transaction type (business object type) to the action profile. In order to assign business transaction type, choose the relevant business transaction type with input help in the category BO - BOR object type and object type fields.

2. Go into the action definition screen and choose new entries. The screen for the definition of actions appears.

3. Enter a name and a description for the action.

4. Specify the default values for the action in the action definition screen. Consider the following notes for these input possibilities: Processing time period:

- Immediate processing - the action is started as soon as the start condition is fulfilled.

- Processing when saving document - the action is started directly after the update.

- Processing using selection report - the action is started by a report after expiration and evaluation. After selection using the report, the system first checks whether a start condition is available. If no start condition is available, or the condition is correct, the action is started.

If you select the partner-dependent field, you can define a partner function or partner function category for which the action is valid. For example, you can use partner function categories if you want a reminder e-mail to be sent to all business partners who are involved in the transaction and assigned to the specific partner function category. You and use partner functions to trigger an action for a specific partner function, for example, to send a reminder e-mail to the employee responsible for the transaction. You can, however, also define the action partner-dependently via the conditions. Select the field changeable in dialog if you want the user to be able to change the condition and processing parameter for the action in the document. Select the field executable in dialog if you want the user to be able to trigger the action manually on the Actions tab page.
Select the display in toolbar field if you want the action to be displayed as a symbol in the toolbar for the document, and the user to be able to plan it from here. In the determination technology field, choose Determination via transportable conditions.
In the field action aggregation, choose:
• a maximum of one action for each action definition, if the action is to be executed exactly once
- a maximum of one unprocessed action for each action definition if you want to be able to call up the action several times.

5. Go to the Processing screen, in order to set how (with which technique) the action is executed.

6. Choose new entries and, in the list, choose Processing Processing types (workflow, method call or Smart Forms). In the case of several processing types, select the standard processing type with the default indicator.

7. Select the processing type and choose Set processing..

- For processing via method call: Select a method (Business-Add-In) in the Filter value field via the input help. If you wish to be able to print an activity, use the processing
Method CRM_ACTIVITY_EXEC_SMART_FORM. This processing method is delivered with the standard configuration. Using the symbol for BAdI implementation, you can display the coding for the selected method. Using the symbol New BAdI
Implementation, you can define your own methods (BAdI).

Define the processing parameters (container) and maintain the standard values, for example, import, transaction type, export: external document number.

- For processing via workflow. Enter a workflow dummy.

8. For processing via Smart Forms:
Choose print, fax or e-mail, and enter a form name, a processing class, and a processing method. If you want the responsible employee to be sent a reminder e-mail if a contract is overdue, use smart form CRM_REMINDER_MAIL_01. This smart form is delivered with the standard configuration.

9. Repeat the steps as of 2 for each action template you wish to define.

Further notes

If you also wish to specify messages for a transaction type (for example, order confirmation by fax), you must define the message output and the actions (for example, follow-up documents) in the same action profile.
The action profile ACTIVITY is assigned to transaction type 0000 in the standard configuration.

You can find information about the BAdI implementation in the SAP Library under Basis -> ABAP Workbench -> ABAP Workbench: Tools -> Further Concepts -> Business Add-Ins

You can find information about the SAP Business Workflow in the SAP Library under Basis -> Business Management (BC-BMT) ->

SAP Business Workflow (BC-BMT-WFM)

eCATT- An Introduction

eCATT-Extended Computer Aided Test Tool

Introduction to eCATT.

The Extended Computer Aided Test Tool is a new automated testing tool that allows you to create automated functional test cases for the majority of applications running in the SAP GUI for Windows and SAP GUI for Java environments. Like other test tools, it works by making a recording of an application, which you can then parameterize and replay with differing sets of input values. You can test the behavior of the application by reading and testing the values returned by the application. eCATT is available from Release 6.20 of the SAP Web Application Server, and is an integral part of the mySAP Technology underlying SAP R/3 Enterprise Release 4.7.
Designed as a successor to the existing CATT, it allows a user to record and replay any application running under SAP GUI for Java or SAP GUI for Windows. Furthermore, because it is embedded within the SAP application server, it has access to other interfaces, such as function modules, BAPIs, or the SAP database (so that users can perform checks), and the ABAP runtime, which lets users write ABAP routines into test cases.


With SAP eCATT, users are also able to test business processes that cross system boundaries. Each command in a test script can have a separate destination so, within one script, a user can call a transaction in mySAP Customer Relationship Management, and also check table entries in an SAP R/3 system. Within a script, logical names are used to refer to target systems. These logical names are mapped to actual RFC destinations in a separate object called a system data container, which is, effectively, a description of the company’s system landscape. Thus by linking a different system data container with a script, a user can execute it in a completely different system landscape without having to alter the script coding at all. The only prerequisite is that all the logical system names that the script uses are defined in the relevant system data container.
Because of the wide variety of applications that may need to be tested, eCATT does not have a single "one-size-fits-all” way of recording and replaying applications. Instead, there are various drivers that encompass the following kinds of scenarios:


• Table operations– interacting with the SAP database
• Function modules and BAPIs
• ABAP
• Transactions and reports
• Applications running outside the SAP GUI for Windows or Java environments

For the last of these scenarios, eCATT offers an interface that third-party tool manufacturers can implement to integrate their tools with eCATT.
You can migrate test cases from Computer Aided Test Tool (CATT) to take advantage of the better features of eCATT.
eCATT is also integrated with the Object Navigator (SE80).

Features
Using eCATT we can:

• Test transactions, reports, and scenarios
• Call BAPIs and function modules
• Test remote systems
• Check authorizations (user profiles)
• Test updates (database, applications, GUI)
• Test the effect of changes to customizing settings
• Check system messages

Constraints
eCATT runs in a system based on SAP Web Application Server 6.20 or higher. However, you can use this system to test systems with Release 4.6C or higher.


In my forth coming weblog’s I will be going through the following topics :

1. Creating Test Scripts.
2. Creating Test Data Containers.
3. Understanding System Data Containers.
4. Executing Test Configurations.
5. Understanding Logs.

I will also demonstrate the use of eCATT with following applications:
• Testing a Standard SAP Business Scenario.
• Testing a Web Dynpro Application.
• Migrating Test Cases from CATT to eCATT


eCATT: Creating Test Scripts
Understanding eCATT

Creation of Test Scripts

In my last weblog on “eCATT : An Introduction” I introduced the subject of eCATT and discussed the capabilities and features of the same . In this weblog I will be going a step further and explain the creation of Test Scripts , the first step in the creation of Test Cases using eCATT .

Before creating Test Scripts using eCATT we need to have some system setting done .

1. Maintaining Table T000
a. Start transaction SM31.
b. In the Table/View field, enter T000.
c. Choose Maintain.
d. In the Change View “Clients”: Overview screen, select the relevant client and choose.
e. In the Restrictions when Starting eCATT field, select an entry that allows eCATT.

2. Enabling Scripting at the front End .
( Check whether SAP GUI Scripting component is installed. There is an option for installing this component when installing the SAP GUI.)
a. On any screen, choose Customizing of local layout.
b. Choose Options....
c. Choose the Scripting tab.
d. Select Enable Scripting.
e. Choose Apply.

3. Enabling Scripting on application server .
a. Start transaction RZ11.
b. On the Maintain Profile Parameters screen, enter sapgui/user_scripting.
c. Choose Display.
d. In the Display Profile Parameter Attributes screen, choose Change value.
e . Enter TRUE in the New value field.

Now we will start with creation of Test Scripts :
The first step in the Creation of Test Case is Creation of Test Scripts .

A test script consists of three principal parts-

  • Its attributes
  • The script commands
  • The parameters


We will be creating a Test Scripts for Sales Order Scenario .

Step1 : Goto Transaction SECATT :

image


image


image

Now the Recording for the Transaction VA01 will start .We will Record and save the Transaction .

image

image

image

After Recording is saved TCD Command Appears in the Command Editor.

image


Now Define Parameters . Only those parameters should be defined which are expected to take values at runtime.

image

On clicking the Toggle Option : The Command Editor Appears .

image

On clicking the “Command Interface” Option the interface appears in left bottom corner of the screen .
For each screen traversed screen name and screen number appears . Within each screen all the Input values that were entered during Recording are parameterized .


When all the screen input fields are parameterized , save the Script .

This Creates the Test Script for the Sales Order Scenario.

In the next Weblogs I will be discussing Test Data Containers , System Data Containers and Test Configurations to complete the Test Case for the Sales Order Scenario.

eCATT: Creation of Test Data Container
Creating Test Cases using eCATT

Creation of Test Data Container .

In my last weblog we were discussing creation of Test Case for Sales Order Scenario .
The first step for Creation of Test Case i.e. creation of Test script was covered in the previous weblog . In this weblog we will continue the flow and cover Creation of “ Test Data Container” and “System data Container “ for the Test Scenario .

Transaction ‘SECATT’. : Creating Test Data Container

image

image
image

Now Create Variants for the Test Case .

image

The Script will be Tested with these 3 variants . These Variants define the different set of values with which the Scenario will be tested . In the above case the Sales Order Creation will be tested for different set of Sales Area Data ( different distribution channels in namely: 10 12 & 16 )

After creation of Test Data Container , In the test script the parameters are assigned to the Input values/Output Values .

Parameterizing Input Fields :
You must set the field mode to ‘S’, and enter a literal or the name of a parameter in the VALIN column. At runtime, the screen field will be filled with the value that you specified.

image
Parameterizing Output Fields :
You must set the field mode to ‘G’, and enter the name of a parameter in the VALIN column. At runtime, the parameter will be filled with the value from the screen field.
image

Now Creation of System data Container :

Transaction ‘SECATT’.
image
Since we are not Doing Remote Testing .Therefore Test System is “NONE
(In Case of Remote Testing RFC destination has to be created in SM59 and should be specified under “RFC Destination Tab”)
image
In the next weblog Creation of “Test Configuration” and Execution of the Test Case will be covered thus completing the Test Case for Sales Order Scenario.

eCATT: Creating & Executing Test Configurations


Creation of Test Configuration

In my previous weblogs on eCATT we were discussing “Creation of Test Case for the Sales Order Scenario” . In the last weblog I had demonstrated the creation of “Test Data Container” . The only step left for the completion of Test Case for the above said scenario is the creation of “Test Configuration “.

I will explain creation of “Test Configuration” with the help of Screen Shots .


Transaction ‘SECATT’ . : Creating Test Configuration .


image


image

In the Test Configuration ( zsales_config ) Test data “ZSALES_DATA”( Created in last Weblog ) is attached .


image

Note : The field Target System is Blank as Testing will be performed Locally .

Now we have to copy variants from Test Data Container to the Test Configuration .

image

image
The above screen shows the three variants namely :
· ECATTDEFAULT
· VAR1
· VAR3

Now the execution of this Test Configuration will Test the Sales Order Process with three different set of data .


Executing Test Configuration : zsales _config .



image
Now , The Log Generated after ZSALES_CONFIG was executed .


image
The Log reveals that variant ECATTDEFAULT AND VAR1 executed successfully ( i.e sales order creation was possible with these set of Data )
But with Variant VAR3 Error : Order type OR not defined in Sales Area<1000 16 00 occurs .
From the above Test Scenario we were able to infer that
Standard Sales Order type OR cannot be created in Distribution channel 16 .


Thus we have successfully created a Test Case for the Sales Order Scenario .

In my next weblog on eCATT , I will discuss Creation of Test Case for “WebDynpro” applications .

eCATT: Creating a Test Case for a Web Dynpro Application
This Weblog will discuss how to create a Test Case for a Web DynPro Application. This is one of the major features of eCATT that allows users to test business processes that cross system boundaries.

In my previous Welogs on eCATT , I discussed topics starting from "Introduction to eCATT" to "Executing a Test Case using eCATT ". This Weblog will go a step further and discuss how to create a Test Case for a Web DynPro Application. This is one of the major features of eCATT that allows users to test business processes that cross system boundaries.

The scenario for Test is as follows :

Scenario

The goal is to create a Test Case for a Web Dynpro Application that is on java Stack . The application is for Purchase Order Creation.
The application will be tested for different set of data .
The url is : http://:/webdynpro/dispatcher/local/PO/CreatePO


Procedure:

The first step towards creating a Test Case for a Web Dynpro Application is to create a
RFC destination in SAP .

Tcode : SM59
RFC Destination : WEBDYNPRO2 , Type : G
Target Host :
Service :


image



Now , create a System data Container assigning HTTP RFC destination created above .

Tcode : SECATT


image


After creation of Test Data Container , Create Test Script . ( the creation of the same has been discussed at length in my previous weblogs )

In pattern option under UI control Group select WEBDYNPRO command .
Entering System data Container and Target System .

image

The Application in our case is “/webdynpro/dispatcher/local/PO/CreatePO”

image


Recording starts . The application starts in the browser .

image


Entering appropriate Header Info in the fields .

image


Adding item details .

image

Creating Purchase Order .


image

The PO is created in SAP and the PO number is reflected in top right corner .

image

Now , click “Stop Recording” Option .

image


Below we can see a WEBDYNPRO command is created for each page of application.

image

Now Parameterize the Input values

image

Creating Test Data Container .

image

2 Variants for are created . The Company code data is different in both cases .

For Test Variant 1 : Company Code is 1000.
For Test Variant 2 : Company Code is 3000.

image


Now Creating Test Configuration and attaching Test Data Container .

image

Executing Test Configuration .

image

Examining Log we see that :

PO can be created with var1 ( Company Code :1000 )

PO cannot be created with var2 ( Company Code :3000 )

image

Thus we were able to successfully Create a Test Case for a "Web Dynpro Application" deployed on Java Stack using eCATT.

1

Recording a test case

1.1

To record a test case, call Transaction SCAT and enter test case Zuser_creat.
Do not choose Enter.
Choose Test Case Record Transaction. Enter Transaction SU01, and choose Record/Enter.
The system runs Transaction SU01.
Enter the user name TESTZ and choose Create.
Enter the user’s title first name ZEBRA and the last name TEST.
Select the Logon data tab, enter init as the initial password, and repeat the password, profile select sap_all then choose Save.
Go back a screen and
In the dialog box displayed, select End recording.
A message is displayed stating that the recording has ended.
Enter the test case title User maintenance.
In the field Component, enter BC-SEC-USR.
Save the test case.
In the field package class, enter $TMP.
Choose Save to save the attributes.
To save the test case functions, go back.

2

Entering parameters for a test case

2.1

To define parameters for a test case, call Transaction SCAT.
Enter the test case name Zuser_creat.
Select Functions and choose Change.
Double-click on TCD.
Then double-click on program SAPLSUU5 screen 0050. (first appearance of this program)
The first screen of Transaction SU01 is displayed. (If you backed out, enter the procedure name again and double-click on TCD.)
Double-click on the user name field. In the field Param. name, enter an "&", and choose Copy/Enter.
Choose Next screen and double-click the last name. In the field Param. name, enter an "&" and choose Copy/Enter.
Go back until the Save folder appears, and choose Save.

3

Creating and using an external variant for the test case

3.1

To export the default parameters into a frontend file, in the test case, select Goto Variants Export Default.
Note: The default file name is .txt. Do not change the default values.

3.2

Open the file, with excel and edit and add another couple of user, and save the text file

3.3

To execute the test case using the external variant from file, from the initial CATT screen, enter the test case name and choose Execute.
In the field Variants, select External from file and choose Choose. Select the file created above, and choose Open. Under Processing mode, select Errors, and choose Execute.
Note: When you use this method, the file must be imported each time the test case is executed (file remains only on PC).

Followers

About Me

My photo
ENERGY is my SECOND NAME because LOYALTY is my FIRST. I NEVER LET PEOPLE DOWN and NEVER FORGIVE BETRAYERS. WORDS are my WEAPONS and STYLE is my ATTITUDE. FRIENDSHIP is my biggest STRENGTH and FRIENDS are my biggest WEAKNESS. I LIKE it when PRESSURE PILES ON ME & TEACHES me how to LIVE LIFE EASY. I know NO BARRIERS, NO LIMITS & LOVE to do THINGS in my WAY. That's when the whole WORLD is AGAINST YOU, but I LOVE OPPOSING FORCES!! That MAKES me more STRONGER as a PERSON. CREATIVITY is my USP and out-of-the-box thinking is my SPECIALISATION. I WEAR my ATTITUDE & I am who I am. Change is the only static thing in the world but I never let it cross me. FAILURE is my BIGGEST FEAR & FEAR is my BIGGEST FAILURE. I NEVER FOLLOW FASHION but LET FASHION FOLLOW ME. I never exaggerate by saying I am so and so, but I am enough GOOD for people to LOVE me and enough BAD to be put behind the bars. ;-). I don't know the straight road to approach life, instead I make my own roads. People who love me get addicted to me and I get addicted to them. So just be in touch and let me touch your life!! My One and only funda: "NEVER STICK TO BASICS"