on 02-11-2008 11:14 PM
Hi,
I have an input file with following rows (say):
1, 11, 111, 1111, cc1
2, 22, 222, 2222, cc1
3, 33, 333, 3333, cc1
4, 44, 444, 4444, cc2
5, 55, 555, 5555, cc2
6, 66, 666, 6666, cc3
How can I configure so that the file is split into multiple messages based on change in the last field i.e for the above example I should have the following messages..
Msg1 consisting of:
1, 11, 111, 1111, cc1
2, 22, 222, 2222, cc1
3, 33, 333, 3333, cc1
Msg2 consisting of:
4, 44, 444, 4444, cc2
5, 55, 555, 5555, cc2
Msg3 consisting of:
6, 66, 666, 6666, cc3
Note that cc1, cc2, cc3 etc. are variables but can be expected to arrive sorted like in above example. For example cc1 can be company 1000, cc2 can be company 1031, cc3 can be company 1032 etc. but in another instance, these may by companies 1020, 1021, 1051 etc. So without hardcoding the actual companies, how can I split for any company when there is a change in company. I would guess there was an easy way of doing this using node functions, not my strong point.
Thanks in advance
JB
James,
What's ur receiving system? See first use Content conversion in sender adapter and bring into XI. After getting the msg into XI, u can do mapping stuff and split them accoringly.
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Receiving system is SAP, with a RFC call. So the file is to be split into multiple postings by calling RFC wrapper for BAPI_ACC_DOCUMENT_POST for each company. In my example, the mapping should create 3 nodes for the request part of above BAPI with the next node being created when company changes.
The source structure is:
<Bank>
<Record> occur 1
<Row> occur 0 .. unbounded
<field1> occur 1
<field2> occur 1
<field3> occur 1
<field4> occur 1
<field5> occur 1 -- this field will be the company code based on which the file is to be split
The target structure is:
<BAPI_ACC_DOCUMENT_POST> occur 0 .. unbounded
...
...
Whenever there is change in company code, a new node above is to be created with subsequent rows going into the new instance with same mapping
James,
See the below snapshots in the URL
Mapping
http://flickr.com/photos/8764045@N06/2260194337/sizes/o/
Change ur target message occurrences in message mapping, Similarly don't forget to change in Interface mapping too.
http://flickr.com/photos/8764045@N06/2260194333/sizes/o/
Results
http://flickr.com/photos/8764045@N06/2260194335/sizes/o/
Are u looking for the above stuffs? Are u ok with it. Actually I don't know what logic u need to do with field1 to field4. I took only field5 and did the logic.
Reply back if it doesn't helps u!
raj.
Thanks Raj, that's a start.
For the individual fields, they should go into the corresponding <item> tag in the AccountGL tags of the target message as shown..
In my example, the <field1> tags under company cc1 should go into the first output tag <AccountGL><Item(1)>
the <field1> under company cc2 will go into <AccountGL>Item(1) under the next message tag etc.
ie.
BAPI_ACC_DOCU_POST(1)
....ACCOUNTGL
........item(1)
1, 11, 111, 1111, cc1
........item(2)
2, 22, 222, 2222, cc1
........item(3)
3, 33, 333, 3333, cc1
BAPI_ACC_DOCU_POST(2)
....ACCOUNTGL
........item(1)
4, 44, 444, 4444, cc2
........item(2)
5, 55, 555, 5555, cc2
BAPI_ACC_DOCU_POST(3)
....ACCOUNTGL
........item(1)
6, 66, 666, 6666, cc3
you can use the variable substitution method. http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.