on 01-21-2011 1:42 PM
Hi All,
I have a requirement where in i need to create a flat file in append mode . The requirement is as follows :
- In a week , SAP sends certain number of IDOCs to XI . For the first IDOC that comes in ,XI has create a file and later for the rest of the IDOCs ,XI just has to append the file contents .
- During the End of the week , the target system picks this file for processing.
My file structure is as follows:
Header
seg1
seg2
seg2
seg3
seg3
seg1
seg2
seg2
seg3
seg3
Trailer.
So ,while creating a file in append mode , is there any way apart from creating one more interface to pick the finally created file , i can make sure that the file gets written in the above format without header and trailer getting repeated.
Regards
Vinay P.
Hi All,
One more requirement regarding this interface is once all the idocs are sent to XI , at the end of the week SAP will send an outbound proxy message to XI . XI has to just create a control file from this message .
So,is there anyway where in i can use this proxy message as indicator to add Header and Tralier to the main file which will be containing only detail segments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> i can make sure that the file gets written in the above format without header and trailer getting repeated.
No, this is not possible. How should PI know, that it is the last idoc?
The header could be set by system command, but the trailer, I do not see a possible way.
Way you need header and trailer? Discuss this with your team, they could think about not using header and trailer at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi vinay,
During the End of the week , the target system picks this file for processing.
As the file is getting picked by target systems, why u need another interface.
if possible try getting a file at the end of day from ECC and avoid append at PI side
Regards,
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Vinay
If you don't want to use a new interface, you can use a operating system command in your target communication channel..
The OS script must:
pick up only one header line and move it to a temporal file. For example, with UNIX command you can do that with
grep "criteria" file | head -1 > temporal_file
pick up each detail line and move it to the temporal file.
pick up only the last trailer line and move it to the temporal file
Rename temporal file to final flat file.
Regards,
Carme.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.