on 12-08-2009 12:01 PM
Hi
we have a scenario from JDBC to idoc , the idoc is WPUUMS01 for aggregated sales data in retail scenario. As per the reqmnt ,
for a particular location_code we need a single idoc , if lineitems are multiple , segments should be added in the same idoc .
Idoc should change when location_code changes .
now when we are doing the mapping we are gettting as many iodcs generated as the no of locations_code
rgds
arun
Hi Arun,
wt is the problem are you facing,..???you dint mentioned anything....you said its working fine...then what is the problem
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probem:
Idoc should change when location_code changes .
but we are gettting as many iodcs generated as the no of locations_code
lineitem should be added in the segments within the same idoc and new idoc should be generated on the change of location_code
we have done bothe the changes in the MM and interface mapping and as a result of that we are getting multiple idocs generated ,
pl suggest
rgds
arun
Hi Sarvesh ,
Thanks for ur reply , the logic has worked
one more problem is yet to be sorted , when same LOCATION_CODE is coming for different lineitems , segments should be added under the same idoc.
At present with the above logic , idocs are getting segregated on the basis of LOCATION CODE , BUT when the lineitems are repeating for the same LOCATIONCODE , line items are not getting added to the particular idoc .
I've added a sample payload of sender as well as receiver with three LOCATION_CODES -1000, 1001,1001
in the target payload we are getting two idocs with LOCATION_CODES -1000, 1001
LOCATION_CODE is mapped with idoc also its mapped with SNDRPRN in the header segment EDI_DC40 of idoc
XML OF THE SENDER SIDE :
ns:MT_OB_AGGSALES xmlns:ns="http://AGGSALES_IB_NS">
row>
Location_Code>1000</Location_Code>
Date>20091208</Date>
Currency>INR</Currency>
Sku_Code>500083</Sku_Code>
Batch>B1</Batch>
Total_Sales_Value>500</Total_Sales_Value>
Total_Sales_qty>1</Total_Sales_qty>
Sign_for_qty>-</Sign_for_qty>
IsRecordRead>Y</IsRecordRead>
Sign_for_value>+</Sign_for_value>
Sales_UOM>EA</Sales_UOM>
FieldGroup>BATCH</FieldGroup>
row>
row>
Location_Code>1001</Location_Code>
Date>20091208</Date>
Currency>INR</Currency>
Sku_Code>500083</Sku_Code>
Batch>B1</Batch>
Total_Sales_Value>500</Total_Sales_Value>
Total_Sales_qty>1</Total_Sales_qty>
Sign_for_qty>-</Sign_for_qty>
IsRecordRead>Y</IsRecordRead>
Sign_for_value>+</Sign_for_value>
Sales_UOM>EA</Sales_UOM>
FieldGroup>BATCH</FieldGroup>
row>
row>
Location_Code>1001</Location_Code>
Date>20091208</Date>
Currency>INR</Currency>
Sku_Code>500084</Sku_Code>
Batch>B1</Batch>
Total_Sales_Value>500</Total_Sales_Value>
Total_Sales_qty>1</Total_Sales_qty>
Sign_for_qty>-</Sign_for_qty>
IsRecordRead>Y</IsRecordRead>
Sign_for_value>+</Sign_for_value>
Sales_UOM>EA</Sales_UOM>
FieldGroup>BATCH</FieldGroup>
row>
ns:MT_OB_AGGSALES>
TARGET XML
<?xml version="1.0" encoding="UTF-8"?>
WPUUMS01><IDOC BEGIN="1"><EDI_DC40 SEGMENT="1">
TABNAM>EDI_DC40</TABNAM>
DIRECT>2</DIRECT>
IDOCTYP>WPUUMS01</IDOCTYP>
MESTYP>WPUUMS</MESTYP>
SNDPOR>SAPXID</SNDPOR>
SNDPRT>KU</SNDPRT>
SNDPRN>1000</SNDPRN>
RCVPOR>SAPDEV</RCVPOR>
RCVPRT>KU</RCVPRT>
RCVPRN>1000</RCVPRN>
EDI_DC40>
E1WPU01 SEGMENT="1">
BELEGDATUM>20091208</BELEGDATUM>
BELEGWAERS>INR</BELEGWAERS>
E1WPU02 SEGMENT="1">
ARTNR>500083</ARTNR>
VORZMENGE>-</VORZMENGE>
VORZWERT>+</VORZWERT>
UMSWERT>500</UMSWERT>
SALES_UOM>EA</SALES_UOM>
E1WXX01 SEGMENT="1">
FLDGRP>BATCH</FLDGRP>
FLDVAL>B1</FLDVAL>
E1WXX01></E1WPU02>
E1WPU01>
IDOC><IDOC BEGIN="1">
EDI_DC40 SEGMENT="1">
TABNAM>EDI_DC40</TABNAM>
DIRECT>2</DIRECT>
IDOCTYP>WPUUMS01</IDOCTYP>
MESTYP>WPUUMS</MESTYP>
SNDPOR>SAPXID</SNDPOR>
SNDPRT>KU</SNDPRT>
SNDPRN>1001</SNDPRN>
RCVPOR>SAPDEV</RCVPOR>
RCVPRT>KU</RCVPRT>
RCVPRN>1001</RCVPRN>
EDI_DC40>
E1WPU01 SEGMENT="1">
BELEGDATUM>20091208</BELEGDATUM>
BELEGWAERS>INR</BELEGWAERS>
E1WPU02 SEGMENT="1">
ARTNR>500083</ARTNR>
VORZMENGE>-</VORZMENGE>
VORZWERT>+</VORZWERT>
UMSWERT>500</UMSWERT>
SALES_UOM>EA</SALES_UOM>
E1WXX01 SEGMENT="1">
FLDGRP>BATCH</FLDGRP>
FLDVAL>B1</FLDVAL>
E1WXX01></E1WPU02>
E1WPU01>
IDOC></WPUUMS01>
thanks for ur support
rgds
arun
For this you have to creat the External Defintion of that IDOC. So take the XSD of IDOC and paste it on notepade then change the occurence 0..unbounded and then create the External Definition and then use this external definition instead to std. IDOC.
Example: In your IDOC xsd (in notepad) add the maxOccurs="unbounded" as shown in below example.
<xsd:element name="IDOC" type="ACC_GL_POSTING.ACC_GL_POSTING01" maxOccurs="unbounded" />
Regards,
Sarvesh
Hi,
You need to set Occurence for target Idoc message as 0..Unbounded. Within message mapping you can do this from Message tab -> find Occurence option at Target message. Also within Interfce mapping for Target Interface set Occurence 0..Unbounded.
map unique no.of location codes to Node WPUUMS01 to populate no.of Idocs and Apply your mapping rules.
Cheers
Veera
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
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.