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

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

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

Similar Messages

  • Need to create sale order from the flat file & mail has to be sent

    Hi Experts,
              I have a requirement to create a sale order from a flat file and once the oder is created, mail has to be sent to customer as well as to internal user with the order details. I want to know how this process can be implemented and what adapters are needed to execute this.
    it would be very helpful, if i get an step-by-step procedure.
    Points assured for any helpful answers.
    Thanks in Advance
    Jai

    HI Jai,
    You need to create two interfaces as file will be sending the Sales oreder details that you need to capture in IDOC or RFC and then have to trigger to create the sales order. For this Standard BAPIs are also available.
    These RFC or BAPIs will response with Sales order details that you need to divert to Mail adapter with the use of BPM and also have to go for Async to Sync bridge.
    File -
    >XI (BPM) ---> BAPI/RFC  (Request)
    MailAdapter <- XI (BPM) <--- BAPI/RFC (Response)
    For this refer below links for step by step
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm - Walk through BPM
    /people/siva.maranani/blog/2005/05/22/schedule-your-bpm - Schedule BPM
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in ccBPM
    If you will use IDOC then In IDOC inbound processing you need to trigger for Sales order creation and then have to send the Sales Order generated IDOC as an Outbound to Mail Adapter
    Flat file -
    > XI ---> IDOC
    IDOC -
    > XI ---> Mail
    This will be bit easy scenario to develope as compare to using BAPI with BPM
    /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping - Any flat file to any Idoc
    configuring IDOC-XI-Mail scenario using following web-log:
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
    Thanks
    Swarup

  • Creating reconciliation events from a flat file--a design question

    Hello,
    I am currently evaluating an existing OIM implementation to rebuild it using OIM 11g and have a question regarding the ideal method to create reconciliation events from a flat file.
    The current implementation is using a web service call to process a flat file and creates the reconciliation events. This runs every hour.
    Although this looks cool but I thought there was no need to go to the extent.
    If OIM cannot consume the flat file directly, meaning if it needs some data massage, I can always load the data from the flat file into an external table, write a pl/sql procedure to transform the data and put it into a temporary global table and create reconciliation events like that.
    What would be the ideal method to load data from a flat file into OIM?
    THanks
    Khanh

    If it's a flat file, then have you looked at GTC option? And why any staging in between? OIM can read flat files just fine either through GTC or write up your own recon code.
    -Bikash

  • My Iphone 4 will not send regular SMS messages. I have tried resetting my phone and by restoring and making sure i have SMS turned on. I receive them but can not send them. imessages work also. Plus my cellular data keeps randomly turning off. any ideas?

    My Iphone 4 will not send regular SMS messages. I have tried resetting my phone and by restoring and making sure i have SMS turned on. I receive them but can not send them. imessages work also. Plus my cellular data keeps randomly turning off. any ideas? Thank you

    Yes I have turned imessage off a number of times and that does not seem to he doing the trick, and it is not delivering them then I have to press on the photo and either chose try again or send as text message, I have had the setting on to not allow sending pictures as texts (so they can only send as imessage) since I got my phone in January and it has always worked until now, I have turned that off to allow me to send them as picture messages now but it's still not working over iMessage, I have also tried it using 3G and not wifi

  • How to send an iDoc from XI to flat file

    hi,
    I have send an IDoc from R/3 to XI.The iDoc is being received by XI.Now,I need to send this iDoc to Flat file.
    For this,What i need to do?
    can any body help me step by step in this regard..........
    Thanx in advance..
    Sridhar Raju Mahali

    Hi Sridhar,
    Hope you are clear with the XI portion.
    Now for sending the data from IDOC to XI follow these steps...
    1.create an RFC destination pointing to <i>XI server</i> in the Business System where IDOC is present, using transaction sm59
    2.create a tRFC port in the same Business System using transaction we21
    3.create a logical system name using transaction bd54
    4.then create a partner profile  using transaction we20
    5.Now log on to the Business System where IDOC is created.
    6.go to we19..execute the idoc and give standard outbound processing on
    7.on the values given click and give the sender and recipeint port and partner name and type..
    Hope this will help you...
    Regards
    Suraj

  • Idoc XML to a flat File

    Hello everybody,
    On my system SAP, i need to send a IDOC to XI who convert it to a flat file idoc like this :
    SAP => IDOC XML => XI => FLAT FILE IDOC.
    Can anyone help me on this subject.
    Thanks

    If you need the file in the idoc structure itself, I would suggest to create the file in R/3 and poll the file from XI.
    Otherwise creating a flat file from the IDOC XML using the file-content conversion will be very cumbersome.
    I don't find any other way to create the idoc flat file, anyone has a better idea??
    But the polling solution will not work online. Still assuming that the file you create in the output side will be polled at some regular interval by some other application, make the polling frequency of the XI sender adapter same as the one of application at the output side should be enough.
    If you are doing this as an experiment, I suggest you to create a file-content-conversion
    regards,
    kk

  • Creating a business sytem for flat file

    i am using proxy  to file scenerio, where i am using a FTP server , i dont know how to create a business sytem for that in sld please help me in this, and i have one interface running for IDOC to JDBC already , where can i use this Busniess sytem same for Proxy , which is R/3 ,in my case sender service
    thanking you
    Edited by: sridhar loganathan on Nov 5, 2008 7:45 AM

    Hi Sridhar,
    You need to create a third part system for File System i.e. FTP
    in case you are using the FTP server which is same as of yours JDBC system then u can use the same.
    and for Proxy side you can use the same BS you used for IDOC.
    Check these blogs for better understaning:
    ABAP Proxies in XI(Client Proxy)
    Along came a File Adapter, Mr. 'FTP' and Rest of the Gang
    Sachin

  • IDOC creation from a flat file

    We currently receive a large volume of invoices from freight companies that move our product from point A to B.
    I will receive a file from the vendor with 10 fields.  The fields are BOL, shipdate, shipfrom_pt, shipto_pt, volume, rate, surcharge, total, invoice_no, invoice_dt.
    I may also get them to plug in the Vendor number on creation.
    Currently, our staff uses paper invoice with the BOL & shipdate to locate the PO in our system, then lookup the PO, and if the total in SAP matches to the total on the paper invoice, it is marked for payment (that is the short of it).
    We have eVision already in place which I use to build an iDOC for our Utility bills we receive.  But these occur once a month, whereas we may receive 50+ invoices from a freight vendor.
    Do I have enough information to create an iDOC in SAP, in which SAP will know how to locate and reconcile?  The invoic01 documentation is extensive and examples are nill.  Help on identifying the segments, fields and values necessary to generate an iDOC.
    The alternative is to import the file into SAP and write an ABAP pgm, with BAPI's to search and create the invoice.
    I wanted to go with iDOC as it is SAP's proprietary form for handling inbound records.
    Ralph

    Hi Ralph,
       In my opinion, you must have a PO Number for Invoice if you want to use standard functionality. You will probably need to create IDOC using an ABAP program which reads this file and search for PO based on the information available to you. I also notice that you are missing material number as well, how do you match the item number in the PO ?
       I don't see a way aroung without writing an ABAP program to handle this logic, but you can still use IDOC ( which comes with the standard processing logic and that is a big advantage ) so that you need to write only the PO matching logic.
      or if you are not inclined to write a separate program for uploading file into SAP and formatting IDOC, you can write your own process code (FM)for INVOICE01. Inside this process code (FM), you can put your PO matching logic and then call standard FM (process code). This is what I usually do.
    Cheers,
    Sanjeev
    Cheers,
    Sanjeev

  • TO IGNORE A HEADER IN A FLAT FILE (SENDER) XI

    Developing a solution XI in file-jdbc cenario and
    the file is a flat file with header line  and various
    detail lines. I need to write  the jdbc table ignoring
    the header line of the flat file. How can We do this?
    Someone can help me?
    Thanks and regards,
    Midervilson.

    Hi Midervilson,
    If you are using a content conversion based on key fields in the sender file adapter and if your header and details are differentiated by a key field then you can ignore them in content conversion itself. i.e say if your header is identified by a key field value '1' and  details are identified by a key field value '2'  then just configure your file content conversion  details alone and your header will be automatically ignored.
    Otherway you can achive this is using mapping. while mapping do not map your header from source to JDBC structure.
    hope this helps...
    Regards
    Anand
    Message was edited by: Anand Torgal

  • Inputs requried to create purchase order report from flat file

    inputs requried to create purchase order report from flat file

    At a guess, I'd say purchase order data.
    If you don't give us a clue what you are actually trying to do we can't really help you too much.
    Do you want to call a BAPI?  Do a BDC?  Use an IDOC?  Or just generally muck up the system by doing inserts into the purchasing tables?
    No doubt if you tell us, you'll get lots and lots of suggestions.
    Gareth.

  • Create the Product Catalog from Flat file

    Hi,
    We have a requirement to create the Product catalog (CRM) from flat file data. We have the required data like Product catalog ID, description, sub areas and products are present in the Exel file. Now we need to create product catalog automatically using the report. Can u give me any pointers on what FM and BAdis to be callled in this report?.
    Thanks and Regards,
    S Reddy

    Link:[Create product basic Data|http://esoadocu.sap.com/socoview(bD1lbiZjPTAwMSZkPW1pbg==)/render.asp?packageid=DDC84252E3AEF0F1AA5A001A64D3F460&id=8C145DB8CF3A11DC2B8D000F20FCB6A9]

  • Convert created idoc to an output text file

    Hi,
    How can i convert an idoc to an output text file? is there a standard program in SAP that does this?
    Thanks,
    Tots

    Hi,
    We can do it.
    The steps are
    1. Create a xml file port (we21)
      2. Create a partner profile point to the file port.
      3. Make sure the idocs are genereated.
    4  . Run the staandard program (RSEOUT001) with the port and required details in teh selection screen.
    The idocs will be generated to a xml file .
    Regards

  • Convert IDOC XML structure to flat file - and now?

    Hi,
    we are working with input message ORDERS05 and want to convert it to flat file.
    So we used the implementation description from "how to convert an IDOC-XML structure to a flat file....".
    Looks like this is a standard procedure described here fitting for all IDOCs.
    We followed the guide, making XI ready for Abap-Mapping, implemented the Abap class like described, added an interface mapping with source ORDERS05 to a mess.type dummy destination, added with type Abap-class the class implemented from the guide and completed the Int.Dir. implementation.
    For comparism purpose we have two systems as receiver, one with a standard flat file with regular graph.mapping in XI, one with the Abap mapping.
    Result:
    Error description in SXMB_MONI:
    Didn´t expect something like that! The IDOC was delivered successfully to the other simple flat file receiver.
    Any idea what we made wrong (we are on SP17) or if there is a standard mistake you can do when following the guide?
    Best regards
    Dirk

    Hi,
    I've got the same problem. He the solution in my case:
    The problem is:
    My IDOC has no element <STDMES>, but the method IF_MAPPING~EXECUTE from the 'HOW-TO Guide' does not check this situation:
    el_element = idocument->find_from_name('STDMES').
    ls_edidc-stdmes = el_element->get_value().
    thows the exception.
    Solution:
    make shure that the field STDMESis set or change the method to:
    el_element = idocument->find_from_name('STDMES').
    if not el_element is initial.
        ls_edidc-stdmes = el_element->get_value().
    endif.
    Best regards
    Dieter

  • Not Able to Pass IDOC greek characters to Flat File?

    Hi Experts,
    I am working on IDOC to Flat file scenario where IDOC is passing greek characters but Flat file has ???????????(question marks)
    Do I need to do some configurations to get actual greek letters?
    Thanks
    Rajeev

    Hi,
    >>I am working on IDOC to Flat file scenario where IDOC is passing greek characters but Flat file has ???????????(question marks)
    Try writing the file in bin mode.
    Try this content type ISO-8859-7
    Regards
    Suraj

  • How can we save multiple IDocs as a single Flat file in R/3 system ?

    Hi,
    How can we save Multiple Idocs as a single Flat IDoc in R/3 (Not xmlized)
    Kulwinder

    Hi,
    Check this link for Mutiple IDOCs into single File.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Regards,
    phani
    Reward points if Helpful:)

Maybe you are looking for

  • Convert 11X17 to 8-1/2 X 11

    I publish a community newsletter. The printer would like to receive pdf files 2 pages wide. That is, Page 16 and page 1 side by side laid out landcape 2 columns per page. This makes 8 pages for a 16 page newsletter. However pefore printing I would li

  • Shown PDF loses Form Fields

    Hi Perhaps someone could please help me I have a PDF that is built from 3 seperate PDF's into 1.   Each PDF has form fields that are filled with data by my software, then the resulting PDF is saved to a temporary PDF.   When I load that PDF into Adob

  • Problems with attachments going corrupt from Mail in the dock when sending?

    I have had my Mac G5 Tower at home now for a couple of years now and have always had a problem with sending attachments to any one from my .mac account with mail in the dock. The error massage people would tell they were getting from the files that I

  • JasperReports - passing parameters at runtime - Issue

    I want to create JR from a DB passing parameters for the portions of sql query, field name etc. A particular case is working when <parameter name="dbname" class="java.lang.string" /> <queryString><![CDATA[SELECT * from $P{dbname}]]></queryString> <fi

  • Re installed hp up date, doesn't work

    hi peeps re installed hp update because it was hanging/freezing and guess what, it still is hanging/freezing. be grateful if anyone could suggest a solution