
Quick Contact
SAP Tutorial
- SAP HANA
- Features of SAP HANA
- Advantages and Disadvantages of SAP HANA
- SAP HANA Architecture
- SAP HANA Use Cases
- SAP Hana Installation
- SAP Hana Studio
- SAP HANA Studio Administration Console
- How to Use SAP HANA System Monitor
- How to Use SAP HANA on Azure
- SAP HANA Modeling – Attributes, Measures, Privileges, Modeling Objects
- Data Warehousing in SAP HANA – Components, Methods, Working & Benefits
- SAP HANA Attribute View – Create Attribute View in 9 Easy Steps
- SAP HANA Analytic View
- SAP HANA Calculation View
- Tables in SAP HANA
- SAP HANA Packages
- Schema in SAP HANA
- How to Create Analytic Privileges in SAP HANA
- SAP HANA Information Composer
- Import and Export in SAP HANA
- Major Components of SAP HANA
- Reporting in SAP HANA
- SAP Bussiness Objects Reporting Tool
- create relational connection in sap hana in 8 steps/
- steps to create olap connection in sap hana/
- How to Connect SAP Lumira with SAP HANA
- Connect Dashboard Designer to SAP HANA & Create Stunning Dashboards
- How to Connect Web Intelligence to SAP HANA in 4 Ways – Seamless Process
- Replication Modes and Types in SAP HANA
- SAP HANA Sidecar Scenario
- SAP HANA Security Guide
- SAP HANA License Management
- Difference between SAP HANA vs SAP S/4 HANA
- What is SAP S/4 HANA?
- S/4HANA Editions
- SAP S/4HANA Lines of Business
- >SAP S/4HANA Deployment Options
- >SAP S/4HANA Overview
- >Introduction of SAP ABAP
- >Overview of SAP ABAP
- >SAP R3 ARCHITECTURE
- >SAP Data Dictionary
- >SAP ABAB Views
- >SAP ABAB database Tables
- >ABAP Constants & Literals
- >ABAP Constants & Literals
- >Types of Tables in SAP
- >Sap Data Object
- >Internal Tables and Work areas
- >Internal Table Operations in SAP ABAP
- >ABAP Report uses Internal tables and Work Areas
- >Select single and Select up to 1 rows
- >Modularization Techniques
- >Techniques of debugging
- >Types Subroutines
- >Reports of Sap Abap
- >Using At Selection Screen Output
- >Select Statements
- >Function Modules
- >Modularization Techniques 2/
- >Subroutines In Sap Abap/
- >Report Of Sap Abap 2
- >Using At Selection Screen Output 2
- >Interactive Reports
- >Interactive Reports Development
- >Interactive Report Using Hide Technique
- >Interactive Report Using Get Cursor Technique
- >Tree List Report
- >Abap Alv Reports/
- >Sap scripts/
- >Purchase Order SAP Script/
- >SAP Smartforms/
- >What is BDC in SAP ? Types of BDC ?/
- >BDC Call transaction for Material Master MM01/
- >SD flow with T-Codes and tables/
- >Introduction to module pool programming in SAP/
- >Functional Specification/
- >ASAP methodology SAP
- >ABAP Development end to end process in Companies
- >SAP SD Sales and Distribution
Sap Abab
Sap FI
- Accounting Entries in SAP FICO
- Define Company in SAP
- Creating new companies
- Assign Company Code
- Business Area
- Functional Area
- Credit Control Area in SAP
- Financial Management in SAP
- Segments in SAP
- SAP Enterprise Structure
- General Ledger Accounting
- Fiscal Year Variant in sap
- Posting Period Variants in SAP
- Posting Period Variant to Company Code
- How to Assign company code to field status variants in SAP
- Posting Keys in SAP
- Tolerance Group for Employees in SAP
- Tolerance Groups For G/L Accounts
- Assign Users to Tolerance Groups in SAP
- Enter Global Parameters for Company Code OBY6
- Define Additional Local Currencies for Company code in SAP System
- Chart of Accounts in FICO
- Assign Company Code to Chart of Accounts in SAP
- How to Create G/L Account Group in SAP
- Define Sample Account Rule Types in SAP
- Data Transfer Rules
- Convolutional and recurrent neural network
- Assign company code to rule type in sap
- Create sample account in sap
- Accounting entries in sap fico sap accounting postings
- Financial statement versions in sap
- TAX Check Calculation Procedure in SAP
- Define New Condition types for Taxes
- How to Assign Country to Calculation Procedure
- Specify Structure for Tax jurisdiction code
- How to Create tax codes in SAP – FTXP "FI"
- Assign Tax Codes for Non-Taxable Transactions in SAP FI
- Define Tax Calculation Procedure for GST in SAP"FI"
- Assign Tax Calculation Procedure to Country in SAP for GST"FI"
- Define Access Sequence in SAP for GST"FI"
- Define Condition Types in SAP for GST"FI"
- How to create customer account groups in sap
- How to create number ranges for customer accounts
- Assign number ranges to customer account groups
- How to Assign Number Ranges to Vendor Account Groups in SAP F1
- How to Create Sundry Creditors GL Account in SAP FI
- How to Define Tolerance group for vendors /Customers
- How to Create Vendor Master Data
- Automatic Payment Program Configuration Steps SAP FI
- Create Vendor Account Groups in SAP
- How to Create Number Ranges for Vendor Accounts in SAP
- Maintain terms of payment SAP
- How to Create Customer master data by XD01
- How to Define Dunning Procedures in SAP
- Copy Reference Chart of Depreciation in SAP
- Assign Chart of Depreciation to Company code in SAP
- Specify account determination asset accountng
- How to create screen layout rules asset accounting
- SAP FI: Create Screen Layout Rules
- SAP FI: Maintain Asset Number Ranges – AS08
- Create Investment Program Types in SAP
- Investment profiles
- How to Investment Program Types to Operative objects in SAP
Purchase Order SAP Script
Requirement: Develop a purchase order with Logo, Address and page no.
A Real Time Scenario on Purchase Order SAP Script Form
Business Req:
Create a PO form with the below layout.
Please follow the below steps
Step 1:
Create a Page by name PAGE1
Step 2:
Create Required no of Window as per the layout given
Step 3:
Create Page Windows and specify height/width
Step 4:
Create Paragraph Formats
Step 5:
Create a TABS for Paragraph Formats
Step 6:
Create a Character Format
Step 7:
Write the code for Printing Headings, Line item information, Grand total in
Mainwindow
Step 8:
Write the code for Printing Vendor address in Address window
Step 9:
Write the code for Printing Footer information in Footer window
Step 10:
Write the code for Printing Logo in Logo window
Step 11:
Similarly, Write the code for Printing PO Details/PageNo/Title
Step 12:
Print the standard text using SO10 Tcode
Step 13:
Arrange all the windows as per the given Layout.
Step 14:
Create a Driver Program
Step 15:
EXECUTE THE driver program
Step 16:
Create a Second Page Layout
Step 17:
Increase the height of MAIN window
Step 18:
Printing Terms&Conditions using STARTFORM AND END FORM
Step 19:
Change the Driver Program for using STARTFORM AND END FORM
Detailed Steps:
- Se71->Give formname ->ZV_PO ->create.
- give Meaning->click on BASIC settings.
- Select page format /landscape
- Click on PAGES->EDIT->CRATE ELEMENT->give page as page1 and meaning as page1->>Give Next Page as Page1
- click on WINDOWS(by default, main window will be added)
- 6- click on EDIT->create element->give window name as TITLE and meaning as title.
- Click on Page windows-> EDIT->CRATE ELEMENT->Double click on each window so that the window would be added to the page. Give the appropriate height, width, left/right margin as below for each window
- Click on Page windows-> Give Page as Page2->Click on EDIT->CRATE ELEMENT->Double click on Main Window, Page No Window, Footer Window so that the windows would be added to the page2.
Step 1: Create a Page by name PAGE1
Step 2 : Create Required no of Window as per the layout given
Repeat the same step and add the below windows.
Step 3: Create Page Windows and specify height/width
Step 4 : Create Paragraph Formats
Create the 4 paragraph Formats as below.
Step 5 : Create a TABS for Paragraph Formats
Give Tabs for HEADER paragraph format as below.
And the 4th tab as 55 chars right justified .
Give font family as COURIER AND size as 12 for all paragraph formats, except for TITLE paragraph. Give 16 for this TITLE paragraph.
Step 6 : Create a Character Format
Create character format as below.
Step 7 : Write the code for Headings, Line item information, Grand total in Mainwindow
Goto->Pagewindows->Double click on main window and click on texteditor-
CLICK ON GOTO CHANGE EDITOR—>write the below code.
Here…
/:TOP…ENDTOP is used to print header information in the main window so that the it flows on to every page .
/Eïƒ BODY—-this is used to print body. All the line item values.
/E-Total—-used to print total at the end of main window..
This element is called after the loop..endloop..so that Grand total is printed immediately
After the main window.
Step 8 : Write the code for Printing Vendor address in Address window
Goto->Pagewindows->Double click on ADDRESS window and click on texteditor->write the below code.
Step 9 : Write the code for Printing Footer information in Footer window
Goto->Pagewindows->Double click on FOOTER window and click on texteditor->write the below code.
FT–&ULINE(60)&
FT–ALL RIGHTS RESERVED TO IBM INDIA PVT.LTD
Here FT is paragraph format And
C1 is char format with bold.
Step 10 : Write the code for Printing Logo in Logo window
Goto->Pagewindows->Double click on LOGO window and click on texteditor->write the below code or Click on INSERT->GRAPHICS->Select Stored on Document
Server->Give Name ‘IBM'(Image name Uploaded through SE78)->
Give object : GRAPHICS
ID : BMAP
Select color Bitmap Image->Press Continue->the Below syntax will come automatically
BITMAP ‘IBM’ OBJECT GRAPHICS ID BMAP TYPE BCOL
Step 11 : Similarly, Write the code for Printing PO Details/PageNo/Title
Similarly, for all windows write the below code in the text editor
Goto->Pagewindows->Double click on PO_NO window and click on texteditor->write the below code
DF– PO No : &wa_ekko-ebeln&
DF– PO Date : &wa_ekko-aedat&
Goto->Pagewindows->Double click on PAGE_NO window and click on texteditor->write the below code
DF–Page.No : &PAGE&/&SAPSCRIPT-FORMPAGES(C)&
Goto->Pagewindows->Double click on TITLE window and click on texteditor->write the below code
TL—-Purchase Order
Step 12 : Print the standard text using SO10 Tcode
Goto->Pagewindows->Double click on TEXT window and click on texteditor->write the below text.
We can write the text directly in the window. But in the real time we use a concept called standard Text.
So Lets use the standard Text now.
Goto SO10->give text name->click on Create->
CLICK ON GOTO->CHANGE EDITOR
Write the below text->click on save->go back and click on print preview.
Go back to script
Goto->Pagewindows->Double click on TEXT window and click on texteditor->write the below text.
/: INCLUDE ZV_PO_TEXT OBJECT TEXT ID ST
THIS IS STD TEXT THRU SO10 TXN.
Or
CLick on Insert->Text->Standard->a pop will appear->give text name as ZV_PO_TEXT->press enter->
The code will be displayed automatically.
Step13 : Arrange all the windows as per the given Layout
Finally, Lets Re-arrange all the window positions again by going to Graphical Form Painer.
Click on SETTINGS->FORM PAINTER->Select checkbox Graphical Form Painter
And press enter
The form should look as below.
If not arrange all the windows as below by dragging and dropping.
Now goback to PC EDITOR.
Save and activate script
Specify default paragraph and first page
Save and activate script
Step14 : Create a Driver Program
And the driver prg is: REPORT ZV_PO_DRIVER. TABLES: ADRC,LFA1,EKKO. PARAMETERS: P_EBELN TYPE EKKO-EBELN. *DATA DECLARATIONS DATA: WA_EKKO TYPE EKKO. DATA: WA_EKPO TYPE EKPO. DATA: IT_EKPO TYPE TABLE OF EKPO. DATA: WA_LFA1 TYPE LFA1. DATA: WA_ADRC TYPE ADRC. DATA: V_TOT TYPE EKPO-NETWR. *READ PO HEADER DETAILS SELECT SINGLE * FROM EKKO INTO WA_EKKO WHERE EBELN = P_EBELN. *READ PO ITEM DETAILS SELECT * FROM EKPO INTO TABLE IT_EKPO WHERE EBELN = P_EBELN. READ TABLE IT_EKPO INTO WA_EKPO INDEX 1. DO 100 TIMES. APPEND WA_EKPO TO IT_EKPO. ENDDO. *READ VENDOR MASTER DATA TO FIND THE ADDRESS NUMBER SELECT SINGLE * FROM LFA1 INTO WA_LFA1 WHERE LIFNR = WA_EKKO-LIFNR. SELECT SINGLE * FROM ADRC INTO WA_ADRC WHERE ADDRNUMBER = WA_LFA1-ADRNR. *OPEN THE FORM CALL FUNCTION 'OPEN_FORM' EXPORTING FORM = 'ZV_PO' LANGUAGE = SY-LANGU. *PRINT EACH ITEM IN MAIN WINDOW LOOP AT IT_EKPO INTO WA_EKPO . *CALCLUATE GRAND TOTAL V_TOT = V_TOT + WA_EKPO-NETWR . WA_EKPO-MATNR = 'APACHE-160' . CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'BODY' WINDOW = 'MAIN'. *PRIINT THETOTAL AFETR ANIN WINDOW BODY PAGE AT LAST . CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'TOTAL' WINDOW = 'MAIN'. ENDAT. ENDLOOP . CALL FUNCTION 'CLOSE_FORM'.
Step15 : EXECUTE THE driver program
EXECUTE THE driver program->Give PO number as 4151508223
and execute->Below is the output .
Step16 : Create a Second Page Layout
Now Create a second Page PAGE2 and copy the Main Window, Page No Window, Footer Window.
Click on PAGES->EDIT->CRATE ELEMENT->give page as page2 and meaning as page2->>Give Next Page as Page2
Double click on Page1->give next page as Page2.
Double click on Page2->give next page as Page2.
Step17 : Increase the height of MAIN window
Now Lets Re-arrange the MAIN window position i.e. Just Increase the height of MAIN window as below by going to Graphical Form Painer.
Click on SETTINGS->FORM PAINTER->Select checkbox Graphical Form Painter
The form should look as below.
Save->activate the form and again test it from Driver Prg.
The Page1 Should look as below.
And the Page2 Should look as below.
USING STARTFORM AND END FORM
Step18 : Printing Terms&Conditions using STARTFORM AND END FORM
Crate another Sap Script by name ZV_PO_TERMS with below attributes.
Page : Page1
Windows : Main Window, Create a new window by name TERMS.
Page Windows : Copy MAIN window and TERMS windows onto page1 .
Double click on the Main Window->Write the below text.
Double click on the TERMS Window->Write the below text.
Create a title paragraph format and write the below text with font size 22 points
Also create defuakt paragraph format with font size 16 points
Save , Activate the program.
Define irst page and default paragraph
Step19 : Change the Driver Program for using STARTFORM AND END FORM
Write the below code in the above driver program i.e. just add the below code to the above code CALL FUNCTION ‘CLOSE_FORM’.
CALL FUNCTION ‘END_FORM’.
*The start form is used to call a different form for printing TREMS&CONDITIONS.
*This for is reusable as it is only for printing
* TREMS&CONDITIONS
CALL FUNCTION ‘START_FORM’
EXPORTING
* ARCHIVE_INDEX = ARCHIVE_INDEX form = 'ZV_PO_TERMS' language = sy-langu . CALL FUNCTION 'WRITE_FORM' EXPORTING element = 'TERMS' window = 'MAIN'. CALL FUNCTION 'END_FORM' . CALL FUNCTION 'CLOSE_FORM'. The Terms and conditions will be printed on the Last Page . *&---------------------------------------------------------------------* *& Report ZV_PO_DRIVER *& *&---------------------------------------------------------------------* REPORT ZV_PO_DRIVER. TABLES : ADRC,LFA1,EKKO. PARAMETERS : P_EBELN TYPE EKKO-EBELN . *DATA DECLARATIONS DATA : WA_EKKO TYPE EKKO . DATA : WA_EKPO TYPE EKPO . DATA : IT_EKPO TYPE TABLE OF EKPO . DATA : WA_LFA1 TYPE LFA1 . DATA : WA_ADRC TYPE ADRC . DATA : V_TOT TYPE EKPO-NETWR . *READ PO HEADER DETAILS SELECT SINGLE * FROM EKKO INTO WA_EKKO WHERE EBELN = P_EBELN. *READ PO ITEM DETAILS SELECT * FROM EKPO INTO TABLE IT_EKPO WHERE EBELN = P_EBELN. READ TABLE IT_EKPO INTO WA_EKPO INDEX 1. DO 100 TIMES . APPEND WA_EKPO TO IT_EKPO. ENDDO. *READ VENDOR MASTER DATA TO FIND THE ADDRESS NUMBER SELECT SINGLE * FROM LFA1 INTO WA_LFA1 WHERE LIFNR = WA_EKKO-LIFNR. SELECT SINGLE * FROM ADRC INTO WA_ADRC WHERE ADDRNUMBER = WA_LFA1-ADRNR. *OPEN THE FORM CALL FUNCTION 'OPEN_FORM' EXPORTING FORM = 'ZV_PO' LANGUAGE = SY-LANGU. *PRINT EACH ITEM IN MAIN WINDOW LOOP AT IT_EKPO INTO WA_EKPO. *CALCLUATE GRAND TOTAL V_TOT = V_TOT + WA_EKPO-NETWR. WA_EKPO-MATNR = 'APACHE-160'. CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'BODY' WINDOW = 'MAIN'. *PRIINT THETOTAL AFETR ANIN WINDOW BODY PAGE AT LAST. CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'TOTAL' WINDOW = 'MAIN'. ENDAT. ENDLOOP. CALL FUNCTION 'END_FORM'.
*The start form is used to call another SAP SCRIPT form for printing TERMS&CONDITIONS.
*This form can be reusable by al forms as it is only for printing TREMS&CONDITIONS
CALL FUNCTION 'START_FORM' EXPORTING * ARCHIVE_INDEX = ARCHIVE_INDEX FORM = 'ZV_PO_TERMS' LANGUAGE = SY-LANGU . CALL FUNCTION 'WRITE_FORM' EXPORTING ELEMENT = 'TERMS' WINDOW = 'MAIN'. CALL FUNCTION 'END_FORM'. CALL FUNCTION 'CLOSE_FORM'