on 05-09-2007 2:43 PM
Hi Friends,
I have a input xml file :-
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp1 (http://www.altova.com) by Administrator (EMBRACE) -->
<BAPI_PROCORD_GET_DETAIL>
<INPUT>
<COLLECTIVE_ORDER>111</COLLECTIVE_ORDER>
<NUMBER>123</NUMBER>
<ORDER_OBJECTS>
<HEADER>header</HEADER>
<POSITION>position</POSITION>
<SEQUENCES>sequences</SEQUENCES>
<PHASES>phases</PHASES>
<COMPONENTS>components</COMPONENTS>
</ORDER_OBJECTS>
</INPUT>
<TABLES>
<COMPONENT>
<item>
<RESERVATION_NUMBER>1001</RESERVATION_NUMBER>
<RESERVATION_ITEM>aaa</RESERVATION_ITEM>
<RESERVATION_TYPE>bbb</RESERVATION_TYPE>
<DELETION_INDICATOR>ccc</DELETION_INDICATOR>
<MATERIAL>ddd</MATERIAL>
<PROD_PLANT>eee</PROD_PLANT>
<BATCH>batch1</BATCH>
</item>
</COMPONENT>
<HEADER>
<item>
<ORDER_NUMBER>56743900</ORDER_NUMBER>
<PRODUCTION_PLANT>hfcgjcgc</PRODUCTION_PLANT>
<MATERIAL>fdfdd</MATERIAL>
<FINISH_DATE>12.07.05</FINISH_DATE>
<START_DATE>12.01.02</START_DATE>
<SCRAP>dgdds</SCRAP>
<UNIT>dhdhsr</UNIT>
</item>
</HEADER>
<PHASE>
<item>
<ROUTING_NO>443</ROUTING_NO>
<COUNTER>sgsrhs</COUNTER>
<CONF_NO>sgsrgsg</CONF_NO>
<UNIT>tjuyjj</UNIT>
<QUANTITY>drhhh</QUANTITY>
<SCRAP>rhhrh</SCRAP>
<DESCRIPTION>rjejdtj</DESCRIPTION>
</item>
</PHASE>
<POSITION>
<item>
<ORDER_NUMBER>763920987</ORDER_NUMBER>
<SCRAP>DHDDG</SCRAP>
<QUANTITY>354</QUANTITY>
<MATERIAL>hsgsh</MATERIAL>
<BATCH>shshh</BATCH>
<ORDER_ITEM_NUMBER>2343</ORDER_ITEM_NUMBER>
<BASE_UNIT>hgdhdh</BASE_UNIT>
</item>
</POSITION>
<SEQUENCE>
<item>
<ROUTING_NO>3545</ROUTING_NO>
<COUNTER>GDH</COUNTER>
<DESCRIPTION>fsgfd</DESCRIPTION>
<GROUP_COUNTER>fdgfd</GROUP_COUNTER>
<BRANCH_OPERATION>gfgsg</BRANCH_OPERATION>
<RET_OPERATION>egeg</RET_OPERATION>
<SEQ_NO>345</SEQ_NO>
</item>
</SEQUENCE>
</TABLES>
</BAPI_PROCORD_GET_DETAIL>
I want the output to look like this :-
<?xml version="1.0" encoding="UTF-8"?>
<EquipmentInformation DateCreated="2007-05-09T18:50:39" EndDate="2007-05-09T18:08:25" StartDate="2007-05-09T18:08:25" Version="11.5.1">
<EquipmentSegment>
<Component>
<Material>fdfdd</Material>
<Scrap>dgdds</Scrap>
<Unit>dhdhsr</Unit>
</Component>
</EquipmentSegment>
<EquipmentSegment>
<Phase>
<Counter>sgsrhs</Counter>
<Unit>tjuyjj</Unit>
<Scrap>rhhrh</Scrap>
</Phase>
</EquipmentSegment>
<EquipmentSegment>
<Header>
<Material>ddd</Material>
<Prod_plant>eee</Prod_plant>
<Batch>batch1</Batch>
</Header>
</EquipmentSegment>
</Rowsets>
But I am getting the output like this :--
<?xml version="1.0" encoding="UTF-8"?>
<Rowsets DateCreated="2007-05-09T18:50:39" EndDate="2007-05-09T18:08:25" StartDate="2007-05-09T18:08:25" Version="11.5.1">
<Rowset>
<Row>
<Material>fdfdd</Material>
<Scrap>dgdds</Scrap>
<Unit>dhdhsr</Unit>
</Row>
</Rowset>
<Rowset>
<Row>
<Counter>sgsrhs</Counter>
<Unit>tjuyjj</Unit>
<Scrap>rhhrh</Scrap>
</Row>
</Rowset>
<Rowset>
<Row>
<Material>ddd</Material>
<Prod_plant>eee</Prod_plant>
<Batch>batch1</Batch>
</Row>
</Rowset>
</Rowsets>
Can anybody please let me know as to how to rename Rowsets, Rowset and Row into the desirable tag name??
This is urgent.
Thanks in Advance,
Lipsa
Lipsa,
Ryan's suggestion is correct.Just create a xml transaction property with the output xml structure that you want.
And then from your BAPI response map then accordingly to your transaction Property. In case you have multiple items returned in tables Component, Phase, etc, have a repeater that repeats on these items and then assign them to your xml transaction property
Hope this helps
Regards,
Ajitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Friends,
The answers were pretty much helpful.
But I was confused.
I have a simple input xml file :-
<?xml version="1.0" encoding="UTF-8"?>
<CampaignDetails>
<CampaignID> 1</CampaignID>
<CampaignID> 2</CampaignID>
<CampaignID> 3</CampaignID>
<StartTime CampaignID="1"> st1</StartTime>
<StartTime CampaignID="2"> st2</StartTime>
<StartTime CampaignID="3"> st3</StartTime>
<EndTime CampaignID="1">et1</EndTime>
<EndTime CampaignID="2">et2</EndTime>
<EndTime CampaignID="3">et3</EndTime>
<Description CampaignID="1"> This is Campaign 1</Description>
<Description CampaignID="2"> This is Campaign 2</Description>
<Description CampaignID="3"> This is Campaign 3</Description>
</CampaignDetails>
And I want the output as :-
<?xml version="1.0" encoding="UTF-8"?>
<CampaignDetails>
<Campaign>
<ID>1</ID>
<Description> This is campaign 1</Description>
<StartTime> st1</StartTime>
<EndTime> et1</EndTime>
</Campaign>
<Campaign>
<ID>1</ID>
<Description> This is campaign 2</Description>
<StartTime> st2</StartTime>
<EndTime> et2</EndTime>
</Campaign>
<Campaign>
<ID>1</ID>
<Description> This is campaign 3</Description>
<StartTime> st3</StartTime>
<EndTime> et3</EndTime>
</Campaign>
</CampaignDetails>
Can anybody please suggest me steps in details as to how do I achieve this??
Thanks,
Lipsa.
The result of an IllumDocument is a Rowsets/Rowset/Row format. If you know the schema of the xML document you want, create a Transaction Property of type XML and use the Assignment action block to assign data to the correct nodes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.