on 11-08-2010 3:00 PM
Hello Friends,
I have a requirement like we need to create multiple files at the target side from a single file at the source side.
The files will be splitted on the basis of Invoice number.
we have a single file which will have all the Invoice details (line item) in a single file
for eg. sample file
invoice number* inv item item description
1234 10 test1
1234 20 test2
1234 30 test3
1235 10 test13
1235 20 test14
1236 10 test15
1236 20 test234
we have details of 3 invoices 1234,1235 and 1236.
we want 3 files to be generated at the target side for this
1st file is like:
1234 10 test1
1234 20 test2
1234 30 test3
2nd file is like:
1235 10 test13
1235 20 test14
3rd file is like
1236 10 test15
1236 20 test234
Please guide me with the development approach for this.
Please let me know if the requirement is not clear and you need more information on this.
Thanks
Kannu reen.
1)Create structure like below, both sender and target structire going to be same, and do file content converion in seder channle.
<invoice>------>1 to unbounded
<invoicenumber> 1..1
<invoiceitem> 1..1
<invoicedescription>1..1
</invoice>
2) implement multi mapping, change occurace of structure in message mapping signature tab to 0 to Unbounded, same chnage required in operation mapping also for inbound service interface
3)use node functions in mapping
suppose if your target message type name MT_INVOICE_TARGET
then create mapping like below
invoicenumber-->removecontexts-->sort-->splitbyvalue(valuechange)-->collapsecontect-->MT_INVOICE_Target
invoicenumber-->removecontexts-->sort-->splitbyvalue(valuechange)-->invoice
invoicenumber-->invoice
invoiceitem-->invoice
invoicedescription-->invoicedescription
this will work perfectly, i have tested.
Regards,
RAJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do Multi Mapping. It will resolve this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kannu,
why not to use mapping based mess split ?
http://help.sap.com/saphelp_nwpi711/helpdata/en/48/cf944768583172e10000000a42189b/frameset.htm
BR
Rudolf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
create xml structure like below
<invoice>------>1 to unbounded
<invoicenumber> 1..1
<invoiceitem> 1..1
<invoicedescription>1..1
</invoice>
target strcure source structure going to be same, use node functions split by value,formatby example to split the record when value get changed(invoice number).
regards,
raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.