Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Flat file having multiple header lines , how to separate the same and pushit into my intrnal table

Former Member
0 Likes
728


Hi Guys,

                I got an issue , My flat file having multiple header lines

TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2

09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE

Company No: xxxxxxxx - xxxxxxxxxxxxx.

____________________________________________________________________________________________________________________________________

                                                                        Employee/       Employee/

Employee Full Name/                                                       Company         Company                        Allocation

Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage

____________________________________________________________________________________________________________________________________

some lines of data and again

TPS27RPR  MOME                                      THRIFT (SAVING) PLAN SYSTEM                                           Page    2

09:54 05 JAN 2014                          List of Contributors w/Company Contributions                           Phase DAY Unit TRE

Company No: xxxxxxxx - xxxxxxxxxxxxx.

____________________________________________________________________________________________________________________________________

                                                                        Employee/       Employee/

Employee Full Name/                                                       Company         Company                        Allocation

Number  ID Number                           PS  PN  End Date        Contribution          Profit        Total Balance   Percentage

____________________________________________________________________________________________________________________________________

in this case how could I separate the header lines from the flat file and update the details to my internal table.

kindly help me on this issue.

Thanks and regards,

M.S.Amirtharajvijay.

1 ACCEPTED SOLUTION
Read only

GirieshM
Active Contributor
0 Likes
619

Hi Amirthraj,

If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.

With Regards,

Giriesh M

2 REPLIES 2
Read only

GirieshM
Active Contributor
0 Likes
620

Hi Amirthraj,

If the flat file is static (if the content within it is same for all) then use the offset concept. First get the contents of the flat file into an internal table and later find the field that has to be in final internal table within the line, calculate the offset for the line and get the value into an workarea. Finally modify/append the work area into an internal table. Also wait for other experts answers for any other hassle free way to achieve the requirement.

With Regards,

Giriesh M

Read only

Former Member
0 Likes
619

Hi Giriesh,

                 Thanks for your reply currently I am working with contains string ,CS to remove the header list

and moving the line item into an another internal table.

this logic is working for me but a bit conflict solution.

any way thanks for your support.lets I wait for further replies also.

thanks & regards,

Vijay.