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: Using Select-Options

Print This Post Email This Post Written by admin on Nov 30th, 2007 | Filed under: ABAP Programs

REPORT CHAP1109.
* Work area
TABLES CUSTOMERS.
* Specifiying a Select-Option
SELECT-OPTIONS SNAME FOR CUSTOMERS-NAME.
* Internal table for later use
DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100
WITH HEADER LINE.
* Reading table entries according to a Select-Option

SELECT * FROM CUSTOMERS INTO TABLE ALL_CUSTOMERS
WHERE NAME IN SNAME.
* Displaying the reuslt
LOOP AT ALL_CUSTOMERS.
WRITE: / ALL_CUSTOMERS-CITY,
ALL_CUSTOMERS-NAME.
ENDLOOP.

———————
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: 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....
  2. ABAP Programs: Type-Specific Output Options REPORT ZSOURCE0808. * Specifying a format templateDATA TIME TYPE T VALUE ’154633′.WRITE AT (8) TIME USING EDIT MASK ‘__:__:__’. * Using decimalsDATA PACKED_NUMBER TYPE P VALUE 123.WRITE PACKED_NUMBER DECIMALS 2....
  3. 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′...
  4. ABAP Programs: Obtaining data with nested select loops REPORT ZSOURCE1111.* Work areasTABLES: CUSTOMERS, BOOKINGS.* Reading entries from both database tableSELECT * FROM CUSTOMERS. SELECT * FROM BOOKINGS WHERE CUSTOMID = CUSTOMERS-ID AND ORDER_DATE = ’19990101′. WRITE: / CUSTOMERS-NAME,...
  5. Visualization Options of SAP BW Visualization Options of SAP BW http://www.mediafire.com/?9o02l4nawfm...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. ABAP Programs for Beginners Here is the list of Programs available in the ABAP Master Code Book (PDF). How to define types and data objects A Few Simple Examples Working with database tables and...
  11. Ending ABAP Programs The execution of an ABAP program is always ended when the corresponding process in the runtime environment ends. From an ABAP programmer’s perspective, this is when the last of the...
  12. Some Cool Programs in ABAP and the link is :- http://www.kabai.com/abaps/q.htm...
  13. ABAP Programs: Using where clauses REPORT ZSOURCE1104.* Work areasTABLES: BOOKINGS, CUSTOMERS.* Internal tablesDATA CUSTOMER_ORDERS LIKE BOOKINGS OCCURS 100 WITH HEADER LINE.DATA ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE.* Selecting data with a simple where...
  14. ABAP Programs: Using colors REPORT ZSOURCE0807. * Display the header using an appropriate color (grayish blue)WRITE ‘Header’ COLOR COL_HEADING. * Switch the standard colorFORMAT COLOR COL_TOTAL. * Make the color less brightWRITE / ‘total...
  15. Different types of ABAP Programs There are nine types of ABAP Programs in SAP: 1 Executable Programs (ABAP Reports) I INCLUDE Program M Module Pool/Dialogue programs S Sub-Routine Pool J Interface Pool K Class Pool...



Leave a Reply