cancel
Showing results for 
Search instead for 
Did you mean: 

GP Limitations with BAPI

Former Member
0 Kudos

Does anyone know whether GP has any limitations when calling BAPI? We are trying to call the “BAPI_GET_ATTRIBUTES_AT03” in SRM. The call gets completed successfully but no data comes back (if I execute this in SAP GUI, I get data back). We are currently using NW2004s SP09.

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rao,

One limitation due to the Double Stack (conversion of parameters from Java to ABAP): if your BAPI expects something like an integer (value 0034) and that you are calling it from GP, GP passes 34 and not 0034.

The only solution is to pass a String and make sure that the expected syntax (with some '0') is respected.

If you want to simplify your process modeling, you could also use a CAF Core Service to abstract this conversion step.

I would also recommend you to upgrade to SP11 to make sure that your are using the last version (with the last fixes also).

Best regards,

David

Former Member
0 Kudos

Hi,

There should be no limitations. Did you test it with the RFC CO? Did you configure the exception handling? For testing purposes, I wouldn't use at first.

Hope this helps.

Best regards,

David

Former Member
0 Kudos

We used the "External Service" CO under "Service" Category. I tried it with both exception handling and no exception handling. The call completes successfully - but no data comes back.

- Rao

Former Member
0 Kudos

Does the BAPI have input parameters? There are bugs in the callable object in SP9 (and SP10, but there is a patch for 10). It has problems with the error handling due to how it is trying to work with the table structure. So it may look like it is completing successfully but it won't return any values if the input parameters are not correct. We ran across this trying to get customer address details. Be sure to use leading zeros, etc. when providing input values because it will not return an error message that it can't find the record, it just returns no values.

Hope this helps.

-Cindy

Former Member
0 Kudos

Cindy,

Thanks for your response. We built a custom BAPI around this one to simplify the call. Now it takes the user ID as input and returns the company codes assigned to that user. I'm still seeing the call being successfully completed, but no rows come back. Below is the code for the custom BAPI.

DATA: it_attributes TYPE STANDARD TABLE OF bbp_attributes,

fs_attr TYPE bbp_attributes,

w_bukrs TYPE bukrs.

CALL FUNCTION 'BBP_GET_ATTRIBUTES_AT03'

EXPORTING

user_id_p = user_id_p

TABLES

it_attr_p = it_attributes

EXCEPTIONS

user_not_found = 1

orgunit_not_found = 2

object_id_not_found = 3

ambiguous_position = 4

OTHERS = 5.

CASE sy-subrc.

WHEN 0.

LOOP AT it_attributes INTO fs_attr WHERE attr_id = 'BUK'.

APPEND fs_attr TO t_bukrs.

ENDLOOP.

WHEN 1.

RAISE user_not_found.

WHEN OTHERS.

ENDCASE.

Any thoughts on what might be wrong?

Thanks again!

- Rao

Former Member
0 Kudos

Rao,

I'm not an ABAP person, so I can't help you there. I'm assuming you have tested your BAPI directly and it works ok there, just not in GP.

It still might be how GP sends the input value (user id) and what the BAPI is expecting. I'm not sure if you need any leading/trailing spaces or zeros to make it work. Since SP9 had issues with how it handled tables, it might be how the data is returned and GP isn't able to handle it. I can't test this since all of our systems are now on SP11. You might check to see if there is a patch for SP9.

-Cindy

Former Member
0 Kudos

We had a similar problem where it was working for BAPIs that didn't take any input parameter but would fail for the ones that had input parameters (in SP9). We upgraded to SP10 and that fixed it. I'd recommend to upgrade to SP10 or SP11 if possible.

Thanx,

Mahesh