Reading database tables - logical
database
|
| Requirement:
Read a logical database (you must have data in those tables, now
LFA1), fill up an internal table. Sort the data by a given field and
then display the internal table. |
|
Solution:
- report zldbread no standard page heading.
- tables: lfa1.
- data: begin of t occurs 0,
- linfr like lfa1-lifnr,
- name1 like lfa1-name1,
- end of t.
- start-of-selection.
- get lfa1.
- clear t.
- move-corresponding lfa1 to t.
- append t.
- end-of-selection.
- sort t by name1.
- loop at t.
- write: / t-name1, t-lifnr.
- endloop.
|
|
SAP Technical Tutorials
ABAP
DICTIONARY
INTERNAL TABLES
ALV Reports
SAPSCRIPTS
SMARTFORMS
LSMW
BDC
ALE
IDOC
USER EXITS
TRANSPORTING
ITS
SAP Functional Tutorials
FI (Financial)
CO (Controlling)
HR (Human
Resource)
LO (Logistics)
MM (Materials
Management)
PP (Production
Planning)
QM (Quality
Management)
SD (Sales
and Distribution)
TR (Treasury
and cash)
WM (Warehouse
Management)
PS (project
Systems)
PM (plant
Maintenance)
CA (Cross
Application)
SAP
Interview
questions
Architecture
faqs
BDC faqs
DATADICTIONARY faqs
Logical Database Faqs
Modularization Faqs
Reports Faqs
Transactions Faqs
SAP References
transaction
codes
System
Fields
Function Modules
SAP TABLES
code
optimization
TOOLS
SQL Trace tool
Runtime Analysis
LSMW
ABAP Query
CTS
|