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

Finding an Current line in Module pool

divsmart
Participant
0 Likes
1,123

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.
2 REPLIES 2
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,048

I don't get the question. Is it about Table Control or about Excel?

Read only

divsmart
Participant
0 Likes
1,048

Issue done

Closing the thread .