cancel
Showing results for 
Search instead for 
Did you mean: 

File -> BPM -> BAPI_COMPANY_GETDETAILS > File

Former Member
0 Kudos

Hi,

I'm in a little trouble...

I had a working scenario with File -> BPM -> BAPI_COMPANY_GETDETAILS -> File as found in a Blog.

The first file contains one company code and the RFC sync call gets the details and then sends the info back in a file.

To get closer to my final scenario, I enhenced this scenario qith having in the first file, multiple instance of the CompanyID (I created a special DataType, Message Type, .. for that) then in my BPM, I started with the receive step, then a transform 1 to N and then a bloc foreach that included the Sync RFC call and the send call as before.

My trouble is that now the RFC call sends me back an error (with same companyID then before)

Type - Code - Message

E - FN030 - Company 1 does not exist

but if I do the BAPI call with SE37, I get the correct results...

Has any one an idea ? It keeps me mad from this morning !

Thx in advance!!

Cheers

greg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes checked out, and it is in format 0001.

By the way, it was working also with 1 or 01 or 001.

Is there a way for me to look from the ERP client the incoming FRC call ?

Former Member
0 Kudos

So you mean if you pass the same data in se37 and check it shows you correct result and only through interface its giving you error.

Thanks

Sudharshan

Former Member
0 Kudos

Exactly Sudharshan, you got it !!

If I use the SE37 trx code, and imput exaclty the same data (copy paste) I got the answer I expect !

thy for all of you who are replying so quickly !! I hope we finnaly will find the solution !

Former Member
0 Kudos

Hi,

I just checked with this BAPI in R3 side ya its working if I enter even just '1' from se37 but the same BAPI if I call from normal report program and just give 1 its giving me same error as you are getting so I added zeros for which I used UNPACK statement which nothing but adds zeros.

So for your confirmation while giving company code you give value of 6 char lengh e.g '000001'.

This will work I have tested.

Thanks

Sudharshan

kenny_scott
Contributor
0 Kudos

Hi Gregorio,

Sudharshan is correct - you have to ensure that leading spaces, zeroes are filled,

i.e.,

see the RFC Adapter FAQ

[FAQ XI 3.0/ PI 7.0/ PI 7.1 RFC Adapter|http://service.sap.com/sap/support/notes/730870]

===========

Q 18: The function module works fine with my parameters when I

execute it in transaction SE37. Why do I get errors when sending the

same data via RfcAdapter?

A: Parameters are treated different when SAPGUI is used. A detailed

description of this problem can be found in note 206068. See also Q

24 which is related to this one.

============

Regards

Kenny

Answers (3)

Answers (3)

Former Member
0 Kudos

You had it Sudharshan !!!

With the 000001 I got it !!!

<?xml version="1.0" encoding="UTF-8"?>
<ns1:FileResponse_MT xmlns:ns1="http://polyright.com/xi/HR"><Company>000001</Company><Country>CH</Country><Street>Leugenestrasse 6</Street></ns1:FileResponse_MT>

MANY THANKS FOR YOUR SUPPORT !!!

Former Member
0 Kudos

Hi Gregorio,

Itu2019s possible that there exists a format mismatch between messageu2019s COMPANYID and BAPI's COMPANYID.

Former Member
0 Kudos

Hi Sergi,

I'm sorry I don't get your point.

Would you mean as if the 0001 that is in my message was not a valid entry for the BAPI's COMPANY field ?

Former Member
0 Kudos

Hi,

Can you send the paste the error you are getting from RFC.

Thanks

Sudharshan

Former Member
0 Kudos

Here is the message as it comes back from the RFC call:

  <?xml version="1.0" encoding="UTF-8" ?> 
- <rfc:BAPI_COMPANY_GETDETAIL.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
- <COMPANY_DETAIL>
  <COMPANY /> 
  <NAME1 /> 
  <NAME2 /> 
  <COUNTRY /> 
  <LANGU /> 
  <STREET /> 
  <PO_BOX /> 
  <POSTL_COD1 /> 
  <CITY /> 
  <CURRENCY /> 
  <COUNTRY_ISO /> 
  <CURRENCY_ISO /> 
  <LANGU_ISO /> 
  </COMPANY_DETAIL>
- <RETURN>
  <TYPE>E</TYPE> 
  <CODE>FN030</CODE> 
  <MESSAGE>Company 0001 does not exist</MESSAGE> 
  <LOG_NO /> 
  <LOG_MSG_NO>000000</LOG_MSG_NO> 
  <MESSAGE_V1>0001</MESSAGE_V1> 
  <MESSAGE_V2 /> 
  <MESSAGE_V3 /> 
  <MESSAGE_V4 /> 
  </RETURN>
  </rfc:BAPI_COMPANY_GETDETAIL.Response>

Former Member
0 Kudos

Hi,

Just check with your input to RFC[BAPI] is in the required format as some fields needs padding so best way is check the length of the fields from SAP ECC in BAPi and pass the data of correct length

for e.g company code field is BUKRS of length 4 so make sure that you have given value as '0001'.Similar check with other fields and pad zeros to make fields of correct length.

Thanks

Sudharshan