cancel
Showing results for 
Search instead for 
Did you mean: 

Delphi Programming and SAP - errors

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Sigurdur
Participant
0 Kudos

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

Former Member
0 Kudos

What is your email Sig ?

I can't see in your profile....

Could you email to me your code Delphi at grendah@pertamina.com

Cc: grendah@yahoo.com

Thank you for your attention.

Former Member
0 Kudos

Hi Sig,...I had already been try to get certain field and success..but I have problem " How to get the data with filtering using OPTION ?" I don't know how to use it...

Thanks.

Message was edited by: Grendah Yudha