Skip to Content
0
Former Member
Oct 07, 2009 at 01:26 AM

flat file with header and item data to the internal tables

787 Views

experts help needed

i am having a flat file like this in application server.

if the first field is hd then it represents header and items is represented by it.

Now i want to download this into internal table.

hd ponumber11 customernumber podate deliverydate

it material1 materialtext quantity price plant

it material2 materialtext quantity price plant

it material3 materialtext quantity price plant

hd ponumber21 customernumber podate deliverydate

it material1 materialtext quantity price plant

it material2 materialtext quantity price plant

it material3 materialtext quantity price plant

hd ponumber31 customernumber podate deliverydate

it material1 materialtext quantity price plant

it material2 materialtext quantity price plant

it material3 materialtext quantity price plant

1)Do i need to declare 2 internal tables or one ie one for header and another for item or single internal table with all the fields?

2)if i declare 2 interanl tables how to check ie which is header and which is item and how to populate into interanl table from the application server file?

READ DATASET file INTO itab_header . " if i say like this it will be problem because we are having two differnet structures in flat file ie header and item, so please help

3)after downlaoding to 2 internal tables how can i know which items belong to which header?

but by seeing the flat file we can say below hd all the items belong to that header etc.

so please me , how many tables i want and how to populate into itabs using read data set and how to know which items belongs to which header , because with this data i need to crea te the sales orders..