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

regarding error message

Former Member
0 Likes
529

Hi,

METHOD handle_user_command.

IF e_ucomm = 'BOOKINGS'.

CALL METHOD r_grid->get_selected_rows

IMPORTING

et_index_rows = rownum

et_row_no = rowid.

READ TABLE rownum INTO gw_row INDEX 1.

READ TABLE gt_vbak INTO gw_vbak INDEX gw_row-index.

IF sy-subrc EQ 0.

MESSAGE e001(zmsg).

ENDIF.

ENDIF.

ENDMETHOD. "handle_user_command

ENDCLASS.

if i select one record from output and hit the pushbutton insert i ll get an error message saying that invalid record and after that if i select the some other record and hit the pushbutton insert the control is going to sap initial screen without giving error message.....why is this happening and what should i do to get the same error message for every record......

Edited by: NEED HELP on Feb 5, 2009 12:41 PM

3 REPLIES 3
Read only

Former Member
0 Likes
509

hi,

Pls tell what you are trying to do?

If im getting right, you want to give that invalid message in case you dont find any record in gt_vbak corresponding to your condition. Is it?

You can try to debug your code to get the problem.

Or explain it more clearly.

Regards

Natasha Garg

Read only

0 Likes
509

hi,

here what i m doing is i m selecting one record and i m clicking on push button so that for the first time i m getting that message displayed at the bottom.....if i select another record and click on pushbutton it is not giving any error message........and the control is going to sap initial sap screen......i hav to get that error message for each record after selecting the record and hitting the pushbutton......

Read only

Former Member
0 Likes
509

Hi

Some Times the user command will give some problems.so try clearing the field.

METHOD handle_user_command.

IF e_ucomm = 'BOOKINGS'.

CALL METHOD r_grid->get_selected_rows

IMPORTING

et_index_rows = rownum

et_row_no = rowid.

READ TABLE rownum INTO gw_row INDEX 1.

READ TABLE gt_vbak INTO gw_vbak INDEX gw_row-index.

IF sy-subrc EQ 0.

MESSAGE e001(zmsg).

ENDIF.

clear e_ucomm.

ENDIF.

ENDMETHOD. "handle_user_command

ENDCLASS.

Thanks,

Nithya.