Start Routine: delete some data in ODS

Hi,
I need some help. I have the following business requirement:
1. I have an ODS with some data
2. When I upload these ODS I need this behavior: the routine shoud see which data is in the datapackage that was upload to PSA (for instante field Z data A), and if in ODS this field Z had the data A then this data in ODS should be deleted.
I had tried the following code:
Data: itab type table of /BIC/AZGDOS*****.
DATA: work_area like line of itab.
data: WA_SOURCE like line of SOURCE_PACKAGE.
data: z_tabix type sy-tabix.
LOOP AT SOURCE_PACKAGE into wa_source.
z_tabix = sy-tabix.
select single * from /BIC/AZGDOS***** into work_Area where
/BIC/Z******** = wa_source-/BIC/Z********.
if sy-subrc = 0.
    move-corresponding /BIC/AZGDOS***** to work_area.
   append work_area into itab.
  ENDIF.
ENDLOOP.
   delete /BIC/AZGDOS***** from table itab.
   if sy-subrc eq 0.
   commit work.
   endif..
But this code isn't working.
suggestions?
Thanks in advance

Try it:
Data: itab type table of /BIC/AZGDOS*****.
DATA: work_area like line of itab.
data: WA_SOURCE like line of SOURCE_PACKAGE.
data: z_tabix type sy-tabix.
LOOP AT SOURCE_PACKAGE into wa_source.
z_tabix = sy-tabix.
select single * from /BIC/AZGDOS***** into work_Area where
/BIC/Z******** = wa_source-/BIC/Z********.
if sy-subrc = 0.
move-corresponding /BIC/AZGDOS***** to work_area. ERROR,delete it
append work_area into itab.
ENDIF.
ENDLOOP.
delete /BIC/AZGDOS***** from table itab.
commit work and wait.
Edited by: gang qin on May 3, 2011 4:29 PM
Edited by: gang qin on May 3, 2011 4:31 PM

Similar Messages

  • ABAP code in start routine (delete no in)

    In my start routine, I would like to delete some data package whose employee id is not in the selection list.
    but there are some ABAP grammer error in the where condition. Can somebody help this? I tried to read the document for 'WHERE - IN seltab', but still I could not give the right code.
    <p>
      employeeid_itab type table of string.
      select /bic/zpe_employeeid into table employeeid_itab from /bic/pzpe_employeeid.
      DELETE SOURCE_PACKAGE where ZEMP_employee_ID NOT IN employeeid_itab.
    It seems that internal table employeeid_itab could not be directly used after the IN keyword.
    how can I do this?
    Edited by: Ben Li on Feb 22, 2008 2:09 PM

    Hi Oscar,
          Actually I had tried this before, using the code like the following,
          <p>
    Types: EmployeeID(7) type  c.
    <p>
    data: sel_itab type  range of EmployeeID.
    <p>
    select /bic/zpe_employeeid into table sel_itab from /bic/pzpe_employeeid.
    <p>
    delete SOURCE_PACKAGE where zemp_employee_id  not in sel_itab.
    <p>
         The grammer check is OK, but when I debug it, I found that there are records in sel_itab, but all the records just have one charactor, actually, my employeeID have 7 charactors in database. So it does not work, I think I miss something in define  of the range table. Can you please figure out? Thanks a lot.

  • Sending failed memory is full delete some data bef...

    Good Day 
    i have N900 and i'm facing a problem when i start any conversation  i can send 1 msg then receive 1 the second i want to send the phone reflects with error msg 
    (sending failed memory is full delete some data before send or receive)
    altho i have 26 gb free and i updated the phone to the latest version can any1 assist me with this

    It could be a few things.. Try this on your phone..
    Open this link on your phone
    http://chris.intrepid.cx/N900/debug2.sh
    Choose to save this file. Save it in the documents folder on your phone
    Now, open an x terminal and type in this command exactly
    sh MyDocs/.documents/debug2.sh
    It will take a LONG time to finish.. but when it stops, connect your phone to your PC and browse the storage.. you'll find a file called debug2.txt.. Drop that in an email to me (check you personal messages for my email address) and I'll have a look

  • For the last month or so my icloud won't back up, it keeps telling me that there is too much storage and I need to delete some data. But I have deleted between 3-400 photos and it is still saying the same, can anyone please help

    For the last month or so my icloud won't back up, it keeps telling me that there is too much storage and I need to delete some data. But I have deleted between 3-400 photos and it is still saying the same, can anyone please help

    If they were deleted from your camera roll that should have resulted in a corresponding decrease in the estimated size of your next backup.
    If it's still saying that you don't have enough storage to back up, read through this article: http://support.apple.com/kb/ht4847.  It provides some suggestions for reducing your iCloud storage, such as deleting unneeded email. 
    The other area to look at is your text messages.  These are included in the backup.  If you have lots of photos and videos attached to your messages, that can significantly increase the size of your backup.  If that's the case, deleting these may make a big difference.

  • How to delete some date in target table at a mapping?

    How to delete some date in target table at a mapping?
    I extract date from source tabel into target table,
    but before extract date I want to delete some date from target?
    how to do?

    Just to change a bit of terminology in the reply, within the mapping, click on operator properties and choose TRUNCATE/INSERT.
    Note that truncate is dependent on constraints, so you probably must disable those before doing this. You can of course do DELETE/INSERT...
    Jean-Pierre

  • How to reduce the size of file after delete some datas?

    The size of the database file isn't smaller than ago after delete some data from database.
    How to reduce the size of file after delete some datas?

    Hi,
    What BDB release are you using? If it's one of the latest releases, then what you are looking for is the DB->compact() method:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/dbcompact.html
    The DB->compact() method compacts Btree, Hash, and Recno access method databases, and optionally returns unused Btree, Hash or Recno database pages to the underlying filesystem. Please let me know if it helps.
    Bogdan Coman

  • N70 - Not Enough Memory Delete some data first

    Hi,
    Could someone please help with a problem that i am having with N70. Messages Empty(All Folders) and no images or media files on the phone memory, al applications also are on the Memory card(1GB and 3/4th of it is free). But still i am getting this message of "Not Enough Memory to eprform the Operation. Delete some data first". Could someone please advise what i could do to resolve this, as now i do not have any log of Calls(missed, rec, dialled), no incoming messages etc.
    Thanks in advance.
    Regards,
    Powi

    first upgrade your phone software with the latest available version that you can check here:
    http://europe.nokia.com/A4577224
    if you have the latest software version,reset your phone by pressing *#7370# in standby mode(after backing up)
    NOKIA means:Night Of King In Alone

  • N73ME Memory full delete some data

    Memory full delete some data...every...time. . try this..
     switch off the mobile phone then. . .Remove the memory card. . . Keep it switched off for a while and then. . .switch it on. . .again. . .For more help reply. . .sk
    Sadath khan
    Attachments:
    sk.JPG ‏123 KB

    do you have some apps installed on the phone memory istelf. there are some apps that will only install on the phone and not the memory card. is your firmware up to date? did you add anything new, try also removing some of the messages from the memory card and all the folders, send, inbox, outbox if applicable and see if this will make any difference. 
    You know what I love about you the most, the fact that you are not me ! In love with technology and all that it can offer. Join me in discovery....

  • N82: Memory full. Delete some data from phone memo...

    memory full. delete some data from phone memory
    i deleted all of the messages in inbox and in memory card. i also tried *#7370#. stil the memory is full. i check the phone memory status everytime i delete the messages and it will show available memory for about 30kb. when i restart the phone and check the phone memory, it will indicate that it has 0 kb left. i didn't installed any application in it.
    Message Edited by katnix on 13-Jul-2008 01:39 PM

    proper advice???? that's the advice i gave, take it or leave it. it's not for you tell me what's proper or not.
    i don't remember seeing your name in the thread above, and i don't remember you TELLING me before that you don't want to format.
    now just not to go into alot of words. there is a better way you can use to talk to people. because we are trying to help. if you like what we suggest, fine, if not, wait for another suggestion or come with one yourself.
    if you have a registery cleaner or a temp file cleaner for symbian , please be so kind to offer it's name here.
    Fear not those who argue but those who dodge

  • Memory Full. Delete some data

    I am trying to delete some data because of the message I get when switching on my Nokia 3230.
    The message says : "Home Screen: Memory insufficient. Delete some data first"
     However, I cannot access the MENU/File Manager/Options by pressing the Menu key.
    Any ideas?! Many thanks.
    Ianor
    Solved!
    Go to Solution.

    If the phone is unusable then unfortunately the only options you have are a hard reset or a trip to a nokia care point.  Both will result in the total loss of all data and content that you have added to the phone.
    Hard reset:
    1. Switch off the phone.
    2. Hold down the following three buttons: Green (the call answer button), * button, and '3' button.
    3. While holding these buttons, hold the power button for a second to switch on the phone.
    4. Release when the phone shows the nokia hands logo or shows other signs of life like the language selection screen.
    It may take a few attempts and very flexible fingers.
    Care points/service centres and repair info:
    UK • Europe • Asia-Pacific • USA •
    Canada • Middle East and Africa
    Elsewhere: Click here, select your country, go to the support section, then select repair.

  • Start routine internal table data  is inaccessible.

    Hi Guru,
    I have written a small code in start routine  using internal tables. The internal table has 4 fields. Intially first 3 fields are populated from ods for only the records in the data package. Then the 4th field is modified using loop on internal table. Then a sort is done on internal table  and deleting the adjacent records. Now the data is read from internal table in updates rules. But data is not populating for the fields in listcube. I guess the loop on internal table is not modifying the internal table, below is the code.
    Types: BEGIN OF ITAB1,
    doc_no LIKE /BIC/AZFGLO10100-AC_DOC_NO,
    item_no LIKE /BIC/AZFGLO10100-ITEM_NUM,
    taxjur LIKE /BIC/AZFGLO10100-TAXJURCODE,
    z_len TYPE I,
    END OF ITAB1.
    DATA ITAB_01 TYPE TABLE OF ITAB1 WITH HEADER LINE.
    DATA LEN TYPE I.
    DATA: str1 TYPE string,
    str2 TYPE string,
    doc like /BIC/AZFGLO10100-AC_DOC_NO,
    item like /BIC/AZFGLO10100-ITEM_NUM,
    jur like /BIC/AZFGLO10100-TAXJURCODE.
    ***filling the internal table with the contents of
    select AC_DOC_NO ITEM_NUM TAXJURCODE into
    corresponding fields of itab_01
    from /BIC/AZFGLO10100
    FOR ALL ENTRIES IN DATA_PACKAGE
    WHERE AC_DOC_NO = DATA_PACKAGE-AC_DOC_NO
    AND ITEM_NUM = DATA_PACKAGE-ITEM_NUM.
    endselect.
    SORT ITAB_01 ASCENDING BY doc_no ITEM_NO ASCENDING.
    loop at itab_01.
    doc = itab_01-doc_no.
    item = itab_01-item_no.
    TAX = itab_01-taxjur.
    len = STRLEN(tax).
    itab_01-z_len = len.
    modify itab_01 transporting z_len where
    doc_no = doc and item_no = item.
    ENDLOOP.
    ***what I am doing here I am keep only the records in itab which has minimum
    tax jurisdiction length for a line item in a document*****
    SORT ITAB_01 DESCENDING BY doc_no z_len ASCENDING.
    DELETE ADJACENT DUPLICATES FROM itab_01 comparing doc_no.
    and for zlenght object I am writing the followoing code in update rules.
    read table itab_01 with key doc_no = COMM_STRUCTURE-AC_DOC_NO
    BINARY SEARCH.
    if sy-subrc = 0.
    RESULT = itab_01-z_len.
    endif.
    But the field z_len field is blank for all fields.
    Any help is really appreciated.
    Thanks,
    Raj

    hi Ravi,
    try to give same field name in internal table and /BIC/AZFGLO10100, change the code accordingly
    Types: BEGIN OF ITAB1,
    <b>AC_DOC_NO</b> LIKE /BIC/AZFGLO10100-AC_DOC_NO,
    <b>ITEM_NUM</b> LIKE /BIC/AZFGLO10100-ITEM_NUM,
    <b>TAXJURCODE</b> LIKE /BIC/AZFGLO10100-TAXJURCODE,
    z_len TYPE I,
    END OF ITAB1.
    DATA ITAB_01 TYPE TABLE OF ITAB1 WITH HEADER LINE.
    ***filling the internal table with the contents of
    select AC_DOC_NO ITEM_NUM TAXJURCODE into
    <b>corresponding fields</b> of itab_01
    from /BIC/AZFGLO10100
    FOR ALL ENTRIES IN DATA_PACKAGE
    WHERE AC_DOC_NO = DATA_PACKAGE-AC_DOC_NO
    AND ITEM_NUM = DATA_PACKAGE-ITEM_NUM.
    endselect.
    <b></b><b></b>

  • Not able to delete the data from ODS

    Hi All,
    I have ODS which is having some requests . All the requests are being loaded with full update only. When I am trying to delete the requests from ODS,  out of 4 requests 2 requests have been deleted but rest of them are not at all deleting .
    As I am working in Quality system, So I don't have the access to delete request from Table level like RSODSACTREQ, RSICCONT etc...
    Can you give any clue to delete the remaining 2 requests.
    Thanks,

    Hi kavitha,
    Does the Request has data mart status.IF yes try to delete the request from the respective DSO's.
    and try to delete the request.
    are you deleting the Whole data from DSO ? - right click on the DSO and select deleted data from the context menu.
    Regards
    Prashanth K

  • How to delete the data in ODS

    Hi,
    I am working for production support project.I want to delete the data(error data) from ODS and willing to reload the data again to ODS with different data(Corrected data).
    Can any body throw some light on this please.
    karunakar reddy

    hi karunkar,
            I am also in production support but new . I have some queery can I have your mail id to contact you.currently I a, located in singapore at client side. I will appritiate you if you we can have some knowledge sharing.
      With best Regards
         Vikas Sharma

  • How to debug start routines of update rules from ODS to InfoCube

    Dear gurus,
      I have an update rule from ODS to InfoCube. I wrote a start routine in the update rule. Now I want to debug it. I went to monitor and simulate update the data package and only got the prompt "No data exists in the corresponding PSA table". So how can I debug this start routine?
      Thanks in advance.
    Jin Ming

    Jin,
    In order to use PSA between ODS and InfoCube, you may have to use an exclusive InfoPackage and load separately. In that InfoPackage, choose the radio button to use a PSA.
    I think you are currently updating the InfoCube directly without using a separate InfoPackage.
    Look for an InfoSource under DataMarts (search for 8<ODS Technical name>) and create your InfoPackage there.
    Good luck.

  • How to delete some data from GLPCA table

    Dear Friends,
    We have extracted some data in GLPCA table via the ECPA component. We
    want to delete these records ( Doc type and Posting date is known).
    However we do not want other data already existing the GLPCA to be
    deleted. Is there some Std SAP Trx for deletion of partial/select data
    from EIS tables.
    Please explain us clearaly how we can delete these records.
    Your quick reply for this issue is highly appreciated.
    Thanks & Regards,
    Naveen Kumar.

    Hello,
    Please check the use of the report ZDELETE_PCA_DATA_BUKRS (mentioned in the SAP note 1174360), to delete totals from GLPCT.
    I am not sure of any deletion reports for GLPCA table.
    If you open the Source code of this program, you can see the following information :
    "This report provides a possibility to delete actual and plan
    *& postings on company code level as an alternative for transaction
    *& 0KE1."
    I do not have much information on this report as, personally I haven't used this anytime. Please run in 'Test Run' mode first and look for the results.
    I hope this helps.
    Thanks and regards,
    Suresh Jayanthi.

Maybe you are looking for

  • SL300 Dim Display

    Hi All I was searching the internet for possible solutions to my problem and found this board but couldn't find an answer to my problem. Basically, I have an SL300 and the screen is really dim. I can just see the image on the screen but there is no b

  • Export SWF from AE CS6

    I used to be able to export SWF files directly from AE CS3. But am having difficulty performing that same task in CS6. Under FILE/EXPORT there is an option to choose "Adobe Flash Player (SWF)". However, when I output the file it appears to start rend

  • Change AutoScroll Bounds in JTextPane

    I cannot figure this out for the life of me. I would like to CHANGE the bounds for the autoscroll on a JTextPane that resides inside a JScrollPane when the user selects text and moves the mouse outside of the "autoscroll bounds". The normal bounds fo

  • Fonts in Pages

    I am trying to make the transition from Word to Pages, but one thing that is bothering me is the way fonts look. In Word, fonts look more crisp and sharp. Even more bold. In Pages, the same fonts look washed out and blurry. I thought maybe this was a

  • CAN I USE JAVA CARD TECHNOLOGY TO BUILD BIOMETRIC COLLEGE ATTENDANCE SYSTEM

    HELLO everybody, I am new in Java card technology.Please any one can guide me.Can i use Java Card Technology to build biometrics college attendance system.If i can so which device should i need to buy or eBooks.. PLEASE I NEED HELP.. Thanks for your