on 09-15-2008 7:39 PM
I have a file, I need to read from unix and need to validate on header data, first header and update the ztable.
Can anyone suggest me?
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
For this issue you have to take the help of ABAP. Following are the steps :
1) In ABAP program uplaod the file in internal tables.
2) Identify the fields in the header table on which you want to apply validation and then apply the validation.
3) Then subsequently cleanse the data in the required format.
4) Go for your final functionality by using BDC, IDOc or BAPI.
Thanks.
Lalit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.