on 09-02-2005 7:45 AM
Hi Sig,
I need your help...
My problems are :
1. Do you know how to get Customer data from SAP ?
Because when I tried to get the data, the error shows 'DATA_BUFFER_EXCEEDED'.
2. How to get data in a certain fields ?
I don't know the function and the statement how to use it.
Thank for your answer about how to use the components of Delphi 5.
Thank You
SAP has dropped support with those Active-X components, some time ago. Also those don´t come with rather poor documentation. I my current solutions I hvae migrated away from those and switched to the native onse from Gs-Soft.
1. I don't know this error, but it could relate to datatype translation from sap to delphi, try using a variant datatype in Delphi
2. Here is a code to get at certain fields
-
-
procedure ReadTable;
var
r, y, iTeljari : integer;
Table : Variant;
begin
Table := MySapRfcObject.Tables.Item('XHRSTM');
//sap Table Struct
//Grid is a TStringGrid component
Grid.RowCount := Table.RowCount + 1;
Grid.ColCount := Table.Columns.Count + 1;
//fill in header row
iTeljari := 0;
Grid.Cells[0,0] := 'Line no.';
Grid.Cells[1,0] := 'Field 1.';
Grid.Cells[2,0] := 'Field 2.';
Grid.Cells[3,0] := 'Field 3.';
Grid.Cells[4,0] := 'Field 4.';
Grid.Cells[5,0] := 'Field 5.';
Grid.Cells[6,0] := 'Field 6.';
Grid.Cells[7,0] := 'Field 7.';
//fill in table
for r := 1 to grid.rowCount -1 do begin
Inc(iTeljari);
Grid.Cells[0,r] := IntToStr(iTeljari);
for y := 1 to grid.ColCount -1 do begin
Grid.Cells[y,r] := Table.Value(r,y);
end;
end;
end;
-
-
Ps. If you want more code e-mail my directy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.