cancel
Showing results for 
Search instead for 
Did you mean: 

Using function parameters from SAP FrontEnd

Former Member
0 Kudos

Dear all,

To test and compare the results of a BAPI call, I use SAP FrontEnd, go to the BAPI list ("bapi" transaction), select an object and its method, then go to Tools / Function Builder / Single Test, enter needed parameter values, and Execute. This allows me to see what the function returns with given input values.

I do not fill all of the parameters, though, only the ones I need to get results from the BAPI.

Now I have the following problem - when I pass the same values (the ones I type into the Single Test) to the methods in SAP .NET Connector proxy, for some BAPI's I don't get expected response - all returned values are empty, just as if the call didn't work.

It looks like some of the values are passed by FrontEnd even if nothing is types into them. Are there some general guidelines as to which ones need to be filled?

One thing I noticed is that if I pass "null" instead of SAPTable parameters, I get empty results as well - so I need to at least construct these tables (using "new <TableTypeName>" in C#) before passing to the BAPI call. Are there more unspoken conventions like this one?

I have seen this on ProdProcessModelAPS.GetList even with SAP .NET Connector v1.2, and now also see the same with ResourceAPS.GetList call. There may be more such occurances, yet I need to deal with at least these ones.

I would really appreciate any help or pointers to debugging methods to resolve this. Thank you in advance!

Regards,

Anton Maslo

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

> Now I have the following problem - when I pass the

> same values (the ones I type into the Single Test) to

> the methods in SAP .NET Connector proxy, for some

> BAPI's I don't get expected response - all returned

> values are empty, just as if the call didn't work.

The test UI has some builtin magic to format all parameters correctly as need by the function. E.g. some number string fields need to be filled up with "0"s, date format must be correct and so on. SAP .NET Connector doesn't do this magic.

There is some thready here in the forum that deal with this.

> One thing I noticed is that if I pass "null" instead

> of SAPTable parameters, I get empty results as well -

> so I need to at least construct these tables (using

> "new <TableTypeName>" in C#) before passing to the

> BAPI call. Are there more unspoken conventions like

> this one?

This is a documented convention (don't ask me where exactly, but it's there). The fact that tables are transfered as REF is to be compatible with MS Soap client. To make databinding easy, we use the same table object for input and output (this is in contrast to the Soap client). Therefore we need a valid table object to be handed over, else we ignore the table.

> I have seen this on ProdProcessModelAPS.GetList even

> with SAP .NET Connector v1.2, and now also see the

> same with ResourceAPS.GetList call. There may be more

> such occurances, yet I need to deal with at least

> these ones.

???

Former Member
0 Kudos

Reiner,

Thank you for the reply.

> There is some thread here in the forum that deal with this.

Can you please point me to this thread? And may be there is a complete description of formatting that needs to be done in order to pass data to SAP? It would be really appreciated.

reiner_hille-doering
Active Contributor
0 Kudos

> > There is some thread here in the forum that deal

> with this.

>

> Can you please point me to this thread? And may be

E.g. this one: