Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SLIS_SELFIELD is unknown abap

Former Member
0 Likes
1,955

Hello masters! I am be implement a POPUP that will show a table internal. I try the next example but not works, I am using the BADI ME_PROCESS_PO_CST in the method CHECK

My error: SLIS_SELFIELD is unknown abap.
My code:

method IF_EX_ME_PROCESS_PO_CUST~CHECK .

  TYPES:

  BEGIN OF ty_posic,

    ebelp        TYPE EKPO-EBELP,

    pspnr        TYPE PROJ-PSPNR,

    waers        TYPE EKKO-WAERS,

  END OF ty_posic.

  DATA:

  t_posic        TYPE STANDARD TABLE OF ty_posic,

  t_cols         TYPE STANDARD TABLE OF help_value,

  t_tabix        LIKE sy-tabix.

  DATA: gwa_selfield TYPE slis_selfield.

  DATA:

  wa_cols LIKE LINE OF t_cols,

  wa_posic LIKE LINE OF t_cols.

  IMPORT t_posic = t_posic FROM MEMORY ID 't_posic'.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

  EXPORTING

    i_checkbox_fieldname = 'CHECK'

    i_tabname            = 'GT_SPFLI'  " Internal table name

    i_structure_name     = 'SPFLI'

  IMPORTING

    es_selfield          = gwa_selfield

  TABLES

    t_outtab             = t_posic  " Internal table which contains entries

  EXCEPTIONS

    program_error        = 1

    OTHERS               = 2.

endmethod.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,437

Add:

TYPE-POOLS SLIS.

before defining gwa_selfield.

Rob

Hello masters! I am be implement a POPUP that will show a table internal. I try the next example but not works, I am using the BADI ME_PROCESS_PO_CST in the method CHECK

My error: SLIS_SELFIELD is unknown abap.
My code:

method IF_EX_ME_PROCESS_PO_CUST~CHECK .

  TYPES:

  BEGIN OF ty_posic,

    ebelp        TYPE EKPO-EBELP,

    pspnr        TYPE PROJ-PSPNR,

    waers        TYPE EKKO-WAERS,

  END OF ty_posic.

  DATA:

  t_posic        TYPE STANDARD TABLE OF ty_posic,

  t_cols         TYPE STANDARD TABLE OF help_value,

  t_tabix        LIKE sy-tabix.

  DATA: gwa_selfield TYPE slis_selfield.

  DATA:

  wa_cols LIKE LINE OF t_cols,

  wa_posic LIKE LINE OF t_cols.

  IMPORT t_posic = t_posic FROM MEMORY ID 't_posic'.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

  EXPORTING

    i_checkbox_fieldname = 'CHECK'

    i_tabname            = 'GT_SPFLI'  " Internal table name

    i_structure_name     = 'SPFLI'

  IMPORTING

    es_selfield          = gwa_selfield

  TABLES

    t_outtab             = t_posic  " Internal table which contains entries

  EXCEPTIONS

    program_error        = 1

    OTHERS               = 2.

endmethod.

6 REPLIES 6
Read only

Former Member
0 Likes
1,438

Add:

TYPE-POOLS SLIS.

before defining gwa_selfield.

Rob

Read only

Former Member
0 Likes
1,437

Hi,

Adding to Type-Pools SLIS .I could see below observations

  i_tabname            = 'GT_SPFLI'  " Internal table name

t_outtab             = t_posic  " Internal table which contains entries

structure type of these two internal tables are different. You need to pass same table name here in case if your building the field catalog.

Moreover , i_structure_name     = 'SPFLI'   -->This is referring to SPFL, so ALV will display SPFLI field names and not the fields declared in t_posic .

In this case, structure of t_posic  is declared in the program, you need to build field catalog.


Regards

Pallavi

Read only

0 Likes
1,437

Internal table structure and Structure name what you passed must be the same .

Read only

Chintu6august
Contributor
0 Likes
1,437

This message was moderated.

Read only

0 Likes
1,437

This message was moderated.

Read only

Former Member
0 Likes
1,437

This message was moderated.