Application Development 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: 

ALV Grid Toolbar not working

Former Member
0 Kudos

Hello Friends,

Iam working on ALV.

I think the default icons which are provided for ALV should work automatically, but they are not working. Do I need to code anything for that or by default these standard icons should work? I used set_table_for_first_display to display the ALV Grid. For this I passed the field catalog, output table and the sort table.

I looked into the Forum for relavant topic. But I could find only how to exclude the toolbar or how to make the customized icons work but I didnt find how the standard icons should be handled.

I appreciate your responses.

Regards,

Raju.

4 REPLIES 4

Former Member
0 Kudos

THE STANDARD FUNCTIONS SHOULD WORK NORMALLY..

COULD U PLEASE POST UR CODE ALSO..

Message was edited by: Simy Abraham

0 Kudos

SO U R USING ALV GRID CONTROL ..

COULD U PLEASE SEND UR SAMPLE CODE..

ARE U ADDING ANY NEW BUTTONS OR ANYTHING TO UR TOOLBAR..

0 Kudos

<b>CALL METHOD gc_alv_mm_mrn_min->set_table_for_first_display

EXPORTING i_structure_name = 'ZPOSTAB'

i_buffer_active = 'X'

  • is_layout = gs_layout_mm_mrn_min

  • it_toolbar_excluding = gt_toolbar

CHANGING it_outtab = gt_postab_menge[]

it_fieldcatalog = gt_fieldcatalog[]

it_sort = gt_sort[].</b>

No Iam not addding new buttons to the toolbar. Iam filling my catalog

CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'

EXPORTING

i_structure_name = 'ZPOSTAB'

CHANGING

ct_fieldcat = gt_fieldcatalog[].

  • change fieldcatalog

DATA: ls_fieldcatalog TYPE lvc_s_fcat.

LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.

IF ls_fieldcatalog-fieldname <> 'MENGE' OR

ls_fieldcatalog-fieldname <> 'MENGE_1' OR

ls_fieldcatalog-fieldname <> 'POSNR' OR

ls_fieldcatalog-fieldname <> 'SNO' OR

ls_fieldcatalog-fieldname <> 'MATNR' OR

ls_fieldcatalog-fieldname <> 'IDNRK' OR

ls_fieldcatalog-fieldname <> 'TEXT' OR

ls_fieldcatalog-fieldname <> 'KTEXT'.

ls_fieldcatalog-no_out = 'X'.

ELSE.

ls_fieldcatalog-no_out = ' '.

ENDIF.

MODIFY gt_fieldcatalog FROM ls_fieldcatalog.

ENDLOOP.

  • gt_fieldcatalog-emphasize = 'C000'.

gt_fieldcatalog-fieldname = 'MATNR'.

gt_fieldcatalog-outputlen = 12.

gt_fieldcatalog-scrtext_l = 'Material'.

gt_fieldcatalog-col_pos = '1'.

gt_fieldcatalog-no_merging = ' '.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'SNO'.

gt_fieldcatalog-outputlen = 4.

gt_fieldcatalog-scrtext_l = 'S.No'.

gt_fieldcatalog-col_pos = '2'.

gt_fieldcatalog-fix_column = 'X'.

  • gt_fieldcatalog-NO_SUM = 'X'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'POSNR'.

gt_fieldcatalog-outputlen = 12.

gt_fieldcatalog-scrtext_l = 'Item Cat No'.

gt_fieldcatalog-col_pos = '3'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'IDNRK'.

gt_fieldcatalog-outputlen = 20.

gt_fieldcatalog-scrtext_l = 'Material in BOM'.

gt_fieldcatalog-col_pos = '4'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'KTEXT'.

gt_fieldcatalog-outputlen = 20.

gt_fieldcatalog-scrtext_l = 'Description'.

gt_fieldcatalog-col_pos = '5'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'MENGE'.

gt_fieldcatalog-outputlen = 12.

gt_fieldcatalog-scrtext_l = 'Old Quantity'.

gt_fieldcatalog-col_pos = '6'.

  • gt_fieldcatalog-DO_SUM = 'X'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'MENGE_1'.

gt_fieldcatalog-outputlen = 12.

gt_fieldcatalog-scrtext_l = 'New Quantity'.

gt_fieldcatalog-col_pos = '7'.

  • gt_fieldcatalog-DO_SUM = 'X'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

gt_fieldcatalog-fieldname = 'TEXT'.

gt_fieldcatalog-outputlen = 15.

gt_fieldcatalog-scrtext_l = 'Add/Modify/Delete'.

gt_fieldcatalog-col_pos = '8'.

  • gt_fieldcatalog-no_merging = space.

APPEND gt_fieldcatalog.

And my sort table is

IF NOT gt_postab_menge IS INITIAL.

gt_sort-spos = '1'.

gt_sort-fieldname = 'MATNR'.

gt_sort-up = 'X'.

gt_sort-down = space.

APPEND gt_sort.

ENDIF.

And I fill my output table and pass that to the method set_table_for_first_table.

Do I need to pass the layout for this method?

Message was edited by: Narayana Raju Sampathirao

0 Kudos

I copied ur code and checked..(used scarr table )

Its working perfectly..

and all the stndard functions like sort,choose,print,search,export...all are working fine..

No need of passing any layout information....