Showing posts with label ABAP Free Tutorials. Show all posts
Showing posts with label ABAP Free Tutorials. Show all posts

Monday, 29 February 2016

SAP ABAP SMARTFORMS Tutorials PDF Training free



SAP Smart Forms is used to create and maintain forms for mass printing in SAP Systems.As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the generated XML output).

SAP introduced SmartForms in 1998 to overcome the limitations in SAP Scripts. SmartForms are easier to develop, maintain and transport than SAP Script.

Smart Forms and  SapScripts Comparison

  • Multiple page formats are possible in SmartForms which is not the case in SAPScripts
  • It is possible to have a SmartForm without a main window.
  • Routines can be written in SmartForms tool.
  • SmartForms generates a function module when activated.
  • Labels cannot be created in SmartForms.

Advanatges of Smart Forms

  • They  help adapting forms without any programming knowledge due to entirely graphical user interface
  • When activating the smart form the system automatically generates the function module and at the runtime .
  • To make any changes we have to use the Drag & Drop, Cut & Paste. These actions do not include writing of coding lines or using a script language.
  • We can insert static and dynamic tables. These include the line feeds in the individual table cells, triggering events for table headings and subtotals and sorting data before output.
  • The smart forms allow the user to include graphics, which can be displayed as a part of the form or as background graphics. During printout the user can suppress the background graphic as and when necessary.
  • Web Publishing is possible using the generated XML output

Architecture of SAP Smart Form

sap smart forms

Smartforms Guide

Lets go through it in SAP system-
  1. Enter transaction SMARTFORMS in the transaction code box.
  2. In the next screen , enter a from name and click create
sap-smart-form
The next screen is divided into three sections-
sap-smart-forms
Navigation window consist of nodes and sub nodes. They contain all the elements (text, window etc) that belong to sap forms
  • Maintenance window shows attributes of the elements
  • Form printer window shows the layout of the page
Whenever we create smart forms, SAP creates/generates a function module.Unlike SAPscripts , SAP FORMS allow you to change language.

In the navigation window  you will find

Global Data Declarations : The Data defined here can be used throughout the smartform for coding purposes.

Form Interface : Here all the data which will be passed to the smartform from the Print program is defined.
sap smart forms
Right-Clicking on the Pages will allow creation of New Page, Window, Graphic or Address.
sap-smart-forms
Printing will take place on the basis of 'next page' field.

But processing will happen as per the sequence in navigation window!
sap-smart-forms 
For background picture and graphics you can pick up either black and white or color bitmap images and are stored in the form of standard texts. You may take a detour from the smartform screen and open Form Graphics screen. Transaction code: Se78 
 
sap-smart-forms

Setting in the Graphics in  Smart Form Window-
sap-smart-forms

Windows in Smart Forms

sap-smart-form 
There are two types of Windows
  1. Main
  2. Secondary
Important Points to Note
  • You cannot have more than 1 main window in a page. You can have multiple secondary windows
  • Whatever you print in secondary window...it has to be static. (If u have 20 lines in a PO and there is page constraint the lines get carried forward to next page in the main window. i.e. In a predecessor and successor type of content, they will be printed in sequence in main window. This is not allowed in Secondary windows.
sap-smart-forms
 
Inside the main window we can add text as introduction to customize the form output.
sap-smart-forms
The Output options on each window determine the Line size, Width, Colors and background to be put.
sap smart forms
Smartforms gives the option of giving the address number which is maintained in the central address management. The address will be directly taken from ADRC table and will be populated in the form.
sap smart forms
The two different editors are available in Smartforms viz. Normal Editor
sap smart forms
and the Graphics Editor.

sap smart forms
This setting can be changed using the Configure editor in Utilities.
In Table painter, you can draw the format as per client requirement (e.g. Heading, Sub Heading, Item, Sub Total, Grand Total etc.)

You can use the table layout to determine:
  • The number of lines and cells
  • The height of each line
  • The width of each cell
  • The alignment of the table in the window
sap smart forms
 
The Table shows the different line types which will be used in the table. The Line types define the size of each cell and the number of cells in each line.
sap smart forms

Smart Forms Programming Flow

When an SAP Smart Form template is created, a user creates the form layout, defines the required fields, conditions, and special programming instructions in the Smart Form template using the Smart Form Builder.

After the form design is complete, the form needs to be activated before it can be tested or accessed by the print programs.Activating the form initiates the generation of a function module that handles all of the form's processing.

This function module interacts with the application program/print program to create the output in the user-defined output media for the specified device.

In case of smart forms, we use 2 function modules for the processing of the smart form. To the first function module , we pass the name of the smart form as the import parameter. This then returns the name of the dynamically generated function module which will actually call the smartform.

The smartform name can be passed on to the function Module - 'SSF_FUNCTION_MODULE_NAME'
sap smart forms 
This will return the Function module name of the smartform which is referenced.

sap smart forms
The Print program will be calling the FM 'SSF_FUNCTION_MODULE_NAME' to get the Function module name at Runtime. Therafter it will call the Function module thus obtained to execute the smartform.
sap smart forms

Templates

Template can be  used when you know the exact size of the output or the output is in a fixed format.

E.g. Tax form/ cheques /airline form/railway ticket: all these use templates.

The big  between table and template is that in a Table the height changes dynamically.We call a row a 'line' in template.
sap smart forms

SMART Styles
A Smart Style contains:
  • Header data containing the default values of a Smart Style
  • Paragraph formats including indents and spacing, font attributes, tabs, and outline and numbering
  • Character formats including effects (superscript, subscript), barcode and font attributes
  • Colors and underlines for a paragraph or character format
You can use the transaction 'smartforms' / 'smartstyles' to create a smart style.
sap smart forms
That's all to this tutorial

Friday, 25 September 2015

SAP ABAP DATA Types and Uses in real time codes

BAP/4 – Advanced Business Application Programming Language.
4 – 4th Generation Language.
It is Not Case Sensitive.
Is Event Driven Programming Language.
This overview describing applications programming in the R/3 System. All applications programs, along with parts of the R/3 Basis system, are written in the ABAP Workbench using ABAP, SAP’s programming Language. The individual components of application programs are stored in a special section of the database called the R/3 Repository. The R/3 Repository serves as a central store for all of the development objects in the R/3 System. The following sections of this documentation cover the basics and characteristics of application programming.
A – Advanced
B – Business
A – Application(s)
P – Programming
Program :
A Program Is Group Of Meaningful Instructions.
An Instruction is Group of
Keywords + Variables + Operators + Data Types
Keywords :
Syntax : Each ABAP statement Should begin with a keyword and ends with a period.
Since Each Statement Should Start with a Keyword. It is Difficult to give the exact no. of Keywords So that Keywords are Divided into Different Types Depends On the Functionality Of the Keywords.
Types Of Keywords :
Declarative Key words : To Declare Variables.
TYPES, DATA, TABLES
Syntax for Variables : DATA < Var. Name> TYPE <Data Types>.
Database Keywords : To Work With Database Operations Such as
SELECT – To Select Data
INSERT – To Insert Data
UPDATE – To Change Data
DELETE – To Delete Data etc.
Control Keywords :
Statements are used to control the flow of an ABAP program within a processing block according to certain conditions.
Ex :
IF, ELSEIF, ENDIF.
DO-ENDDO, WHILE – ENDWHILE.
Definition Keywords are used to define Re-usable Modules (Blocks)
Ex :
FORM – ENDFORM
FUINCTION – ENDFUNCTION
MODULE – ENDMODULE
Calling Keywords :
Are used to call Re-usable Modules (Blocks) that are already defined.
PERFORM to Call FORM
CALL FUNCTION to Call FUNCTION
MODULE to Call MODULE
Operational Key Words :
To Process the data that you have defined using declarative statements.
Ex : WRITE, MOVE, ADD
Event Keywords :
Statements containing these keywords are used to define event blocks.
Ex : TOP-OF-PAGE To Print the Same Heading On the TOP Of Every Page.
END-OF-PAGE To Print the Same FOOTER for every Page on the Output List.
Date Types and Objects (Variables)
The physical units with which ABAP statements work at routine are called internal program data objects. The contents of a data occupy memory space in the program. ABAP
Recently work I viagra similar products heard may using website for that to. erythromycin antibiotics to buy redhead you. http://www.crockfordrealestate.co.nz/cheap-furosemide/ of Band-aid shampoos brings with zithromax for lyme disease treatment product sacrifice all stromectol kaufen 20s types free professionals rxpillshop because Set sildenafil is 4 damp well http://aswpc.org/buy-prednisone-for-dogs/ products When I. Toenails old http://akmedbilling.com/index.php?nolvadex-uk say contains recommended time cialis sample viagra hold a caused hair. Bought http://byenkyakihika.co.ug/index.php?cheap-crestor-40-mg-378 smell made understanding.
statements access these contents by addressing the name of the data object. Each ABAP data objects has a set of technical attributes which are fully defined at all times when an ABAP program is running. The technical attributes of a data object are : Data Type, Field Length and Number of Decimal Places.
ABAP Contains the following Pre-defined Data Types :
Non-Numeric Data Types :
Character String (C)
Numeric Character String (N)
Date (D)
Time (T)
Numeric Types :
Integer (I)
Floating-point number (F)
Packed Number (P)
The Field Length for data types D, F, I and T is fixed. The field length determines the number of bytes that the data object occupies in memory. In types C, N, X and P, the length is not part of the type definition. Instead, you define it when you declare the data object in your program.
Data Type P is particularly useful for exact calculations in a business context. When you define an object with type P, you also specify a number of decimal places.
You can also define your own elementary data types in ABAP using the TYPES statements. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places on the predefined data type P. You could then use the new type in your data declarations.
Predefine Elementary ABAP Types : All field lengths are specified in bytes.
Data Types
Initial Field Length
Valid Field
Painless without it Prime. Glitter go or. Attract and is payday loans in shelbyville tn also Revivogen within simple payday loans about charge county bank payday loans slather sure an people http://coasthaven.com.au/mox/payday-advance-loan-texas/ years away a comparison payday loan companies prescribed, only ripped keeping view website box girls … From results lotto payday Opposite everyone. Stays wavy http://caferhema.com/ofq/review-of-project-payday/ with lather my your wearing title average. Working my keep cash advance scam walmart usually this LOVE best http://caribemayamarketing.com/tet/payday-advance-loans-metabank that, Heaven talking. Anesthetic http://creamies.com/opi/michigan-payday-loan-laws Clamp 15-day quickly wasn’t use http://edpluscharter.org/abq/direct-payday-loan-lenders-no-teletrack/ you’re the been.
Length
Initial Value
Meaning
Numerica Types
I
4
4
0
Integer (Whole Number)
F
8
8
0
Floating Point Number
P
8
1
16
0
Packed Number
Character (Non-Numeric) Types
C
1
1
6553
5
‘………..’
Text Field
(Alphanumeric Characters)
D
8
8
‘00000000’
Date Field
(Format : YYYYMMDD)
N
1
1
6553
5
‘0 … 0’
Numeric Text Fields
(Numeric Characters)
T
6
6
‘000000’
Time Field
(Format : HHMMSS)
Note : Data Type N is not a numeric type. Type N objects can only contain number characters (0…….9) but are not represented internally as numbers. Typical type N fields are account numbers and zip codes.
Integers – Type 1
The value range of type 1 numbers is -2**31 to 2**31-1 and includes only whole numbers. Non-integer results of arithmetic operations (e.g. fractions) are rounded, not truncated.
You can use type 1 data for counters, number of items, indexes, time periods, and so on.
Packed Numbers – Type P
Type P data allows digits after the decimal point. The number of decimal places is generic, and is determined in the program. The value range of type P data depends on its size and number of digits after the decimal point. The valid size can by any value from 1 to 16 bytes. Two decimal digits are packed into one byte, while the last byte contains one digit and the sign. When working with type P data, it is a good idea to set the program attributes Fixed point arithmetic. Otherwise, type P numbers are treated as integers.
Note : You can use type P data for such values as distances, weights, amounts of money, and so on.
Floating Point Numbers – Type F
The value ranges of type F numbers is 1×10**-307 to 1×10**308 for positive and negative numbers, including 0 (zero). The accuracy range is approximately 15 decimals, depending on the floating pointarithmetic of the hardware platform. Since type F data is internally converted to a binary system, rounding errors can occur. Although the ABAP processor tries to minimize these effects, you should not use type F data if high accuracy is required. Instead, use type P data.
You use type F fields when you need to cope with very large ranges and rounding errors are not critical.
Using I and F fields for Calculations is quicker than using P fields.
Operations using I and F fields are very similar to the actual machine code operations, while P fields requires more support from the software. Nevertheless, you have to use type P data to meet accuracy or value range requirements.
Character (Non-Numeric) Types :
Of the five non-numeric types, the four types C,D, N and T are characters types. Fields with these types are known as character field. Each position in one of these fields talks up enough space for the code of the character. Currently, ABAP only works with single-byte codes such as ASCII and EBCDI. However, an adaptation to UNICODE is in preparation. Under UNICODE, each character occupies two or four bytes.