on 03-23-2007 2:07 AM
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!
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.