on 04-24-2009 7:38 AM
Hi All,
I have a requirement related to Mapping and need your help on this. There is a financial posting Interface and the data is being fetched from database using strored procedure.
The source file is having structure like as shown below
<FIExport>
<resultset>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
<field4>29</field4>
<field5>3</field5>
</row>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
<field4>48</field4>
<field5>3</field5>
</row>
<row>
<headerid>12345</header id>
<field2>5</field2>
<field3>1</field3>
</field4>
<field5>3</field5>
</row>
<row>
<headerid>12346</header id>
<field2>5</field2>
<field3>1</field3>
<field4>2</field4>
<field5>3</field5>
</row>
<row>
<headerid>12347</header id>
<field2>5</field2>
<field3>1</field3>
<field4>2</field4>
<field5>3</field5>
</row>
</resultset>
</FIExport>
Condition:
For creating target structure follwoing conditions are required
1) IDOC at receiver side will be created as per unique header id therefore in the current source structure 3 Idocs will be created for 3 unique header id like 12345 , 12346 , 12347
2) Target EIFISEG which is line item will be created based on per row per unique header id under each IDOC and there has to be 2 SEGMENTS (2A & 2B ) per row based on the VAT amount presence and also two additional E1FISEG has to be created statically per idoc for BSCHL = 34
so for the above source structure the target should have number of EIFISEG as follows:
As there are 3 rows for header id 12345, therefore under IDOC1 the number of EIFISEG will be
since VAT Amount(field 4) is present therefore for 2rows of 12345 header id IDOC it will generate 2X2=4 , E1FISEG segments (each for 2A & 2B) and 1 E1FISEG for 3 row of header id IDOC 12345.
In addition to this 2 additional segment will be created for BSCHL=34( it's duplicate segment of E1FISEG, so no issues in this)
Total number of E1FISEG segments in IDOC for header id(12345) will be = 4 + 1 + 2 = 7 segments
Similarly for IDOC with header id (12346) the total number of EIFISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
Similarly for IDOC with header id(12347) the total number of E1FISEG will be = 2( 2A & 2B as vat amount (field 4) is present + 2(bschl =34) = 4 segments
So the target strcuture should look like:
Target Structure
IDOC1 for header id= 12345
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
E1FISEG5
field 2
E1FISEG6
field 2
E1FISEG7
field 2
IDOC1 for header id= 12346
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
IDOC1 for header id= 12347
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
Please help me to complete this mapping requirement as it seems to be complex.
Thanks & Regards
Prabhat
Hi,
since VAT Amount(field 4) is present therefore for 2rows of 12345 header id IDOC it will generate 2X2=4 , E1FISEG segments (each for 2A & 2B) and 1 E1FISEG for 3 row of header id IDOC 12345.
Try the below mapping.
field4length-EqualsNotIf-- (then(constant))(else(constant))E1FISEG
constant(0)-----
duplicate the E1FISEG segment.
field4length-EqualsNotIf with out else-- (then(constant))--E1FISEG
constant(0)-----
for BSCHL segment you already told there is no issue.
Regards,
Prakasu.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhat,
Please provide the target output with values (the way u have done for source structure)..so it will be easy to understand what kind of output is required?
In target Structure output...from field2..not able to understand what value is expected there.
Regards,
Manisha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There was one typo mistake, the TARGET structure will be
Target Structure
IDOC1 for header id= 12345
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
E1FISEG5
field 2
E1FISEG6
field 2
E1FISEG7
field 2
IDOC2 for header id= 12346
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
IDOC3 for header id= 12347
E1FIKPF
field 1
E1FISEG1
field 2
E1FISEG2
field 2
E1FISEG3
field 2
E1FISEG4
field 2
Thanks & Regards
Prabhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To achive the IDOCs follow the bellow mapping:
<headerid>- Remove context- Split by value(on value change)-collapse conext-<IDOC>.
Regards,
Shweta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.