ABAP SELECT SUM函数用法 表MSEG中,根据物料号MATNR,对MENGE字段进行求和 。 当SHKZG = H ,MENGE*( -1 ); SHKZG = S, MENGE*1,,然后求和 参考ABAP SQL CASE 语法 代码语言:javascript 代码运行次数:0 SELECTmseg~matnr,SUM(mseg~menge*(CASEmseg~shkzgWHEN'H'THEN(-1)WHEN'S'THEN(1)END))ASslFROM...
CASE <f>.WHEN <f1>.<statement block>WHEN <f2>.<statement block>WHEN <f3>.<statement block>WHEN ...WHEN OTHERS.<statement block>ENDCASE. 系统执行 WHEN 语句之后的语句块,如果<f>内容等于<fi>的内容,且继续处理 ENDCASE 语句后面的语句。如果<f>的内容不等于<fi>的内容,则执行选项 WHEN OTHERS ...
1字段表达式2data carrid type scarr-carrid value'LH'.3select from scar4fields carrid,5carrname6into table @data(lt_carriers).7select from spfli8fields'*'as mark,9@carrid as id,10@( lt_carriers[ carrid = carrid ]-carrname ) as carrier,11connid12into table @data(lt_result).13cl...
select ZCASHCODE, FISCYEARPER ,gjahr , SUM( HSL ) as HSL from ACDOCA where RLDNR = '0L' and RACCT >='1001000000' and RACCT <='1012999999' and gjahr >= @l_year_low and gjahr <= @l_year_high " and gjahr in @p_gjahr " and SUBSTRING( BUDAT , 1, 6 ) in @p_FISC " " ...
DATA mytable TYPE z_table,”数据字典表类型,声明内表. myline TYPE LINE OF z_table.”表类型的行结构,声明结构体. 3. 取系统日期:SY-DATUM, 4. 取系统时间:SY-UZEIT.0 5. 系统字段定位:SY-FDPOS.字符比较结果为真时,此字段将给出偏移量信息. ...
PERFORM show_item_sum USING l_temp2-zcashcode . ELSE . MESSAGE '该行没有科目明细' TYPE 'I' . ENDIF . endcase . 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. ...
SELECTION-SET SELECTION-TABLE SELECT-OPTIONS SEND SEPARATED SET SHARED SHIFT SIGN SIN SINGLE SINGLEDISTINCT SINH SIZE SKIP SORT SORTABLE SPACE SPECIFIED SPLIT SQL SQRT STABLE STAMP STANDARD START STARTING STATICS STEP-LOOP STOP STRLEN STRUCTURE SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUFFIX SUM SUPPLY ...
CDS also provides support for aggregations (SUM, MIN, MAX, AVG, COUNT), SQL functions (LPAD, SUBSTRING, MOD, CEIL, CAST) and CASE statements in view entities. In the above example the view selects the business partners with outstanding sales orders which together (SUM) amount to more than...
FILTER expression) to filter an internal table after some select (e.g. select from BUT000 and the filter the business partner type). However, It would be interesting to find further usage scenarios in which a functional solution offer advantages over the classical one. 3. Future ABAP versions...
after the short dump. In the display, then select the function "System->List->Save->Local File (unconverted)". 3. If the programs are your own programs or modified SAP programs, supply the source code. To do this, select the Editor function "Further Utilities-> ...