Application Development 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: 

Creating idoc,downloading them in flat-files,sending them in zipped form

Former Member
0 Kudos

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

4 REPLIES 4

uwe_schieferstein
Active Contributor
0 Kudos

Hello Abishek

To create flat-files from your IDocs you just need to send them to a FILE port (WE21).

Regards

Uwe

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

it is solved now. some other issues were there.