Hi experts,
this is my code during running it display problem like "field ENDIF is unknown it is neither in one of the specified tables nor defined by a DATA statement.
PLEASE GUIDE ME.
----
Form process_data
----
Processing output data
----
form process_data .
Get AUFSD value from ZVARV
perform zvarv_read.
loop at i_knb1.
read table i_kna1 with key kunnr = i_knb1-kunnr.
if sy-subrc ne 0.
concatenate: 'in kna1 no record found for Customer number'
i_knb1-kunnr
into v_result separated by space.
move v_result to i_error_log-message.
append i_error_log.
clear i_error_log.
v_count = v_count + 1.
else.
Move the kna1 data to output
move : i_kna1-name1 to i_output-custname,
i_kna1-stras to i_output-custaddress,
i_kna1-ort01 to i_output-custcity,
i_kna1-stcd1 to i_output-taxid,
i_kna1-pstlz to i_output-postalcode,
endif.
read table i_knvp with key kunnr eq i_knb1-kunnr.
if sy-subrc ne 0.
concatenate : 'in knvp no record found for customer number'
v_knb1-kunnr
into v_result1 separated by space.
move v_result1 to v_error_log-message.
append v_error_log to i_error_log.
v_count1 = v_count1 + 1.
else.
loop at i_knvp where kunnr eq knb1-kunnr.
Move the knvp data to output
move : i_knvp-kunnr to i_output-soldtocust,
i_knvp-kunn2 to i_output-payer,
end loop.
endif.
v_sequence = v_sequence + 1.
Move non table related data to output
move : 'C' to i_output-recordtype,
v_sequence to i_output-sequence,
'1' to i_output-branch,
'ABC' to i_output-delivery.
append i_output.
insert v_output into table i_output.
*
clear : v_knb1,
v_kna1,
v_knvp,
v_output.
clear : i_output.
endloop.
endform. " process_data
Thanks,
venkat