‎2006 Jul 21 10:15 AM
Hi all,
I am getting confused that how to validate the Sales Order fields data which are stored in flat file from client side and equal to sap table data.
how to compare and validate the fields & data.
i am new to this.
anyone can u Please send me coding.
Thanks in advance
Venkat
‎2006 Jul 21 10:18 AM
Upload that file into SAP with FM 'GUI_UPLOAD' (to internal table) Than compare that internal table with sap table.
BR, JAcek
‎2006 Jul 21 10:20 AM
Hello Venkat,
Upload the Flat file data to an internal table Itab.
LOOP AT ITAB.
select single * from vbak where vbeln = itab-vbeln.
if sy-subrc NE 0.
ERROR MESSAGE.
ENDIF.
ENDLOOP.
Reward if helps.
Vasanth
‎2006 Jul 21 10:21 AM
Hi Venkat -
1. Map the flay file fields to SAP fields.
2. Find the check table for the SAP fields (for sales order u can check with VBAK table....there check the data elemnts of fields and check tables.....u will know which table to use for validation)
3. Once u find the check table, pass the field value n check if the value is present in the table (select up2 1 rows or sleect single).
-Aarthi.
‎2006 Jul 21 10:24 AM
hi Venkat,
first using GUI_UPLOAD store the data in internal table
then loop at internal table and validate each field against the check table of that field
loop at itab.
select single field from checktable where field = itab-field.
if sy-subrc eq 0.
field correct.
endif.
endloop.
‎2007 Mar 22 5:14 PM
Upload that file into SAP with 'GUI_UPLOAD' (to internal table).
Find the check table for the SAP fields (for sales order u can check with VBAK table....there check the data elemnts of fields and check tables.....u will know which table to use for validation).
Than compare that internal table with sap table.
Example:
loop at itab.
select single field from checktable where field = itab-field.
if sy-subrc eq 0.
Message i000(su) with ' information exist in the checktable '.
else.
Message e000(su) with ' information no exist in the checktable '.
endif.
endloop.