cancel
Showing results for 
Search instead for 
Did you mean: 

How can I output multiple IDOC messages in one dataflow in DS 3.2?

Former Member
0 Kudos

Hi, we are trying to load some business partner data into CRM through an IDOC. The specific IDOC we are attempting to use is CRMXIF_PARTNER_SAVE_M02. We successfully created a Data Services flow which takes input from a file and can write out an IDOC message which updates the record in CRM. The problem is that we can only manage to run this job for one record at a time - if the file we are using for input contains 2 or more records (2 or more business partners which we are trying to update), then the batch job fails with the error message:

IDoc Error: Message: Adding this segment exceeds maximum allowed number of repetition E101CRMXIF_PARTNER_KEYS

I'm guessing from this error message that it is trying to shove both business partner records into one IDOC which is not supported by this IDOC. Instead what we want it to do is send 2 IDOC messages to the server, one per business partner.

Does anyone have any suggestions on how we can make this work?

Thanks

-Trevor

Accepted Solutions (1)

Accepted Solutions (1)

werner_daehn
Active Contributor
0 Kudos

Imagine I have a simple source with a list of PARTNERS and want to load that as an IDOC. IDOC means nested, so I have to create the NRDM - the schemas. Big question is about the from clauses for each schema level.

The schema shall be simplified a


IDOC_ROOT
+-- PARTNERS (schema)
      KEY_FIELD
      NAME_FIELD

One option would be to set the FROM clause of the IDOC_ROOT to Row_Generation as input and the PARTNERS schema to the source file. In other words, you would get one IDOC with n PARTNER records.....and the error.

If you swap these two, IDOC_ROOT has as FROM the source table, and PARTNERS the Row_Gen, it would mean n IDOCs with one row in the PARTNERS schema.

Former Member
0 Kudos

Thanks Werner, that solved the problem perfectly!

0 Kudos

Hi,

Can you please share your job's screenshot developed in BODS ?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Werner,

I am trying to load data into SAP for Functional Locations Domain using the 'FUNC_LOC_CHANGE' IDOC in Data Services and I am getting the following error.

82367776R3C-2440052013/02/27 4:52:36 PM|Data flow DF_ChangeIDOC|Loader FUNC_LOC_CHANGE01
82367776R3C-2440052013/02/27 4:52:36 PMIDoc target tried to generate IDoc <FUNC_LOC_CHANGE01> from NRDM data: <
82367776R3C-2440052013/02/27 4:52:36 PMIDoc Error: Message:      CIDocIterator::Field: No datarecord available for this segment type
82367776R3C-2440052013/02/27 4:52:36 PMIDoc Type:    FUNC_LOC_CHANGE01
82367776R3C-2440052013/02/27 4:52:36 PMRelease:      731
82367776R3C-2440052013/02/27 4:52:36 PMIDoc Number:  Not Applicable
82367776R3C-2440052013/02/27 4:52:36 PMSegment Name:
82367776R3C-2440052013/02/27 4:52:36 PMSegment Type:
82367776R3C-2440052013/02/27 4:52:36 PMField Name:   FUNCTLOCATION
82367776R3C-2440052013/02/27 4:52:36 PM>. Check your input data.
69928284R3C-2440052013/02/27 4:52:46 PM|Data flow DF_ChangeIDOC|Loader FUNC_LOC_CHANGE01
69928284R3C-2440052013/02/27 4:52:46 PMIDoc target tried to generate IDoc <FUNC_LOC_CHANGE01> from NRDM data: <
69928284R3C-2440052013/02/27 4:52:46 PMIDoc Error: Message:      CIDocIterator::Field: No datarecord available for this segment type
69928284R3C-2440052013/02/27 4:52:46 PMIDoc Type:    FUNC_LOC_CHANGE01
69928284R3C-2440052013/02/27 4:52:46 PMRelease:      731
69928284R3C-2440052013/02/27 4:52:46 PMIDoc Number:  Not Applicable
69928284R3C-2440052013/02/27 4:52:46 PMSegment Name:
69928284R3C-2440052013/02/27 4:52:46 PMSegment Type:
69928284R3C-2440052013/02/27 4:52:46 PMField Name:   FUNCTLOCATION
69928284R3C-2440052013/02/27 4:52:46 PM>. Check your input data.

I am trying to update the ABCIndicator from 2 to 3 and hence have set the Flag to X in the source table as well. I have updated the EDI_DC40 mandatory schema with the necessary values and mapped the values to the schemas in the IDOC

E1FUNC_LOC_CHANGE - from the source table 

and sub schemas

E1BP_ITOB - some from the source table and other values to NULL

E1BP_ITOBX - FLAG X to the ABC Indicator from Source table and all others to NULL

E1BP_ITOB_FL_ONLY - NULL for Everything

E1BP_ITOB_FL_ONLYX - NUll for everything

I have tried to play around the FROM cluase in the query as well as UNnesting...all of them failed to resolve the issue...Can you please suggest me where I am going Wrong..

Thanks

Chan

Former Member
0 Kudos

I get this error when I remove unnesting

30567988R3C-2440052013/02/27 5:13:55 PM|Data flow DF_ChangeIDOC|Loader FUNC_LOC_CHANGE01
30567988R3C-2440052013/02/27 5:13:55 PMIDoc target tried to generate IDoc <FUNC_LOC_CHANGE01> from NRDM data: <
30567988R3C-2440052013/02/27 5:13:55 PMIDoc Error: Message:      Adding this segment exceeds maximum allowed number of repetition E1BP_ITOB
30567988R3C-2440052013/02/27 5:13:55 PMIDoc Type:    FUNC_LOC_CHANGE01
30567988R3C-2440052013/02/27 5:13:55 PMRelease:      731
30567988R3C-2440052013/02/27 5:13:55 PMIDoc Number:
30567988R3C-2440052013/02/27 5:13:55 PMSegment Name: Not Applicable
30567988R3C-2440052013/02/27 5:13:55 PMSegment Type: E1BP_ITOB
30567988R3C-2440052013/02/27 5:13:55 PMField Name:   Not Applicable
30567988R3C-2440052013/02/27 5:13:55 PM>. Check your input data.
7180144R3C-2440052013/02/27 5:14:05 PM|Data flow DF_ChangeIDOC|Loader FUNC_LOC_CHANGE01
7180144R3C-2440052013/02/27 5:14:05 PMIDoc target tried to generate IDoc <FUNC_LOC_CHANGE01> from NRDM data: <
7180144R3C-2440052013/02/27 5:14:05 PMIDoc Error: Message:      Adding this segment exceeds maximum allowed number of repetition E1BP_ITOB
7180144R3C-2440052013/02/27 5:14:05 PMIDoc Type:    FUNC_LOC_CHANGE01
7180144R3C-2440052013/02/27 5:14:05 PMRelease:      731
7180144R3C-2440052013/02/27 5:14:05 PMIDoc Number:
7180144R3C-2440052013/02/27 5:14:05 PMSegment Name: Not Applicable
7180144R3C-2440052013/02/27 5:14:05 PMSegment Type: E1BP_ITOB
7180144R3C-2440052013/02/27 5:14:05 PMField Name:   Not Applicable
7180144R3C-2440052013/02/27 5:14:05 PM>. Check your input data.