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 in alv ouput

Former Member
0 Likes
644

Dear Freinds,

Iam using ALV grid for my report output and iam getting data perfectly on the alv grid i have one custom button,

when i select one record and clickt the custom button it will go and update table the correspodning data . Now

i wanted to check the data is successful or encountered error (for updaing tabel we have written bdc) ........so all messages

i have collected in one internal table and i wanted to display this in alv ouput ...........so now iam getting problem is

when select the record and click the button on the alv grid iam getting the ALV output but it is geeting displayed on the first

ALV grid only it is not displaying for me on next page...........iam getting dump when iam trying come out saying the ALV overwritten....... please could any one let me how can i display the second alv ( which has only two fields slno and message) on the next page.

regards

divya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
606

Hi Divya,

I hope you are using AT user command.

also use separate fieldcatlog for error record.

and declare another ALV Fm Reuse_alv_grid_display.

You should be able to display it in another alv in the same screen,

and when you will press back button you will be able to return

on main alv.

I hope this will be help ful for you.

Regards,

Vijay

Dear Freinds,

Iam using ALV grid for my report output and iam getting data perfectly on the alv grid i have one custom button,

when i select one record and clickt the custom button it will go and update table the correspodning data . Now

i wanted to check the data is successful or encountered error (for updaing tabel we have written bdc) ........so all messages

i have collected in one internal table and i wanted to display this in alv ouput ...........so now iam getting problem is

when select the record and click the button on the alv grid iam getting the ALV output but it is geeting displayed on the first

ALV grid only it is not displaying for me on next page...........iam getting dump when iam trying come out saying the ALV overwritten....... please could any one let me how can i display the second alv ( which has only two fields slno and message) on the next page.

regards

divya.

3 REPLIES 3
Read only

Former Member
0 Likes
606

i think you need to use intreactive events at lineselection , at user command

if ahcnce show me code

regards

Read only

0 Likes
606

Hi

the first ALV

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = gd_repid

i_callback_pf_status_set = 'PF_STATUS'

i_callback_user_command = 'ALV_USER_COMMAND'

is_layout = l_wa_layout

it_sort = l_i_sort[]

it_fieldcat = it_fieldcat

TABLES

t_outtab = it_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

When i execute this first report this ALV gets triggered iam getting output ............and i can see alll my data getting

displayed with check boxes for all the records . Now if i select a record and click the custom button it is going and updating

the table ..........here i have written bdc and and for the messages i have created one more internal table with two fields

Pernr no and Descirption ..........this iam passiing in to second alv as below.

CLEAR gk_fieldcat.

gk_fieldcat-col_pos = 1.

gk_fieldcat-seltext_m = 'Pernr'.

gk_fieldcat-fieldname = 'PERNR'.

gk_fieldcat-tabname = 'FP_IT_FINAL_0015'.

gk_fieldcat-outputlen = 8.

gk_fieldcat-just = 'C'.

APPEND gk_fieldcat TO gt_fieldcat.

CLEAR gk_fieldcat.

gk_fieldcat-col_pos = 2.

gk_fieldcat-seltext_m = 'Description'.

gk_fieldcat-fieldname = 'STATUS'.

gk_fieldcat-tabname = 'FP_IT_FINAL_0015'.

gk_fieldcat-outputlen = 30.

gk_fieldcat-just = 'C'.

APPEND gk_fieldcat TO gt_fieldcat.

CLEAR gk_fieldcat.

  • refresh it_final.

delete adjacent duplicates from fp_it_final_0015.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = gt_layout

it_fieldcat = gt_fieldcat

i_save = 'X'

TABLES

t_outtab = fp_it_final_0015[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

This ALV output is getting overwritten on that first ALV .....because ican see the First ALV grid data still there only and

iam getting this second alv grid on the first alv grid only .

Please let me know how can i dispaly this second alv in new page.

regards

divya

Read only

Former Member
0 Likes
607

Hi Divya,

I hope you are using AT user command.

also use separate fieldcatlog for error record.

and declare another ALV Fm Reuse_alv_grid_display.

You should be able to display it in another alv in the same screen,

and when you will press back button you will be able to return

on main alv.

I hope this will be help ful for you.

Regards,

Vijay