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 error in loop

Former Member
0 Likes
1,453

hi,

I have a alv designed in oops,now i have a problem like

loop at itab.

case itab-field.

when '1'.

call method gv_grid->refresh_table_display.

message e000 with 'ERROR'.

endcase.

endloop.

Its displaying the error and alv header but not displaying the grid data.

Please look into this and replay.

Thanks,

Phani.

10 REPLIES 10
Read only

Former Member
0 Likes
1,245

Hi,

Please check if you are refrshing the

internal table ( which contains output data ) after 'FIRST DISPLAY'.

Regards,

Raj

Read only

0 Likes
1,245

Thanks for reply

Based on some condition iam refreshing data and changing some data

so iam refreshing grid display.

and then showing error.

if i remove error message it working fine.

but i need error message also.

Read only

0 Likes
1,245

Hello,

Error message will stop the excution of the program at the point it encounters the error message. Please try to give a information/warning message instead of error.

Hope it helps.

Thanks,

Jayant

Read only

0 Likes
1,245

Hi,

An Error message stops further processing of the code. Read more about error messages thru F1 help.

Meanwhile try this...

Message e000 with 'Error' display like 'S'.

Cheers

Read only

0 Likes
1,245

Try using it in PAI.

If you are not able to display data, you may use popup to display error.

In case of displaying multiple Error line FM like RSDC_SHOW_MESSAGES_POPUP can be useful.

Regards,

Mohaiyuddin

Read only

0 Likes
1,245

sorry iam getting the same error eevn if i write the code in end-of-selection.

and can u please tell me the function module that helps in displaying multiple error mesages at once.

Thanks,

Phani..

Edited by: phanisreedhar lakamsani on Dec 2, 2008 11:08 AM

Read only

0 Likes
1,245

FM is RSDC_SHOW_MESSAGES_POPUP.


DATA : gt_msg_disp TYPE TABLE OF bal_s_msg WITH HEADER LINE,
       gt_msg_user_act TYPE bal_s_excm.

CALL FUNCTION 'RSDC_SHOW_MESSAGES_POPUP'
      EXPORTING
        i_t_msg          = gt_msg_disp[]
        i_txt            = 'Message Log'
        i_one_msg_direct = ' '
      IMPORTING
        e_s_exit_command = gt_msg_user_act.

you can pass msgid, msgno, msgty, msgv1,msgv2, msgv3 and msgv4. Use msgid and msgno which can accept 4 message text i.e. & & & &

Regards,

Mohaiyuddin

Read only

0 Likes
1,245

which sap version version does this FM exsist.

Iam using 4.7 h and i dont find it in.

Thanks,

Phani.

Read only

Former Member
0 Likes
1,245

Error messages should not be used after start-of-selection .. Give I or S for the messages ..

Read only

Former Member
0 Likes
1,245

Hi

I think it's because the error message stop processing: whene error condition is reached, error message is alerted to the user and processing is blocked. Try to substitute message with a popup, or try to change message error type.