Write incorrect record to Unix file and not load to PSA

Hi,
Is there anyway to write an incorrect record to a file from the transfer rules, such as if the record is not found after a search through one of the master data table, it should not load to the PSA but write to a UNIX file? What would be the ABAP code?
Thanks,
Will

Hi Will,
Transfer rules are processed after data are loaded to PSA. So you can only avoid that records are updated to info providers and write them to a file on your application server.
If you really want to manipulate records in PSA you need to load required data to PSA within a process chain and to add a report that deletes the records from PSA and writes them to a file.
The steps are
1. Transfer rules
     1.create a start routine
     2.load required masterdata to an internal table
     3.loop at datapak
     4.delete records according to conditions
     5.append records to an internal table
     6.load file from internal table
2. PSA
     1..Create a report
     2. Load PSA request into an intenal table
     3.load required masterdata to an internal table
     4. loop at ‘internal’ PSA
     5 .delete records according to conditions
     6.append records to an internal table
     7.load file from internal table
Hope this helps
Joe

Similar Messages

  • Reading Data from Unix file and write into an Internal table

    Dear all,
                     I am having an requirement of reading data from unix file and write the same into an internal table..how to do that ...experts please help me in this regard.

    Hi,
    do like this
    PARAMETERS: p_unix LIKE rlgrap-filename OBLIGATORY.
    DATA: v_buffer(2047) TYPE c.
    DATA: BEGIN OF i_buffer OCCURS 0,
            line(2047) TYPE c,
    END OF i_buffer.
    * Open the unix file..
    OPEN DATASET p_unix FOR INPUT IN TEXT MODE.
    <b>IF sy-subrc NE 0.
    *** Error Message "Unable to open file.
    ELSE.</b>
       DO.
         CLEAR: v_buffer.
         READ DATASET p_unix INTO v_buffer.
         IF sy-subrc NE 0.
            EXIT.
         ENDIF.
         MOVE v_buffer TO i_buffer.
         APPEND i_buffer.
      ENDDO.
    ENDIF.
    CLOSE DATASET p_unix.
    <b>Reward points if it helps,</b>
    Satish

  • Unix file path not working to retrieve file

    I have an application I developed on a Windows machine to generate some XML and then later read it. Well when I generate on my Windows machine it works fine, and then I can read it with no problem. When I generate on the Unix machine, It works fine, but I can not read the file at all. The path is correct, the file is there, Java just can't read it for some reason, I get a FileNotFoundException. It gets the path from a properties file, then adds the filename to the path and tries to retrieve it. The path looks like this /pages/content/net/tool/Custom.xml and when I vi the file vi can read it fine. So anyone run across this before, not being able to read the file at all? To generate I use betwixt and to read I use digester.
    Thanks in advance.

    I am going to give you the output here, and all of the configuration info as well and the checkSlash method too. But I suspect what is happening is some kind of stream/os control is holding on to the file and not letting someone take a look at it in the application level. If it's not that then it's a permission issue, which I chmod'ed the file and made rw-rw-r-- (it was rw-r--r--)just like the files that already work. Also I winSCP'ed into the box and tried a simple overwrite with another file of the same name and got a permision denied.
    my application level exception :
    com.spectra.common.CommonException:
    /pages/content/net/tool/OpFinderCategoryReview.xml 
    (No such file or directory)
    the real exception thrown by the application:
    Caused by: java.io.FileNotFoundException:
    /pages/content/net/tool/OpFinderCategoryReview.xml 
    (No such file or directory)
    /*this method checks the file name passed in and see if it leads
    with a slash to cap on the end of the path from the properties file
    which is /pages/content/net/tool/ */
    private String checkSlash(String fileName) {
       if(fileName != null && !fileName.startsWith("/"))
         return "/"+fileName ;
       return fileName ;
    /*I use betwixt to write out the XML for me and then I try and use it but it fails . this is the way I call betwixt */
    try {
                  WizardProduct wizProduct = (WizardProduct)request.getSession().getAttribute(PricingResources.WIZARD) ;
                  String fileName = CommonUtil.checkSlash(this.createFileName(wizProduct)) ;
                  int pageId = this.createPage(wizProduct,fileName) ;
                  GenerateProduct genProduct = new GenerateProduct() ;
                   Product product = genProduct.doExecute(wizProduct, pageId) ;
                   PropertiesReader reader =  new PropertiesReader() ;
                   String path = reader.getRepositoryProps().getProperty(PricingResources.REPOSITORY_DIR) ;
                   FileWriter fileWriter = new FileWriter(new File(path + fileName));
                   BeanWriter writer = new BeanWriter(fileWriter);
                   writer.getBindingConfiguration().setMapIDs(false) ;
                   writer.enablePrettyPrint();
                   XMLIntrospector introspector = writer.getXMLIntrospector( );
                 introspector.getConfiguration().setWrapCollectionsInElement(false);
                   writer.write("product", product);
                   writer.flush();
                   writer.close() ;
                   fileWriter.close() ;
    /* The read file process works fine in every scenario EXCEPT when I generate a document from my application and then try to read it. The problem is not in reading it normally, it's reading it only on a Linux machine after I generate a doc, not on windows.
    Thanks

  • How open a file and not showing window?

    I write a script to do some work automatic,
    for Indesign script, its application open method could open a file and not showing window,
    the open method has a parameter [ShowingWindow] (if true, show the document window).
    That is good a feature for me.
    But with Illustrator, the application open method hasn't the same feature.
    Open
    (files as String,
    [documentColorSpace as AiDocumentColorSpace],
    [options as Object])
    and for OpenOptions properties, there is not useful information for me.
    Is there any other methods could do that?
    Any help is greatly appreciated.

    Thank for your reply.

  • I have purchased itunes tv series, movies and music and have transferred them onto an external hard drive and tried to play them on my tv on a media hub.  The file will not load.  Is there some form of blocking by itunes or another p[roblem and how d

    I have purchased itunes tv series, movies and music and have transferred them onto an external hard drive and tried to play them on my tv on a media hub.  The file will not load.  Is there some form of blocking by itunes or another p[roblem and how do I fix it?

    You can't fix it.  iTunes bought content is DRM protected. so it can only be played on authorized devices.  i.e devices associated with the apple Id used to purchase the content.  Its copyright protection that the rights owners demand.
    Circumventing it, is illegal in most countries, and as such cannot be discussed here.  If you want to play the content you'll need to connect your computer directly to your TV, or use some other device you can authorize for iTunes content such as an iPad, iPhone , iPod touch or Apple Tv.

  • Jpeg attachments appearing as a .dat file and not .jpeg files

    Please can someone tell me how I can change jpeg attachments that are coming through on emails on my new iPhone 5 as a .dat file and not as a .jpeg file.
    These .dat files cannot be opened - I assume that this will happen with PDF files as well.  
    Thanks

    I am surprised at this point in time no one has chimed in, seeing how many people have tried this in the pasta. I actually solved the whole clusters issue, but now I have discovered another problem that is making me throw in the towell on this one as I just can't explain it.
    I am finding for some silly reason while the code will work in one VI it won't seem to work in another. See my photos below. The one where the code works, I have created the whole thing as a subroutine inside of a greater VI which I can not publish due to proprietary code. Next I tried pulling out the functioning part of the code and putting that in a stand alone file. See the photo where the code doesn't work. I have also ran the same code that doesn't work with both 1 and 2 variables. Each time Matlab can't open it. I am using the same to MAT subvi in each of these. For some reason though when I run the code in the working picture it runs, and I get a nice little mat file that I can open in Matlab. When I run the same exact code as a standalone I get the matlab error code every time.
    I have tried reviewing every possible variable I can think of and worked with them. In all cases the two new VI's I made the code doesn't want to give me a valid mat file. However in the greater program it does! I am really stumped at this point. So unless I can find a better convert to matlab file code I don't think this will work.
    Attachments:
    where_code works.png ‏14 KB
    where code fails.png ‏15 KB
    matlab_error_code.png ‏23 KB

  • Why can I highlight some pdf files and not others

    Why can I highlight some pdf files and not others

    Highlighting only works on text documents; a scanned document (image) cannot be highlighted.

  • HT2493 How to change preview image of a file and NOT the icon ?

    Hello dear Mac users
    How to change preview image of a file and NOT the icon ?
    I know how to change the icon of a file, but I wish to know how to change the preview of any file.
    For example: my file is "mysong.aif", I changed the icon to be "mylogo.png" using cmd+i, cmd+v on the icon. But the preview of the file still remain the same.
    I know it can be changed using iTunes, but I don't want to import all my files in iTune, and iTune cannot import all type of files.
    I hope someone will understand my needs...
    Thanks!

    Thanks BeerbarX
    You can't change the preview image for anything
    hoo
    QuickLook plugin
    what are the plugin ?
    In the case of a music file, it will be that generic black box with a note on it
    That is exactly what I'm asking about !
    MP3 which has a special tagging standard that can include artwork
    How can I "tag" my MP3 without going thru iTunes ? Is it possible to do it dirrectly in the Finder ? Is there other type of files that can include such tags ?
    Thank you for answering my question , wich I have to admit may seem useless, but I wish I could put something like a signature logo on each of the different file I produce (as AIF for music and MP4 for video clip) instead of that generic black box with a note on it, and by the meantime keeping a different icon for all of them in order to illustrate theire content.

  • How can I attach a photo from iPhoto to mail as a file and not just put it on the email itself?

    How can I attach a photo from iPhoto to mail as a file and not just put it on the email itself?

    Souvent eu ce problème,
    Je cree un dossier sur le bureau et glisse les photos à partir d'Iphoto dans ce dossier. Ce geste a pour effet de creer des copies dans le dossier.
    Il ne reste plus qu'à selectionner ces photos pour les envoyer en pièces jointes.

  • How can I get to read a large file and not break it up into bits

    Hi,
    How do I read a large file and not get the file cut into bits so each has its own beginning and ending.
    like
    1.aaa
    2.aaa
    3.aaa
    4....
    10.bbb
    11.bbb
    12.bbb
    13.bbb
    if the file was read on the line 11 and I wanted to read at 3 and then read again at 10.
    how do I specify the byte in the file of the large file since the read function has a read(byteb[],index,bytes to read);
    And it will only index in the array of bytes itself.
    Thanks
    San Htat

    tjacobs01 wrote:
    Peter__Lawrey wrote:
    Try RandomAccessFile. Not only do I hate RandomAccessFiles because of their inefficiency and limited use in today's computing world, The one dominated by small devices with SSD? Or the one dominated by large database servers and b-trees?
    I would also like to hate on the name 'RandomAccessFile' almost always, there's nothing 'random' about the access. I tend to think of the tens of thousands of databases users were found to have created in local drives in one previous employer's audit. Where's the company's mission-critical software? It's in some random Access file.
    Couldn't someone have come up with a better name, like NonlinearAccessFile? I guess the same goes for RAM to...Non-linear would imply access times other than O(N), but typically not constant, whereas RAM is nominally O(1), except it is highly optimised for consecutive access, as are spinning disk files, except RAM is fast in either direction.
    [one of these things is not like the other|http://www.tbray.org/ongoing/When/200x/2008/11/20/2008-Disk-Performance#p-11] silicon disks are much better at random access than rust disks and [Machine architecture|http://video.google.com/videoplay?docid=-4714369049736584770] at about 1:40 - RAM is much worse at random access than sequential.

  • How do I record a sound file and send it as an attachment using my 4s?

    How do I record a sound file and send it as an attachment using my 4s?

    Hi,
    The following is the program[Click Here| http://saptechnical .com/Tips/ABAP/email/EmailProgram.txt] which will send any format file. Actual Creator of the program is Amit Bisht.
    Thanks & Regards,
    Rock.

  • How can I download an audiobook so it goes into audiobook file and not music

    how can I download an audiobook so it goes into audiobook file and not into music ? thanks

    Select all tracks that you want to listen to as Audiobook. Right click. Get Info. Click yes. Options tab. Media Kind change to audio book. OK  Done.
    T

  • How do i test a record containing status E0008 and not containing status I0002

    hello all,
    how do i test a record containing status E0008 and not containing status I0002  for a given WBS Element....
    the data(like pspnr, posid and objnr from table PRPS are avialable in internal table it_prps)....

    Hi,
    You can check the received table from the function module as per your condition.
    loop at it_prps.
         call function STATUS_READ and pass objnr
              "suppose tables parameter data is in table itab
         Read table itab with key STAT = 'E0008'. "check for E0008
           if sy-subrc = 0.
              read table itab with key stat = 'I0002'. "if E0008 exists then check for I0002
                   if sy-subrc = 0.
                       "both status E0008 & I0002 exists so delete this record from it_prps
                        delete it_prps.
                   else.
                       "only status E0008 exists.
                   endif.
         endif.

  • The .prel files will not load into premiere elements 13 and says that there is a missing codec. This is a school's site llicense that we've used for more thatn a month.

    The .prel files will not load into premiere elements 13 and says that there is a missing codec. This is a school's site llicense that we've used in our lab for more than a month.

    GPPNeil
    Premiere Elements 13 on Windows 8.1 (assumed 64 bit).
    First..
    1. Have you updated from 13 to the 13.1 Update using an opened project's Help Menu/Update. If not, please do so.
    2. Do the problems exist if you disable the antivirus and firewall(s)?
    3. Are you running the program as Administrator? Do you have the latest version of QuickTime installed on your computer?
    4. Have you refreshed the Online Services using Premiere Elements Editor Edit Menu/Preferences/Web Sharing?
    5. Have you updated the Adobe Application Manager?
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=4773
    6.Is your video card/graphics card driver version up to date according to the web site of the manufacturer of the card?
    7. Lots more we could go through such as deleting the Adobe Premiere Elements Prefs file and, if necessary, the whole
    13.0 Folder in which it exists.
    But, I think that you have enough things going on here to warrant an uninstall, free ccleaner run through (regular cleaner and registry cleaner parts) and then reinstall with the antivirus and firewall(s) disabled.
    CCleaner - PC Optimization and Cleaning - Free Download
    If the problems persist after all that then we will adjust to additional troubleshooting maneuvers.
    Any questions or need clarification, please do not hesitate to ask.
    Thank you.
    ATR

  • How feed many record in table component and not use append command again

    hi master
    How I feed Multiple records in table component and not use append and save command again and again
    Same as oracle grid
    I give many record and save one time
    Please give me idea how I add Multiple record and save one time not use append and save command again and again
    Thank�s
    aamir

    Hi!
    appendRow() method just add temporal row. For add them to DB commitChanges() method should be used. So you can use appendRow() method several times, fill every new row and only then use commitChanges() method. In this case all new rows will be added to DB per one time.
    Thanks,
    Roman.

Maybe you are looking for