on 06-20-2007 3:41 PM
Hello SDN,
I am using the BAPI <b>BAPI_COSTCENTER_GETDETAIL1</b> to get the costcenter detail from SAP. I can execute the BAPI successfuly in R/3. When I call the BAPI from with in my UDF, it returns RETURN segment with Msg status <b>E</b> and the cost center does not exist.
But the BAPI executes sucessuly for the same inputs when I execute the same in SE37.
Am I missing any config in XI?
P.S: I have used the same Communication channel to call RFC sucessfully.
Regards,
Jai Shankar
Jai,
<i>I have used the same Communication channel to call RFC sucessfully.</i>
If you are using the code given in the michals document then it should return the entire table in the form of xml. Then you have to parse the cost center value using User defined functions.
Also what do you see in receiver RFC communication channel (lookup communication channel)?
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shankar,
There seems to be a problem in the format in which you are entering the data.
Make sure what ever you are passing in the IMport Structure is in the same format as the BAPI struc.
Just checked the BAPI..theres a key date field..
hope you are passing the date in the format.
YYYYMMDD
Regards,
Sumit
Message was edited by:
Sumit Khetawat
Bhavesh,
The input XML I am providing is
"<?xml version="1.0" encoding="UTF-8"?>
<ns0:BAPI_COSTCENTER_GETDETAIL1 xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<CONTROLLINGAREA>1000</CONTROLLINGAREA>
<COSTCENTER>100</COSTCENTER>
<COSTCENTERDETAIL></COSTCENTERDETAIL>
</ns0:BAPI_COSTCENTER_GETDETAIL1>"
I got the XML by creating a dummy mapping as explained in Michal's article.
@ Sumit,
I beleive the date field is optional. I tried executing the BAPI with out the date field and it returns a valid output. But when I call the same using the above input xml, it is returns nothing.
Thank You.
Regards,
Jai Shankar
Jai,
When creating this XML in your Code, make sure that this entire XML is a String and a valid one (I know you wuld have ensure this but corss check ).
Not sure what are the inputs etc expected by the BAPI, but also try to use the Trace to print the Response XML and see what is happening . Just think that there must be some small issue somewhere.
Regards
Bhavesh
Hi Jai,
<i>But, when I execute the BAPI in R/3 no matter I give 100 or 0000000100 it gives me the correct result.</i>
Might be the conversion doesnt work when you call from XI. Not sure but itz worth a try. I have seen a few cases where it worked.
Secondly the error which you are getting is related to Cost Center.
There doesnt seem to be any problem with the XML which is created.
Regards,
Sumit
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.