DATA: ls_variant TYPE disvariant.
  ls_variant-report = sy-repid.
  IF ... .
    ls_variant-handle = 'YS'.
  ELSE.
    ls_variant-handle = ''.
  ENDIF.
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from datetime import timedelta | |
| from datetime import datetime | |
| #### testing data | |
| raw_set = [ | |
| {"begin": "20231201", "end": "20240101", "content": "a"}, | |
| {"begin": "20231217", "end": "20240101", "content": "a1"}, | |
| {"begin": "20231204", "end": "20231206", "content": "b"}, | |
| {"begin": "20231101", "end": "20231215", "content": "c"}, | |
| {"begin": "20231101", "end": "20231214", "content": "c1"}, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import decimal | |
| from decimal import Decimal | |
| a = ['23.17', '3.2', '1.22', '0.32'] | |
| b = ['7.36', '4.16', '3.2', '1.69', '1.28', '1.28', '0.96', '0.96', '0.90', '0.64', '0.64', '0.64', '0.50', '0.50', '0.32', '0.32', '0.32', '0.32', '0.32', '0.32', '0.32', '0.32', '0.32', '0.32'] | |
| a = ["52.7", "8.96"] | |
| b = ["21.44", "6.72", "5.44", "5.12", "4.48", "3.20", "2.24", "1.92", "1.92", "1.92", "1.28", "1.28", "1.00", "0.96", "0.50", "0.32", "0.32", "0.32", "0.32", "0.32", "0.32", "0.32"] | |
| a = ['17.76','62.13','26.67'] #'62.13','17.76',] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 批量搜索程序 RPR_ABAP_SOURCE_SCAN | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | " 通常 | |
| DEMO:SALV_DEMO_TABLE_SIMPLE | |
| " 双击单击事件 | |
| DEMO:SALV_TEST_TABLE_EVENTS | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | width, height = 600, 600 | |
| w, h = 300, 600 | |
| lines, cols = 40, 20 | |
| xspace, yspace = 5, 10 | |
| moving = 0.0 | |
| bg_color = color(50, 55, 100) | |
| fg_color = color(255) | |
| def setup(): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import socket | |
| from concurrent.futures import ThreadPoolExecutor, as_completed | |
| from collections import deque | |
| from functools import wraps | |
| _addr_ = ('', 50007) | |
| _queue_ = deque() | |
| executor = ThreadPoolExecutor(max_workers=10) | |
| def _loop_(): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | METHOD if_rest_handler~handle. | |
| DATA: BEGIN OF wa_jsondata, | |
| name TYPE char20, | |
| greeting TYPE char100, | |
| END OF wa_jsondata. | |
| DATA str_name TYPE string. | |
| str_name = io_request->get_uri_attribute( iv_name = 'name' ). | |
| str_name = cl_http_utility=>if_http_utility~unescape_url( str_name ). | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | METHOD if_rest_application~get_root_handler. | |
| *CALL METHOD SUPER->IF_REST_APPLICATION~GET_ROOT_HANDLER | |
| * RECEIVING | |
| * RO_ROOT_HANDLER = | |
| * . | |
| DATA: lo_router TYPE REF TO cl_rest_router. | |
| IF mo_server IS BOUND. | |
| CREATE OBJECT lo_router. | |
| lo_router->attach( iv_template = '/GetTest' iv_handler_class = 'ZCL_REST_WS_TEST' ). | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | " escape & unescape | |
| DATA str_name TYPE string. | |
| str_name = cl_http_utility=>if_http_utility~escape_url( str_name ). | |
| str_name = cl_http_utility=>if_http_utility~unescape_url( str_name ). | |
| " encode | |
| DATA conv TYPE REF TO cl_abap_conv_out_ce. | |
| conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ). | |
| conv->convert( | |
| EXPORTING data = v_text | 
NewerOlder