07-06-2008 5:43 PM
Hi Friends,
Presently I have a requirement regarding creation of WPDBBY idocs, downloading them in flat files and sending the files in zipped form to the user.
1. In the first program bonusbuy records have to be fetched which have been created/changed during the selection period. for every selected bonusbuy record transaction WPMA is executed which will create an WPDBBY Idoc for the Bonusbuy.
2. In the second program the idocs created are taken as input. first all deletion idocs are sorted. A deletion idoc can be recognized because it only has one segment (E1WPBB01) and in this segment the field AENDKENNZ equals DELE. For every idoc a file is created The name of this file is determined via the Logical file from the selection screen, with a sequence number. It is then saved. All files are zipped en send. After processing of the Idocs, the Idoc status is changed to u201818u2019.
If any of you have information about how to do this then pls tell me. I will definitely reward points for your heplful answers. Thanks!
Regards,
Abhishek
07-06-2008 9:20 PM
Hello Abishek
To create flat-files from your IDocs you just need to send them to a FILE port (WE21).
Regards
Uwe
07-11-2008 11:57 AM
i am not using XI. in the 1st program the transaction zwpma is called which creates an idoc. in second program the idocs which are created are the inputs. those are downlodea as flat file. the files are zipped and sent.
can u also suggest how to zip the files and then send.
07-11-2008 6:31 PM
Hi,
For creating zip files and related processing use class cl_abap_zip.
You can check sample code at
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/dynamicTransformationofInternaltabledataintoXMLandCreatingaZIPFile
..very easy to use.
Regards,
Abhijit
08-14-2008 12:27 PM