cancel
Showing results for 
Search instead for 
Did you mean: 

File recevier in append mode FCC parameter used - header line getting repeated

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

maheswarareddykonda
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Maheswarareddy ,

I want to use the UDF any pointers to help regarding same.

Thanks,

Gouse

pvishnuvardan_reddy
Active Contributor
0 Kudos

Hi Gouse,

Similar issue has been discussed in the below thread. Can you check once.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Vishnu,

Thanks for the link..as per that link, you had suggested blog which is explained about idoc packaging configuration.

but here how we can configure package number, which is not aware how many idoc will process per day.

Thanks again

Former Member
0 Kudos

Hi Vishnu,

I have tried using Idoc Pakage.still no header in the output file.

this is the structure:

and the below is the FCC parameters configured:

Thanks,

Mohammed Gouse

maheswarareddykonda
Active Contributor
0 Kudos

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:)

Former Member
0 Kudos

Hi Mahesh,

I dont have header fields

MT_Cust

   Item

     itemRecord

          field1

          field2

          field3

          field4

I want ItemRecord feilds in my file.

Thanks,

Gouse

maheswarareddykonda
Active Contributor
0 Kudos
Any pointers/suggestions/ideas will be helpful to get the file header only once .

OK,can you explain some more infor what header you are expecting?


pvishnuvardan_reddy
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Vishnu,

I tried it but getting the repeated header lines.

3 makes difference is that we can define the header line names.

Thanks,

Gouse

pvishnuvardan_reddy
Active Contributor
0 Kudos

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.