‎2022 Aug 04 11:08 AM
Hi Experts,
I developed an Module screen, where user will upload an excel file.
Here in excel file 'If user inputs an invalid movement type need to thrown an error message .
I have done validate after PAI module. 'But here the issue was i need to show the current line where the invalid movement type'
Below was the 2nd line item error message to be display and if its 4th line item need to show as so on.


MODULE validation INPUT.
DATA: wa_bwart TYPE zcg_t_mvt.
IF git_resb_tc-bwart IS INITIAL.
MESSAGE 'Enter the Movement type' TYPE 'E'.
ENDIF.
LOOP AT git_resb_tc INTO gs_resb_tc.
SELECT SINGLE * FROM zcg_t_mvt INTO wa_bwart WHERE bwart = gs_resb_tc-bwart.
IF sy-subrc <> 0.
PERFORM tc_cur_set.
MESSAGE 'Enter the correct Movement Type' TYPE 'E'.
ENDIF.
ENDLOOP.
ENDMODULE.
FORM tc_cur_set .
GET CURSOR FIELD tc_cur-field
LINE tc_cur-line
AREA tc_cur-area.
ENDFORM.
‎2022 Aug 04 3:32 PM
I don't get the question. Is it about Table Control or about Excel?
‎2022 Aug 05 9:42 AM