Selective deletion frm DSO based on selection in csv file on AL11 directory

Hi Experts,
I have a requirement where I have to automate the Flat File Upload coming from AL11 SAP directory followed by the selective deletion from DSO with the selection in the Flat file (.csv) on the directory.
The csv file having fixed name and column. We have to take first selection i.e. Date (single entry) from second column and Comp Code from the 4th column (multiple entry).
based on both the selection i have to perform selective deletion and then file upload.
Could anybody please help me to write code and steps.
Thanking you.
Regards
Ajay

check this where i have written in start routine
CALL METHOD P_R_REQUEST->get_TGT
       RECEIVING
          R_TGT = I_TGT.
CONCATENATE '/BIC/A' I_TGT '00' INTO ACT_TABLE.
CONCATENATE '8' I_TGT '_VA' INTO ACT_TABLE_RSTSODS.
DATA: SOURCE_PACKAGE1 LIKE LINE OF SOURCE_PACKAGE.
READ TABLE SOURCE_PACKAGE INTO SOURCE_PACKAGE1 INDEX 1.
DELETE FROM (ACT_TABLE) WHERE /BIC/ZVERSION =
SOURCE_PACKAGE1-PL_VERSION.
SELECT SINGLE ODSNAME_TECH FROM RSTSODS INTO ZDSNAME_TECH WHERE ODSNAME
= ACT_TABLE_RSTSODS.
DELETE FROM (ZDSNAME_TECH) WHERE /BIC/ZVERSION =
SOURCE_PACKAGE1-PL_VERSION.

Similar Messages

  • Selecting all the files in a directory

    How would i select all the files in a directory, write the info of the files into a new file, and after the end of each file, make a New Line?

    hi zymus,
    check this code u will get the solution for ur problem..
    import java.io.*;
    public class files {
    public static void main(String[] args) {
    File f = new File("c://");// specify ur directory name here
    String[] n = f.list();
    System.out.println("ALL FILES.....");
                   if (n != null)
                             System.out.println("length = " + n.length);
    for (int i = 0; i < n.length; i++) { System.out.println("i = " + n[i]); }
                                  String[] n2 = f.list(new myJavaFileFilter());
                                  System.out.println("ALL JAVA FILES.....");
                                  if (n2 != null)
                                       System.out.println("length = " + n2.length);
    for (int i = 0; i < n2.length; i++)
         System.out.println("the files are::::::::: " + n2);
    class myJavaFileFilter implements FilenameFilter
    public boolean accept(File dir, String name)
         if (name.indexOf(".pdf") > 0)// give the file extension what u want
         return true;
    return false;

  • Select csv files

    Hi all,
    I need to create one addon when i run my add on i need to select total csv file in selected path and i need to import all files one by one .  i am not getting how select all csv file because we do n't know file name just we know path where all file exist..
    plz help me.

    check http://support.microsoft.com/kb/186118
    3rd example is what you are looking for (its for subdirectories, you may change ti for files).

  • How to delete a  file from AL11??????

    Hi Friends,
    how can i delete a file from AL11 directory....
    i have found FM's like EPS_DELETE_FILE, EDI_PORT_DELETE_FILE and some more from SAP system but those are not deleting the files....
    let me know if i can write a program for this and if yes then guide me for writing the same....
    Thanks,
    Nagesh.

    reference:http://saplab.blogspot.com/2007/10/sample-abap-program-to-delete-file-from.html
    REPORT ZDELETE.
    Delete a file on the application server.
    PARAMETERS: P_DIR LIKE RLGRAP-FILENAME
    DEFAULT '/usr/sap/trans/', *it will delete files from this dir
    P_FILE1 LIKE RLGRAP-FILENAME.
    DATA: P_FILE(128).
    DATA: W_ANS.
    START-OF-SELECTION.
    CONCATENATE P_DIR P_FILE1 INTO P_FILE.
    check file exists
    OPEN DATASET P_FILE FOR INPUT.
    IF SY-SUBRC NE 0.
    MESSAGE E899(BD) WITH P_FILE 'does not exist'.
    EXIT.
    ELSE.
    CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
    EXPORTING
    DEFAULTOPTION = 'N'
    TEXTLINE1 = P_DIR
    TEXTLINE2 = P_FILE1
    TITEL = 'ARE YOU SURE YOU WANT TO DELETE'
    START_COLUMN = 25
    START_ROW = 6
    IMPORTING
    ANSWER = W_ANS
    EXCEPTIONS
    OTHERS = 1.
    ENDIF.
    CLOSE DATASET P_FILE.
    CHECK W_ANS = 'J'.
    delete
    DELETE DATASET P_FILE.
    IF SY-SUBRC NE 0.
    MESSAGE E899(BD) WITH 'Invalid file name' P_FILE.
    ELSE.
    CLOSE DATASET P_FILE.
    MESSAGE I899(BD) WITH P_DIR P_FILE1 'DELETED'.
    ENDIF

  • Selective Deletion is possible based on request ID?

    Hello Friends,
    Our Cube is Not Compressed where Aggregate Rollup was done and Compression of Aggregate rollup are done.
    In this Case, Can i peform selective delete of data based on Request ID? If yes,
    1) Any special procedure and need to take care of any thing?
    2) Does Aggreagte rollup and its compression will adjust automatically with next run ? (or) do we need to do any thing for aggregates rollup and its compression?
    Thanks
    Tony

    Hi,
    Before you do Compression you can perform Selective Deletion for Req ID. And it automatically changes your Aggregates also.
    Ali.

  • How to dynamically and selectively update DSO based on values in a csv file

    Hi,
    I'm loading a csv file into a DSO. When loading the flat file in FULL mode I need to do a pseudo delete of records that were previously loaded but are not in the new flat file.
    Is it possible to dynamically determine the unique set of records (say Pk1, Pk2, Pk3) in the csv file and then set all the corresponding DSO records' quantities to 0 - maybe in a start routine??  After that, I can load the csv file with the correct quantities (effectively update and inserts).  The net result should be that the change log only be updated through to the next DSO.
    Example: Load 10 records yesterday. Today reload 9 records. 10th records must have quantity set to 0. Other 9 records will have quantity values set to those in today's csv file -  some will be the same & some will be different. The net change log of all 10 records must be loaded into the next DSO.
    Any suggestions on how to do this logic?
    Thanks!

    Hi Gregg,
    You can create one transformation from the DataStore to itself.  In the "Technical" rules group, set 0RECORDMODE = 'X' (before image) or 'R' (reverse).  Therefore, when you execute its corresponding DTP, all existing records shouldl be set to zero.
    Then, as a second step, you can execute the DTP which is related to the transformation between the DataStore and the DataSource, thus loading the new records.
    I hope this helps you.
    Regards,
    Maximiliano

  • I am trying to delete pages from a PDF file. I opened the bookmarks, selected the pages to delete and choose Edit Delete. The selected pages are not deleted. Note: I have to open the file using a passport provided by an external party.

    I am trying to delete pages from a PDF file. I opened the bookmarks in the PDF file, selected the pages to delete and choose Edit > Delete. The selected pages are not deleted. Note: I have to open the file using a passport provided by an external party.

    Resolved

  • Not able to delete Cube & DSO data

    Hi Team,
    I am trying to delete data request from upper & lower Data providers(cube & DSO respectivly).
    Frst I tried to delete cube data using context menu option DeleteData.It generates dump "Time Exceeded". So I manually selected the request in cube manage & deleted.
    Later when i try deleting DSO(that updates abv cube) data with context menu option gv similar dump so i manually tried deleting topmost req & it fails with following log.
    Delete running: DataStore object FIGLO02B, from 304,053 to 304,053
    Delete is scheduled; Selection conditions were substituted
    FB RSM1_CHECK_DM_GOT_REQUEST called from PRG RSSM_PROCESS_REQUDEL_ODSO; row 000396
    Request '304,054'; DTA 'FIGLO02B'; action 'D'; with dialog ''
    Leave RSM1_CHECK_DM_GOT_REQUEST in row 70; Req_State ''
    No records found for request ODSR_AKJPD3YPNDJMTLCTHHM0Z01VX in change log /BIC/B0000111000 of DataStore FIGLO02B
    Deletion of request REQU_F1RX9B16C7MNKCHC4AYPLI0LP from data target FIGLO02B failed
    Deletion of request REQU_F1RX9B16C7MNKCHC4AYPLI0LP from data target FIGLO02B failed
    No records found for request ODSR_AKJPD3YPNDJMTLCTHHM0Z01VX in change log /BIC/B0000111000 of DataStore FIGLO02B
    then i noted the cube data still nt deleted .Also this table /BIC/B0000111000  is empty.
    Please suggest hw shall i delete data frm DSO & cube as i want to perform fresh init.

    Hi
    Try deleting the Data Requests from Tables.
    Active Data /BIC/A<ODS_NAME>00
    New Data /BIC/A<ODS_NAME>10 in BW 2.x /BIC/A<ODS_NAME>40 in BW 3.x
    Change Log: search in table RSTSODS with the string "8<ODS_NAME>" in field ODSNAME, the name of Change Log is in field ODSNAME_TECH.
    RSODSACT                       Activation of ODS M Records
    RSODSACTREQ                    Activation table of M-request
    RSODSO_REQUCPY                 Assigning Requests to Template
    RSODSO_ROLLBACK                Table for Temporary Storage
    RSODSO_RUNTIME                 Results of Runtime Measuremen
    RSODSREQTSTMP                  Sorting of ODS Requests
    RSODSSETTINGS                  Settings for an ODS
    Hope ithelps

  • Deleting duplicate rows based on three columns in Oracle 8i

    Hi all,
    The database we use is Oracle 8i.
    The query below raises the too_many_rows exception when I launch an application. So I want to delete the duplicated rows :
    select polarisation_1, polarisation_2
    into v_pol1_tech, v_pol2_tech
    from v_cfh_lien_element
    where nom_lien = p_nom_lien
    AND num_canal_1 = p_num_canal_1
    AND freq_emise_1 = p_freq_emise_1;
    Notice that with many possible values of the parameters p_nom_lien, p_num_canal_1 and p_freq_emise_1 then the exception is raised.
    So how to delete generally the duplicated rows based on the three columns "nom_lien" , "num_canal_1" and "freq_emise_1" ?
    Thank you very much indeed.

    Check the other thread with same question deleting duplicate rows based on three columns in Oracle 8i

  • How to see the data records for a dso based upon the request id?

    Hi all,
    How to see the data records based upon the request id on the dso.
    I need to see the data for a dso based upon the request id 444493 loaded from another dso through repair full update.
    thanks

    Hi,
    Step 1: select your request from DSO request tb
    Step 2: Select your DSO just above your contents/requests/reconstruction tabs
    Step 3: Click contents(Spectacles symbol) in the top area of your screen
    Step 4: Slect the required fields
    Regards,
    Suman

  • Determining the correct DSO based on date.

    Hi,
    I  am new to BI. Now I am doing BI ABAP  report. I have a requirement that need to find correct sales quarter DSO based on the selection screen date. Would you please anybody suggest me any function module or code to achieve that.
    Your help will be more appreciated.
    Thanks,
    Kumar.

    Hi,
    Are you using a Multiprovider based on this quarter wise DSO's ? If yes, then you can provider an exit variable and code for the correct infoprovider based on quarter calculation
    If this is the scenario then use the following guide , there they have provider exit code from similar scenario
    How tou2026Create Efficient MultiProvider Queries
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/751be690-0201-0010-5e80-f4f92fb4e4ab
    hope this helps..
    Edited by: Sonal Patel on Nov 27, 2009 11:36 AM

  • [SOLED] Firefox input type = file selects the wrong file

    When I have use a webpage in firefox that has an upload feature, Firefox often selects the wrong file. I can reproduce this problem by simply creating a form with an input tag like this:
    <input type="file" />
    When I enter the file selection screen and open fileA the input box contains fileA, fileB or fileC. It seems kind of random to me. I use KDE 4.5 btw, if that matters.
    Last edited by Wilco (2010-08-07 08:24:35)

    It seems to be some kind of kde problem. When I delete ~/.kde4/share/config/* it works fine. I tried deleting the all files in share/config starting with a-m and it still didn't work. Then I deleted every file from n-z and it didn't work so it's probably a combination of files that give these problems. I don't feel like setting up KDE all over again so damn, it's back to Icewm, again...

  • Material archiving(selection of archiving file)

    Hi all,
    How to select the archiving file? when i am trying to do this, its showing empty..
    Regards,
    Bhagavan

    Hello,
    At which phase of the archiving process you are not able to see the archiving session no?
    If it is during Deletion Run: Write job is not completed successfully or Deletion job might have triggered automatically (please check your customization)
    If it is during Store Job: Then check your customizing for any automation and sequence of storing the archive files
    If it is during the Read Run: Then Archive session is not created.
    If it is during Build Archive Infostructure: Check deletion job is successful. AIS can be build only after the deletion job is successful.
    Hope this will resolve your issue.
    -Thanks,
    Ajay

  • Select a Folder/File starting with a Space via Keyboard

    I have just upgraded to Snow Leopard and I am having problems selecting a folder/file that starts with a space in the finder and in open/save. The problem is that it activates QuickView. In Leopard (10.5) you could override QuickView (in the Finder) by pressing the Option Key and the space bar at the same time and then pressing the next letter in the folder name. This action now open QuickView in Fullscreen mode. I have tried other key combos without success.
    Thanks for any help.
    Rich

    I have tried other key combos without success.
    OS X Help has this to say about that:
    -=-=-=-
    Creating keyboard shortcuts for applications
    You can assign your own keyboard shortcuts to menu commands in any Mac OS X application or in the Finder. This may be useful if, for example, one of the “global” shortcuts, which works the same in most applications, is used by one application for a different purpose. In this case, you can assign it a different key combination.
    You can create keyboard shortcuts only for existing menu commands. You can’t define keyboard shortcuts for general purpose tasks such as opening an application or switching between applications.
    To create a keyboard shortcut for an application:
    Choose Apple menu > System Preferences, and then click Keyboard.
    Click Keyboard Shortcuts, and then click the Add button.
    Choose an application from the Application pop-up menu. If you want to set the same key combination for a menu command that appears in many applications, choose All Applications.
    If the application you want to select does not appear in the list, choose Other and locate the application using the Open dialog. Some applications may not allow you to set keyboard shortcuts.
    Type the menu command for which you want to set a keyboard shortcut in the Menu Title field.
    You must type the command exactly as it appears in the application menu, including ellipses and any other punctuation. An ellipsis is a special character that looks like three periods. To type an ellipsis, press Option-semicolon, or use the Character Viewer. It may be difficult to know whether the command is written in the menu with a real ellipsis or with three periods, so if one does not work, try the other.
    Click in the Keyboard Shortcut field and press the key combination that you want to assign to the menu command, and then click Add.
    You cannot use each type of key (for example, a letter key) more than once in a key combination.
    Quit the application for which you added or changed a keyboard shortcut.
    Restart the application to see the keyboard shortcut in the application’s menu.
    If you assign a keyboard shortcut that already exists for another command or another application, your new shortcut won’t work. Find the menu command that’s using it and reassign the keyboard shortcut for that item.
    To remove a customized shortcut, click the Delete (–) button.

  • Advance select for source file in Sender File Adapter

    Hi
    I am trying to utilise the parameter 'Advance Selection for source file' on a sender file adapter to pick the file from multiple folders
    My problem is that this parameter that is listed on the SAP help is not getting in File accessing Parameters.
    I am running PI 7.02 (NW702_07_Rel)
    Service pack 07
    Has anyone come across this before?
    any suggestions on how to do this?

    Hi,
    In PI7.0 the property exists. I have used it previously. I think SP was 13.
    Regards,
    Nutan
    Edited by: nutan champia on Nov 24, 2011 10:42 AM

Maybe you are looking for

  • Program terminated error after entering sold to party no. in sales order

    hello friends,                   can any help me, i was doing the topic of user exit for pre-defined sold to party using v45a0002 in cmod and i wrote a program for include 'if sy-uname= 'sapuser'. message e000(0) with ' you are not authorised to crea

  • Error... Error.... Error... What do they mean?

    Fool me once shame on you, fool me twice shame on me.    The HP Photosmart C7250 printer I own now I only used one or two days a week for printer.... never used for fax.... only a few times for coping.   I only used one black print ink and still have

  • Outlook and CSV files on a mac book

    I have a Mc Book Pro REtina and use MS outlook 2011 version 14.3.9 as my contact data base. I need to export my contacts to a csv file so i can upload them to google so i can sync with my iphone 5

  • Rename with resequence does not allow 6 digits

    OS: Win XP Bridge: 3.0.0.464 Batch rename of files allows a sequence number that is limited to 5 digits. Even though the selector control allows you to specify six digits, the sequence number box does not allow the entry of the 6th digit. For example

  • Slow counting time (PCI-6601)​-Single period measuremen​t

    Dear friends I wish to count TTL pulses from my device(Avalanche Photo Doide) by using PCI-6601 for a certain time. Thus, I tried to use "Measure Period.vi" with "for loop" configuration. And the gate frequency from another counter is 100 Hz ( 10 ms