Monday, December 10, 2007

XI: IDOC Adapter - EDI_DC40 - demystified

When you start working with IDOCs scenarios the first thing you'll probably notice
is the IDOC receiver channel configuration and maybe the lack of sender IDOC adapter:-)

There's one little checkbox you can set or not: "Apply control record values".
When you check standard documentation you may be little confused
but I hope to clear all things out with this weblog.

Scenario 1

We don't set the checkbox.

image

Since we do not want to fill the control record ourself we can Disable the EDI_DC40 segment.

image

Now the control record will be filled with those parameters:

TABNAM, SNDPOR, MANDT, DOCNUM, DOCREL, RCVPOR, ARCKEY, SERIAL, MESTYP, IDOCTYP, CIMTYP
SNDPRN, SNDPRT, SNDPFC, RCVPRN, RCVPRT, RCVPRT, STATUS, DIRECT OUTMOD, CREDAT, CRETIM


and they will have values like described on help.sap.com
(so basically nothing difficult over here).

Scenario 2

We set the checkbox.

image

If you read the documentation you may see this:

"If you have not set the Apply Control Record Values from Payload indicator
in the receiver IDoc adapter, the fields are filled as follows...."


but this is only half of the truth:) Because if you mark the checkbox you're also not able to fill those fields.

If you want to check how this works take a look the little example below.

As you can see I'm sending my IDOC to the IDOC adapter and I'm setting values
like SNDPRT, RCVPRN and also some other like MESTYP.

image

But the IDOC adapter changes them and uses the standard values as when you don't set that checkbox.

image

image

That means that the only values you're allowed to change are those:

MESCOD, MESCFT, TEST, EXPRSS, STD, STDVRS, STDMES, SNDSAD, SNDLAD, RCVSAD, RCVLAD, REFINT, REFGRP

as you can see from the example the IDOC Message Code (MESCOD) is created correctly (just like it was set in my mapping).

This is a very easy scenario but I hope it may be useful for IDOC adapter begginers.

2 comments:

Chun Poh said...

Hi,

Your example pic is not showing up. Can you fix that?

krawczykm said...

it's not an origial post
it's a plagiarized copy
the original can be found here:
https://weblogs.sdn.sap.com/pub/wlg/2279

Blog Archive