on 09-07-2010 2:47 PM
Hey,
now I got general question about mapping:
I'm using the SAPRDI02 IDoc to send print data to PI. This should be mapped to the web service structure then.
The IDoc contains the text elements of the sap script and the value of these elements.
The Web service has some structures and one structure for the document content. this structure has some general
fields to describe the type of document, which should be printed and a field for the content of the document. This field
expects unformated XML.
My question now is, how I should do the mapping best. Do you think it's possible to do it with the graphical tool, or should
I use XSLT, Java or ABAP mapping?
I think, the data from the IDoc would be something like this:
E1RDID
....
....
SYMNAME
....
SYMVALUE
The structure of the web service form content is something like this:
Printforms
Printform
Formtype
FormContent
Priority
....
....
....
And as I understand it, the XML content for the field "FormContent" should be something like this:
<FormField1>contentOfFormField1</FormField1>
or
<FormField1 value = 'contentOfFormField1' />
So the fields SYMNAME and SYMVALUE should be transferred to this structure and then to the field "FormContent"
in the webservice.
Any idea how I do this in the best way?
THANK YOU!
Michael
Hi,
as i can understand your issue,you can solve it with a graphical mapping, just map each field valueof the IDoc with each field/attribute of the Web Service as you show below
<FormField1>contentOfFormField1</FormField1>
or
<FormField1 value = 'contentOfFormField1' />
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rodrigo,
how do I create the XML tags? The XML-tag name should be the content of SYMNAME and the tag value should be
the content of SYMVALUE.
Like this:
<SYMNAME>SYMVALUE</SYMNAME>
And in the IDoc, Symname and Symvalue are part of a structure, and each line is one symname/symvalue couple. That means,
all the lines of this segment should later be just one field value of FormContent in the webservice....
Example:
Line1:
SYMNAME --> testField1
SYMVALUE --> testContent1
Line2:
SYMNAME --> festField2
SYMVALUE --> testContent2
And this should later result in:
<testField1>testConent1</testField1><testField2>testContent2</testField2>
Sorry, it's a bit hard to explain...
let start from the begining.
first you dont have to create anyfield coz you will import the.wsdl to SAP PI. and second if you are sure that all the value going to be in order you could solve your issue ussing grapical mappping.
i mean:
SYMNAME --> testField1
SYMVALUE --> testContent1
SYMNAME --> testField2
SYMVALUE --> testContent2
SYMNAME --> testField3
SYMVALUE --> testContent3
....
...
so you just have to map the SYMVALUE to target value instand.
correct me if i miss something
Hello Michael.
I undertand that your XML result have to be dynamic, alright?
You can create a Datatype with one tag..line:
- Datatype
<TagRoot>
</Field>
</TagRoot>
- Datatype
So, your XML Result could be create within a tag <FIELD> in Message Mapping.
You can use a Java Mapping or XSLT Mapping.
Follow some links about this topics:
Generic XSLT Mapping for SAP XI, Part II.pdf
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
How to Optimize and Encrypt Your Exchange Infrastructure Java Mappings
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/91640c86-0b01-0010-5f9f-95e095674090
User | Count |
---|---|
86 | |
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.