Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with IDOCS and exchange rates

Former Member
0 Kudos
2,298

Hi,

Our client has bought a company in the UK that was already running SAP. It is a roll-out project.

That company had already IDOC interfaces (AS400-->to SAP), so they are have interfacing sales documents in GBP and EUR as well, into their SAP

Our client wants us to "copy" the interface (into our client´s SAP, which is another machine) exactly as it is in the original SAP (for the company purchased), but we are encountering problems in the copy for which I am going to try an describe

In the original SAP system, the thing is that when there is a posting in EUR (GBP is compnay code currency), the IDOC processing completely ignores the exchange rates that are being sent, and reflects in the journal posting just the amounts in both currency: EUR and GBP (they are both sent, as well). This is good, because sometimes they reflect in the journal more than one exchange rate. So they just insert the amounts.

When we try to reproduce this situation in our clients SAP system (we have copied everything), our system tends to insert to all the Items the exchange rate that is being sent in the Header, not matching the performance of the original interface, and of course not matching exactly the amount of the item it was originally registered in AS400 with a different ex. rate.

The IT company that were the IT vendors for the Company purchased, tells us that in facti, in their original system they do not use the exchange rate As 400 is sending to their SAP.

But in our clients SAP system, when we delete all the ex. rates in the IDOC (before processing it), the posting becomes even worse, because in our system the processing of the IDOC goes directly to tabl TCURR (ex. rate maintenance), and inserts the last rate registered in the table so all the amounts are unmatched (in comparison to the figures registered in the "original SAP").

How could we avoid completely exchange rates and tell the IDOC just to insert in the journal the amounts provided in the data (amount in GBP and amount in EURO), just as it works originally?. We are not able to, and system always relies on an exchange rate that not always is exact , unmatching amount in the posting (in comparison with SAP Live system belonging to the company that has bought my client)

We cannot much practice debugging in the company purchased because its system rights are hold by an external IT company.

I would really appreciate any clue or hint in order to move forward because we are completely stop.

Best wishes.

Patxi

13 REPLIES 13

JL23
Active Contributor
0 Kudos
452

Pretty long story, but still unknown is the process and IDoc about which you are talking.

0 Kudos
452

To get an answer to this question, you need to supply the basic type (IDOCTYP) of the idocs involved and the Process code (EVCODA) you are using.

I can't tell if you are discussing order entry or payment processing.

Former Member
0 Kudos
452

Ok, Jürgen, Juan,

I reactivate the long story. I´ll try to simplify it.

It was a Sales interface through IDOCS.

We have discovered that inserting a cost center in the IDOC, it is affecting the final values, when the FI journal is incoming with a currency different from the local one

How this can be? I mean: when we add a cost center to the P&L account (it has to go with cost center, because the account is also created as Cost element), the values in the local currency are not what expected. But, when we delete the cost center (in a given account which is not cost element and does not require a cost center), the processing of the IDOC is perfect, and the amounts posted are just what is declared in the IDOC.

This perfomance is detected in IDOCS which are posted in document currency different from local curremcy. The difference is detected when they use cost centers, and it is in an item of the local currency

How this can happen??

Any hints on how to have the same amounts using cost centers? We need to use cost centers on those P&L accounts, but system does not post the exact amounts in both currencies, although the IDOC has the exact amounts. There is a change when posting, due to the cost center....

Please, any ideas on what to check or do?

Thanks in advance

0 Kudos
452

Patxi,

I suggest you do the following:

  1. Go to transaction WE05 and view one of the IDOCs that had problems.
  2. click on the "Control Rec." information
  3. write down the "Basic type"
  4. write down the "Partner No."
  5. write down the "Partn. Type"
  6. write down the "Message type"
  7. Go to transaction WE20
  8. Navigate thru the partner profiles to find the information for Partner Type and Partner number from the previous steps.
  9. Double-click on the Inbound entry with the Message Type from the previous steps.
  10. Double-click on the "Process code" in the [Inbound options] tab.
  11. The "Identification" value you are looking at is the Function Module that is converting the contents of your IDOC to system data.
  12. Double-click "Identification".

You are now looking at the code that converts the EDIDC structure and EDIDD table containing IDOC information into system data.

Look thru this code to figure out where the cost center fields are copied into SAP.

Former Member
0 Kudos
452

Hi Juan,

We have followed your path, but as far as my abaper has seen, the behaviour of the system is the same introducing the cost center in comparison when the cost center is not introduced. The moment we should need to compare is a little bit later: when the document is posted with or without a cost center where we should see a difference in amounts.

Could you provide us another hint?

Many thanks in advance!

Former Member
0 Kudos
452

Hi Juan,

I add more things to this long story.

It is very strange that in the original SAP, the sales amounts are posted correctly (via IDOC) when the revenue account is not set as a cost element (it does not go with cost center). As I said, this happens when document currency (EUR) differs from local currency (GBP). The controlling area in this machine runs in EUR.

On the other scenario, my clients' machine (we need to copy the scenario above), although I post via IDOC (copied IDOC from above machine) using a revenue account without cost center, the journal that goes with document currency (EUR)  different from local currency (GBP), is posted but with a little difference in a GBP value (not all the items). EUR values are OK, but in local currency not all the values are OK. The reason for this, is that the IDOC contains values in both currencies but not all of them are with the same Exchange rate. However, THIS SYSTEM WORKS IN THE ABOVE MACHINE, and not in my clients' machine. ´

So: In both machines, the journal is not posted correctly using cost centers within the journal. However, in Machine A (the one to be copied)  it works fine when there is not a cost center in the journal, and this second situation cannot be reproduced in my clients´ machine because it doesn´t work either......

I finally say that my clients´ Machine runs its Controlling area in GBP, which is a fundamental difference....

Do you know, or does anybody know why this happen? Could it be because of the currency in Controlling áreas?.

We are very lost about this issue and I don´t know how to solve it.

I would appreciate a solution, or at least a possible explanation of why this can happen. There is a different performance in both instances, when posting sales via IDOC interface and I need to understand why.

Many thanks in advance for any hint or near experience explanation.

Regards,

Patxi

0 Kudos
452

Patxi,

If there is no error with the processing of your iDocs, then the issue must lie in the data itself.

You say that your idocs contain "values in both currencies but not all of them are with the same Exchange rate". I believe that SAP will convert all currencies to local based on the rates stored in table TCURR (see transaction OB08). My first suspicion would be to look at the rate that SAP is using when monetary values are entered. This may conflict with the difference between currency values in the idoc.

Your question has gone beyond an ABAP Development issue. I suggest you try posting a question in one of the FI communities.

Juan

Former Member
0 Kudos
452

Juan,

I have already done it, I have posted the issue in the Financial community but I am very pesimist.

It has nothing to do with table TCURR, because the IDOC data is already providing an Exchange rate. However, in one of the revenue items,  if you divide EUR/GBP, it does not correspond to the exchange rate of the document at header. This is because in their system (AS/400), they introduce sales values from different days, but SAP is only keeping one Exchange rate at header.

When they pass the IDOC file to their SAP system (Machine A) from AS/400, their SAP does not care about that exchange rate, it only posts values, bearing in mind that the revenue account is not with a cost center (that is, is not a cost element). And all the figures are OK, in EUR and in GBP. matching the data provided in the IDOC, and not caring about the exchange rate.

But, this same scenario is not reproduced in Machine B: despite posting against a revenue account that is not a cost element (without a cost center), system is not matching values in GBP for that item that was coming with a different exchange ratio....and differs, although in EUR yes it is matched.

No, I think it has nothing to do with TCURR.

Thanks Juan for your information.

Regards

Patxi

JL23
Active Contributor
0 Kudos
452

The story becomes longer and longer (and even duplicated in various FI forums) and is still missing essential information. What is the IDOC name?

This piece of info could eventually help to know the SAP process behind the IDOC.

And it could then be used to search for bug fixes in the Service Market place too.

Jelena_Perfiljeva
Active Contributor
0 Kudos
452

I agree with Jurgen - TLDR but still not clear what is even the IDoc/message type? How are we supposed to answer intelligently? This is posted in the ABAP forum, but not a single piece of technical information is provided. Makes no sense...

You might want to check this blog before posting more questions: http://scn.sap.com/community/getting-started/blog/2010/05/12/asking-good-questions-in-the-forums-to-...

0 Kudos
452

Benefit of the doubt. I don't think he ever realized he didn't supply enough info to answer.

JL23
Active Contributor
0 Kudos
452

Now the thread got closed with "Assumed answered" - after having wasted the time of many people who had read the long story. J ust leaving another piece of garbage in SCN which is useless for anyone who finds this in a search result in future since the OP did not even care to reply and to share how it was solved. Some people may never understand the purpose of a Internet forum.

Former Member
0 Kudos
452

Hi, Jürgen and everybody else:

I haven't had time till now to briefly explain how we solved it.

Finally, my abaper got to the point in which documents were being posted and noticed a custom validation that was activated in the original machine. We integrated the validation in OUR system, and the interface works fine now.

The fact is, that I am a consultant, not an abaper, so I cannot explain more details about this.

I beg your pardon for your concern about my disappearing from this issue, but I haven´t disappear at all.

Thanks to all!