ERP Database - The Unofficial ERP Knowledge Base

Facebook Twitter del.icio.us Digg it
ERP Database contains a huge collection of articles related to ERP System and Software. Many of the articles are specifically related to SAP. All these ERP/SAP articles are freely available to everyone.

If you would like to submit an article or share any document related to ERP or any specific ERP software. Please mail it to support@erpdb.info. Please make sure that the documents are not copyrighted.
Social Bookmarks:

ABAP Programs: Obtaining data with nested select loops

Print This Post Email This Post Written by admin on Dec 3rd, 2007 | Filed under: ABAP Programs

REPORT ZSOURCE1111.
* Work areas
TABLES: CUSTOMERS, BOOKINGS.
* Reading entries from both database table
SELECT * FROM CUSTOMERS.
SELECT * FROM BOOKINGS
WHERE CUSTOMID = CUSTOMERS-ID
AND ORDER_DATE = ’19990101′.
WRITE: / CUSTOMERS-NAME,
BOOKINGS-FLDATE.
ENDSELECT.
ENDSELECT.

~ end of post ~

———————
ABAPer, mail: abap.community@gmail.com http://www.erpdb.info

Share

If you like this post, you may as well like these too:

  1. ABAP Programs: Using Select-Options REPORT CHAP1109.* Work areaTABLES CUSTOMERS.* Specifiying a Select-OptionSELECT-OPTIONS SNAME FOR CUSTOMERS-NAME.* Internal table for later useDATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Reading table entries according to a...
  2. ABAP Programs: Using select statements REPORT ZSOURCE1501. * Work areas TABLES: CUSTOMERS, BOOKINGS. * Reading data SELECT * FROM CUSTOMERS. WRITE / CUSTOMERS-NAME. SELECT * FROM BOOKINGS WHERE CUSTOMID = CUSTOMERS-ID AND FLDATE > ’19990501′...
  3. ABAP Programs: Working with Select-Options REPORT ZSOURCE1602. * Work area TABLES CUSTOMERS. * Defining Select-Options SELECT-OPTIONS S_NAME FOR CUSTOMERS-NAME. SELECT * FROM CUSTOMERS WHERE NAME IN S_NAME. WRITE / CUSTOMERS-NAME. ENDSELECT....
  4. ABAP Programs: Hexadecimal (or binary) data REPORT CHAP0406. * Hexadecimal (or binary) data is stored in fields of type x.* A type x field of length n contains 2n digits* and its output length is also...
  5. ABAP Programs: Local data in a form REPORT ZSOURCE1002. * Global field of the programDATA FLAG VALUE ‘G’.* Displaying the global fieldWRITE FLAG.* Calling a formPERFORM WRITE_FLAG.* Displaying the global field againWRITE FLAG.* Defining a form with...
  6. ABAP Programs: Transferring data to a file Here is a little program, which will teach you to transfer the data to a file. REPORT ZSOURCE2601. * Data declarations for later use PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat' LOWER CASE....
  7. ABAP Programs: Complex Non-Elementary Types and Data Objects REPORT ZSOURCE0408. * Nested recordsTYPES: BEGIN OF ADDRESS, CITY(25), STREET(30), END OF ADDRESS, BEGIN OF PERSON, NAME(25), ADDRESS TYPE ADDRESS, END OF PERSON.DATA RECEIVER TYPE PERSON.RECEIVER-NAME = ‘Smith’.RECEIVER-ADDRESS-CITY = ‘Big...
  8. ABAP Programs:Reading data from a file (presentation server) REPORT ZSOURCE2604. * Data declarations for later use PARAMETERS FILENAME(128) DEFAULT 'c:usersdefaulttestfile.dat' LOWER CASE. TABLES CUSTOMERS. DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE. CALL FUNCTION 'WS_UPLOAD' EXPORTING FILENAME...
  9. SELECT SINGLE Statement The Select Single Statement is used to ensure that only one row is read from the Database. The Search is terminated as soon as the that row is found with...
  10. Difference between Master Data, Transaction Data and Customizing Data Customizing Data refers to the customized information for a particular Client. This includes data such as payment terms, discounts, pricing, tolerance limits, etc., which you do not normally change on...
  11. ABAP Source Code: Syntax of ABAP/4 Programs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 * Declaration...
  12. ABAP Programs: Exporting to the ABAP/4 Memory REPORT ZSOURCE1401. * Work areas TABLES: CUSTOMERS, BOOKINGS. * Internal tables which will be exported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH...
  13. ABAP Programs: Importing from the ABAP/4 Memory REPORT ZSOURCE1402. * Internal tables which will be imported DATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 10 WITH HEADER LINE, NEW_BOOKINGS LIKE BOOKINGS OCCURS...
  14. ABAP Data Dictionary Overview Data definitions also called as meta data are managed and created in ABAP Dictionary. It allows to maintain a huge volume of data without data redundancy. The ABAP Dictionary...
  15. DATA : ABAP Keyword a day DATA Variants1. DATA f.2. DATA f(len).3. DATA: BEGIN OF rec,…END OF rec.4. DATA: BEGIN OF itab OCCURS n,…END OF itab.5. DATA: BEGIN OF COMMON PART c,…END OF COMMON PART.EffectDefines global...



Leave a Reply