‎2009 Jul 16 12:08 PM
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.
‎2009 Jul 16 12:15 PM
‎2009 Jul 16 12:15 PM
Hi,
Pass variant2-report = sy-repid before calling method set_table_for_first_display
Maybe this will solve your error.
Thanks & Regards,
Anagha Deshmukh
‎2009 Jul 16 12:15 PM
‎2009 Jul 16 1:00 PM
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'.
‎2009 Jul 16 1:41 PM
‎2009 Jul 16 2:08 PM
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 .
‎2009 Jul 16 2:15 PM
Hi
U should check how your catalog table (field_cat) is filled, probably something is not correct there, something is missing.
Max
‎2009 Jul 16 2:23 PM
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
‎2009 Jul 16 2:23 PM
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.
‎2009 Jul 16 2:25 PM
Hi
i_table is like ZPIGCU? IF it's so how do you fill the sort table?
Max
‎2009 Jul 16 2:42 PM
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.
‎2009 Jul 16 2:45 PM
‎2009 Jul 16 2:47 PM
‎2009 Jul 16 2:53 PM
‎2009 Jul 16 3:03 PM
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
‎2009 Jul 16 3:08 PM
Have a quick look on SAP NOTE based on your SAP version.
thanq
‎2009 Jul 16 3:09 PM
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®
‎2009 Jul 16 2:49 PM
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