Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

need to validate on header main and header detail.

File is in application server. i read the file from it by:

OPEN DATASET p_file FOR INPUT IN TEXT MODE.

IF sy-subrc NE 0.

MESSAGE e999(za) WITH 'Error opening file' p_file.

ENDIF.

DO.

*Reads each line of file individually

READ DATASET p_file INTO v_file.

if sy-subrc = 0.

append v_file.

clear v_file.

else.

exit.

ENDDO.

close dataset p_file.

and the file format is:

Header main

Header detail

detail rec 1

detail rec 2

detail rec 3

detail rec 4

.........

Header detail1

detail rec 1

detail rec 2

detail rec 3

detail rec 4

................

Header detail2

detail rec 1

detail rec 2

detail rec 3

detail rec 4

................

I need to validate on header main and header detail.

can anyone suggest?

Tags:
Not what you were looking for? View more on this topic or Ask a question