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: Selection screen events

Print This Post Email This Post Written by admin on Jan 5th, 2008 | Filed under: ABAP 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
REPORT ZSOURCE1603 MESSAGE-ID SU.
* Worka area
TABLES CUSTOMERS.
* Selection criteria
PARAMETERS PCODE LIKE CUSTOMERS-POSTCODE.
SELECT-OPTIONS S_NAME FOR CUSTOMERS-NAME.
* Variables
DATA: PARAMETER_LENGTH TYPE I,
      NUMBER_OF_SELECTIONS TYPE I.
* Checking user input in Parameter pcode
AT SELECTION-SCREEN ON PCODE.
  PARAMETER_LENGTH = STRLEN( PCODE ).
  IF PARAMETER_LENGTH < 5.
    MESSAGE E000 WITH 'ZIP code invalid'.
  ENDIF.
* Checking user input in Select-Option s_name
AT SELECTION-SCREEN ON S_NAME.
  DESCRIBE TABLE S_NAME LINES NUMBER_OF_SELECTIONS.
  IF NUMBER_OF_SELECTIONS = 0.
    MESSAGE E000 WITH 'Please specify name of customer'.
  ENDIF.
* Processing data
START-OF-SELECTION.
  SELECT * FROM CUSTOMERS
         WHERE NAME IN S_NAME.
    WRITE / CUSTOMERS-NAME.
  ENDSELECT.
Share

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

  1. ABAP Programs : Using the events start-of-selection and end-of-selection REPORT ZSOURCE1503. * Work area TABLES BOOKINGS. * Initial processing START-OF-SELECTION. WRITE / ‘Start’. * Reading data GET BOOKINGS. WRITE: AT /3 BOOKINGS-FLDATE. * Final processing END-OF-SELECTION. WRITE / ‘Finished’....
  2. ABAP Programs:Displaying the selection screen 1 2 3 4 5 6 7 8 9 10 REPORT ZSOURCE1803. * Work area TABLES CUSTOMERS. * Selection criteria SELECT-OPTIONS S_NAME FOR CUSTOMERS-NAME. * running chap1801 and displaying the...
  3. ABAP Tips: Reporting and Selection-screen ABAP Reporting Report Template Calling another report from your own report Calling a dialog screen from a report and passing data Call dialog screen from report – Example 2 Control...
  4. ABAP Programs: Working with get events REPORT ZSOURCE1504. * Work areas TABLES BOOKINGS. * Reading data GET BOOKINGS. WRITE / BOOKINGS-FLDATE....
  5. ABAP Programs: External flow of control (events) REPORT ZSOURCE0901. * Display a list of customersTABLES CUSTOMERS.SELECT * FROM CUSTOMERS. WRITE / CUSTOMERS-NAME.ENDSELECT. * Event for drill downAT LINE-SELECTION. WRITE: / ‘This line appears after drill-down’. ~~~~~ end...
  6. ICON in Selection-Screen How to write the ICON in the selection screen. In the selection screen definition add the below code 1 selection-screen comment 40(20) icon1. Now in event of at selection-screen output...
  7. Dynamic Selection Screen ABAP Program using Dynamic Selection Screen ABAP Program with consists of the selection screen, which changes based on the user click on a radio button. The entire selection screen is...
  8. ABAP Programs: Sample report with selection criteria REPORT ZSOURCE1801. TABLES: CUSTOMERS, BOOKINGS. PARAMETERS P_DATE TYPE D. SELECT-OPTIONS S_NAME FOR CUSTOMERS-NAME. SELECT * FROM CUSTOMERS WHERE NAME IN S_NAME. WRITE / CUSTOMERS-NAME. SELECT * FROM BOOKINGS WHERE ORDER_DATE...
  9. Create Toolbar in Selection Screen How to create a toolbar in the selection screen, similar to the one below. Refer the sample code TABLES: sscrfields. SELECTION-SCREEN FUNCTION KEY 1.   INITIALIZATION. sscrfields-functxt_01 = 'Tool bar...
  10. ABAP Programs: Using Internal Tables for Selection Criteria REPORT ZSOURCE1112.* Work areasTABLES: CUSTOMERS, BOOKINGS.* Internal tablesDATA: ALL_CUSTOMERS LIKE CUSTOMERS OCCURS 100 WITH HEADER LINE, ALL_BOOKINGS LIKE BOOKINGS OCCURS 500 WITH HEADER LINE.* Reading entries from both database tableSELECT...
  11. END-OF-SELECTION : ABAP Keyword a day END-OF-SELECTION Basic form END-OF-SELECTION. Effect Processing event Executes the code after END-OF-SELECTION when all the logical database records have been read and processed. Related START-OF-SELECTION , STOP , GET dbtab...
  12. Data Transport from ABAP to Screen and back Data Transport between screens and ABAP programs is automatically handled by the system. The First data transport occurs after all the PBO Modules have been executed and prior to a...
  13. 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...
  14. 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...
  15. 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...



Leave a Reply