daily pastebin goal
12%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. * prog 27
  2.  
  3. TABLES: kna1.
  4. TYPES: BEGIN OF t_kna1,
  5.   v_name1 LIKE kna1-name1,
  6.   v_name2 LIKE kna1-name2,
  7.   v_land1 LIKE kna1-land1,
  8.   END OF t_kna1.
  9.  
  10. SKIP 2.
  11.  
  12. SELECTION-SCREEN BEGIN OF BLOCK one WITH FRAME TITLE text-002.
  13.  
  14. PARAMETERS: asc RADIOBUTTON GROUP rad USER-COMMAND radio,
  15.             des RADIOBUTTON GROUP rad.
  16.  
  17. PARAMETERS : de AS CHECKBOX default 'X',
  18.              gb AS CHECKBOX,
  19.              us AS CHECKBOX.
  20.  
  21. SELECTION-SCREEN END OF BLOCK one.
  22.  
  23.  
  24. DATA: int_table TYPE STANDARD TABLE OF t_kna1,
  25.       wa_table TYPE t_kna1.
  26.  
  27.  
  28. RANGES rang FOR kna1-land1.
  29.  
  30. START-OF-SELECTION.
  31.  
  32.  
  33.   rang-sign = 'I'.
  34.   rang-option = 'EQ'.
  35.  
  36. *  IF sy-subrc = 0.
  37.  
  38.  
  39.  
  40.     IF de = 'X'.
  41.       rang-low = 'DE'.
  42.       APPEND rang.
  43.     ENDIF.
  44.  
  45.     IF gb = 'X'.
  46.       rang-low = 'GB'.
  47.       APPEND rang.
  48.     ENDIF.
  49.  
  50.     IF us = 'X'.
  51.       rang-low = 'US'.
  52.       APPEND rang.
  53.     ENDIF.
  54. *
  55. *  ELSE.
  56. *    MESSAGE 'invalid check option' TYPE 'E'.
  57. *  ENDIF.
  58.  
  59.   SELECT name1 name2 land1 FROM kna1 INTO TABLE int_table where land1 in rang.
  60.  
  61.  
  62.  
  63. *  RADIOBUTTON CONDITION CHECK
  64.   IF asc = 'X'.
  65.     SORT int_table BY v_land1 ASCENDING.
  66.   ELSE.
  67.     SORT int_table BY v_land1 DESCENDING.
  68.   ENDIF.
  69.  
  70.  
  71.   LOOP AT int_table INTO wa_table.
  72.     WRITE:/ wa_table-v_name1 ,wa_table-v_name2 ,wa_table-v_land1.
  73.   ENDLOOP.
  74.  
  75.  
  76. END-OF-SELECTION.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top