Dear gurus
My requirement was to upload excel sheet and update the data in to Z-table .
It is done now. But now , I wanted to show error message if the data is being already there.
Here's the code as-
LOOP AT it_tab INTO wa_tab.
ZEXCEL-EMPNAme = wa_tab-EMPName.
ZEXCEL-Designation = wa_tab-Designation.
ZEXCEL-Salary = wa_tab-Salary.
INSERT ZEXCEL.
if sy-subrc <> 0.
MOVE-CORRESPONDING wa_tab to wa_error. append wa_error to it_error.
clear wa_error.
endif.
clear wa_tab.
ENDLOOP.
if it_error is initial.
message 'all data updated Sucessfully' type 'S'.
else.
loop at it_error into wa_error.
write:/ 'Already Exist',wa_error-EMPName.
endloop.
endif.
output is as -
Can you please modify my code to get my requirement.
help will be appreciated.
Thanks
Regards
Karan