06-29-2007 7:23 AM
hi all,
I am fetching data froM sap system and storing them into an internal table,but to store this data on application server i have to create <b>Header and Trailer</b>.
Can anybody send me any sample code as how to create <b>header</b> and <b>trailer</b> record for an outbound interface.
reply soon
ANIL RAINA
06-29-2007 7:40 AM
Header & Trailer records are nothing but the columns need to be appended in the starting and end of the downloadng internal table.
There formats depend on the client requirement so check the formats with the existing sample files or the functional consultant.
Regards,
Amit
reward all helpful replies.
06-29-2007 7:39 AM
Hi create a variable of type l_v_filename_temp TYPE draw-filep,
OPEN DATASET l_v_filename_temp FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
create work areas withe required data
l_wa_header TYPE ty_header, "table for header data
l_wa_record TYPE ty_record. "table for record data
pass the data to these structures.
for header only once fill header workk area and pass it
TRANSFER l_wa_header TO l_v_filename_temp
loop the item record table and pass the data to the structure
l_wa_record
in the loop keep on transfering to
TRANSFER l_wa_record TO l_v_filename_temp.
If you wnat to send soem trailer datta use the same method.
and at the end
CLOSE DATASET l_v_filename_temp.
if you have any doubts reply me back.
Reward points if useful.
Regards,
sasi
06-29-2007 12:07 PM
thanks guys u people gave me an exact idea hw to approach the interface............
one more thing i want to ask is the method of placing data in application server -
is <b>OPEN DATASET</b>. as written by <b>sasidhar</b> .
then where does <b>FTP</b> COME INTO EXISTENCE....................
CAN I TRANSFER DAT USING FTP ALSO TO APPLICATION SERVER.
06-29-2007 1:01 PM
Normally FTP is used to get data from other systems.Here there is no need of this.
Regards,
Sasi
06-29-2007 7:40 AM
Header & Trailer records are nothing but the columns need to be appended in the starting and end of the downloadng internal table.
There formats depend on the client requirement so check the formats with the existing sample files or the functional consultant.
Regards,
Amit
reward all helpful replies.