you have to assign the field as well to another field symbol: DATA : <fs_field> TYPE ANY. loop at <fs_alv_histd> assigning <fs_wa>. ASSIGN COMPONENT 'OIL_DISP' OF STRUCTURE <fs_wa> TO <fs_field>. if <fs_field> = 0 . ==> code for delete ... hope this helps ec Reply...
a selection field . my problem is to loop through field-symbol and convert a structure to string value so that I can write to the file. REPORT zlab_tbl_export. DATA table_name(30) VALUE 'ZSMARTTS_HTML'. DATA v_file(100) VALUE 'c:\sap_export.txt'. DATA line(1000). DATA: o_...
LOOP AT gt_itab ASSIGNING FIELD-SYMBOL(<ls_savepo>) WHERE chk = 'X' AND hh_mark_son <> 'X' GROUP BY ( lifnr = <ls_savepo>-lifnr werks = <ls_savepo>-werks zzvmi_type = <ls_savepo>-zzvmi_type lgort = <ls_savepo>-lgort zzbond = <ls_savepo>-zzbond umson = <ls_sav...
) = order->get_items( ).loopatitems assigningfield-symbol(<item>). item = <item>...( ).loopatschedule_lines assigningfield-symbol(<schline>). schedule = <schline> 2020-09-01 ABAP基本语法1.ABAP程序是由若干单独语句组成的2.每个语句用句点结束 3.语句的第一个单词,一般为关键字 4.语句与...
size=GROUPSIZE"分组组数--index =GROUPINDEX )"分组的组序号ASCENDING ASSIGNINGFIELD-SYMBOL(<组>).LOOPATGROUP<组> ASSIGNINGFIELD-SYMBOL(<指针>)."对指针进行操作,和普通的loop循环相似ENDLOOP.ENDLOOP. 2.简而言之:就是第一个loop循环是把内表进行分组,第二loop循环是把组里的数据循环读出来进行修改判断等...
loop at lt_data into wa_data. read table lt_result assigning field-symbol(<wa_result>) with table key blart = wa_data-blart. if sy-subrc is initial. add wa_data-hsl to <wa_result>-hsl. else. insert wa_data into table lt_result. endif. endloop. or types: begin of ty_data,...
LOOP AT GROUP <key1> ASSIGNING FIELD-SYMBOL(<key1_member>). APPEND <key1_member> TO lt_table_tmp. "处理单行数据 ENDLOOP. cl_demo_output=>display( lt_table_tmp ). "处理组数据 CLEAR lt_table_tmp. ENDLOOP. "方法二 LOOP AT lt_table INTO wa_table GROUP BY ( key1 = wa_table-car...
LOOP AT itab ASSIGNING FIELD-SYMBOL(<wa>) GROUP BY ( key1 = <wa>-key1 key2 = <wa>-key2 ) WITHOUT MEMBERS REFERENCE INTO DATA(group_key). cl_demo_output=>write( group_key->* ). ENDLOOP. cl_demo_output=>display( ).
引用字段符号:在内表的处理过程中,可以使用ASSIGNING FIELD-SYMBOL语句将当前行的字段赋值给一个字段符号,以便对当前行进行操作。 使用聚合函数:在每个组中进行处理时,可以使用各种聚合函数,如SUM、COUNT、AVG等,对每个组的数据进行计算。 循环处理结果:通过LOOP AT语句的循环处理,可以将每个组的数据存储到其他内部表...
LOOP AT itab FROM idx ASSIGNING FIELD-SYMBOL(<fs>). ... ENDLOOP. Addition 3 StaticWHEREcondition. All rows are processed for which the condition afterWHEREis met. If a staticWHEREcondition is specified, the row type of the internal table must be statically identifiable.WHEREcan be specified...