on 09-03-2015 6:10 AM
Hi All,
I have a requirement where in i need to add one file header to a file in append mode .
The requirement is as follows :
In a day , SAP sends certain number of IDOCs to XI . For the first IDOC that comes in ,XI has to create a file and later for the rest of the IDOCs ,XI just has to append the file content .
My file structure should be as follows:
Header
Seg1
Seg2
seg3
Seg4
Seg5
seg6
Getting Output as:
Header
Seg1
Seg2
seg3
Header
Seg4
Seg5
seg6
While creating a file in append mode at receiver , the header record getting appended all the time when the Idoc comes.
Any pointers/suggestions/ideas will be helpful to get the file header only once .
FCC configured parameters:
Thanks for your help,
Gouse
Gouse,
I hope you had checked this conversation
if you dont want to do this by UDF...i can suggest you an simple way to achieve this.
As you said final file will process from Inbound folder ones a day, you can do create two flows.
one is as you had done working as
While creating a file in append mode at receiver , the header record getting appended all the time when the Idoc comes.
here you use dummy folder(some thing like Temp folder in ALL11)
and second flow is from the Temp folder you can pick the file and process the same file to original file,
and in mapping level use colapscontaex function for Header data to send first header row values.
and this flow(interface) should be run at end of the day(11:59 PM) every day..this can be done by availability time planing option in RWB.
hope this will helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gouse,
in your structure, i am not able to see header fields, did you create?
create structure like below
MT_Cust
Item
header
field1
field2
field3
itemRecord
field4
field5
field6
field7
even after you create structure you can not ignore headers depending existed file at target folder unless you follow as i suggested earlier post and coming to UDF i am not sure how to write the logic to check the file exist or not at target folder. at lost if you unable to do it , you can just think about two flows:)
I want ItemRecord feilds in my file.
Can you try the below highlighted option in FCC configuration and let me know if you still facing issues.
Set the parameters for all the specified recordset structures NameA, NameB,... in the following table:
○ NameA.addHeaderLine
Specify whether the text file will have a header line with column names. The following values are permitted:
■ 0 – No header line
■ 1 – Header line with column names from the XML document
■ 2 – As for 1, followed by a blank line
■ 3 – Header line is stored as NameA.headerLine in the configuration and is applied
■ 4 – As for 3, followed by a blank line
Hi Gouse,
To which one you have mentioned header names explicitly in the FCC, is it for ITEM or Itemrecord.
I assume ITEM comes only once and below that you will get multiple Itemrecords also.
If yes, then pls include the header names for ITEM level in the FCC so that header names will come only once in your flat file.
Try this and let me know if you still struck anywhere.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.