Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

A question about write BAPI with delphi~

Former Member
0 Likes
419

Dear gulus:

I have declare a function in SAP, the function have a import parameters:P_MATNR, and the P_MATNR's type is MATNR,

when i call the function in delphi,

and export the parameters like following code:

Funct.exports('P_MATNR'):= 'ABS00221+GPG00103' ,

when i run the code, it show an error and say "Type is not match."类型不匹配。

why? who can help me ? thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
361

P_MATNR's type is MATNR,

you can not pass value as Funct.exports('P_MATNR'):= 'ABS00221+GPG00103' ,

because of that it show an error and say "Type is not match."类型不匹配。

This is because of type mismatch, we need to pass same value as the type declare

Here you need to pass value as CHAR18 only and you are passing more than that value so you are getting error.

Simple thing you can do goto SE11 check in MARA table for value of MATNR

and then pass the same value to P_MATNR.

Hope this will work out.

Minal

1 REPLY 1
Read only

Former Member
0 Likes
362

P_MATNR's type is MATNR,

you can not pass value as Funct.exports('P_MATNR'):= 'ABS00221+GPG00103' ,

because of that it show an error and say "Type is not match."类型不匹配。

This is because of type mismatch, we need to pass same value as the type declare

Here you need to pass value as CHAR18 only and you are passing more than that value so you are getting error.

Simple thing you can do goto SE11 check in MARA table for value of MATNR

and then pass the same value to P_MATNR.

Hope this will work out.

Minal