on 09-12-2011 1:14 PM
Hi,
Record Type:Header Record(Always = 0),Min Occurrence:1,Max Occurrence:1
Record Type:Sales Invoice Header Record (Always = 4),Min Occurrence:0,Max Occurrence:unlimited
Record Type:Sales Invoice Item Record (Always = 5) ,Min Occurrence:1(per Sales Invoice Header Record)
,Max Occurrence:999999 (per Sales Invoice Header Record)
Record Type:Trailer Record(Always = 1),Min Occurrence:1,Max Occurrence:1
The Src Str is:
Header
SalesInvoiceHeader
SalesInvoiceItem
Trailer
The target Str is:
Header
SalesInvoice = SalesInvoiceHeader + SalesInvoiceItem (Repeat SalesInvoiceHeader fields at its respective SalesInvoiceItem)
Trailer
Ex:
SRC:
00BKP000000000512.08.201107:30:13~0000000006
10100048HeaderTxt
10000009781444724585Item Txt
10000006666666666666Item Txt
01~5
Target:
00BKP000000000512.08.201107:30:13~0000000006
10100048Haeder Txt10000009781444724585~Item Txt
10100048Header Txt10000006666666666666~Item Txt
01~5
Provide some inputs.
Thanx
Hi,
I think you dont need to use xslt mapping. You can achieve this with simple graphical mapping also. Use FCC and design your source & target structures like below and do graphical mapping.
Src structure:
<Header>
<hf1>
<hf2>
<SalesInvoictHeader>
<sdhf1>
<sdhf2>
<SalesInvoictItem>
<sdif1>
<sdif2>
<Trailer>
<tf1>
<tf2>
target structure:
<header>
<hf1>
<hf2>
<salesInvoic>
<f1>
<f2>
<f3>
<f4>
<trailer>
<trailerf1>
<trailerf2>
Mapping:
--->simple one to one mapping for header & trailer.
salesinvoicItem------>salesInvoic
useOneasMany----->f1
1stinput: sdhf1
2ndinput:salesinvoicItem---removecontext
3rdinput:sdhf1
useOneasMany----->f2
1stinput: sdhf2
2ndinput:salesinvoicItem---removecontext
3rdinput:sdhf2
sdif1--->f3
sdif2--->f4
Regards
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One possible way to achieve this is using java mapping. Read the salesinvoiceheader and its respective item and append that data as single item and map it to target structure. Like that you have to repeat for every SalesInvoiceheader and its item. Hope you have idea about java mapping.
Refer these links
http://wiki.sdn.sap.com/wiki/display/XI/PI7.0and7.1Mapping-Blogs%2CArticles%2CWiki%2CCodeSamplesandVideos+Collections
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Here map your Sales Invoice Item Record to SalesInvoice of target strucutre.And mapp the fields with Sales Invoice Header and Item with the fields in SalesInvoice
Monica
Edited by: monica bhosale on Sep 12, 2011 2:42 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kevin,
In one of your previous [threads |;you were discussing the same scenario.
1. You have to use FCC on sender adapter and achieve the XML structure Like
<Header>
<SalesHeader>
<SalesInvoice>
<Trailer>
2. Once you get this using FCC on sender side, then you can use either XSLT or Java mapping to convert flat XML structure to your required format.
<Header>
<Sales> > <SalesHeader>-> <SalesItems>
<Trailer>
Regards
Ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am giving you the template on how to construct based on your requirement. You have to do bit of research on web and do it. It is quite simple
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://demo.com">
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
<xsl:template match="/">
<ns1:MessageTypeName>
<xsl:call-template name="Header"> <!--Add all the header items here-->
</xsl:call-template>
<xsl:call-template name="SalesHeader"> <!--Add all the header Sales Header here-->
</xsl:call-template>
<!-- In SalesHeader Template at the end call Sales Invoice Items template-->
<xsl:for-each select="//SalesInvoiceDetails">
<xsl:call-template name="SalesInvoiceDetails">
</xsl:call-template>
</xsl:for-each>
</ns1:MessageTypeName>
</xsl:template>
</xsl:stylesheet>
regards
Ramesh
chk this article for basics of XSLT:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/000ee4d0-be91-2d10-8aaf-ff8045bdd37d
Edited by: Jason Lax on Dec 28, 2011 2:27 PM (Updated URL to correct format)
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.