Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
hi all i read this question: http://sap.ittoolbox.com/groups/technical-functional/sap-dev/clear-rfc-tables-when-using-rfc_read_table-in-a-loop-2614239 but not answer for me. my question is: i have a problem: How to Clear RFC Tables when using RFC_READ_TABLE in a loop i use the ActiveX Sap components. FunctDetail : VARIANT ; SAPFunctions2: TSAPFunctions; SapFunctions2.Connection:=Connection; SapFunctions2.Removeall; FunctDetail := SAPFunctions2.add('RFC_READ_TABLE'); var i:integer for i:=0 to 50 do begin FunctDetail.exports('QUERY_TABLE').value := 'LFA1'; FunctDetail.Tables.Item('FIELDS').AppendRow.Value( 'FIELDNAME'):='LIFNR'; FunctDetail.Tables.Item('FIELDS').AppendRow.Value( 'FIELDNAME'):='NAME1'; FunctDetail.Tables.Item( 'OPTIONS' ).AppendRow.Value( 'TEXT' ) := 'LIFNR = '''+Ng1.Cellhttp://wc1LIFNR,Ng1.RowCount-1.asstring+''''; end; my problem is how to clear the Table Items, the first time work, but in the next loop (when i=1) say a error. SYSTEM_FAILURE and then other error: "No connection to SAP System Available" i think, for fix the problem, each time clear the Table.Items (or reuse the items) i try for delte the items: FunctDetail.Tables.Item(1).Delete; or FunctDetail.Tables.Item(1).Remove; also i try: FunctDetail.Parameter[ 'OPTIONS' ].Value := 'LIFNR = '''+Ng1.Cell[wc1LIFNR,Ng1.RowCount-1].asstring+''''; but get these error: "Method 'Parameter' not supported by automation object" and not work. Thanks | __.____._ Copyright © 2011 Toolbox.com and message author. Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251 | | Popular White Papers In the Spotlight _.____.__ |