‎2009 Feb 05 11:38 AM
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
‎2009 Feb 05 11:45 AM
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
‎2009 Feb 05 11:55 AM
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......
‎2009 Feb 05 11:47 AM
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.