Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ccc_ccc
Active Contributor


1 Create open hub as like below.



2 HEADER column is holding headers data and length is 200, you can change according to your requirement.



3 Do not map in transformation for Header column.

4 And write below ABAP code in End Routine

data: t_rs type standard table of _ty_s_TG_1.

data: wa_rs type _ty_s_TG_1.

clear: t_rs.

wa_rs-header = 'HED;MATERIAL;MATERIAL_GROUP;MATERIAL_TYPE'.

append wa_rs to t_rs.

clear: wa_rs.

loop at RESULT_PACKAGE into wa_rs.

wa_rs-header = 'Header'.

append wa_rs to t_rs.

endloop.

clear: RESULT_PACKAGE.

RESULT_PACKAGE[] = t_rs[].

5 we will get Flat file output as like below

HED, MATERIAL, MATERIAL_GROUP, MATERIAL_TYPE--> Header information

Header;LUX,ZBC,HC--> Actual data

 

 

 

 

20 Comments
Labels in this area