abap

How to transpose an internal table rows into columns?

99封情书 提交于 2021-01-03 06:57:05
问题 I want to transpose my internal table rows into column and i want to fix the first column,i am trying to do it with the following code but i am not getting the expected result....it is not converting all the rows into columns *Types Declaration Types: BEGIN OF ty_t001w, ekorg TYPE t001w-ekorg, werks TYPE t001w-werks, name1 TYPE t001w-name1, END OF ty_t001w. **Field Symbols Declaration FIELD-SYMBOLS: <fs1> TYPE any, <fs2> TYPE any. **Internal table and work area declaration DATA: it1_col_row

Most efficient itab filtering with ABAP 7.40+ syntax

送分小仙女□ 提交于 2020-12-28 20:53:51
问题 With release 7.40 we have plenty of ways to filter internal table data. For example, one can use such ABAP constructs: FILTER operator DATA(lt_extract) = FILTER #( lt_bseg USING KEY matnr_bwtar WHERE matnr = CONV matnr( SPACE ) AND bwtar = CONV bwtar( SPACE ) ). FOR table iterations with VALUE construction operator DATA(lt_extract) = VALUE tty_bseg( FOR line IN lt_bseg WHERE ( matnr EQ SPACE AND bwtar EQ SPACE ) ( line ) ). Is there any performance gain of one over another and why? Maybe you

Exception CX_SY_REF_IS_INITAL

ε祈祈猫儿з 提交于 2020-12-27 05:28:59
问题 I'm setting up a Method call from a class DATA: r_info TYPE REF TO zcl_sv_job_offline_ctrl. CALL METHOD r_info->create EXPORTING is_data = lr_test_record. And receiving the following errors: CX_SY_REF_IS_INITAL You are trying to access a component with a 'ZERO' object reference (points to nothing). Variable: "R_INFO". Am I missing something? 回答1: Sorry, I don't have the rep to comment just yet... I notice that your class is a Z so I'm wondering if you are trying to create a singleton class.

New ABAP syntax instead of COLLECT

百般思念 提交于 2020-12-12 10:05:32
问题 Currently, I have this coding, and it works perfectly fine: TYPES: BEGIN OF tty_ekpo, ebeln TYPE ebeln, ebelp TYPE ebelp, END OF tty_ekpo. DATA: lt_ekpo TYPE TABLE OF tty_ekpo, ls_ekpo LIKE LINE OF lt_ekpo. LOOP AT gt_lopdata ASSIGNING FIELD-SYMBOL(<fs_collect>). ls_ekpo-ebeln = <fs_collect>-ebeln. ls_ekpo-ebelp = <fs_collect>-ebelp. COLLECT ls_ekpo INTO lt_ekpo. ENDLOOP. I want to do the same with the new syntax, is it possible? If yes, how? 回答1: I use this one: lt_ekpo = VALUE #( FOR GROUPS

New ABAP syntax instead of COLLECT

﹥>﹥吖頭↗ 提交于 2020-12-12 10:04:56
问题 Currently, I have this coding, and it works perfectly fine: TYPES: BEGIN OF tty_ekpo, ebeln TYPE ebeln, ebelp TYPE ebelp, END OF tty_ekpo. DATA: lt_ekpo TYPE TABLE OF tty_ekpo, ls_ekpo LIKE LINE OF lt_ekpo. LOOP AT gt_lopdata ASSIGNING FIELD-SYMBOL(<fs_collect>). ls_ekpo-ebeln = <fs_collect>-ebeln. ls_ekpo-ebelp = <fs_collect>-ebelp. COLLECT ls_ekpo INTO lt_ekpo. ENDLOOP. I want to do the same with the new syntax, is it possible? If yes, how? 回答1: I use this one: lt_ekpo = VALUE #( FOR GROUPS

Read ALV changes after user input?

谁都会走 提交于 2020-12-08 02:22:47
问题 I've got a report which outputs the data of my internal table via an ALV grid. The output itself consists of some information and two check boxes for each row. The user can check these boxes if necessary and now I need to read the table back in order to know what boxes were checked. The corresponding rows will be processed differently afterwards depending on which of the two boxes got checked. I already tried the method get_actual_view , which I don't know how to use correct and the method