Program Structure Important
for ABAP Freshers
Go through the program structure below.
You need to follow this structure when you start your
coding.
Suppose you have to validate three field in the selection
block. You have to write like this...
AT SELECTION SCREEN.
perform validate_field1.
perform validate_field1.
perform validate_field1.
then.....
Double clock on the first perform statement and write
the validation code for that field in between the FORM
----- ENDFORM .
Similarly, when you collect the data into an output internal
table or display the output table write the code in the respective perform
statements only like..
PERFORM GET_OUTPUT.
PERFORM DISPLAY_OUTPUT.
For any action you perform, make sure you write the respective
code inside the perform statements ONLY.
************************************************************************
* Program Name :
* Title
:
* Requestor :
* Req Recd Date :
* Creation Date :
* SAP Version :
* Author/ Id :
* Based on : (optional)
* Project No. :
*----------------------------------------------------------------------*
* Description :
*
:
************************************************************************
* Change History
*----------------------------------------------------------------------*
* Req Date Recd :
* Requestor :
* Change desc :
*
:
* SAP Version :
* Done by/ Id :
* Ref in code :
************************************************************************
REPORT <Prog. name> NO STANDARD PAGE HEADING
MESSAGE-ID XX.
********************************************************************
*
TABLES
********************************************************************
TABLES:
********************************************************************
*
TYPE-POOLS
********************************************************************
********************************************************************
*
TYPE DECLARATION
********************************************************************
********************************************************************
*
CONSTANTS
********************************************************************
********************************************************************
*
DATA DECLARATION
********************************************************************
*WORK FIELDS.
*STRUCTURES DEFINITION.
*INTERNAL TABLES.
*GLOBAL VARIABLES.
********************************************************************
*
RANGES
********************************************************************
RANGES:
********************************************************************
*
SELECTION-SCREEN.
********************************************************************
*SELECTION VALUES.
* * * * * * *
* * * LOGIC SECTION * * * * *
* * * *
********************************************************************
*
INITIALIZATION .
********************************************************************
INITIALIZATION .
********************************************************************
*
AT SELECTION-SCREEN.
********************************************************************
AT SELECTION-SCREEN .
********************************************************************
*
START-OF-SELECTION
********************************************************************
START-OF-SELECTION .
********************************************************************
*
END-OF-SELECTION.
********************************************************************
END-OF-SELECTION .
********************************************************************
*
TOP-OF-PAGE.
********************************************************************
TOP-OF-PAGE .
********************************************************************
*
END-OF-PAGE.
********************************************************************
END-OF-PAGE .
********************************************************************
*
AT LINE SELECTION.
********************************************************************
********************************************************************
*
AT USER COMMAND.
********************************************************************
********************************************************************
*
SUBROUTINES.
********************************************************************
*eject
*&---------------------------------------------------------------------*
*& Form validate_scr_input
*&---------------------------------------------------------------------*
* Subroutine to validate
screen input values
*----------------------------------------------------------------------*
FORM validate_scr_input.
ENDFORM.
“validate_scr_input
Get help for your ABAP problems
Do you have
a ABAP Question?
ABAP Books
ABAP
Certification, BAPI, Java, Web Programming, Smart Forms, Sapscripts Reference
Books
More ABAP Tips
Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
All product names are trademarks of their respective
companies. The site www.erpgreat.com is in no way affiliated with
SAP AG.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
The content on this site may not be reproduced
or redistributed without the express written permission of
www.erpgreat.com or the content authors.
|