Hi Gurus,
I am writing a code which reads Application Log table from SAP and returns records.
The problem is SAP returns 1000s of records and to process my VBA Code quickly I am looking for a technique which will Conditionally Delete this 1000s records.
For Example:
4000 Records returned to SAP Object
Delete Records for which field "TYPE" is Not equal to "E"
This will end up with records only with errors
Any help would be highly appreciated.
My code is as below:
For Each objDatRec In objDatTab.Rows
x_OUT = Split(objDatRec("WA"), "|")
Call BAPI_Read_Appl_Log(x_OUT(0)) '==>>>> Reads Application Log from SAP
For Each objBAPIRec In objLogDatTab.Rows '=>>> Returns 4000 records.
' *******I need to delete all Error records based on condition before further processing
'x_OUT = Split(objBAPIRec("WA"), " ")
If objBAPIRec("TYPE") = "E" Then
colErr = colErr + Chr(10) + objBAPIRec("MESSAGE_V1")
End If
Next
Next
Is there any query sort of thing available through which I can directly delete all records which is of TYPE not equal to "E". This will help me in optimizing Runtime of my program.
Thanx...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks