What is SAP

Document Sample
What is SAP Powered By Docstoc
					                                          What is SAP

    SAP stands for Systeme, Anwendungen, Produkte in der Datenverarbeitung or in english '
                   Systems, Applications, and Products in Data Processing'.

SAP is the leading Enterprise Information and Management Package worldwide. Use of this
package makes it possible to track and manage, in real-time, sales, production, finance
accounting and human resources in an enterprise.

SAP is the third-largest software company in the world. Founded in 1972, The company now
employs more than 22,000 people in more than 50 countries. SAP global headquarters are
located in Walldorf, Germany, and the company is listed on several stock exchanges, including
the Frankfurt DAX and the New York Stock Exchange, under the symbol "SAP."

SAP America is a subsidiary of SAP AG, the recognized leader in providing collaborative, inter-
enterprise software and e-business solutions. A truly global software provider, SAP AG has more
than 1000 partners, 22 industry solutions and 10 million users at 30,000 installations around the
world. SAP America has contributed significantly to this leadership position, and it is the foremost
provider of e-business and enterprise software in the United States.

                                          Why use SAP ?

SAP software was developed to be modular, scaleable, open and flexible, allowing companies to
tailor it specifically to their needs. SAP calls this approach to implementing software "configure to
order" because each implementation will be different according to each customer's needs.

But SAP solutions don't stop there. Information integration is a major tenet of the SAP philosophy,
and SAP places great emphasis on the creation of tools that facilitate it. SAP provides integration
tools and methods for linking legacy and distributed systems as well as a host of third party
software solutions, to get your information into the right hands, internally and externally.

Solution from Traditional approach
Traditional Information technology systems used by many business today have been developed
to accomplish some specific task and provide reports and analysis of events that have already
taken place. Examples are accounting general ledger systems. Occasionally, some systems
operate in a "real-time" mode that is, have up to date information in them and can be used to
actually control events. A typical company has many separate systems to manage different
processes like production, sales and accounting. Each of these systems has its own databases
and seldom passes information to other systems in a timely manner.

SAP takes a different approach. There is only one information system in an enterprise, SAP. All
applications access common data. Real events in the business initiate transactions. Accounting is
done automatically by events in sales and production. Sales can see when products can be
delivered. Production schedules are driven by sales. The whole system is designed to be real-
time and not historical.

SAP structure embodies what are considered the "best business practices". A company
implementing SAP adapts it operations to it to achieve its efficiencies and power.

The process of adapting procedures to the SAP model involves "Business Process Re-
engineering" which is a logical analysis of the events and relationships that exist in an
enterprise's operations.

Multiple country implementation

       Comprehensive multi-currency translation
       Multiple language support
       Customized reporting and document generation for individual countries
       Multi-company support
       Local support in most major industrialized countries
       Country specific functionality

Flexibility

       Customers can customize business modules to realize best business practices
       System provides necessary interfaces to incorporate external software.
       Scalability, accommodates acquisitions and growth
       System can be configured the way you want to do business in the future
       Allows customized screens processing and reports
       System runs on multiple hardware platforms

Enterprise-Wide Integration
Enterprise-wide integration is the main functionality of SAP R/3 System. No other application
software offers the breadth of open systems, client/server functionality, functional links between
processes that multiply the power of each person's work. The R/3 System's components are fully
integrated. Once you enter data, it resides in the central database shared by all R/3 components.
Transaction-related process chains trigger the next activity as needed from engineering to
production planning to sales and distribution. The R/3 System's full integration pulls your
enterprise together, promoting data access, flexibility, and productivity.

Real-Time Information
SAP provides up-to-the-minute, real-time information.

                                         Architecture

SAP R/3 system is based on Client/Server architecture that is comprised of three tiers:

Presentation server: Your local PC that has SAPGUI.

Application server: The application server is used to run the business application programs in
the R/3 client/server concept. The application modules are loaded from the data base server to
the application server as required. Thus the application server requires only storage capacity to
accommodate UNIX, Swapping and the SAP runtime environment.

Database server: The data base server stores the SAP application programs and data in the R/3
client/server concept. It also handles the SAP update program and batch jobs.

                                   SAP Application Modules

SAP has several layers. The Basis System is the heart of the data operations and should be not
evident to higher level or managerial users. Other customizing and implementation tools exist
also. The heart of the system from a manager’s viewpoint is the application modules. These
modules may not all be implemented in a typical company but they are all related and are listed
below:


              FI              Financial Accounting
              CO              Controlling
              AM              Asset Management
              PS              Project System
             WF               Workflow
             IS               Industry Solutions
             HR               Human Resources
             PM               PlantMaintenance
             MM               Materials Management
             QM               Quality Management
             PP               Production Planning
             SD               Sales and Distribution
Financial Accounting -- is designed for automated management and external reporting of
general ledger, accounts receivable, accounts payable and other sub-ledger accounts with a
user defined chart of accounts. As entries are made relating to sales production and
payments journal entries are automatically posted. This connection means that the "books"
are designed to reflect the real situation.


Controlling -- represents the company's flow of cost and revenue. It is a management
instrument for organizational decisions. It too is automatically updated as events occur.


Asset Management--is designed to manage and supervise individual aspects of fixed assets
including purchase and sale of assets, depreciation and investment management.


Project System -- is designed to support the planning, control and monitoring of long-term,
highly complex projects with defined goals.


Workflow -- links the integrated SAP application modules with cross-application
technologies, tools and services


Industry Solutions -- combines the SAP application modules and additional industry-specific
functionality. Special techniques have been developed for industries such as banking, oil and
gas, pharmaceuticals, etc.


Human Resources -- is a complete integrated system for supporting the planning and control
of personnel activities.


Plant Maintenance--In a complex manufacturing process maintenance means more than
sweeping the floors. Equipment must be services and rebuilt. These tasks affect the
production plans.


Materials Management--supports the procurement and inventory functions occurring in day-
to-day business operations such as purchasing, inventory management, reorder point
processing, etc.


Quality Management--is a quality control and information system supporting quality
planning, inspection, and control for manufacturing and procurement.
Production Planning--is used to plan and control the manufacturing activities of a company.
This module includes; bills of material, routings, work centers, sales and operations planning,
master production scheduling, material requirements planning, shop floor control, production
orders, product costing, etc


Sales and Distribution--helps to optimize all the tasks and activities carried out in sales,
delivery and billing. Key elements are; pre-sales support, inquiry processing, quotation
processing, sales order processing, delivery processing, billing and sales information system.


                                 SAP Hardware Platforms


The SAP R/2 system that was released in 1979 runs on mainframes like IBM, BS 2000 ( Seimens
machines ) or Amdahl. The next version, SAP R/3 client/server software system has been
designed for open systems like UNIX. SAP has established a partnership with IBM which
provides a wide choice of servers, operating systems and databases for implementing R/3. These
servers provide scalability, performance, high availability and investment protection needed to
support a successful R/3 implementation. Some of IBM's server and database offerings include:

RS/6000 for UNIX , AS/400 Advanced Series for integrated server and database platform, PC
servers for reliable Microsoft NT solutions, S/390 database servers and DB2 family for database
support. IBM Netfinity 7000 and IBM PC Server 330 and 704 provide the reliable foundation you
need for SAP R/3 applications for Microsoft NT. The platforms offered by IBM provide latest
Pentium Pro technology, Ultra fast throughput, Storage flexibility and upgradable system
components.

SAP R/3 runs on a variety of databases such as Oracle, Informix, Online, ADABAS-A, DB2 for
Unix, DB/400, Microsoft SQL Server 6 and on an experimental version on DB2 for MVS.

SAP R/3 is based on various hardware and software architectures. It scales very well on SMP
systems and MPP architectures. The latest version of R 4.1, which is still in the developmental
stage, provides the Internet compatible business application package.

Hardware Partners

Since there are so many different platforms available in today's market, compatibility between
SAP and the customer's platform, Hardware partners play a very important role. Hardware
partners are leading hardware vendors who provide the computing hardware necessary to meet a
customer's system requirements. Working with both SAP and customers, hardware partners
continually develop and optimize products to meet the running business applications with SAP
software. Hardware partners have developed organizations to provide strong SAP support, from
product selection to system set-up, installation and ongoing performance tuning.

Some of the hardware partners are Amdahl, IBM, Bull, NCR, Compaq, NEC, Data General,
Sequent, Dell, Tandem, Digital, Siemens Nixdorf, Fujitsu, Sun, Hewlett-Packard, Sun, Unisys,
Hitachi and Intergraph.



                                        SAP Glossary


GUI (Graphic User Interface)
A graphical interface used by SAP environment as part of the three tiers. Also known as frontend.
IMG (Implementation Management Guide)
It is a hierarchical structure that reflects the R/3 component hierarchy and contains every
configuration activity. Released from version 3.0 onwards.

Instance
It means application server and each one has its own set of work processes.

SysID
A set of three letters or number that identify a system. Some sets are not allowed because they
are used by SAP. They are informed when the system is installed.

ITS (Internet Transaction Server)
It links the R/3 application server with one or more Web servers, thus enabling the R/3 to
communicate with the Internet.

OSS (Online Service System)
SAP's Online Service System offers fast and effective help for R/3 System problems. It is also the
basic element of communications between customers, partners, and SAP.

RFC (Remote Function Call)
A way to implement communication between application programs via Abap/4 function call.

IDoc (Intermediate Document)
An IDoc is a data container for data exchange between SAP systems or between an SAP system
and an external system.

Archiving – SAP’s terminology for the functionality that purges transactions and master data
from the SAP database. The SAP literature states that archived data can be restored to the
production system. For practical purposes however, this is not recommended.

DART – An acronym for Data Archiving and Retention Tool. This is SAP functionality which
allows you to periodically extract and retain data from your R/3 system. The data is extracted into
a sequential file. DART provides tools for viewing the retained data in different ways.

Legal Data – As used in this document, this refers to the requirements imposed by the IRS,
State tax authorities and other tax authorities for the long-term retention of business data to
support taxes paid and other legal requirements.

Operational Data – As used in this document, this refers to the requests from customers,
vendors or employees for business data.

Management Data – As used in this document, this refers to data that is used by
management for business decisions.

                                            ABAP / 4
                                             What is ABAP/4?
  Advanced Business Application Programming.ABAP is SAP's fourth generation language. All of R/3's
 applications and even parts of its basic system are developed in ABAP. ABAP is used for customization
                                   and modification of SAP applications.


                                        Tools for Abapers.
                             Transactions (Development and Workbench)
                                          ABAP Keywords
                        ABAP System fields (Structure SYST)
                              ABAP Sample Report

                            ABAP Transactions


                                   SAP 3.0d

                 Useful Dev. and Workbench Transactions

SCAM CATT Management
SCAT Computer Aided Test Tool
SE09 Workbench Organizer
SE10 Customizing Organizer
SE11 ABAP/4 Dictionary Maintenance
SE12 ABAP/4 Dictionary Display
SE13 Maintain Technical Settings (Tables)
SE14 Utilities for Dictionary Tables
SE15 ABAP/4 Repository Information System
SE16 Data Browser
SE17 General Table Display
SE30 ABAP/4 Runtime Analysis
SE32 ABAP/4 Text Element Maintenance
SE35 ABAP/4 Dialog Modules
SE36 ABAP/4: Logical Databases
SE37 ABAP/4 Function Modules
SE38 ABAP/4 Program Development
SE39 Splitscreen Editor: Program Compare
SE41 Menu Painter
SE43 Maintain Area Menu
SE51 Screen Painter
SE54 Generate View Maintenance Module
SE61 R/3 Documentation
SE62 Industry utilities
SE63 Translation
SE64 Terminology
SE65 R/3 document. short text statistics
SE66 R/3 Documentation Statistics (Test!)
SE68 Translation Administration
SE71 SAPscript layout set
SE72 SAPscript styles
SE73 SAPscript font maintenance (revised)
SE74 SAPscript format conversion
SE75 SAPscript Settings
SE76 SAPscript Translation Layout Sets
SE77 SAPscript Translation Styles
SE80 ABAP/4 Development Workbench
SE81 SAP Application Hierarchy
SE82 Customer Application Hierarchy
SE84 ABAP/4 Repository Information System
SE85 ABAP/4 Dictionary Information System
SE86 ABAP/4 Repository Information System
SE87 Data Modeler Information System
SE88 Development Coordination Info System
SE91 Maintain Messages
SE92 Maintain system log messages
SE93 Maintain Transaction Codes
SEU Object Browser
SHD0 Transaction variant maintenance
SQ00 ABAP/4 Query: Start Queries
SQ01 ABAP/4 Query: Maintain Queries
SQ02 ABAP/4 Query: Maintain Funct. Areas
SQ03 ABAP/4 Query: Maintain User Groups
SQ07 ABAP/4 Query: Language Comparison



                           ABAP/4 Keywords

               Keywords                          Description
, [, ], {, }                   Syntax conventions, Syntax notation
*, "                           Comments
                               Arithm. Operator: Exponentiation
**
                               (COMPUTE)
+, -, *, /                     Arithmetical operators (COMPUTE)
->, =>, ->>, ~, ?=             Operators in ABAP Objects
                               Mathematical function: Absolute amount
ABS
                               COMPUTE)
                               Mathematical function: Cosine arc
ACOS
                               (COMPUTE)
ADD                            Add
ADD-CORRESPONDING              Field string addition
                               Delete duplicates from internal table
ADJACENT DUPLICATES
                               (DELETE)
AND                            Comparison operator: and
ANY TABLE                      Generic table type for internal tables
APPEND                         Append line to internaltable
ASIN                           Mathematical function: Sine arc (COMPUTE)
ASSIGN                         Assign field symbol
                               Event, control break, field group
AT
                               determination
ATAN                           Mathematical function: Tangent arc
AUTHORITY-CHECK                Check authorization
AVG                            Aggregate expression: Average (SELECT)
BACK                           Positioning in list
BETWEEN                        Relational operator: Between
BINARY SEARCH                  Binary read of internaltable (READ TABLE)
 BIT-NOT                       Bit calculation operator: NOT (COMPUTE)
 BIT-AND                       Bit calculation operator: AND (COMPUTE)
 BIT-OR                        Bit calculation operator: OR (COMPUTE)
 BIT-XOR                       Bit calculation operator: AND/OR
                                 (COMPUTE)
 SET BIT                         Set bit of an X field
 GET BIT                         Read bit of an X field
BLANK LINES                      Switch on blank lines in list
BREAK-POINT                      Stop processing in debug mode
C                                Data type for fixed-length character string
                                 Contains any characters -Relational operator
CA
                                 forstring comparison
CALL                             Call external component
CASE                             Begin case distinction
CATCH                            Exception handling (catch runtime errors)
                                 Mathematical function: Smallest whole
CEIL
                                 value
CENTERED                         Output format: Centered(WRITE)
CHECK                            Check condition
CHECKBOX                         Display as checkbox
  PARAMETERS ... AS CHECKBOX     on the selection screen
  WRITE ... AS CHECKBOX          in a list
CLASS                            Definition of a class
CLASS-DATA                       Static attributes in classes
CLASS-METHODS                    Static methods in classes
CLASS-EVENTS                     Static events in classes
CLASS-POOL                       Introduction for type Kprograms
CLEAR                            Initialize data object
CLIENT                           Client handling when
  DELETE ... CLIENT SPECIFIED    deleting from a database
  EXPORT ... TO DATABASE ...
                                 Storing a data cluster
CLIENT
  IMPORT ... FROM DATABASE ...
                                 Reading a data cluster
CLIENT
  EXPORT ... TO SHARED BUFFER
                                 Storing a data cluster
... CLIENT
  IMPORT ... FROM SHARED
                                 Reading a data cluster
BUFFER ... CLIENT
  INSERT ... CLIENT SPECIFIED    inserting into a database
  MODIFY ... CLIENT SPECIFIED    Insert/Modify in database(s)
  SELECT ... CLIENT SPECIFIED    reading from a database
  UPDATE ... CLIENT SPECIFIED    updating a database
CLOSE                            Close file/cursor
                                 Contains Not Only - Relational operator for
CN
                                 character comparison:
CNT                              Field groups: Number ofdifferent values
                                 Contains Only - Relational operator for
CO
                                 character comparison:
CODE PAGE                        Character set
 TRANSLATE ... FROM/TOCODE
                                 Translate character codes
PAGE
COLLECT                          Internal table: Add entries
COLOR                            Output format: Color (FORMAT)
COMMENT                          Comment on selection screen
 SELECTION-SCREEN COMMENT        Generate comment
COMMIT                           Close processing unit
COMMUNICATION               Data exchange
COMPUTE                     Perform calculations
CONCATENATE                 Concatenate character fields
CONDENSE                    Condense character fields
CONSTANTS                   Defing constants
CONTEXTS                    Communicate contexts
CONTINUE                    Exit current loop pass
CONTROLS                    Define controls for visualization
CONVERT                     Convert fields
COS                         Mathematical function: Cosine (COMPUTE)
                            Mathematical function: Hyperbola cosine
COSH
                            (COMPUTE)
COUNT                       Aggregate expression: Count (SELECT)
COUNTRY                     Set country ID (SET)
                            Relational operator forcharacter
CP
                            comparison:
DATABASE                    Contains Pattern
CREATE                      Generate an object or data object
                            Contains character - Relational operator
CS
                            forcharacter comparison
                            Output format: Correct format for currency
CURRENCY
                            (WRITE)
CURSOR                      Cursor
 CLOSE                      Close database cursor
 FETCH NEXT CURSOR          Read lines with a database cursor
 GET CURSOR FIELD            Get field name
 OPEN CURSOR                Open database cursor
 SET CURSOR                  Position cursor
CUSTOMER-FUNCTION           Call customer enhancement
DATA                        Define data
DATABASE                     Data cluster
 DELETE FROM DATABASE        Delete from a database table
 EXPORT ... TO DATABASE     Store in a databasetable
 IMPORT ... FROM DATABASE   Read from a database table
DATASET                     Sequential file
 CLOSE DATASET               Close file
 DELETE DATASET              Delete file
 EXPORT ... TO DATASET      Store data cluster in file
 IMPORT ... FROM DATASET    Read data cluster from file
 OPEN DATASET Open file     Open file
 READ DATASET               Read from a file
 TRANSFER                   Output to a file
                            Output format: Places after the decimal
DECIMALS
                            point - (WRITE)
DEFINE                      Define macro
DELETE                      Delete from tables or from objects
DEMAND                      Request information from a context
DESCRIBE                    Determine attributes ofdata objects
DIALOG                      Call a dialog module (CALL)
DISTINCT                    Duplicates
 SELECT DISTINCT             Selection set without duplicates
 AVG( DISTINCT ... )        Average without duplicates (SELECT)
 COUNT( DISTINCT ... )      Sequential file
 MAX( DISTINCT ... )        Maximum without duplicates (SELECT)
 MIN( DISTINCT ... )        Minimum without duplicates (SELECT)
 SUM( DISTINCT ... )        Sum without duplicates (SELECT)
DIV                         Arithmetic operator: Whole number division
DIVIDE                      Divide
DIVIDE-CORRESPONDINGField
                            Field string division
string division
DO                          Loop
DYNPRO          Screen       Screen
 DELETE DYNPRO Delete       Delete
 EXPORT DYNPRO Export       Export
 GENERATE DYNPRO Generate   Generate
 IMPORT DYNPRO Import        Import
 SYNTAX-CHECK FOR DYNPRO
                            Check
Check
EDITOR-CALL                 Call editor
ELSE                        Query
ELSEIF                      Query
END-OF-DEFINITION           End of a macro definition
END-OF-PAGE                 Event: End of page handling in lists
                            Event: After processingof all records in a
END-OF-SELECTION
                            LDB
ENDAT                       End of an event introduced by AT
ENDCASE                     End of case distinction
ENDCATCH                    End of exception handling
ENDDO                       End of a DO loop
ENDEXEC                     End of a Native SQL statement
ENDFORM                     End of a subroutine
ENDFUNCTION                 End of a function module
ENDIF                       End of a query
ENDINTERFACE                End of an interface definition
ENDLOOP                     End of a LOOP
ENDMODULE                   End of a module definition
ENDON                       End of a conditional statement
ENDPROVIDE                  End of a PROVIDE loop
ENDSELECT                   End of a SELECT loop
ENDWHILE                    End of a WHILE loop
EQ                          Relational operator: Equals
EXEC SQL                    Native SQL statement
EXIT                        Exit loop or terminate processing
EXP                         Mathematical function: Exponential function
EXPONENT                    Output format: Exponentdisplay (WRITE)
EXPORT                      Export data
EXTENDED CHECK              Switch extended syntax check on/off (SET)
EXTRACT                     Generate extract dataset
FETCH                       Read line from a database table
FIELD-GROUPS                Define field groups
FIELD-SYMBOLS               Define field symbols
FLOOR                       Mathematical function:Largest whole value
FORM                         Define subroutine
FORMAT                       Output format for lists
FOR UPDATE                   Read database table with lock (SELECT)
FRAC                         Mathematical function: Fraction (COMPUTE)
FREE                         Release resources no longer needed
FUNCTION                     Define function module
 CALL FUNCTION               Call function module
FUNCTION-POOL                Introduction for type Fprograms
GE                           Relational operator: Greater than or equal
GENERATE                     Generate a program or screen
GET                          Event, read settings
GT                           Relational operator: Greater than
HASHED TABLE                 Table type for internalhashed tables
                             Define an internal table with header line
HEADER LINE
                             (DATA)
HELP-ID                       Help ID for F1 help
 DESCRIBE FIELD ... HELP-ID   Determine help ID
HELP-REQUEST                  Self-programmed help (F1)
 PARAMETERS ... HELP-REQUEST for parameters
 SELECT-OPTIONS ... HELP-
                             for selection options
REQUEST
HIDE                         Store line information
                             Output format: Hotspot,interaction by
HOTSPOT
                             simple - mouse click (FORMAT)
ICON                         Icons in lists
IF                           Query
IMPORT                       Import data or a screen
IN                           Relational operator: Selection criterion
INCLUDE                      Include program components
INDEX                        Line index in an internal table
INDEX TABLE
 DELETE ... INDEX            Delete line
 INSERT ... INDEX            Insert line
 MODIFY ... INDEX            Modify line
 READ TABLE ... INDEX        Read line
INFOTYPES                    Declare HR info type
INITIAL                      Relational operator: Initial value
INITIAL SIZE                 Define an internal table type (TYPES)
INITIALIZATION               Event: Before display of the selection screen
INPUT                        Output format: Ready for input (FORMAT)
INSERT                       Insert into tables or objects
INTENSIFIED                  Output format: Intensified (FORMAT)
INTERFACE                    Definition of an interface
INTERFACES                   Class component interface
INTERFACE-POOL               Introduction fortype J programs
INVERSE                      Output format: Inverse (FORMAT)
IS                           Relational operator
                             Relational operator: Is the field symbol
 IS ASSIGNED
                             assigned?
 IS INITIAL                  Relational operator: Initial value
 IS REQUESTED                Relational operator: Existence of a formal
parameter
JOIN                       Join (SELECT)
LANGUAGE                   Set language for text elements (SET)
LE                         Relational operator: Less than or equal
LEAVE                      Leave processing
LEFT-JUSTIFIED             Output format: Left-justified (WRITE)
LIKE                       Use an existing field as areference
 TYPES ... LIKE            Create a type
 DATA ... LIKE             Create a field
LINE                        Line in a list
 MODIFY LINE               Modify line
 READ LINE                 Read line
LINE-COUNT                 Number of lines per page (NEW-PAGE)
LINE-SIZE                  Line size (NEW-PAGE)
LIST-PROCESSING            List processing (LEAVE)
LOAD                       Load program componentsin internal table
LOAD-OF-PROGRAM            Execution at load time
LOCAL                      Rescue actual parameters of a subroutine
LOCAL COPY                 Assign local copy to a field symbol
LOCALE                     Set text environment (SET)
  SET LOCALE               Set text environment
  GET LOCALE               Determine text environment
                           Mathematical function: Natural logarithm
LOG
                           (COMPUTE)
Logical condition
 SELECT ... WHERE           when reading database tables
 UPDATE ... WHERE          when changing database tables
 DELETE ... WHERE          when deleting fromdatabase tables
 SELECT ... FROM ... ON     when reading usinga join
                           Mathematical function: Base 10 logarithm
LOG10
                           (COMPUTE)
LOOP                       Loop
LT                         Relational operator: Less than
                           Relational operator: Byte contains zeros and
M
                           ones
MARGIN                     List output: Distance from edge (SET)
MATCHCODE                  Matchcode handling
PARAMETERS ... MATCHCODE   for parameters
 SELECT-OPTIONS ...
                           for selection options
MATCHCODE
MAX                        Aggregate expression: Maximum (SELECT)
MEMORY                     ABAP/4 memory
 EXPORT ... TO MEMORY      Roll out data to memory
 IMPORT ... FROM MEMORY    Restore data from memory
MESSAGE                    Output message
MESSAGE-ID                 Specify message class (REPORT)
METHOD                     Definition of a method
METHODS                    Class component method
MIN                        Aggregate expression: Minimum (SELECT)
                           Arithmetic operator: Remainder after
MOD
                           division
                         (COMPUTE)
MODIFY                   Modify tables or objects
MODULE                   Flow logic: Module
MOVE                     Assignment
MOVE-CORRESPONDING       Component-by-component assignment
MULTIPLY                 Multiply
MULTIPLY-CORRESPONDING   Field string multiplication
                         Relational operator forcharacter
NA
                         comparison:
                         Contains not any characters
NE                       Relational operator: Not equal
NEW-LINE                 List processing: New line
NEW-PAGE                 List processing: New page
NODES                    Interface work area forlogical databases
NO-GAP                   Output format: Leave nogaps (WRITE)
NO-HEADING               Display no column headers (NEW-PAGE)
NO-SCROLLING             Do not scroll line (NEW-LINE)
NO-SIGN                  Output format: No preceding signs (WRITE)
                         Do not display standardpage header (NEW-
NO-TITLE
                         PAGE)
NO-ZERO                  Output format: No leading zeros (WRITE)
NON-UNIQUE                Defines an
 TYPES                   internal table type
 DATA                    internal table object
                         Relational operator forcharacter
NP
                         comparison:
                         Does not contain pattern
                         Relational operator forcharacter
NS
                         comparison:
                         Does not contain character
                         Relational operator: Byte positions occupied
O
                         by1
OBJECT                    External object
 CREATE OBJECT           Generate
 FREE OBJECT             Release
OCCURS                   Defines an
 TYPES                   internal table type
 DATA                    internal table object
ON CHANGE                Control break
OPEN                     Open file/cursor
OR                       Relational operator: OR
ORDER BY                 Sort table rows (SELECT)
OVERLAY                  Overlay character fields
PACK                     Conversion
PARAMETER                Parameter in global SAP memory
 GET                     Read parameter
 SET                     Set parameter
PARAMETERS               Define report parameters
PERFORM                  Execute subroutine
PF-STATUS                Set GUI status
POSITION                 List processing: Defineoutput position
PRINT                          Print formatting (NEW-PAGE)
PRINT-CONTROL                  Define print format
PRIVATE                        Class area not visible from outside
PROGRAM                        Introduction for type Mand S programs
 LEAVE PROGRAM                 Leave program
PROPERTY                       Object property
 GET PROPERTY                  Get property
 SET PROPERTY                  Set property
PROVIDE                        Internal tables: Interval-related processing
PUT                            Trigger event
RADIOBUTTON                    Radio button (PARAMETERS)
RAISE                          Raise exceptions and events
RAISING                        Raise error message in function module
RANGES                         Define internal table for selection criterion
READ                           Read tables or objects
RECEIVE                        Receive results (RFC)
REFRESH                        Delete internal table
REFRESH CONTROL                Initialize control
REJECT                         Do not process current database line further
REPLACE                        Replace characters
REPORT                         Introduction for type 1programs
 DELETE REPORT                  Delete program
 EDITOR-CALL FOR REPORT        Call ABAP program editor
 INSERT REPORT                 Insert program in library
 READ REPORT                   Read program
RESERVE                        List processing: Conditional new page
RESET                          Output format: Reset all formats (FORMAT)
RIGHT-JUSTIFIED                Output format: Right justified (WRITE)
ROLLBACK                       Roll back database changes
ROUND                          Output format: Scaled (WRITE)
RTTI                           Runtime type identification
RUN TIME ANALYZER              Activate/Deactivate runtime analysis (SET)
SCAN                           Analyze ABAP/4 source code
SCREEN                         Screen
 CALL SCREEN                   Call screen
 SET SCREEN                    Set next screen
 LEAVE SCREEN                  Leave screen
 LEAVE TO SCREEN               Branch to a screen
 LOOP AT SCREEN                Loop through screen fields
 MODIFY SCREEN                 Modify screen fields
SCROLL                         List processing: Scroll
SCROLL-BOUNDARY                 List processing: Fix lead columns (SET)
SEARCH                         Find character
SELECT                         Read database table
SELECT-OPTIONS                 Define selection criterion
SELECTION-SCREEN               Design selection screen
 AT SELECTION-SCREENEvent:     After editing ofselection screen
SHARED BUFFER                  Cross-transaction application buffer
 DELETE FROM SHARED BUFFER     delete from application buffer
 EXPORT ... TO SHARED BUFFER   Store data in application buffer
 IMPORT ... FROM SHARED
                          Read data from application buffer
BUFFER
SELECTION-TABLE           Selection table (SUBMIT)
SET                       Set different processing parameters
SHIFT                     Move character
SIGN                      Mathematical function: Sign (COMPUTE)
SIN                       Mathematical function: Sine (COMPUTE)
SINGLE                    Select single record (SELECT)
                          Mathematical function: Hyperbola sine
SINH
                          (COMPUTE)
SKIP                      List processing: Outputblank line
SORT                      Sort internal table or extract dataset
                          Table type for internaltables that are always
SORTED TABLE
                          kept
SPLIT                     Split character fields
                          Mathematical function: Square root
SQRT
                          (COMPUTE)
STANDARD TABLE            Table type for standardinternal tables
START-OF-SELECTION        Event: Before first access to LDB
STATICS                   Define static data
STOP                      Stop data selection (LDB)
                          Data type for variable-length character
STRING
                          sequence
                          Character function: Current length
STRLEN
                          (COMPUTE)
STRUCTURE                 Data structure
 INCLUDE STRUCTURE        Use structure
SUBMIT                    Program call
SUBTRACT                  Subtract
SUBTRACT-CORRESPONDING    Field string subtraction
SUM                       Calculate control total
 SELECT ... SUM           Aggregate expression: Total
SUPPLY                    Supply context key fields
SUPPRESS DIALOG           Suppress dialog
SYMBOL                    Output as symbol (WRITE)
SYNTAX-CHECK              Syntax check for programs and screens
SYNTAX-TRACE              Syntax check log
SYSTEM-CALL               Call to various system services
SYSTEM-EXCEPTIONS          Catch runtime errors (CATCH)
TABLE LINE                Unstructured lines in internal tables
TABLE_LINE                Unstructured lines in internal tables
TABLES                    Declare database table
TABLE                     Set or array operations for database tables
 DELETE ... FROM TABLE    Delete block of lines
 INSERT ... FROM TABLE    Insert block of lines
 MODIFY ... FROM TABLE    Insert/update block of lines
 UPDATE ... FROM TABLE    Update block of lines
 SELECT ... INTO TABLE    Copy block of lines to internal table
TAN                       Mathematical function: Tangent (COMPUTE)
                          Mathematical function: Hyperbola tangent
TANH
                          (COMPUTE)
TEXT                       Locale-specific
 CONVERT TEXT              Set format
 SORT itab AS TEXT         Sort an internal table
 SORT AS TEXT              Sort an extract dataset
TEXTPOOL                   Text elements
 DELETE TEXTPOOL           Delete
 INSERT TEXTPOOL           Insert
 READ TEXTPOOL             Read
TIME                       Time measurement
 GET RUN TIME              Get runtime
 GET TIME                  Get time
 SET RUN TIME ANALYZER     Switch runtime analysison/off
TIME STAMP                 Time stamp
 GET TIME STAMP            Get time stamp
 CONVERT TIME STAMP        Convert time stamps to date/time
 WRITE f TIME ZONE         Output of time stamps to lists
TITLEBAR                   Set screen title (SET)
TOP-OF-PAGE                Event: Top of page handling in lists
TRANSACTION                SAP transaction
 CALL TRANSACTION          Call
 LEAVE TO TRANSACTION      Leave to
TRANSFER                   Output to file
TRANSLATE                  Character conversion incharacter fields
TRANSPORTING               Selective field transport
 MODIFY ... TRANSPORTING   Modify lines of an internal table
 READ ... TRANSPORTING     Read lines of an internal table
 LOOP ... TRANSPORTING     Loop through an internal table
                           Mathematical function: Whole number part
TRUNC
                           (COMPUTE)
TYPE                       Define a type
 TYPES ... TYPE            Define a type
 DATA ... TYPE             Define a field
TYPE-POOL                  Introduction for type Tprograms
TYPE-POOLS                 Include type group
TYPES                      Define types
ULINE                      List processing: Underscore
                           Output format: One under the other
UNDER
                           (WRITE)
UNIQUE                     Define an
 TYPES                     internal table type
DATA                        internal table object
UNIT                       Output format: Unit (WRITE)
UNPACK                     Conversion
UPDATE                     Update database table
                           List processing: Execute command
USER-COMMAND
                           immediately (SET)
USING                      Use parameter or format
 USING                     Parameter of a subroutine
 USING EDIT MASK           Output format: Use template (WRITE)
VALUE-REQUEST              Self-programmed value help(F4)
 PARAMETERS ... VALUE-      for parameters
REQUEST
 SELECT-OPTIONS ... VALUE-
                             for selection options
REQUEST
WHEN                         Case distinction
 SELECT ... WHERE            when reading from databasetables
 UPDATE ... WHERE            when changing database tables
 DELETE ... WHERE            when deleting database tables
 LOOP AT ... WHERE           when looping at internal tables
 DELETE ... WHERE             when deleting from internal tables
WHILE                        Loop
WINDOW                       List processing: Outputin window
WITH-TITLE                   Output standard page header (NEW-PAGE)
WORK                         Processing unit
 COMMIT WORK                 Close unit
 ROLLBACK WORK               Close unit, but undo changes
WRITE                        List processing: Output
WRITE TO                     Correct type output in a variable
X                            Data type for fixed-length byte sequence
XSTRING                      Data type for variable-length byte sequence
                             Relational bit operator: Bit positions
Z
                             occupiedby

                         ABAP System Fields


       ABAP/4 System
       fields

       ABCDE                 Constant: Alphabet (A,B,C,...)

       APPLI                 SAP applications

       BATCH                 Background active (X)

       BATZD                 Background SUBMIT: Daily

       BATZM                 Background SUBMIT: Monthly

       BATZO                 Background SUBMIT: Once

       BATZS                 Background SUBMIT: Immediately

       BATZW                 Background SUBMIT: Weekly

       BINPT                 Batch input active (X)

                             Background SUBMIT: Root name of
       BREP4
                             request report

       BSPLD                 Background SUBMIT: List output to spool

       CALLD                 CALL mode active (X)

       CALLR                 Print: ID for print dialog function

       CCURS                 Rate specification/result field (CURRENCY
        CONVERT)

CCURT   Table rate from currency conversion

CDATE   Date of rate from currency conversion

COLNO   Current column during list creation

CPAGE   Current page number

CPROG   Runtime: Main program

        Exchange rate table from currency
CTABL
        conversion

        Exchange rate type 'M','B','G' from
CTYPE
        CURRENCY CONVERSION

CUCOL   Cursor position (column)

CUROW   Cursor position (line)

DATAR   Flag: Data received

DATLO   Local date for user

DATUM   System: Date

DATUT   Global date related to UTC (GMT)

        Summertime active ? ('daylight saving
DAYST
        time')

        Number of elements in edited dataset
DBCNT
        with DB operations

DBNAM   Logical database for ABAP/4 program

DBSYS   System: Database system

DCSYS   System: Dialog system

        Runtime: Name of dataset for spool
DSNAM
        output

DYNGR   Screen group of current screen

DYNNR   Number of current screen

FDAYW   Factory calendar weekday

FDPOS   Location of a string

FMKEY   Current function code menu

HOST    Host

INDEX   Number of loop passes

LANGU   SAP logon language key

LDBPG   Program: ABAP/4 database program for
        SY-DBNAM

LILLI   Number of current list line

LINCT   Number of list lines

LINNO   Current line for list creation

LINSZ   Line size of list

LISEL   Interact.: Selected line

LISTI   Number of current list line

LOCDB   Local database exists

LOCOP   Local database operation

LOOPC   Number of LOOP lines at screen step loop

LSIND   Number of secondary list

        Interact.: Status information for each list
LSTAT
        level

        Program: Name of file for matchcode
MACDB
        access

MACOL   Number of columns from SET MARGIN

MANDT   Client number from SAP logon

MARKY   Current line character for MARK

MAROW   No. of lines from SET MARGIN statement

MODNO   Number of alternative modi

MSGID   Message ID

MSGLI   Interact.: Message line (line 23)

MSGNO   Message number

MSGTY   Message type (E,I.W,...)

MSGV1   Message variable

MSGV2   Message variable

MSGV3   Message variable

MSGV4   Message variable

OPSYS   System: Operating system

PAART   Print: Format

PAGCT   Page size of list from REPORT statement

PAGNO   Runtime: Current page in list
        PDEST                     Print: Output device

        PEXPI                     Print: Spool retention period

        PFKEY                     Runtime: Current F key status

        PLIST                     Print: Name of spool request (list name)

        PRABT                     Print: Department on cover sheet

        PRBIG                     Print: Selection cover sheet

        PRCOP                     Print: Number of copies

        PRDSN                     Print: Name of spool dataset

        PREFX                     ABAP/4 prefix for background jobs

        PRIMM                     Print: Print immediately

        PRNEW                     Print: New spool request (list)

        PRREC                     Print: Recipient

        PRREL                     Print: Delete after printing

        PRTXT                     Print: Text for cover sheet

        REPID                     Program: Name of ABAP/4 program

                                  Print: Report title of program to be
        RTITL
                                  printed

        SAPRL                     System: SAP Release

        SCOLS                     Columns on screen

        SLSET                     Name of selection set

        SPONO                     Runtime: Spool number for list output

SPONR       Runtime: Spool number from TRANSFER statement

SROWS       Lines on screen

STACO       Interact.: List displayed from column

STARO       Interact.: Page displayed from line

STEPL       Number of LOOP line at screen step

SUBRC       Return value after specific ABAP/4 statements

SUBTY       ABAP/4: Call type for SUBMIT

SYSID       System: SAP System ID

TABIX       Runtime: Current line of an internal table

TCODE       Session: Current transaction code

TFDSN       Runtime: Dataset for data extracts
TFILL   Current number of entries in internal table

TIMLO   Local time for user

TIMUT   Global time related to UTC (GMT)

TITLE   Title of ABAP/4 program

TLENG   Line width of an internal table

TMAXL   Maximum number of entries in internal table (?)
TNAME   Name of internal table after an access (?)

TOCCU   OCCURS parameter with internal tables

TPAGI   Flag indicating roll-out of internal table to paging area (?)

TSTLO   Timestamp (date and time) for user

TSTUT   Timestamp (date and time) related to UTC (GMT)

TTABC   Number of line last read in an internal table (?)

TTABI   Offset of internal table in roll area (?)

TVAR0   Runtime: Text variable for ABAP/4 text elements

TVAR1   Runtime: Text variable for ABAP/4 text elements
                Usefull Tansactions List (by Prabha Jha)
OSS1   SAP Online Service System
OY19   Compare Tables
S001   ABAP Development Workbench
S002   System Administration.
SA38   Execute a program.
SCAT   Computer Aided Test Tool
SCU0   Compare Tables
SE01   Old Transport & Corrections screen
SE09   Workbench Organizer
SE10   Customizing Organizer
SE10   Customizing organizer – requests for user (To release for
       transport – enter user name, press Enter. Select changed object
       and select ReleaseSE10 New Transport & Correction screen
SE11   ABAP/4 Dictionary Maintenance SE12 ABAP/4 Dictionary Display
       SE13 Maintain Technical Settings (Tables)
SE11   ABAP/4 Dictionary.
SE12   Dictionary: Initial Screen – enter object name
SE13   Access tables in ABAP/4 Dictionary.
SE14   ABAP/4 Dictionary: Database Utility.
SE14   Utilities for Dictionary Tables
SE15   ABAP/4 Repository Information System
SE15   ABAP/4 Repository Information System.
SE16   Data Browser
SE16   Data Browser: Initial Screen.
SE16   Display table contents
SE17   General Table Display
SE30   ABAP/4 Runtime Analysis
SE30   ABAP/4 Runtime Analysis: Initial Screen.
SE30   Run Time Analysis (press Tips and Tricks button for good stuff)
SE32   ABAP/4 Text Element Maintenance
SE35   ABAP/4 Dialog Modules
SE36   ABAP/4: Logical Databases
SE37   ABAP/4 Function Library.
SE37   ABAP/4 Function Modules
SE38   ABAP Editor
SE38   ABAP/4 Editor.
SE38   ABAP/4 Program Development
SE39   Splitscreen Editor: Program Compare
SE41   Menu Painter
SE43   Maintain Area Menu
SE51   Screen Painter
SE51   Screen Painter: Initial Screen.
SE54   Generate View Maintenance Module
SE61   R/3 Documentation
SE62   Industry utilities
SE63   Translate Short/Long Text.
SE63   Translation
SE64   Terminology
SE65   R/3 documents. Short text statistics SE66 R/3 Documentation
       Statistics (Test!)
SE68   Translation Administration
SE71   SAPscript layout set
SE71   SAPscript Layouts Create/Change
SE72   SAPscript styles
SE73   SAPscript font maintenance (revised)
SE74   SAPscript format conversion
SE75        SAPscript Settings
SE76        SAPscript Translation Layout Sets
SE77        SAPscript Translation Styles
SE80        ABAP/4 Development Workbench
SE80        Repository Browser: Initial Screen.
SE81        SAP Application Hierarchy
SE82        Customer Application Hierarchy
SE84        ABAP/4 Repository Information System
SE85        ABAP/4 Dictionary Information System
SE86        ABAP/4 Repository Information System
SE87        Data Modeler Information System
SE88        Development Coordination Info System
SE91        Maintain Messages
SE92        Maintain system log messages
SE93        Maintain Transaction Codes
SE93        Maintain Transaction.
SEU         Object Browser
SHD0        Transaction variant maintenance
SM04        Overview of Users (cancel/delete sessions)
SM04        Overview of Users.
SM12        Deletion of lock entries (in the event you have you are locked
            out).
SM12        Lock table entries (unlock locked tables)
SM21        View the system log, very useful when you get a short dump.
            Provides much more info than short dump
SM30        Maintain Table Views.
SM31        Table Maintenance
SM32        Table maintenance
SM35        View Batch Input Sessions
SM37        View background jobs
SM50        Process Overview.
SM51        Delete jobs from system (BDC)
SM62        Display/Maintain events in SAP, also use function
            BP_EVENT_RAISE
SMEN        Display the menu path to get to a transaction
SMOD/CMOD   Transactions for processing/editing/activating new customer
            enhancements.
SNRO        Object browser for number range maintenance.
SPRO        Start SAP IMG (Implementation Guide).
SQ00        ABAP/4 Query: Start Queries
SQ01        ABAP/4 Query: Maintain Queries
SQ02        ABAP/4 Query: Maintain Funct. Areas
SQ03        ABAP/4 Query: Maintain User Groups
SQ07        ABAP/4 Query: Language Comparison
ST05        Trace SQL Database Requests.
SU53        Display Authorization Values for User.




                      Human Resources
PA03        Change Payroll control record
PA20        Display PA Infotypes
PA30        Create/Change PA Infotypes
PP02        Quick Entry for PD object creation
PU00        Delete PA infotypes for an employee. Will not be able to delete
       an infotype if there is cluster data assigned to the employee.




           Sales and Distribution (SD)
OLSD   Config for SD. Use Tools-Data Transfer-Conditions to setup SAP
       supplied BDC to load pricing data
VA01   Create Sales/Returns Order Initial Screen
VB21   Transaction for Volume Lease Purchases (done as a sales deal)
VK15   Transaction used to enter multiple sales conditions (most will be
       entered here)
VL02   Deliveries




                     SAP Office
SO00   send a note through SAP, can be sent to Internet, X400, etc




            Financial Accounting (FI)
FGRP   Report Writer screen
FM12   View blocked documents by user
FST2   Insert language specific name for G/L account.
FST3   Display G/L account name.
KEA0   Maintain operating concern.
KEKE   Activate CO-PA.
KEKK   Assign operating concern.
KL04   Delete activity type.
KS04   Delete a cost centre.
KSH2   Change cost centre group – delete.
OBR2   Deletion program for customers, vendors, G/L accounts.
OKC5   Cost element/cost element group deletion.
OKE1   Delete transaction data.
OKE2   Delete a profit centre.
OKI1   Determine Activity Number: Activity Types (Assignment of
       material number/service to activity type)
OMZ1   Definition of partner roles.
OMZ2   Language dependent key reassignment for partner roles.




              Material Management (MM)
MM06   Flag material for deletion.
OLMS   materials management configuration menu, most of the stuff
       under this menu is not under the implementation guide




           MM configuration transactions
OLMB   Inventory management/Physical Inventory
OLMD   MM Consumption-Based Planning
OLME   MM Purchasing
OLML   Warehouse Management
OLMR   Invoice Verification
OLMS   Material Master data
OLMW   MM Valuation/Account Assignment




                 Configuration related
OLE    OLE demo transaction
OLI0   C Plant Maintenance Master Data
OLI1   Set Up INVCO for Material Movements
OLI8   Set Up SIS for Deliveries
OLIA   C Maintenance Processing
OLIP   C Plant Maintenance Planning
OLIQ   New set-up of QM info system
OLIX   Set Up Copying/Deleting of Versions
OLIY   Set Up Deletion of SIS/Inter.Storage
OLIZ   Stat Set Up INVCO: Invoice Verify
OLM2   Customizing: Volume-Based Rebates
OLMB   C RM-MAT Inventory Management Menu
OLMD   C RM-MAT MRP Menu
OLME   C MM Menu: Purchasing
OLML   C MM Menu for Warehouse Management
OLMR   C RM-MAT Menu: Invoice Verification
OLMS   C RM-MAT Master Data Menu
OLMW   C RM-MAT Valuation/Acct. Asset. Menu
OLPA   SOP Configuration
OLPE   Sales order value
OLPF   SPRO Start SAP IMG (Implementation Guide).
OLPK   Customizing for capacity planning
OLPR   Project System Options
OLPS   Customizing Basic Data
OLPV   Customizing: Std. Value Calculation
OLQB   C QM QM in Procurement
OLQI   Analysis OLVD C SD Shipping Menu
OLVF   C SD Billing Menu
OLQM   Customizing QM Quality Notifications
OLQS   C QM Menu Basic Data
OLQW   C QM Inspection Management
OLQZ   Quality Certificates
OLS1   Customizing for Rebates
OLSD   Customizing: SD
OLVA   C SD Sales Menu
OLVS   C SD Menu for Master Data
                     ABAP/4 Sample Reports

                             List Program
                        It's the first formatted list

report zbctcb98 no standard page heading line-size 90 line-count 120.
parameters: column type i default 40.
data: num2 type i value 2.
data: counter type i value 1.
check column ge 0 and column le 40.
do.
write: /2(4) counter, 15 'example', 23(4) num2,

          o
                 
                 

at column 'hello world' intensified off.
add 1 to counter.
check counter eq 161.
exit.
enddo.
top-of-page.
write: /2 'Page:', 8(4) sy-pagno, 40 'Third Example', 70 sy-datum.
uline.
write: /2 'Counter', 15 'Text', 23 'Number',

          
                 o
                         
                         

at column 'Introduction' intensified off.
uline.

Try out the SHOW SY command in the editor command line. The SHOW
command describes the fields of database tables, views and structures. With
the SHOW SY command you can see the fields of the SYSTEM structure.
These fields are updated at run time. In this example we used the fields sy-
pagno and sy-datum.
                                 Tips and Tricks for ABAP

Reporting

   1.    How do I add a pushbutton on the application toolbar of report selection screen?
   2.    How do I indicate progress while executing a program?
   3.    How do I pop-up my own selection selection values for a select-option ?
   4.    How do I let user display program documentation while on a selection screen?
   5.    How do I get report program name text?
   6.    How do I protect certain field on selection screen?
   7.    How do I get the address of a company given company code?
   8.    How do I read an EXCEL file for upload. How do I download to an EXCEL file?
   9.    How do I add a selection screen parameter to get a local file name with pull down?
   10.   How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory?
   11.   How do I print standard header and footer on all pages of a report? Do you have code for
         standard header & footer function module?
   12.   How do I print selection screen values on a report?
   13.   How do I show valid month and their description as the pull-down option on a month
         seletion field?
   14.   What are the various way’s you can make the user execute a report program
   15.   There are flat files residing on UNIX sub-directory. How can a report program list all these
         files for the user to select one of them.
   16.   How do I let user to decide the format of the report?

Dialog Programming/Table Control

   1.    How do I hide a column in a table control at runtime?
   2.    How do I change attributes of an item in a screen and in a table control at runtime?
   3.    How do I go to a transaction by double clicking on a field in the screen?
   4.    How do I know that user has changed something on a dialog screen?

ABAP/4 General

   1.    How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
   2.    How do I capture the screen sequence and values of a transaction for data transfer?
   3.    How do I copy and paste from one session to another?
   4.    How do I register a function module as RFC enabled?
   5.    One of my custom table has more than million records and I need to access only few
         thousand. When I do SELECT * from Ztable WHERE code like P%, I get short dump
         because the system reads the entire Ztable to specifically select the once I require.
         Meanwhile the system get’s time out eventually giving a short dump. How do I handle this
         scenerio.
   6.    I am editing a program and get logged out by the system. The next time I login and try to
         edit the same program, I get a message ‘you are already editing this program’. How can I
         cancel the session which is still active before I got logged out.
   7.    What are the various ways UPDATE table will update all the records instead of one
         record.
   8.    How do I download text elements of a report program?
   9.    How do you write an ABAP program to find out menu path for a particualar transaction
         screen.
   10.   How can you view the entire program which will also expand all includes, function
         modules, subroutines & subprograms.
   11.   How do I change value of a field in debug mode?
SAP General

    1.  How do I get back to SAP screens I was working on if SAP was terminated?
    2.  How do I assign a CTS number to a local private object ($TMP)?
    3.  How do I view an ABAP dump happened in the SAP system?
    4.  How do I set my user information in SAP?
    5.  How do I reset my password?
    6.  How do I kill a long running job in SAP?
    7.  How do I compare two tables between two systems?
    8.  How do I compare two versions of program?
    9.  How do I find the program name if I know the transaction code?
    10. How do I find user exit in a standard SAP program for me to include enhancement.
    11. I added new entries to an existing table and assigned the changes to a transport number.
        If I want to transport the entire table (definition and data), what are the steps involved.
    12. How do I list files residing on a Unix directory?
    13. How do I view SAP settings?

Reporting
How do I add a pushbutton on the application toolbar of report selection screen?
Add the following code in appropriate events mentioned to display one button with label
'my_button' (You could have up to 5 buttons on the selection screen). Upon pressing the button,
form 'f_my_button' get executed.

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  move 'my_button' to sscrfields-functxt_01.

at selection-screen.
  if sscrfields-ucomm = 'FC01'.
     perform f_my_button.
How do I indicate progress while executing a program?
use function 'PROGRESS_INDICATOR'
How do I pop-up my own selection values for a select-option/parameters?
- Help View
- code example
How do I let user display program documentation while on a selection screen?
step 1:
Create program documentation using the Documentation option on the SE38 screen.
Documentation suggestions:
Description : Lists and describes processing steps done in the
              program.
Precondition: Lists any input and processing that is necessary
              before executing the program.
Select Options: List all the selection options and values expected
Output:          Lists any output from the program.
SAP function: List of sap functions used by the program.
Transactions called: List of sap transactions called in the program.
Programs called: Lists all programs called by the abap program.
step 2:
Add the following code in approprate sections/events:

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  write icon_display_note as icon to sscrfields-functxt_01.
  concatenate sscrfields-functxt_01 'Help' into sscrfields-functxt_01.

at selection-screen.
 if sscrfields-ucomm = 'FC01'.
   perform f_pgm_help.
 endif.

form f_pgm_help.
  data: begin of help_infos.
       include structure help_info.
  data: end of help_infos.
  data: begin of dynpselect occurs 0.
       include structure dselc.
  data: end of dynpselect.
  data: begin of dynpvaluetab occurs 0.
       include structure dval.
  data: end of dynpvaluetab.

 clear help_infos.
 help_infos-call    = 'D'.
 help_infos-spras = sy-langu.
 help_infos-docuid = 'RE'.
 help_infos-report = sy-repid.
 help_infos-title = sy-title.
 call function 'HELP_START'
     exporting
        help_infos = help_infos
    tables
        dynpselect = dynpselect
        dynpvaluetab = dynpvaluetab.
endform.                    " F_PGM_HELP


How do I get report program name text
Use command READ TEXT-POOL. example code
How do I protect certain field on selection screen.
(This is to make the field output only)
parameter: p_parm1(2) default 'MY'.

at selection-screen output.
 loop at screen.
   if screen-name = 'P_PARM1'.
     screen-output = 1.
     modify screen.
     exit.
   endif.
 endloop.
How do I get the address of a company given company code.
How do I read an EXCEL file for upload. How do I download to an EXCEL file.
How do I add a selection screen parameter to get a local file name with pull down?

parameters: p_infile like ibipparms-path default 'C:\'.

* Executes the pull-down to search C:\ drive for input file
at selection-screen on value-request for p_infile.
  call function 'F4_FILENAME'       "allows user to select path/file
      exporting
         program_name = syst-repid
         dynpro_number = syst-dynnr
         field_name = 'p_infile'
      importing
         file_name = p_infile.
  if sy-subrc ne 0.
    write: / 'Error'.
  endif.

How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory.
How do I print standard header and footer on all pages of a report? Do you have code for
standard header & footer function module?
How do I print selection screen values on a report?
How do I show valid month and their description as the pull-down option on a month seletion
field?
What are the various way’s you can make the user execute a report program
There are flat files residing on UNIX sub-directory. How can a report program list all these files for
the user to select one of them.
How do I let user to decide the format of the report?

Dialog Programming/Table Control
How do I hide a column in a table control at runtime? (by Manoj Nair)
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.
   if wa-screen-group1 = <group defined for the column>
      wa-invisible = 1.
      modify tbl_ctrl-cols from wa
   endif
endloop

How do I change attributes of an item in a screen and in a table control at runtime?
add the following code in PBO

loop at screen.
    if screen-name = 'NAME_OF_FIELD_HERE_IN_CAPS'.
  set attributes of screen such as REQUIRED, INPUT, OUTPUT, INTENSIFIED, INVISIBLE,
ACTIVE, DISPLAY_3D, VALUE_HELP to 1(ON) or 0(OFF)
       e.g. screen-output = 1.
       modify screen.
    endif.
endloop
if the field is part of a table control, put the above code within the the loop...endloop of the table
control in PBO

How do I go to a transaction by double clicking on a field in the screen?
Define ok_code for function key <F2>
In Screen PAI when ok_code has the value defined (user has double clicked on the screen)

method 1: if parameter id is available for the field(s) to be populated
set parameter id 'XXX' field field_name_on_screen
call transaction 'TCODE' and skip first screen.

method 2:
1. fill bdc_table (data bdc_table like bdcdata occurs 0 with header line.) with screen info
2. use command
call transaction 'XK03' using bdc_table ...

How do I know that user has changed something on a dialog screen?
Check sy-datar, It is 'X' when there was a change

SAP General
How do I get back to SAP screens I was working on if SAP was terminated?
When you log back in, after entering appropriate values, select User->Copy session (instead on
pressing 'Enter')

How do I assign a CTS number of a local private object ($TMP)?
Run tcode SE80
Select 'Local priv objects' and click on 'Display'.
Select the item you want to reassign and click on it
Now select Development Object->Reassign or (Ctrl + F7)

How do I view an ABAP dump happened in the SAP system?
Use path
Tools->Administration->Monitoring->Dump Analysis

How do I set my user information in SAP?
Run transaction code SU51 or (System->User profile->User address)

How do I reset my password?
You can reset your own password at anytime (but not more than once a day) if you know the
current password. Passwords must be at least 6 characters and can not contain the first letters
of your user id.

1. At the SAP R/3 logon screen enter your user-id and current password.
2. Click the New password button.
3. The SAP R/3 new password dialog box will be displayed.
4. Type the password you wish to have in the New password field.
5. Repeat typing the same password in the Repeat password field.
6. Click the Confirm button

How do I kill a long running job in SAP?
.a.Open a new SAP session.
  b.In the new session, from the SAP R/3 screen, follow
    the menu path:
            Tools>>Administration
            (new screen) Monitoring >>System monitoring>>User overview
    Fastpath:
            /nsm04
  Result: the "Overview of Users" screen appears. This is a list of the jobs currently
  running.
 c.Find your username in the list and click on it
 d.Click on the Sessions button .
  Result: the Overview of Sessions screen appears.
 e.Click on the End session button .

How do I compare two tables between two systems?
The contents of a table between two systems can be checked through the transaction OY19

How do I view SAP settings?
Use transaction code SE38
Enter Program name RSPARAM and execute

ABAP/4 General
How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
Use, So_object_send function module.

How do I capture the screen sequence and values of a transaction for data transfer?
Use transaction 'SHDB' to record any SAP transaction.

How do I copy and paste from one session to another?

    1. Click on the area and press CTRL+Y. Using your mouse highlite the are and press
       CTRL+C. Go do desired targer location; insert necessary number of blank lines and
       press CTRL+V to paste.
    2. Use xx to mark and copy. Use x to paste......

How do I register a function module as RFC enabled?
In the function module Administration screen (transaction code SE37), set the field REMOTE
CALL.

Reporting

    1.    How do I add a pushbutton on the application toolbar of report selection screen?
    2.    How do I indicate progress while executing a program?
    3.    How do I pop-up my own selection selection values for a select-option ?
    4.    How do I let user display program documentation while on a selection screen?
    5.    How do I get report program name text?
    6.    How do I protect certain field on selection screen?
    7.    How do I get the address of a company given company code?
    8.    How do I read an EXCEL file for upload. How do I download to an EXCEL file?
    9.    How do I add a selection screen parameter to get a local file name with pull down?
    10.   How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory?
    11.   How do I print standard header and footer on all pages of a report? Do you have code for
          standard header & footer function module?
    12.   How do I print selection screen values on a report?
    13.   How do I show valid month and their description as the pull-down option on a month
          seletion field?
    14.   What are the various way’s you can make the user execute a report program
    15.   There are flat files residing on UNIX sub-directory. How can a report program list all these
          files for the user to select one of them.
    16.   How do I let user to decide the format of the report?
Dialog Programming/Table Control

    1.    How do I hide a column in a table control at runtime?
    2.    How do I change attributes of an item in a screen and in a table control at runtime?
    3.    How do I go to a transaction by double clicking on a field in the screen?
    4.    How do I know that user has changed something on a dialog screen?

ABAP/4 General

    1.    How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
    2.    How do I capture the screen sequence and values of a transaction for data transfer?
    3.    How do I copy and paste from one session to another?
    4.    How do I register a function module as RFC enabled?
    5.    One of my custom table has more than million records and I need to access only few
          thousand. When I do SELECT * from Ztable WHERE code like P%, I get short dump
          because the system reads the entire Ztable to specifically select the once I require.
          Meanwhile the system get’s time out eventually giving a short dump. How do I handle this
          scenerio.
    6.    I am editing a program and get logged out by the system. The next time I login and try to
          edit the same program, I get a message ‘you are already editing this program’. How can I
          cancel the session which is still active before I got logged out.
    7.    What are the various ways UPDATE table will update all the records instead of one
          record.
    8.    How do I download text elements of a report program?
    9.    How do you write an ABAP program to find out menu path for a particualar transaction
          screen.
    10.   How can you view the entire program which will also expand all includes, function
          modules, subroutines & subprograms.
    11.   How do I change value of a field in debug mode?

SAP General

    1.  How do I get back to SAP screens I was working on if SAP was terminated?
    2.  How do I assign a CTS number to a local private object ($TMP)?
    3.  How do I view an ABAP dump happened in the SAP system?
    4.  How do I set my user information in SAP?
    5.  How do I reset my password?
    6.  How do I kill a long running job in SAP?
    7.  How do I compare two tables between two systems?
    8.  How do I compare two versions of program?
    9.  How do I find the program name if I know the transaction code?
    10. How do I find user exit in a standard SAP program for me to include enhancement.
    11. I added new entries to an existing table and assigned the changes to a transport number.
        If I want to transport the entire table (definition and data), what are the steps involved.
    12. How do I list files residing on a Unix directory?
    13. How do I view SAP settings?

Reporting
How do I add a pushbutton on the application toolbar of report selection screen?
Add the following code in appropriate events mentioned to display one button with label
'my_button' (You could have up to 5 buttons on the selection screen). Upon pressing the button,
form 'f_my_button' get executed.

tables sscrfields.         "Fields on selection screens

selection-screen function key 1. "button on the application toolbar
initialization.
* Populating button text
  move 'my_button' to sscrfields-functxt_01.

at selection-screen.
  if sscrfields-ucomm = 'FC01'.
     perform f_my_button.
How do I indicate progress while executing a program?
use function 'PROGRESS_INDICATOR'
How do I pop-up my own selection values for a select-option/parameters?
- Help View
- code example
How do I let user display program documentation while on a selection screen?
step 1:
Create program documentation using the Documentation option on the SE38 screen.
Documentation suggestions:
Description : Lists and describes processing steps done in the
              program.
Precondition: Lists any input and processing that is necessary
              before executing the program.
Select Options: List all the selection options and values expected
Output:          Lists any output from the program.
SAP function: List of sap functions used by the program.
Transactions called: List of sap transactions called in the program.
Programs called: Lists all programs called by the abap program.

step 2:
Add the following code in approprate sections/events:

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  write icon_display_note as icon to sscrfields-functxt_01.
  concatenate sscrfields-functxt_01 'Help' into sscrfields-functxt_01.

at selection-screen.
 if sscrfields-ucomm = 'FC01'.
   perform f_pgm_help.
 endif.

form f_pgm_help.
  data: begin of help_infos.
       include structure help_info.
  data: end of help_infos.
  data: begin of dynpselect occurs 0.
       include structure dselc.
  data: end of dynpselect.
  data: begin of dynpvaluetab occurs 0.
       include structure dval.
  data: end of dynpvaluetab.

  clear help_infos.
  help_infos-call   = 'D'.
  help_infos-spras = sy-langu.
  help_infos-docuid = 'RE'.
  help_infos-report = sy-repid.
 help_infos-title = sy-title.
 call function 'HELP_START'
     exporting
        help_infos = help_infos
    tables
        dynpselect = dynpselect
        dynpvaluetab = dynpvaluetab.
endform.                    " F_PGM_HELP


How do I get report program name text
Use command READ TEXT-POOL. example code
How do I protect certain field on selection screen.
(This is to make the field output only)
parameter: p_parm1(2) default 'MY'.

at selection-screen output.
 loop at screen.
   if screen-name = 'P_PARM1'.
     screen-output = 1.
     modify screen.
     exit.
   endif.
 endloop.

How do I get the address of a company given company code.
How do I read an EXCEL file for upload. How do I download to an EXCEL file.
How do I add a selection screen parameter to get a local file name with pull down?

parameters: p_infile like ibipparms-path default 'C:\'.

* Executes the pull-down to search C:\ drive for input file
at selection-screen on value-request for p_infile.
  call function 'F4_FILENAME'       "allows user to select path/file
      exporting
         program_name = syst-repid
         dynpro_number = syst-dynnr
         field_name = 'p_infile'
      importing
         file_name = p_infile.
  if sy-subrc ne 0.
    write: / 'Error'.
  endif.

How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory.
How do I print standard header and footer on all pages of a report? Do you have code for
standard header & footer function module?
How do I print selection screen values on a report?
How do I show valid month and their description as the pull-down option on a month seletion
field?
What are the various way’s you can make the user execute a report program
There are flat files residing on UNIX sub-directory. How can a report program list all these files for
the user to select one of them.
How do I let user to decide the format of the report?

Dialog Programming/Table Control
How do I hide a column in a table control at runtime? (by Manoj Nair)
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.
   if wa-screen-group1 = <group defined for the column>
      wa-invisible = 1.
      modify tbl_ctrl-cols from wa
   endif
endloop

How do I change attributes of an item in a screen and in a table control at runtime?
add the following code in PBO

loop at screen.
    if screen-name = 'NAME_OF_FIELD_HERE_IN_CAPS'.
  set attributes of screen such as REQUIRED, INPUT, OUTPUT, INTENSIFIED, INVISIBLE,
ACTIVE, DISPLAY_3D, VALUE_HELP to 1(ON) or 0(OFF)
       e.g. screen-output = 1.
       modify screen.
    endif.
endloop

if the field is part of a table control, put the above code within the the loop...endloop of the table
control in PBO

How do I go to a transaction by double clicking on a field in the screen?
Define ok_code for function key <F2>
In Screen PAI when ok_code has the value defined (user has double clicked on the screen)

method 1: if parameter id is available for the field(s) to be populated
set parameter id 'XXX' field field_name_on_screen
call transaction 'TCODE' and skip first screen.

method 2:
1. fill bdc_table (data bdc_table like bdcdata occurs 0 with header line.) with screen info
2. use command
call transaction 'XK03' using bdc_table ...

How do I know that user has changed something on a dialog screen?
Check sy-datar, It is 'X' when there was a change

SAP General
How do I get back to SAP screens I was working on if SAP was terminated?
When you log back in, after entering appropriate values, select User->Copy session (instead on
pressing 'Enter')

How do I assign a CTS number of a local private object ($TMP)?
Run tcode SE80
Select 'Local priv objects' and click on 'Display'.
Select the item you want to reassign and click on it
Now select Development Object->Reassign or (Ctrl + F7)
How do I view an ABAP dump happened in the SAP system?
Use path
Tools->Administration->Monitoring->Dump Analysis

How do I set my user information in SAP?
Run transaction code SU51 or (System->User profile->User address)

How do I reset my password?
You can reset your own password at anytime (but not more than once a day) if you know the
current password. Passwords must be at least 6 characters and can not contain the first letters
of your user id.

1. At the SAP R/3 logon screen enter your user-id and current password.
2. Click the New password button.
3. The SAP R/3 new password dialog box will be displayed.
4. Type the password you wish to have in the New password field.
5. Repeat typing the same password in the Repeat password field.
6. Click the Confirm button

How do I kill a long running job in SAP?
.a.Open a new SAP session.
  b.In the new session, from the SAP R/3 screen, follow
    the menu path:
            Tools>>Administration
            (new screen) Monitoring >>System monitoring>>User overview
    Fastpath:
            /nsm04
   Result: the "Overview of Users" screen appears. This is a list of the jobs currently
   running.
  c.Find your username in the list and click on it
  d.Click on the Sessions button .
   Result: the Overview of Sessions screen appears.
  e.Click on the End session button .

How do I compare two tables between two systems?
The contents of a table between two systems can be checked through the transaction OY19

How do I view SAP settings?
Use transaction code SE38
Enter Program name RSPARAM and execute

ABAP/4 General
How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
Use, So_object_send function module.

How do I capture the screen sequence and values of a transaction for data transfer?
Use transaction 'SHDB' to record any SAP transaction.

How do I copy and paste from one session to another?

    1. Click on the area and press CTRL+Y. Using your mouse highlite the are and press
       CTRL+C. Go do desired targer location; insert necessary number of blank lines and
       press CTRL+V to paste.
    2. Use xx to mark and copy. Use x to paste......
How do I register a function module as RFC enabled?
In the function module Administration screen (transaction code SE37), set the field REMOTE
CALL.

Dialog Programming/Table Control

    1.    How do I hide a column in a table control at runtime?
    2.    How do I change attributes of an item in a screen and in a table control at runtime?
    3.    How do I go to a transaction by double clicking on a field in the screen?
    4.    How do I know that user has changed something on a dialog screen?

ABAP/4 General

    1.    How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
    2.    How do I capture the screen sequence and values of a transaction for data transfer?
    3.    How do I copy and paste from one session to another?
    4.    How do I register a function module as RFC enabled?
    5.    One of my custom table has more than million records and I need to access only few
          thousand. When I do SELECT * from Ztable WHERE code like P%, I get short dump
          because the system reads the entire Ztable to specifically select the once I require.
          Meanwhile the system get’s time out eventually giving a short dump. How do I handle this
          scenerio.
    6.    I am editing a program and get logged out by the system. The next time I login and try to
          edit the same program, I get a message ‘you are already editing this program’. How can I
          cancel the session which is still active before I got logged out.
    7.    What are the various ways UPDATE table will update all the records instead of one
          record.
    8.    How do I download text elements of a report program?
    9.    How do you write an ABAP program to find out menu path for a particualar transaction
          screen.
    10.   How can you view the entire program which will also expand all includes, function
          modules, subroutines & subprograms.
    11.   How do I change value of a field in debug mode?

SAP General

    1.  How do I get back to SAP screens I was working on if SAP was terminated?
    2.  How do I assign a CTS number to a local private object ($TMP)?
    3.  How do I view an ABAP dump happened in the SAP system?
    4.  How do I set my user information in SAP?
    5.  How do I reset my password?
    6.  How do I kill a long running job in SAP?
    7.  How do I compare two tables between two systems?
    8.  How do I compare two versions of program?
    9.  How do I find the program name if I know the transaction code?
    10. How do I find user exit in a standard SAP program for me to include enhancement.
    11. I added new entries to an existing table and assigned the changes to a transport number.
        If I want to transport the entire table (definition and data), what are the steps involved.
    12. How do I list files residing on a Unix directory?
    13. How do I view SAP settings?

Reporting
How do I add a pushbutton on the application toolbar of report selection screen?
Add the following code in appropriate events mentioned to display one button with label
'my_button' (You could have up to 5 buttons on the selection screen). Upon pressing the button,
form 'f_my_button' get executed.
tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  move 'my_button' to sscrfields-functxt_01.

at selection-screen.
  if sscrfields-ucomm = 'FC01'.
     perform f_my_button.
How do I indicate progress while executing a program?
use function 'PROGRESS_INDICATOR'
How do I pop-up my own selection values for a select-option/parameters?
- Help View
- code example
How do I let user display program documentation while on a selection screen?
step 1:
Create program documentation using the Documentation option on the SE38 screen.
Documentation suggestions:
Description : Lists and describes processing steps done in the
              program.
Precondition: Lists any input and processing that is necessary
              before executing the program.
Select Options: List all the selection options and values expected
Output:          Lists any output from the program.
SAP function: List of sap functions used by the program.
Transactions called: List of sap transactions called in the program.
Programs called: Lists all programs called by the abap program.

step 2:
Add the following code in approprate sections/events:

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  write icon_display_note as icon to sscrfields-functxt_01.
  concatenate sscrfields-functxt_01 'Help' into sscrfields-functxt_01.

at selection-screen.
 if sscrfields-ucomm = 'FC01'.
   perform f_pgm_help.
 endif.

form f_pgm_help.
  data: begin of help_infos.
       include structure help_info.
  data: end of help_infos.
  data: begin of dynpselect occurs 0.
       include structure dselc.
  data: end of dynpselect.
  data: begin of dynpvaluetab occurs 0.
       include structure dval.
  data: end of dynpvaluetab.
 clear help_infos.
 help_infos-call    = 'D'.
 help_infos-spras = sy-langu.
 help_infos-docuid = 'RE'.
 help_infos-report = sy-repid.
 help_infos-title = sy-title.
 call function 'HELP_START'
     exporting
        help_infos = help_infos
    tables
        dynpselect = dynpselect
        dynpvaluetab = dynpvaluetab.
endform.                    " F_PGM_HELP


How do I get report program name text
Use command READ TEXT-POOL. example code
How do I protect certain field on selection screen.
(This is to make the field output only)
parameter: p_parm1(2) default 'MY'.

at selection-screen output.
 loop at screen.
   if screen-name = 'P_PARM1'.
     screen-output = 1.
     modify screen.
     exit.
   endif.
 endloop.

How do I get the address of a company given company code.
How do I read an EXCEL file for upload. How do I download to an EXCEL file.
How do I add a selection screen parameter to get a local file name with pull down?

parameters: p_infile like ibipparms-path default 'C:\'.

* Executes the pull-down to search C:\ drive for input file
at selection-screen on value-request for p_infile.
  call function 'F4_FILENAME'       "allows user to select path/file
      exporting
         program_name = syst-repid
         dynpro_number = syst-dynnr
         field_name = 'p_infile'
      importing
         file_name = p_infile.
  if sy-subrc ne 0.
    write: / 'Error'.
  endif.

How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory.
How do I print standard header and footer on all pages of a report? Do you have code for
standard header & footer function module?
How do I print selection screen values on a report?
How do I show valid month and their description as the pull-down option on a month seletion
field?
What are the various way’s you can make the user execute a report program
There are flat files residing on UNIX sub-directory. How can a report program list all these files for
the user to select one of them.
How do I let user to decide the format of the report?

Dialog Programming/Table Control
How do I hide a column in a table control at runtime? (by Manoj Nair)
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.
   if wa-screen-group1 = <group defined for the column>
      wa-invisible = 1.
      modify tbl_ctrl-cols from wa
   endif
endloop

How do I change attributes of an item in a screen and in a table control at runtime?
add the following code in PBO

loop at screen.
    if screen-name = 'NAME_OF_FIELD_HERE_IN_CAPS'.
  set attributes of screen such as REQUIRED, INPUT, OUTPUT, INTENSIFIED, INVISIBLE,
ACTIVE, DISPLAY_3D, VALUE_HELP to 1(ON) or 0(OFF)
       e.g. screen-output = 1.
       modify screen.
    endif.
endloop

if the field is part of a table control, put the above code within the the loop...endloop of the table
control in PBO

How do I go to a transaction by double clicking on a field in the screen?
Define ok_code for function key <F2>
In Screen PAI when ok_code has the value defined (user has double clicked on the screen)

method 1: if parameter id is available for the field(s) to be populated
set parameter id 'XXX' field field_name_on_screen
call transaction 'TCODE' and skip first screen.

method 2:
1. fill bdc_table (data bdc_table like bdcdata occurs 0 with header line.) with screen info
2. use command
call transaction 'XK03' using bdc_table ...

How do I know that user has changed something on a dialog screen?
Check sy-datar, It is 'X' when there was a change

SAP General
How do I get back to SAP screens I was working on if SAP was terminated?
When you log back in, after entering appropriate values, select User->Copy session (instead on
pressing 'Enter')

How do I assign a CTS number of a local private object ($TMP)?
Run tcode SE80
Select 'Local priv objects' and click on 'Display'.
Select the item you want to reassign and click on it
Now select Development Object->Reassign or (Ctrl + F7)

How do I view an ABAP dump happened in the SAP system?
Use path
Tools->Administration->Monitoring->Dump Analysis

How do I set my user information in SAP?
Run transaction code SU51 or (System->User profile->User address)

How do I reset my password?
You can reset your own password at anytime (but not more than once a day) if you know the
current password. Passwords must be at least 6 characters and can not contain the first letters
of your user id.

1. At the SAP R/3 logon screen enter your user-id and current password.
2. Click the New password button.
3. The SAP R/3 new password dialog box will be displayed.
4. Type the password you wish to have in the New password field.
5. Repeat typing the same password in the Repeat password field.
6. Click the Confirm button

How do I kill a long running job in SAP?
.a.Open a new SAP session.
  b.In the new session, from the SAP R/3 screen, follow
    the menu path:
            Tools>>Administration
            (new screen) Monitoring >>System monitoring>>User overview
    Fastpath:
            /nsm04
   Result: the "Overview of Users" screen appears. This is a list of the jobs currently
   running.
  c.Find your username in the list and click on it
  d.Click on the Sessions button .
   Result: the Overview of Sessions screen appears.
  e.Click on the End session button .

How do I compare two tables between two systems?
The contents of a table between two systems can be checked through the transaction OY19

How do I view SAP settings?
Use transaction code SE38
Enter Program name RSPARAM and execute

ABAP/4 General
How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
Use, So_object_send function module.

How do I capture the screen sequence and values of a transaction for data transfer?
Use transaction 'SHDB' to record any SAP transaction.

How do I copy and paste from one session to another?

    1. Click on the area and press CTRL+Y. Using your mouse highlite the are and press
       CTRL+C. Go do desired targer location; insert necessary number of blank lines and
       press CTRL+V to paste.
    2. Use xx to mark and copy. Use x to paste......
How do I register a function module as RFC enabled?
In the function module Administration screen (transaction code SE37), set the field REMOTE
CALL.

SAP General

    1.  How do I get back to SAP screens I was working on if SAP was terminated?
    2.  How do I assign a CTS number to a local private object ($TMP)?
    3.  How do I view an ABAP dump happened in the SAP system?
    4.  How do I set my user information in SAP?
    5.  How do I reset my password?
    6.  How do I kill a long running job in SAP?
    7.  How do I compare two tables between two systems?
    8.  How do I compare two versions of program?
    9.  How do I find the program name if I know the transaction code?
    10. How do I find user exit in a standard SAP program for me to include enhancement.
    11. I added new entries to an existing table and assigned the changes to a transport number.
        If I want to transport the entire table (definition and data), what are the steps involved.
    12. How do I list files residing on a Unix directory?
    13. How do I view SAP settings?

Reporting
How do I add a pushbutton on the application toolbar of report selection screen?
Add the following code in appropriate events mentioned to display one button with label
'my_button' (You could have up to 5 buttons on the selection screen). Upon pressing the button,
form 'f_my_button' get executed.

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  move 'my_button' to sscrfields-functxt_01.

at selection-screen.
  if sscrfields-ucomm = 'FC01'.
     perform f_my_button.
How do I indicate progress while executing a program?
use function 'PROGRESS_INDICATOR'
How do I pop-up my own selection values for a select-option/parameters?
- Help View
- code example
How do I let user display program documentation while on a selection screen?
step 1:
Create program documentation using the Documentation option on the SE38 screen.
Documentation suggestions:
Description : Lists and describes processing steps done in the
              program.
Precondition: Lists any input and processing that is necessary
              before executing the program.
Select Options: List all the selection options and values expected
Output:          Lists any output from the program.
SAP function: List of sap functions used by the program.
Transactions called: List of sap transactions called in the program.
Programs called: Lists all programs called by the abap program.
step 2:
Add the following code in approprate sections/events:

tables sscrfields.       "Fields on selection screens

selection-screen function key 1. "button on the application toolbar

initialization.
* Populating button text
  write icon_display_note as icon to sscrfields-functxt_01.
  concatenate sscrfields-functxt_01 'Help' into sscrfields-functxt_01.

at selection-screen.
 if sscrfields-ucomm = 'FC01'.
   perform f_pgm_help.
 endif.

form f_pgm_help.
  data: begin of help_infos.
       include structure help_info.
  data: end of help_infos.
  data: begin of dynpselect occurs 0.
       include structure dselc.
  data: end of dynpselect.
  data: begin of dynpvaluetab occurs 0.
       include structure dval.
  data: end of dynpvaluetab.

 clear help_infos.
 help_infos-call    = 'D'.
 help_infos-spras = sy-langu.
 help_infos-docuid = 'RE'.
 help_infos-report = sy-repid.
 help_infos-title = sy-title.
 call function 'HELP_START'
     exporting
        help_infos = help_infos
    tables
        dynpselect = dynpselect
        dynpvaluetab = dynpvaluetab.
endform.                    " F_PGM_HELP


How do I get report program name text
Use command READ TEXT-POOL. example code
How do I protect certain field on selection screen.
(This is to make the field output only)
parameter: p_parm1(2) default 'MY'.

at selection-screen output.
 loop at screen.
   if screen-name = 'P_PARM1'.
     screen-output = 1.
     modify screen.
     exit.
   endif.
 endloop.
How do I get the address of a company given company code.
How do I read an EXCEL file for upload. How do I download to an EXCEL file.
How do I add a selection screen parameter to get a local file name with pull down?

parameters: p_infile like ibipparms-path default 'C:\'.

* Executes the pull-down to search C:\ drive for input file
at selection-screen on value-request for p_infile.
  call function 'F4_FILENAME'       "allows user to select path/file
      exporting
         program_name = syst-repid
         dynpro_number = syst-dynnr
         field_name = 'p_infile'
      importing
         file_name = p_infile.
  if sy-subrc ne 0.
    write: / 'Error'.
  endif.

How do I read a file on my C:\ drive and/or a file residing on UNIX sub-directory.
How do I print standard header and footer on all pages of a report? Do you have code for
standard header & footer function module?
How do I print selection screen values on a report?
How do I show valid month and their description as the pull-down option on a month seletion
field?
What are the various way’s you can make the user execute a report program
There are flat files residing on UNIX sub-directory. How can a report program list all these files for
the user to select one of them.
How do I let user to decide the format of the report?

Dialog Programming/Table Control
How do I hide a column in a table control at runtime? (by Manoj Nair)
1. define group name(s) for the columns to be hidden
2. Add the following code...
(define)
controls tbl_ctrl type tableview ...
wa like tbl_ctrl-cols.

loop at tbl_ctrl-cols into wa.
   if wa-screen-group1 = <group defined for the column>
      wa-invisible = 1.
      modify tbl_ctrl-cols from wa
   endif
endloop

How do I change attributes of an item in a screen and in a table control at runtime?
add the following code in PBO

loop at screen.
    if screen-name = 'NAME_OF_FIELD_HERE_IN_CAPS'.
  set attributes of screen such as REQUIRED, INPUT, OUTPUT, INTENSIFIED, INVISIBLE,
ACTIVE, DISPLAY_3D, VALUE_HELP to 1(ON) or 0(OFF)
       e.g. screen-output = 1.
       modify screen.
    endif.
endloop
if the field is part of a table control, put the above code within the the loop...endloop of the table
control in PBO

How do I go to a transaction by double clicking on a field in the screen?
Define ok_code for function key <F2>
In Screen PAI when ok_code has the value defined (user has double clicked on the screen)

method 1: if parameter id is available for the field(s) to be populated
set parameter id 'XXX' field field_name_on_screen
call transaction 'TCODE' and skip first screen.

method 2:
1. fill bdc_table (data bdc_table like bdcdata occurs 0 with header line.) with screen info
2. use command
call transaction 'XK03' using bdc_table ...

How do I know that user has changed something on a dialog screen?
Check sy-datar, It is 'X' when there was a change

SAP General
How do I get back to SAP screens I was working on if SAP was terminated?
When you log back in, after entering appropriate values, select User->Copy session (instead on
pressing 'Enter')

How do I assign a CTS number of a local private object ($TMP)?
Run tcode SE80
Select 'Local priv objects' and click on 'Display'.
Select the item you want to reassign and click on it
Now select Development Object->Reassign or (Ctrl + F7)

How do I view an ABAP dump happened in the SAP system?
Use path
Tools->Administration->Monitoring->Dump Analysis

How do I set my user information in SAP?
Run transaction code SU51 or (System->User profile->User address)

How do I reset my password?
You can reset your own password at anytime (but not more than once a day) if you know the
current password. Passwords must be at least 6 characters and can not contain the first letters
of your user id.

1. At the SAP R/3 logon screen enter your user-id and current password.
2. Click the New password button.
3. The SAP R/3 new password dialog box will be displayed.
4. Type the password you wish to have in the New password field.
5. Repeat typing the same password in the Repeat password field.
6. Click the Confirm button

How do I kill a long running job in SAP?
.a.Open a new SAP session.
  b.In the new session, from the SAP R/3 screen, follow
    the menu path:
            Tools>>Administration
            (new screen) Monitoring >>System monitoring>>User overview
    Fastpath:
            /nsm04
  Result: the "Overview of Users" screen appears. This is a list of the jobs currently
  running.
 c.Find your username in the list and click on it
 d.Click on the Sessions button .
  Result: the Overview of Sessions screen appears.
 e.Click on the End session button .

How do I compare two tables between two systems?
The contents of a table between two systems can be checked through the transaction OY19

How do I view SAP settings?
Use transaction code SE38
Enter Program name RSPARAM and execute

ABAP/4 General
How do I send mail to a user(s) from an ABAP/4 program without using SAP Office?
Use, So_object_send function module.

How do I capture the screen sequence and values of a transaction for data transfer?
Use transaction 'SHDB' to record any SAP transaction.

How do I copy and paste from one session to another?

    1. Click on the area and press CTRL+Y. Using your mouse highlite the are and press
       CTRL+C. Go do desired targer location; insert necessary number of blank lines and
       press CTRL+V to paste.
    2. Use xx to mark and copy. Use x to paste......

How do I register a function module as RFC enabled?
In the function module Administration screen (transaction code SE37), set the field REMOTE
CALL.




                              How to get Developer key

Procedure explains how to obtain a developer key:

        a) Log into OSS.

        b) Click on the Registration button and then click the Register Developer
        button.

        c) Select appropriate customer installation.

        d) Enter the user ID in the user box,.

        e) Click on the Register button.

        f) Copy the KEY (by highlighting and using ctrl/c for copy and ctrl/v for paste)
        and email the user of his key. The ctrl/c, ctrl/v ensures that the complete key
        is copied since it is a very long number.
         g) Click the Cancel button when done or click the Register button to register
         another developer.

         h) Click the green ' ' to exit.




                                 Logical filename and Path

What is the use of Logical filename and its object.

The logical filename should be defined in the transaction FILE. It is mapped to a
physical directory. The Logical filename allows setting the name of the file at its level or
allows the developer to build himself the filename (through the variables <PARAM_1>
and <PARAM_2>.

Create Logical file name object using transaction SE24.



                 BACKGROUND PROCESSING IN SAP R/3


1.               What the scheduler can do

        Many steps within a job : A job can consist of many steps, each running a different
         program. Each step waits for the previous step to run before it starts.
        Periodic jobs: A job can be scheduled to run every minute, hour, day, month, or any
         other specified time frame.
        Dependent jobs: A jobs can be scheduled to wait for another job to finish before it
         executes.

2. What the scheduler cannot do

        Periodic dependent jobs: If you have a job that runs every night and another that
         depends on it, the dependent job will run the first time, but not again after that.
        Continuing a job that has crashed: If a job crashes on step 1, the whole job stops,
         and there is no way to continue processing.
        Re-running from certain job steps: If your job crashes at step 2, there is no facility to
         re-run, without changing the job and removing step 1 so it does not run again.
        Waiting for a Batch Input Session: If you run a job which runs RSBDCSUB, the
         second step will not wait for the batch input session to process, as it is executing in a
         separate job.

3.       Suggested methods for processing

        Using a self-scheduling job: A program can be set up to re-schedule itself in a job
         after a specified time. This is more flexible than a periodic job.
        Jobs that create other jobs: An alternative to dependent jobs, is to run a program in
         the first job which will create the next job.
        Jobs that wait for other jobs: You can write a custom program that waits for a
         specified job, and runs a batch input session. Use this as a step in your job after a
         batch input session has run.

4.       System messaging

         Information and Success messages: Write the message text to the job log. Program
         and job continues as normal.
         Error and Abend messages: Write the message text to the job log. Stop the current
         program from running. Cancel the entire job. -> any dependent programs must be
         scheduled in a different job

5.       Suggested methods for error handling & reprocessing

        If subsequent steps in a job are not dependent on the first one finishing successfully,
         the first program should be set up to crash using a success message followed by the
         ‘STOP’ statement.
        Before every error message, call a routine which notifies the ‘Operations Center’ of
         error type, severity, action, etc.

                 BATCH INPUT Object                (for ver 4X)

1.              What is the use of Batch Input object ?

Batch Input is a SAP functionality that allows automating input of data via SAP transactions,
commonly known as BDC (Batch Data Commands). BDC works in the following ways:

                   the transaction is called directly within the calling program
                   the scenario is included in a session that could be launched afterwards.

In most companies, programs that handle Batch Input are duplicating the functions that builds
this scenario, creates the session or calls the transactions.

Therefore, create a custome Abap Object, eg. Z_BATCHINPUT. This object should have
all the needed functions and makes some basic checks (e.g. that the program is not creating
two sessions at the same time). The main advantages of using an object are :

        Code is no more duplicated throughout all of the BI programs
        Way to submit the sessions becomes standardized.

The object class Z_BATCHINPUT should be created (and/or transported) into all target systems.
It uses basically all the datatypes available for the BDC functions. It calls the following functions :

        BDC_OPEN_GROUP : Opens a session group

        BDC_CLOSE_GROUP : Closes a session

        BDC_INSERT : Insert a BDC scenario in the session

        The ABAP statement "CALL TRANSACTION" is also called to run directly a transaction
       from its BDC table.

It runs the program RSBDCSUB in order to launch automatically the session. The session
management is done through the transaction code SM35.

The object itself is maintanable through the transaction SE24.

Function of the object Z_BATCHINPUT

The above object should allow to handle three kinds of Batch Input behaviour :

               1. Building a BDC table and calling a transaction
               2. Building a session and a set of BDC scenarios and keeping the session
                  available in SM35,
               3. Building a session and lauching the transaction right after closing the session.

To achieve these operations, the object Z_BATCHINPUT should offer a set of methods :

 Method                      Description                 Parameters
 OPEN_SESSION                Opens a session             SUBRC (Return Code – 0 OK)

                                                         SESSIONNAME (Session to be created)
 CLOSE_SESSION               Closes a session            None
 RESET_BDCDATA               Resets the BDC Internal     None. Normally, for internal purpose…
                             Table...
 BDC_DYNPRO                  Handles a new screen        PROGNAME (Name of the program)

                                                         DYNPRONR (Screen Number)
 BDC_FIELD                   Puts a value on the         FIELDNAME (Name of the field)
                             screen
                                                         FIELDVALUE (Value to be passed)
 CONSTRUCTOR                 Constructor - Initializes   NODATA (No data character). The
                             NO_DATA                     constructor is called automatically when
                                                         the object is created.
 RUN_SESSION                 Launches a session with     None
                             RSBDCBTC
 CALL_TRANSACTION            Calls a transaction with    MODE (Display Mode)
                             the current BDC Data
                                                         UPDATE (Update Mode)

                                                         TCODE (Transaction to be called)
 BDC_INSERT                  Inserts the BDC scenario    TCODE (Transaction to be called)
                             in the session

To complete the different scenarii explained above, some sequences should be followed :

       1) Building a BDC table and calling a transaction :

                  the object batch input should be created (CREATE OBJECT =>
                   method CONSTRUCTOR)
                  the method RESET_BDCDATA could be called (if the object has
                   already been used)
                  several methods BDC_DYNPRO and BDC_FIELD could be called…
                  then, at the last, the method CALL_TRANSACTION should be called.

     2) Building a session and a set of BDC scenarios and keeping the session available in
   SM35 :

                  the object batch input should be created (CREATE OBJECT =>
                   method CONSTRUCTOR)
                  the method RESET_BDCDATA could be called (if the object has
                   already been used),
                  several methods BDC_DYNPRO and BDC_FIELD could be called…
                  then, at the last, the method BDC_INSERT should be called.
                  At the end, the method CLOSE_SESSION MUST be called.

       3) Building a session and lauching the transaction right after closing the session.

                  The previous steps should be followed (the ones explained for the
                   session),
                  At the end, the method RUN_SESSION should be called (after the
                   CLOSE_SESSION).

Path
The Batch Input is described in the Help-On-Line (4.5B) under the following items :

R/3 Library -> BC Basis Components -> ABAP Workbench (BC-DWB) -> BC Basis
Programming Interfaces -> Data Transfer

R/3 Library -> BC Basis Components -> Kernel Components (BC-KRN) -> BC System Service ->
Managing Batch Input Sessions




                          Download ABAP source code
Program name             Program function              Author   Date Added
Z_SEND_EMAIL_to_Users
                      Send email to users
Version: 4.0 & above

REPORT Z_SEND_EMAIL_to_Users.

TABLES: USR02.

DATA: C(15).
DATA: SENT LIKE SONV-FLAG.
DATA: EMAIL_ID LIKE SOFOLENTI1-OBJECT_ID.
DATA: BEGIN OF EMAIL_DATA.
         INCLUDE STRUCTURE SODOCCHGI1.
DATA: END OF EMAIL_DATA.
DATA: BEGIN OF EMAIL_SEND OCCURS 10.
         INCLUDE STRUCTURE SOMLRECI1.
DATA: END OF EMAIL_SEND.
DATA: BEGIN OF EMAIL_TEXT OCCURS 10.
        INCLUDE STRUCTURE SOLISTI1.
DATA: END OF EMAIL_TEXT.

****************************************************
PARAMETERS: ALL__CLI RADIOBUTTON GROUP RADI.
PARAMETERS: THIS_CLI RADIOBUTTON GROUP RADI.
PARAMETERS: SELECT__ RADIOBUTTON GROUP RADI.
SELECT-OPTIONS SEND_TO FOR C NO INTERVALS.
SELECTION-SCREEN SKIP.

PARAMETERS: SUBJECT(30).
SELECTION-SCREEN SKIP.

SELECTION-SCREEN COMMENT /1(20) TEXT-999.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L1(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L2(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L3(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L4(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L5(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L6(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L7(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L8(84).
SELECTION-SCREEN END OF LINE.SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: L9(84).
SELECTION-SCREEN END OF LINE.
***********************************************

EMAIL_TEXT-LINE = L1.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L2.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L3.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L4.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L5.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L6.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L7.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L8.
APPEND EMAIL_TEXT.
EMAIL_TEXT-LINE = L9.
APPEND EMAIL_TEXT.

EMAIL_DATA-OBJ_NAME = 'MESSAGE'.
EMAIL_DATA-OBJ_DESCR = SUBJECT.
EMAIL_DATA-OBJ_LANGU = 'E'.
EMAIL_DATA-SENSITIVTY = 'P'.
EMAIL_DATA-OBJ_PRIO = '1'.
EMAIL_DATA-NO_CHANGE = 'X'.
EMAIL_DATA-PRIORITY = '1'.

IF SELECT__ = 'X'.
   LOOP AT SEND_TO.
     EMAIL_SEND-RECEIVER = SEND_TO-LOW.
     EMAIL_SEND-REC_TYPE = 'U'.
     EMAIL_SEND-EXPRESS = 'X'.
     APPEND EMAIL_SEND.
   ENDLOOP.
ELSEIF THIS_CLI = 'X'.
   SELECT * FROM USR02.
     IF USR02-USTYP = 'A' AND USR02-BNAME NE 'SAP*'
      AND USR02-BNAME NE 'DDIC'.
         EMAIL_SEND-RECEIVER = USR02-BNAME.
         EMAIL_SEND-REC_TYPE = 'U'.
         EMAIL_SEND-EXPRESS = 'X'.
         APPEND EMAIL_SEND.
      ENDIF.
   ENDSELECT.
ELSEIF ALL__CLI = 'X'.
   SELECT * FROM USR02 CLIENT SPECIFIED.
     IF USR02-USTYP = 'A' AND USR02-BNAME NE 'SAP*'
     AND USR02-BNAME NE 'DDIC'.
        EMAIL_SEND-RECEIVER = USR02-BNAME.
        EMAIL_SEND-REC_TYPE = 'U'.
        EMAIL_SEND-EXPRESS = 'X'.
        APPEND EMAIL_SEND.
      ENDIF.
    ENDSELECT.
ENDIF.

WRITE:/ 'End of program'.
*****************************************************
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
      EXPORTING
         DOCUMENT_DATA = EMAIL_DATA
         DOCUMENT_TYPE = 'RAW'
         PUT_IN_OUTBOX = 'X'
      IMPORTING
         SENT_TO_ALL = SENT
         NEW_OBJECT_ID = EMAIL_ID
       TABLES
         OBJECT_CONTENT = EMAIL_TEXT
         RECEIVERS = EMAIL_SEND
       EXCEPTIONS
         TOO_MANY_RECEIVERS = 1
          DOCUMENT_NOT_SENT = 2
          DOCUMENT_TYPE_NOT_EXIST = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR = 5
          X_ERROR = 6
          ENQUEUE_ERROR = 7
          OTHERS = 8.




                                 Creating Extract Dataset


   Q.Write a program that lists the Vendors and their Accounting documents. Create extract
  dataset from KDF logical database. Loop through the dataset to create the required report.
                      Don't list those vendors which has no documents.

                                  Creating Extract Dataset

Your code should be like this.

report zfwr0001 no standard page heading.
tables: lfa1, bsik.
field-groups: header, item1, item2.
insert lfa1-lifnr bsik-belnr into header.
insert lfa1-land1 lfa1-name1 into item1.
insert bsik-belnr bsik-budat into item2.
start-of-selection.
get lfa1.
....extract item1.
get bsik.
....extract item2.
end-of-selection.
loop.
....at item1 with item2.
........skip.
........write:/ 'Vendor number:', 28 'Name:', 56 'City:'.
........write: 16 lfa1-lifnr, 33(20) lfa1-name1, 62(20) lfa1-ort01.
........write:/ 'Document no.', 15 'Date'.
....endat.
....at item2.
........write:/ bsik-belnr, 13 bsik-budat.
....endat.
endloop.
                                           Additional task:

      Don't forget to set the Logical database to KDF on the "Program Attributes" screen.

                                         Result:
      Vendor number: 100124 Name:Coca Cola City: New York
      Document no. Date
      1800000316 01/08/1997
      Vendor number: 100126 Name: Universal Studios City: Los Angeles
      Document no. Date
      1800000109 12/02/1996
      1800000341 01/10/1997
      1800000321 01/14/1997

                           Download ABAP source code

Program name             Program function                      Author            Date Added
Z_Display_menupath
                         Display Menupath
Version: 4.0 & above

REPORT Z_Display_menupath NO STANDARD PAGE HEADING.

TABLES: SMENCUSNEW, SMENENTT, TSTC.
DATA: BEGIN OF ITAB OCCURS 10.
          INCLUDE STRUCTURE SMENCUSNEW.
DATA: END OF ITAB.
DATA: BEGIN OF STACK OCCURS 10,
          ID(5) TYPE N,
       END OF STACK.
DATA: I TYPE I.
PARAMETERS: TRANS LIKE TSTC-TCODE.

* Get the id of our transaction
SELECT * FROM SMENCUSNEW WHERE REPORT = TRANS AND CUSTOMIZED = 'S'.
    MOVE-CORRESPONDING SMENCUSNEW TO ITAB.
   APPEND ITAB.
ENDSELECT.

* Our transaction is not in smencusnew
IF SY-SUBRC <> 0.
   WRITE: / TRANS COLOR 5.
   SKIP.
   WRITE: / 'Not in the profile generator''s table'.
   EXIT.
ENDIF.

* Get the parent id that links us to the root with the fewest levels
SORT ITAB BY MENU_LEVEL.
READ TABLE ITAB INDEX 1.
STACK = ITAB-OBJECT_ID. APPEND STACK.
STACK = ITAB-PARENT_ID. APPEND STACK.

* Search for the grandparets ...
DO.
   CLEAR ITAB. REFRESH ITAB.
   SELECT * FROM SMENCUSNEW WHERE OBJECT_ID = STACK-ID AND
      CUSTOMIZED = 'S'.
      MOVE-CORRESPONDING SMENCUSNEW TO ITAB.
      APPEND ITAB.
   ENDSELECT.
   SORT ITAB BY MENU_LEVEL.
   READ TABLE ITAB INDEX 1.
   IF ITAB-PARENT_ID = '00001'. EXIT. ENDIF.
   STACK = ITAB-PARENT_ID. APPEND STACK.
ENDDO.

* Display the result
WRITE: / TRANS COLOR 5.HIDE TRANS. CLEAR TRANS.
WRITE: ' <<<< Doubleclick to see the transaction'.
SKIP.
WRITE: /(30) 'Main Menu' COLOR 2.
SORT STACK.
LOOP AT STACK.
  I = I + 3.
  SELECT SINGLE * FROM SMENENTT WHERE SPRAS = 'E' AND OBJECT_ID = STACK.
  WRITE: /I(30) SMENENTT-TEXT COLOR 2.
ENDLOOP.

* Display the transaction when the user doubleclick on trans
AT LINE-SELECTION.
IF NOT TRANS IS INITIAL.
   SELECT SINGLE * FROM TSTC WHERE TCODE = TRANS.
   CALL TRANSACTION TRANS.
ENDIF.
CLEAR TRANS.

Note: Comments by : Jarboe, John A



               ABAP List Viewer (ALV)                  (by Viren Shah)
Program name           Program function                      Author       Date Added
Z_abap_list_viewer     List of materials inventory - using
Version: 4.0 & above   ALV                                   Viren Shah
                       Module:

REPORT Z_LIST_MATERIALS.

TYPE-POOLS: SLIS.
TABLES:MARC, MARD, VBAP, LIPS, EKPO, VBFA, EKBE, MARM, VBBE, MARA, MBEW.

SELECTION-SCREEN BEGIN OF BLOCK SEL WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_WERKS FOR MARC-WERKS, " Plant
       S_MATNR FOR MARC-MATNR, " Material
       S_MTART FOR MARA-MTART. " Material Type
SELECTION-SCREEN END OF BLOCK SEL.
PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT. " ALV Variant

CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE
'TOP_OF_PAGE'.

DATA: BEGIN OF INV OCCURS 100,
   WERKS LIKE MARD-WERKS, " Plant
   MATNR LIKE MARD-MATNR, " Material
   MTART LIKE MARA-MTART, " Material Type
   STPRS LIKE MBEW-STPRS, " Standard Price
   AVAIL LIKE MARD-LABST, " Available
   LABST LIKE MARD-LABST, " Unrestricted use
   INSME LIKE MARD-INSME, " Quality Inspection
   RETME LIKE MARD-RETME, " Returns
   TRANS LIKE MARC-UMLMC, " Stock in transit (calculated)
   UMLMC LIKE MARC-UMLMC, " Stock Transfer (plant)
   UMLME LIKE MARD-UMLME, " Transfer (SLoc)
   WESBS LIKE EKBE-WESBS, " GR Blocked Stock
   TRAME LIKE MARC-TRAME, " Stock in transit
   SPEME LIKE MARD-SPEME, " Blocked
   KWMENG LIKE VBAP-KWMENG, " Sales orders
   LFIMG LIKE LIPS-LFIMG, " Scheduled for Delivery
   MENGE LIKE EKPO-MENGE, " Open Purch. Orders
   VALUE LIKE MBEW-SALK3, " Stock Value (Calculated)
   MEINS LIKE MARA-MEINS, " Unit of measure
  END OF INV.

DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
  HEADING TYPE SLIS_T_LISTHEADER,
  LAYOUT TYPE SLIS_LAYOUT_ALV,
  EVENTS TYPE SLIS_T_EVENT,
  REPNAME LIKE SY-REPID,
  F2CODE LIKE SY-UCOMM VALUE '&ETA',
  G_SAVE(1) TYPE C,
  G_EXIT(1) TYPE C,
  G_VARIANT LIKE DISVARIANT,
  GX_VARIANT LIKE DISVARIANT.

INITIALIZATION.
 REPNAME = SY-REPID.
 PERFORM INITIALIZE_FIELDCAT USING FIELDTAB[].
 PERFORM BUILD_EVENTTAB USING EVENTS[].
 PERFORM BUILD_COMMENT USING HEADING[].
 PERFORM INITIALIZE_VARIANT.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
 PERFORM F4_FOR_VARIANT.

AT SELECTION-SCREEN.
 PERFORM PAI_OF_SELECTION_SCREEN.

START-OF-SELECTION.
 PERFORM GET_MARD.
 PERFORM GET_UNIT_OF_MEASURE.
 PERFORM GET_MARC.
 PERFORM GET_EKPO.
 PERFORM GET_LIPS.
 PERFORM GET_VBAP.
 PERFORM GET_OPEN.
 PERFORM GET_PRICE.

END-OF-SELECTION.

 PERFORM BUILD_LAYOUT USING LAYOUT.
 PERFORM WRITE_OUTPUT.


*&---------------------------------------------------------------------*
*&      Form INITIALIZE_FIELDCAT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
*     -->P_FIELDTAB[] text                                              *
*----------------------------------------------------------------------*
FORM INITIALIZE_FIELDCAT USING P_FIELDTAB TYPE SLIS_T_FIELDCAT_ALV.
  DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
* fixed columns (obligatory)
  CLEAR L_FIELDCAT.
  L_FIELDCAT-TABNAME = 'INV'.
  L_FIELDCAT-FIX_COLUMN = 'X'.
  L_FIELDCAT-NO_OUT = 'O'.
  L_FIELDCAT-FIELDNAME = 'WERKS'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'MATNR'.
  APPEND L_FIELDCAT TO P_FIELDTAB.

* totalized columns
  CLEAR L_FIELDCAT.
  L_FIELDCAT-TABNAME = 'INV'.
  L_FIELDCAT-SP_GROUP = 'A'.
  L_FIELDCAT-DO_SUM = 'X'.
  L_FIELDCAT-FIELDNAME = 'LABST'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'INSME'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'RETME'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'UMLME'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'WESBS'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'SPEME'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
* columns with different description
  L_FIELDCAT-FIELDNAME = 'KWMENG'.
  L_FIELDCAT-SELTEXT_M = 'Sales Orders'.
  L_FIELDCAT-SELTEXT_S = 'Sales Or'.
  L_FIELDCAT-SELTEXT_L = 'Sales Orders Qty'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'LFIMG'.
  L_FIELDCAT-SELTEXT_M = 'Sched. Delivery'.
  L_FIELDCAT-SELTEXT_S = 'Schd. Del'.
  L_FIELDCAT-SELTEXT_L = 'Scheduled for Delivery'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'TRANS'.
  L_FIELDCAT-SELTEXT_M = 'Stk. in transit'.
  L_FIELDCAT-SELTEXT_S = 'Stk. trns'.
  L_FIELDCAT-SELTEXT_L = 'Stock in transit (sum)'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'AVAIL'.
  L_FIELDCAT-SELTEXT_M = 'Available'.
  L_FIELDCAT-SELTEXT_S = 'Avail.'.
  L_FIELDCAT-SELTEXT_L = 'Stock Available'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'MENGE'.
  L_FIELDCAT-SELTEXT_M = 'Open Orders'.
  L_FIELDCAT-SELTEXT_S = 'Open Ord'.
  L_FIELDCAT-SELTEXT_L = 'Open Purchase Orders'.
  APPEND L_FIELDCAT TO P_FIELDTAB.

* columns not displayed
  CLEAR L_FIELDCAT.
  L_FIELDCAT-TABNAME = 'INV'.
  L_FIELDCAT-SP_GROUP = 'A'.
  L_FIELDCAT-NO_OUT = 'X'.
  L_FIELDCAT-FIELDNAME = 'MEINS'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'UMLMC'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'TRAME'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'STPRS'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
  L_FIELDCAT-FIELDNAME = 'VALUE'.
  APPEND L_FIELDCAT TO P_FIELDTAB.
ENDFORM.                  " INITIALIZE_FIELDCAT

*&---------------------------------------------------------------------*
*&     Form BUILD_EVENTTAB
*&---------------------------------------------------------------------*
*     text
*----------------------------------------------------------------------*
*     -->P_EVENTS[] text                                               *
*----------------------------------------------------------------------*
FORM BUILD_EVENTTAB USING P_EVENTS TYPE SLIS_T_EVENT.
  DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
      EXPORTING
          I_LIST_TYPE = 0
      IMPORTING
          ET_EVENTS = P_EVENTS.
  READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                      INTO LS_EVENT.
  IF SY-SUBRC = 0.
   MOVE FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
   APPEND LS_EVENT TO P_EVENTS.
  ENDIF.
ENDFORM.                                  " BUILD_EVENTTAB

*&---------------------------------------------------------------------*
*&       Form BUILD_COMMENT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
*     -->P_HEADING[] text                                               *
*----------------------------------------------------------------------*
FORM BUILD_COMMENT USING P_HEADING TYPE SLIS_T_LISTHEADER.
  DATA: HLINE TYPE SLIS_LISTHEADER,
      TEXT(60) TYPE C,
      SEP(20) TYPE C.
  CLEAR: HLINE, TEXT.
  HLINE-TYP = 'H'.
  WRITE: TEXT-101 TO TEXT+23.
  HLINE-INFO = TEXT.
  APPEND HLINE TO P_HEADING.
  CLEAR TEXT.
  WRITE: 'User: ' TO TEXT,
        SY-UNAME TO TEXT+6,
        'Date: ' TO TEXT+25,
        SY-DATUM TO TEXT+31,
        'Page: ' TO TEXT+50,
        SY-PAGNO TO TEXT+56.
  HLINE-INFO = TEXT.
  APPEND HLINE TO P_HEADING.



ENDFORM.                     " BUILD_COMMENT

*---------------------------------------------------------------------*
*      FORM TOP_OF_PAGE                                                 *
*---------------------------------------------------------------------*
*      ........                                            *
*---------------------------------------------------------------------*
FORM TOP_OF_PAGE.
  CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
          IT_LIST_COMMENTARY = HEADING.
ENDFORM.
*&---------------------------------------------------------------------*
*&      Form INITIALIZE_VARIANT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM INITIALIZE_VARIANT.
  G_SAVE = 'A'.
  CLEAR G_VARIANT.
  G_VARIANT-REPORT = REPNAME.
  GX_VARIANT = G_VARIANT.
  CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
      EXPORTING
          I_SAVE = G_SAVE
      CHANGING
          CS_VARIANT = GX_VARIANT
      EXCEPTIONS
          NOT_FOUND = 2.
  IF SY-SUBRC = 0.
   P_VARI = GX_VARIANT-VARIANT.
  ENDIF.
ENDFORM.                                  " INITIALIZE_VARIANT

*&---------------------------------------------------------------------*
*&      Form F4_FOR_VARIANT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM F4_FOR_VARIANT.
  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
      EXPORTING
          IS_VARIANT = G_VARIANT
          I_SAVE = G_SAVE
      IMPORTING
          E_EXIT = G_EXIT
          ES_VARIANT = GX_VARIANT
      EXCEPTIONS
          NOT_FOUND = 2.
  IF SY-SUBRC = 2.
   MESSAGE ID SY-MSGID TYPE 'S'                        NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ELSE.
   IF G_EXIT = SPACE.
     P_VARI = GX_VARIANT-VARIANT.
   ENDIF.
  ENDIF.
ENDFORM.                                  " F4_FOR_VARIANT

*&---------------------------------------------------------------------*
*&      Form PAI_OF_SELECTION_SCREEN
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM PAI_OF_SELECTION_SCREEN.
*
 IF NOT P_VARI IS INITIAL.
  MOVE G_VARIANT TO GX_VARIANT.
  MOVE P_VARI TO GX_VARIANT-VARIANT.
  CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
     EXPORTING
        I_SAVE = G_SAVE
     CHANGING
        CS_VARIANT = GX_VARIANT.
  G_VARIANT = GX_VARIANT.
 ELSE.
  PERFORM INITIALIZE_VARIANT.
 ENDIF.
ENDFORM.                   " PAI_OF_SELECTION_SCREEN


*&---------------------------------------------------------------------*
*&       Form GET_MARD
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_MARD.
  SELECT MATNR WERKS LABST INSME RETME UMLME SPEME
        FROM MARD
        INTO CORRESPONDING FIELDS OF INV
       WHERE MATNR IN S_MATNR
        AND WERKS IN S_WERKS.
   COLLECT INV.
  ENDSELECT.
  PERFORM FILTER_BY_MATERIAL_TYPE.
ENDFORM.                                  " GET_MARD

*&---------------------------------------------------------------------*
*&      Form FILTER_BY_MATERIAL_TYPE
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM FILTER_BY_MATERIAL_TYPE.
  LOOP AT INV.
   CLEAR INV-MTART.
   SELECT SINGLE MTART
         INTO INV-MTART
         FROM MARA
         WHERE MATNR EQ INV-MATNR
         AND MTART IN S_MTART.
   IF SY-SUBRC EQ 0.
     MODIFY INV.
   ELSE.
     DELETE INV.
   ENDIF.
  ENDLOOP.
ENDFORM.                         " FILTER_BY_MATERIAL_TYPE

*&---------------------------------------------------------------------*
*&     Form GET_MARC
*&---------------------------------------------------------------------*
*     text
*----------------------------------------------------------------------*
FORM GET_MARC.
  LOOP AT INV.
   SELECT SINGLE UMLMC TRAME
         FROM MARC
         INTO CORRESPONDING FIELDS OF INV
         WHERE MATNR EQ INV-MATNR
         AND WERKS EQ INV-WERKS.
   IF SY-SUBRC EQ 0.
     INV-TRANS = INV-UMLMC + INV-TRAME.
     MODIFY INV.
   ENDIF.
  ENDLOOP.
ENDFORM.                                  " GET_MARC
*&---------------------------------------------------------------------*
*&      Form GET_EKPO
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_EKPO.
  DATA: WESBS LIKE INV-WESBS,
      SHKZG LIKE EKBE-SHKZG,
      MEINS LIKE EKPO-MEINS,
      LMEIN LIKE EKPO-LMEIN.
  LOOP AT INV.
   CLEAR: WESBS, SHKZG, MEINS, LMEIN.
   SELECT Y~WESBS Y~SHKZG X~MEINS X~LMEIN
         INTO (WESBS, SHKZG, MEINS, LMEIN)
         FROM EKPO AS X JOIN EKBE AS Y
         ON X~EBELN = Y~EBELN
         AND X~EBELP = Y~EBELP
         WHERE X~MATNR EQ INV-MATNR
         AND X~WERKS EQ INV-WERKS
         AND X~LOEKZ NE 'L'.
     IF SHKZG EQ 'H'.
      MULTIPLY WESBS BY -1.
     ENDIF.
     IF MEINS NE LMEIN.
      PERFORM CONVERT_UNIT_OF_MEASURE CHANGING INV-MATNR MEINS
WESBS.
     ENDIF.
     ADD WESBS TO INV-WESBS.
   ENDSELECT.
   MODIFY INV.
  ENDLOOP.
ENDFORM.                                  " GET_EKPO
*&---------------------------------------------------------------------*
*&      Form GET_LIPS
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_LIPS.
  DATA: LFIMG LIKE INV-LFIMG.
  LOOP AT INV.
   CLEAR: LFIMG, INV-LFIMG.
   SELECT OMENG
         INTO LFIMG
         FROM VBBE
         WHERE MATNR EQ INV-MATNR
         AND WERKS EQ INV-WERKS
         AND VBTYP EQ 'J'.
     ADD LFIMG TO INV-LFIMG.
   ENDSELECT.
   MODIFY INV.
  ENDLOOP.
ENDFORM.                                  " GET_LIPS
*&---------------------------------------------------------------------*
*&      Form GET_VBAP
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_VBAP.
  DATA: KWMENG LIKE INV-KWMENG.
  LOOP AT INV.
   CLEAR: KWMENG, INV-KWMENG.
   SELECT OMENG
         INTO KWMENG
         FROM VBBE
         WHERE MATNR EQ INV-MATNR
         AND WERKS EQ INV-WERKS
         AND VBTYP EQ 'C'.
     ADD KWMENG TO INV-KWMENG.
   ENDSELECT.
   INV-AVAIL = INV-LABST - INV-INSME - INV-KWMENG - INV-LFIMG.
   MODIFY INV.
  ENDLOOP.
ENDFORM.                                  " GET_VBAP

*&---------------------------------------------------------------------*
*&      Form GET_UNIT_OF_MEASURE
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
* --> p1          text
* <-- p2          text
*----------------------------------------------------------------------*
FORM GET_UNIT_OF_MEASURE.
  LOOP AT INV.
   SELECT SINGLE MEINS
         FROM MARA
         INTO INV-MEINS
         WHERE MATNR EQ INV-MATNR.
   MODIFY INV.
  ENDLOOP.
ENDFORM.                                  " GET_UNIT_OF_MEASURE

*&---------------------------------------------------------------------*
*&      Form GET_OPEN
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_OPEN.
 DATA: BEGIN OF XTAB OCCURS 10, " Open orders table
     WERKS LIKE EKPO-WERKS,
     LGORT LIKE EKPO-LGORT,
     MATNR LIKE EKPO-MATNR,
     MENGE LIKE EKPO-MENGE,
     MENGK LIKE EKPO-MENGE,
    END OF XTAB.
 RANGES: L_WERKS FOR MARD-WERKS.

 LOOP AT INV.
  REFRESH XTAB.
  CLEAR: XTAB, L_WERKS.
  MOVE INV-WERKS TO L_WERKS-LOW.
  CALL FUNCTION 'MB_ADD_PURCHASE_ORDER_QUANTITY'
    EXPORTING
       X_MATNR = INV-MATNR
       X_MEINS = INV-MEINS
       X_ELIKZ = SPACE
       X_LOEKZ = SPACE
    TABLES
       XTAB = XTAB
       XWERKS = L_WERKS.
  MOVE XTAB-MENGE TO INV-MENGE.
  MODIFY INV.
 ENDLOOP.
ENDFORM.                 " GET_OPEN

*&---------------------------------------------------------------------*
*&      Form GET_PRICE
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM GET_PRICE.
  LOOP AT INV.
   SELECT SINGLE STPRS
         FROM MBEW
         INTO INV-STPRS
         WHERE MATNR EQ INV-MATNR
         AND BWKEY EQ INV-WERKS
         AND BWTAR EQ SPACE.
     IF SY-SUBRC EQ 0.
       INV-VALUE = INV-STPRS *
               ( INV-LABST + INV-INSME + INV-TRANS + INV-SPEME ).
      MODIFY INV.
     ENDIF.
  ENDLOOP.
ENDFORM.                         " GET_PRICE

*---------------------------------------------------------------------*
*      FORM CONVERT_UNIT_OF_MEASURE                                       *
*---------------------------------------------------------------------*
*      text                                                 *
*---------------------------------------------------------------------*
* --> P_MATNR                                                       *
* --> P_VRKME                                                       *
* --> P_QUANT                                                       *
*---------------------------------------------------------------------*
FORM CONVERT_UNIT_OF_MEASURE USING P_MATNR P_VRKME P_QUANT.
 DATA: UMREZ LIKE MARM-UMREZ,
      UMREN LIKE MARM-UMREN.
 SELECT SINGLE UMREZ UMREN
       INTO (UMREZ, UMREN)
       FROM MARM
       WHERE MATNR EQ P_MATNR
       AND MEINH EQ P_VRKME.
 IF SY-SUBRC EQ 0.
   COMPUTE P_QUANT = ( P_QUANT * UMREZ ) / UMREN.
 ENDIF.
ENDFORM.

*&---------------------------------------------------------------------*
*&      Form BUILD_LAYOUT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
*     -->P_LAYOUT text                                                 *
*----------------------------------------------------------------------*
FORM BUILD_LAYOUT USING P_LAYOUT TYPE SLIS_LAYOUT_ALV.
  P_LAYOUT-F2CODE                   = F2CODE.
  P_LAYOUT-ZEBRA                   = 'X'.
  P_LAYOUT-DETAIL_POPUP = 'X'.
ENDFORM.                                  " BUILD_LAYOUT

*&---------------------------------------------------------------------*
*&      Form WRITE_OUTPUT
*&---------------------------------------------------------------------*
*      text
*----------------------------------------------------------------------*
FORM WRITE_OUTPUT.
  SORT INV BY WERKS MATNR.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
          I_PROGRAM_NAME = REPNAME
          I_INTERNAL_TABNAME = 'INV'
          I_INCLNAME               = REPNAME
      CHANGING
          CT_FIELDCAT                = FIELDTAB.
  IF SY-SUBRC <> 0.
   WRITE: 'SY-SUBRC: ', SY-SUBRC, 'REUSE_ALV_FIELDCATALOG_MERGE'.
  ENDIF.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
          I_CALLBACK_PROGRAM = REPNAME
          I_STRUCTURE_NAME = 'INV'
          IS_LAYOUT                = LAYOUT
          IT_FIELDCAT              = FIELDTAB
          I_DEFAULT               = 'A'
          I_SAVE               = G_SAVE
          IS_VARIANT               = G_VARIANT
          IT_EVENTS                = EVENTS[]
      TABLES
          T_OUTTAB                 = INV.
 IF SY-SUBRC <> 0.
  WRITE: 'SY-SUBRC: ', SY-SUBRC, 'REUSE_ALV_LIST_DISPLAY'.
 ENDIF.
ENDFORM.                   " WRITE_OUTPUT

				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:1652
posted:2/26/2010
language:German
pages:67