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

Problem with ALV

Former Member
0 Likes
2,094

Good mourning, Im using metod ->set_table_for_first_display , but im getting this dump getwa_not_assigned , however first time I ve executed it I got the error: Layout parameter program name is missing, i have been checking all the threads but without succed looking for a solution . I tryed to create a deep structure but it implies big changes in the program ( with several includes ) . any ideas here i have some code.

DATA:  g_cont          TYPE scrfname VALUE 'ALV_GRID',

       alvgrid1        TYPE REF TO cl_gui_alv_grid,
       alvgrid2        TYPE REF TO cl_gui_alv_tree_simple,

       cstcontainer    TYPE REF TO cl_gui_custom_container,

       splitter        TYPE REF TO cl_gui_splitter_container,
       container_1     TYPE REF TO cl_gui_container,
       container_2     TYPE REF TO cl_gui_container,

       field_cat       TYPE lvc_t_fcat,
       gt_sort         TYPE lvc_t_sort,

       variant1        TYPE disvariant,
       variant2        TYPE disvariant,
       save            TYPE char1 VALUE 'A'.

create object alvgrid2
      exporting
        i_parent         = container_2
        i_item_selection = 'X'
        i_no_html_header = 'X'
        i_no_toolbar     = ' '.

    call method alvgrid2->set_table_for_first_display
      exporting
        i_background_id = 'ALV_BACKGROUND'
        i_save          = save
        is_variant      = variant2
     changing
       it_sort         = gt_sort[]
        it_outtab       = i_table[]
        it_fieldcatalog = field_cat.

thank you.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,819

Did you pass the report name in the variant (DISVARIANT structuer) ?

Regards,

Raymond

17 REPLIES 17
Read only

Former Member
0 Likes
1,819

Hi,

Pass variant2-report = sy-repid before calling method set_table_for_first_display

Maybe this will solve your error.

Thanks & Regards,

Anagha Deshmukh

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,820

Did you pass the report name in the variant (DISVARIANT structuer) ?

Regards,

Raymond

Read only

0 Likes
1,819

Yes , I did . any other idea ?

INITIALIZATION.

  syrepid = sy-repid.
  PERFORM check_autorizacao(zuniversovmm) USING 'ZBC_REPORT' syrepid.

  GET PARAMETER ID 'BUK' FIELD s_bukrs-low.
  CHECK NOT s_bukrs-low IS INITIAL.

  SELECT SINGLE waers INTO p_waers
                      FROM t001
                      WHERE bukrs EQ s_bukrs-low.

  variant1-report  = syrepid.
  variant1-variant = '/GERAL'.

  variant2-report  = syrepid.
  variant2-variant = '/GERAL2'.

Read only

0 Likes
1,819

Could you run report BALVBUFDEL and then call again your report ?

Regards,

Raymond

Read only

0 Likes
1,819

Done , but the error still continue : the detail of the dump is :

Err.tmpo.ejec. GETWA_NOT_ASSIGNED

short text

Field symbol has not yet been assigned.

Error in the ABAP Application Program

The current ABAP program "CL_GUI_ALV_TREE_SIMPLE========CP" had to

terminated because it has

come across a statement that unfortunately cannot be executed.

maybe could be more useful .

Read only

0 Likes
1,819

Hi

U should check how your catalog table (field_cat) is filled, probably something is not correct there, something is missing.

Max

Read only

0 Likes
1,819

If you use the same field catalog and sort table in tree than in grid, try to call the grid display and perform the [the Consistency Check|http://help.sap.com/saphelp_sm32/helpdata/EN/d6/23253963143e6ae10000000a11402f/frameset.htm] of your ALV, even if the display is fine (use shift+double click right on a free surface of the ALV)

Regards,

Raymond

Read only

0 Likes
1,819

Hi Max,

Im doing that this way ,

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
         EXPORTING
              i_structure_name = 'ZPIGCU'
         CHANGING
              ct_fieldcat      = field_cat.

where ZPIGCU is a structure, what did i miss ? any idea ? , thank you.

Read only

0 Likes
1,819

Hi

i_table is like ZPIGCU? IF it's so how do you fill the sort table?

Max

Read only

0 Likes
1,819

Yes,

i_table    LIKE zpigcu  OCCURS 0 WITH HEADER LINE,

I use the method twice to split the ALV

MODULE display_output OUTPUT.

  IF cstcontainer IS INITIAL.

    CREATE OBJECT cstcontainer
           EXPORTING container_name = g_cont.

* Divide em dois
    CREATE OBJECT splitter
              EXPORTING parent = cstcontainer
                        rows    = 2
                        columns = 1.

    CALL METHOD splitter->get_container
                      EXPORTING row      = 1
                                column   = 1
                      RECEIVING container = container_1.

    CALL METHOD splitter->get_container
                  EXPORTING row      = 2
                            column   = 1
                  RECEIVING container = container_2.

    CREATE OBJECT alvgrid1
           EXPORTING i_parent = container_1.

    CALL METHOD alvgrid1->set_table_for_first_display
         EXPORTING i_structure_name = 'ZPIGCU'
                   is_variant       = variant1
                   i_save           = save
         CHANGING  it_outtab        = i_table[].

    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_double_click FOR alvgrid1.

    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
         EXPORTING
              i_structure_name = 'ZPIGCU'
         CHANGING
              ct_fieldcat      = field_cat.


    CREATE OBJECT alvgrid2
           EXPORTING
               i_parent              = container_2
               i_item_selection      = 'X'
               i_no_html_header      = 'X'
               i_no_toolbar          = ' '.

    CALL METHOD alvgrid2->set_table_for_first_display
            EXPORTING
                 i_background_id      = 'ALV_BACKGROUND'
                 i_save               = save
                 is_variant           = variant2
            CHANGING
                 it_sort              = gt_sort[]
                 it_outtab            = i_table[]
                 it_fieldcatalog      = field_cat.


  ENDIF.

ENDMODULE.

Read only

0 Likes
1,819

Don't you fill internal table gt_sort?

Read only

0 Likes
1,819

No , is empty.

Read only

0 Likes
1,819

How should I fill this table.

Read only

0 Likes
1,819

Hi

No, if the sort table is empty it shouldn't be the problem, anyway delete it if you don't use it.

U should write a new program in order to call the two grid separatly, in this way u can understand in which grid the problem is

Max

Read only

0 Likes
1,819

Have a quick look on SAP NOTE based on your SAP version.

thanq

Read only

0 Likes
1,819

Keep it simple this way and try


call method alvgrid2->set_table_for_first_display
      exporting
        i_save          = save
        is_variant      = variant2
     changing
        it_outtab       = i_table[]
        it_fieldcatalog = field_cat.

a®

Read only

guilherme_frisoni
Contributor
0 Likes
1,819

Hi,

I usually get getwa_not_assigned dump when some SORT field is wrong.

In dump screen, enter in debug mode and check what was assinged before dump occurs.

Maybe you can find the missing (or wrong) field.

Frisoni