ABAP新语法

lv_title = COND #( WHEN gv_agv = 'X' THEN '无源上架' ELSE '上架' ).
***************************
  DATA(LS_VBAK) = LT_VBAK[ 3 ].
  DATA(LV_VBELN) = LT_VBAK[ 3 ]-vbeln.
  DATA(LV_INDEX) = LINE_INDEX( LT_VBAK[ vbeln = '0000004969' ] ).

*********REDUCE************
#拼接相同a的b的值
lt_data = VALUE #( ( a = 'A' b = 10 )
                   ( a = 'B' b = 30 )
                   ( a = 'C' b = 20 )
                   ( a = 'B' b = 50 ) ) .
LOOP AT lt_data ASSIGNING FIELD-SYMBOL() GROUP BY -a.
  ls_tmp = REDUCE #( INIT x TYPE string
                          FOR  wa IN GROUP
                          NEXT x = x && wa-b ).

  APPE

你可能感兴趣的:(ABAP,java)