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

ALV BLOCK LIST Dump

Former Member
0 Likes
2,163

Hello All,

I'm using the FM REUSE_ALV_BLOCK_LIST_DISPLAY.

I'm getting the Output from the Block List FMs as intended.

But when I'm performing any action on user-command the program is going for a dump saying :


Field symbol has not yet been assigned.

You attempted to access an unassigned field symbol
(data segment 97).

This error may occur for any of the following reasons:
- You address a typed field symbol before it is set using ASSIGN
- You address a field symbol that points to a line in an internal table
  that has been deleted
- You address a field symbol that had previously been reset using
  UNASSIGN, or that pointed to a local field that no longer exists
- You address a global function interface parameter, even
  though the relevant function module is not active,
  that is it is not in the list of active calls. You can get the list
  of active calls from the this short dump.


You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:

------------------------------------------------------------------------
"GETWA_NOT_ASSIGNED" C
"SAPLSALV" or "LSALVF02"
"USER_COMMAND"
------------------------------------------------------------------------

I checked the FM REUSE_ALV_BLOCK_LIST_DISPLAY by passing the INTERFACE_CHECK PARAM as 'X'.

I get an output saying :


 Invalid value SAPLSALV of the parameter I_CALLBACK_PROGRAM

Diagnosis
The I_CALLBACK_PROGRAM parameter contains the ABAP List Viewer program names.

Possible sources oe error:
Assigning I_CALLBACK_PROGRAM = SY-REPID in the ABAP List Viewer call interface.


Procedure
Assign SY-REPID to an auxiliary variable before calling the ABAP List Viewer and pass it in the call interface parameter I_CALLBACK_PROGRAM.

But I'm passing the call_back program param to only one FM


  call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
      i_callback_program       = lv_repid
      i_callback_pf_status_set = 'EVENT_SET_STATUS_01'
      i_callback_user_command  = 'EVENT_USER_COMMAND'.

Can u guys tell me where is the actual problem ?

Regards,

Deepu.K

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,881

You have any includes in your program..

if so use only Main program and pass it to lV_REPID.

LV_REPID = SY-REPID.

"value should be main program name.

" i think it is taking include program.

call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
      i_callback_program       = lv_repid  " this you have to check
      i_callback_pf_status_set = 'EVENT_SET_STATUS_01'
      i_callback_user_command  = 'EVENT_USER_COMMAND'.

17 REPLIES 17
Read only

Former Member
0 Likes
1,881

Hi,

You included the form name 'EVENT_USER_COMMAND'. check are you created the subroutine with the same name which you given in the function module.

Regards,

Boobalan S

Read only

0 Likes
1,881

Hello Boobalan,

I already checked it. I created it correctly .

Any clues ???

Regards,

Deepu.K

Read only

Former Member
0 Likes
1,882

You have any includes in your program..

if so use only Main program and pass it to lV_REPID.

LV_REPID = SY-REPID.

"value should be main program name.

" i think it is taking include program.

call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
      i_callback_program       = lv_repid  " this you have to check
      i_callback_pf_status_set = 'EVENT_SET_STATUS_01'
      i_callback_user_command  = 'EVENT_USER_COMMAND'.

Read only

0 Likes
1,881

Hello Vijay,

I checked even that.

My program is entirely one main program. No sub-programs.

I checked in debugging mode. The value is being passed to the FM correctly.

Any other clues ???

Regards,

Deepu.K

Read only

0 Likes
1,881

Show the code once, if it not too big.

Read only

0 Likes
1,881

Hello Vijay,

Here it is ...........


Data: lv_repid like sy-repid.
lv_repid = sy-repid.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      i_callback_program       = lv_repid
      i_callback_pf_status_set = 'EVENT_SET_STATUS_01'
      i_callback_user_command  = 'EVENT_USER_COMMAND'.

* Fill the Events for the Output Table and the Error Table
  PERFORM fill_events.

* Layout Data for the Output Table : For the Check Box
  gwa_layout-box_fieldname = 'X_BOX'.

* Block for the Output Table
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      is_layout                  = gwa_layout
      it_fieldcat                = gt_fieldcat[]
      i_tabname                  = 'GT_OUTPUT'
      it_events                  = gt_out_events[]
      i_text                     = 'Created Roles'
    TABLES
      t_outtab                   = gt_output
    EXCEPTIONS
      program_error              = 1
      maximum_of_appends_reached = 2
      OTHERS                     = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

* Layout Data for the Error Table
  CLEAR gwa_layout.

* Block for the Error Table
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      is_layout                  = gwa_layout
      it_fieldcat                = gt_err_fcat[]
      i_tabname                  = 'GT_ERR_ROLES'
      it_events                  = gt_err_events[]
      i_text                     = 'Error Roles'
    TABLES
      t_outtab                   = gt_err_roles
    EXCEPTIONS
      program_error              = 1
      maximum_of_appends_reached = 2
      OTHERS                     = 3.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

* Gap
  gs_print-reserve_lines = 2.
  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
      i_interface_check = 'X'
      is_print          = gs_print
    EXCEPTIONS
      program_error     = 1
      OTHERS            = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
* End of 002
***************************************************************************************
*&****************************************************************************
*& Form        : FILL_EVENTS *************************************************
*& Description : Fill the Events table for both the Output Table and the *****
*&               Error Table *************************************************
*&****************************************************************************
FORM fill_events .

* Events For the Output Table
  CLEAR wa_event.
  wa_event-name = slis_ev_top_of_list.
  wa_event-form = 'TOP_OF_OUT_LIST'.
  APPEND wa_event TO gt_out_events.
  CLEAR wa_event.

* Events For the Error Table
  CLEAR wa_event.
  wa_event-name = slis_ev_top_of_list.
  wa_event-form = 'TOP_OF_ERR_LIST'.
  APPEND wa_event TO gt_err_events.
  CLEAR wa_event.

ENDFORM.                    " FILL_EVENTS

Regards,

Deepu.K

Read only

0 Likes
1,881

I suspect the cause is from i_interface_check.

comment that once.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
    "  i_interface_check = 'X'  "<---Remove this dont use this
      is_print          = gs_print
    EXCEPTIONS
      program_error     = 1
      OTHERS            = 2.
  IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

Read only

0 Likes
1,881

Hello Vijay,

Previously I din't use that.

But now, I used that interface check just to check whts the actual problem.

When I'm using that i'm getting an output saying :


        Message

        Invalid value SAPLSALV of the parameter I_CALLBACK_PROGRAM

The Log Text Says :

Diagnosis
The I_CALLBACK_PROGRAM parameter contains the ABAP List Viewer program names.

Possible sources oe error:
Assigning I_CALLBACK_PROGRAM = SY-REPID in the ABAP List Viewer call interface.


Procedure
Assign SY-REPID to an auxiliary variable before calling the ABAP List Viewer and pass it in the call interface parameter I_CALLBACK_PROGRAM.

Any other clues ??

Regards,

Deepu.K

Read only

0 Likes
1,881

SAPLSALV is the statnard program for getting the PF-STATUS ....it should not be there ( go to se41 give the program name SAPLSALV there choose status STANDARD u will get all the pf-status for ALV)

means you need to pass the program name for the SY-REPID.

if you check the interface it will call some other interface program name other than your program name into sy-repid.

normally we couldnt use this...

Read only

0 Likes
1,881

Hello All,

I wrote a small test program reg. my query.

The PF Status has 1 Application Toolbar Button addition. ( copy from SAPLSALV STANDARD MENU)

Now execue the program and press the application toolbar button.

The program is going for a dump.

The test program is :


REPORT ztest_123.

TYPE-POOLS : slis.

TYPES : BEGIN OF ty_tab1,
          xbox(1),
          field1 TYPE char10,
          field2 TYPE char10,
        END OF ty_tab1.

TYPES : BEGIN OF ty_tab2,
          xbox(1),
          field3 TYPE char10,
          field4 TYPE char10,
        END OF ty_tab2.

DATA: gt_tab1 TYPE STANDARD TABLE OF ty_tab1,
      gt_tab2 TYPE STANDARD TABLE OF ty_tab2.

DATA: wa_tab1 TYPE ty_tab1,
      wa_tab2 TYPE ty_tab2.

DATA: fcat1 TYPE slis_t_fieldcat_alv,
      wa_fcat1 LIKE LINE OF fcat1,
      fcat2 TYPE slis_t_fieldcat_alv,
      wa_fcat2 LIKE LINE OF fcat2.

DATA: gs_layout  TYPE                   slis_layout_alv,
      gt_events  TYPE                   slis_t_event.

CLEAR wa_tab1.
wa_tab1-field1 = 'Value1'.
wa_tab1-field2 = 'Value2'.
APPEND wa_tab1 TO gt_tab1.

CLEAR wa_tab1.
wa_tab1-field1 = 'Value3'.
wa_tab1-field2 = 'Value4'.
APPEND wa_tab1 TO gt_tab1.

CLEAR wa_tab2.
wa_tab2-field3 = 'ValueA'.
wa_tab2-field4 = 'ValueB'.
APPEND wa_tab2 TO gt_tab2.

CLEAR wa_tab2.
wa_tab2-field3 = 'ValueC'.
wa_tab2-field4 = 'ValueD'.
APPEND wa_tab2 TO gt_tab2.

* FCAT1
REFRESH fcat1.
CLEAR:   wa_fcat1.
wa_fcat1-fieldname       = 'FIELD1'.
wa_fcat1-tabname         = 'GT_TAB1'.
APPEND wa_fcat1 TO fcat1.

CLEAR:   wa_fcat1.
wa_fcat1-fieldname       = 'FIELD2'.
wa_fcat1-tabname         = 'GT_TAB1'.
APPEND wa_fcat1 TO fcat1.

* FCAT2
REFRESH fcat2.
CLEAR:   wa_fcat2.
wa_fcat2-fieldname       = 'FIELD3'.
wa_fcat2-tabname         = 'GT_TAB1'.
APPEND wa_fcat2 TO fcat2.

CLEAR:   wa_fcat2.
wa_fcat2-fieldname       = 'FIELD4'.
wa_fcat2-tabname         = 'GT_TAB1'.
APPEND wa_fcat2 TO fcat2.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
  EXPORTING
    i_callback_program       = 'ZTEST_123'
    i_callback_pf_status_set = 'ZPFSTAT'
    i_callback_user_command  = 'UCOMM'.

IF gt_tab1[] IS NOT INITIAL.
  gs_layout-box_fieldname = 'XBOX'.
ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    is_layout   = gs_layout
    it_fieldcat = fcat1
    i_tabname   = 'GT_TAB1'
    it_events   = gt_events[]
    i_text      = 'Created Roles'
  TABLES
    t_outtab    = gt_tab1.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    is_layout   = gs_layout
    it_fieldcat = fcat2
    i_tabname   = 'GT_TAB2'
    it_events   = gt_events[]
    i_text      = 'Created Roles'
  TABLES
    t_outtab    = gt_tab2.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
  EXPORTING
    i_interface_check = ''.

*&---------------------------------------------------------------------*
*&      Form  zpfstat
*&---------------------------------------------------------------------*

FORM zpfstat USING  lt_excl  TYPE  slis_t_extab.

  SET PF-STATUS 'STANDARD'.
ENDFORM.                    "zpfstat

*&---------------------------------------------------------------------*
*&      Form  ucomm
*&---------------------------------------------------------------------*

FORM   ucomm  USING  if_ucomm      TYPE  sy-ucomm
                     is_selfield   TYPE  slis_selfield.

  if_ucomm = sy-ucomm.

  CASE if_ucomm.
    WHEN OTHERS.
  ENDCASE.

ENDFORM.                    "ucomm

Can u guys tell me now where is the actual problem ?

Regards,

Deepu.K

Read only

0 Likes
1,881

Hi

The problem is on the way u're using to define the internal tables to be dispalyed: they have to have the header line, so try to use this defination:

DATA: GT_TAB1 TYPE STANDARD TABLE OF TY_TAB1 WITH HEADER LINE,
      GT_TAB2 TYPE STANDARD TABLE OF TY_TAB2 WITH HEADER LINE.

Max

Read only

0 Likes
1,881

Hello Max,

Again you came for MY RESCUE !

You are invincible.

I implemented ur code and it's working perfectly.

But I din't understand the actual problem Max.

How does it make a difference if I pass the Table to the FM with header line or Without header line ?

Request you to clarify !

Regards,

Deepu.K

Read only

0 Likes
1,881

hi it is working fine..

the output was like this..

Value1 Value2

Value3 Value4

ValueA ValueB

ValueC ValueD

Read only

0 Likes
1,881

Hi

The problem is when the fm REUSE_ALV_BLOCK_LIST_APPEND is called: here the ALV function assign the data and the header line of every table is transfered (max 19 tables can be displayed at the same list):

FUNCTION REUSE_ALV_BLOCK_LIST_APPEND.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"       IMPORTING
*"             VALUE(IS_LAYOUT) TYPE  SLIS_LAYOUT_ALV

.....................................................................................

  CASE GS_STATUS-COUNTER_OF_LISTS_ADDED.
    WHEN 1.
      ASSIGN T_OUTTAB[] TO <HEADER_TABLE01>.
      ASSIGN T_OUTTAB   TO <HEADER_TABLE01_WA>.
    WHEN 2.
      ASSIGN T_OUTTAB[] TO <HEADER_TABLE02>.
      ASSIGN T_OUTTAB   TO <HEADER_TABLE02_WA>.
.....................................................................................

Now if u use an internal table defination without headerline the command like "ASSIGN T_OUTTAB TO <HEADER_TABLE01_WA>" fails, so the field-symbols like <HEADER_TABLE01_WA> is not assigned.

So after displaying the list if you press a command of toolbar, the system trigger the standard routine for user comand defined in the include LSALVF02:

*---------------------------------------------------------------------*
*       FORM USER_COMMAND                                             *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
*  -->  R_UCOMM                                                       *
*  <->  RS_SELFIELD                                                   *
*---------------------------------------------------------------------*
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                        RS_SELFIELD TYPE SLIS_SELFIELD.     "#EC CALLED
.........................................................................................

  IF GS_STATUS-FLG_CHECKBOXES_ACTIVE = 'X'.
*
    CALL FUNCTION 'K_KKB_MARK_INFO_GET'
         IMPORTING
              ET_ROWMARK = LT_ROWMARK.
    DO GS_STATUS-COUNTER_OF_LISTS_ADDED TIMES.
      L_INDEX = SY-INDEX.
      READ TABLE GT_STACK INDEX L_INDEX.
      IF SY-SUBRC NE 0. MESSAGE X000(0K). ENDIF.
*
      CASE L_INDEX.
        WHEN 1.
          IF GT_STACK-ITEM_TABNAME IS INITIAL.
            ASSIGN GT_DUMMY[] TO <ITEM_TABLE01>.
            ASSIGN GT_DUMMY   TO <ITEM_TABLE01_WA>.
          ENDIF.
          PERFORM E10_CHECKBOX_FILL
                      TABLES
                        <HEADER_TABLE01>
                        <ITEM_TABLE01>
                      USING
                         GT_STACK
                         LT_ROWMARK[]
                         <HEADER_TABLE01_WA>
                         <ITEM_TABLE01_WA>. 
.........................................................................................

So as soon as the system call the routine E10_CHECKBOX_FILL a dump occurs as just the field-symbols <ITEM_TABLE01_WA> is not assigned.

Max

Read only

0 Likes
1,881

Hello Max,

Yes, U r absolutely right.

Earlier when I debugged the FM I didn't bother about this header line point at all.

Thanks for the clarification Max.

SDN is blessed with the guys like you !

Thanks and Regards,

Deepu.K

Read only

Former Member
0 Likes
1,881

Hi Deepu,

If you are getting short dump with 'GETWA NOT ASSIGNED' title, report this problem to SAP as this is standard error / short dump.

Thanks

Read only

asik_shameem
Active Contributor
0 Likes
1,881

Hi,

This is because of the field catalog I believe. Make sure you used upper case in the field catalog field names. If you still facing the same problem, just post yer code.