Mutiple Deleets

Hi Guru's
I have mutiple deletes lets say like this,
How can i have inner query repeting for all the deletes, i have such seven deletes.
Is there any way i can avoide inner query and get it only once.
Help please.
PID is the varibale values from cursor in the for loop
delete from table1
where id1 in ( select id1 from maintab
                  where id=pid)
delete from table2
where id1 in ( select id1 from maintab
                  where id=pid)
delete from table3
where id1 in ( select id1 from maintab
                  where id=pid)
delete from table4
where id1 in ( select id1 from maintab
                  where id=pid)Thank you in advance

Justin..I think there will be more than one value returning according to OP's first post.
user553284: As an option, you can use bulk collect to do this
Declare
Type Num_Type is Table of Number Index By Binary_Integer;
v_Id Num_Type;
Begin
Select
         Id1
Bulk Collect Into
         v_Id
From
        MainTab
Where
        Id=PId;
FORALL i in v_Id.First..v_Id.Last
Delete Table1 Where Id1 = v_Id(i);
FORALL i in v_Id.First..v_Id.Last
Delete Table2 Where Id1 = v_Id(i);
FORALL i in v_Id.First..v_Id.Last
Delete Table3 Where Id1 = v_Id(i);
End;Message was edited by:
Chaitanya.S.S.K

Similar Messages

  • SOAP Adapter Java Null Pointer, Receiver receive mutiple times of message

    Hi,
    My scenario is Proxy -> PI 7.1 -> Soap receiver.
    The scenario was working before , and recently we got System Fails in adapter:
    ********************Adapter Audit Log****************************
    2010-01-11 10:41:16 Information The message was successfully received by the messaging system. Protocol: XI URL: http://hdrpidev01.bchydro.bc.ca:51100/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2010-01-11 10:41:16 Information Using connection SOAP_http://sap.com/xi/XI/System. Trying to put the message into the receive queue.
    2010-01-11 10:41:16 Information Message successfully put into the queue.
    2010-01-11 10:41:16 Information The message was successfully retrieved from the receive queue.
    2010-01-11 10:41:16 Information The message status was set to DLNG.
    2010-01-11 10:41:16 Information Delivering to channel: ESB_CostCenter_SOAP_Receiver
    2010-01-11 10:41:16 Information SOAP: request message entering the adapter with user J2EE_GUEST
    2010-01-11 10:41:16 Information SOAP: completed the processing
    2010-01-11 10:41:16 Information SOAP: sending a delivery ack ...
    2010-01-11 10:41:16 Information SOAP: sent a delivery ack
    2010-01-11 10:41:16 Error Adapter Framework caught exception: null
    2010-01-11 10:41:16 Error Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.NullPointerException.
    2010-01-11 10:41:16 Information The message status was set to WAIT.
    2010-01-11 10:41:16 Information The asynchronous message was successfully scheduled to be delivered at Mon Jan 11 10:46:16 PST 2010. .....
    The log has another three reties which I did not listed above.
    The question is that the receiver system received the message and received 4 times.
    I future go to the je22 engine log viewer, then I got following error message :
    ********************J2EE Log Viewer****************************
    Message:
    Marked transaction for rollback for meesage 4b47ad05-9df9-0176-e100-8000ac190651(INBOUND). Reason: java.lang.NullPointerException
    Date: 2010-01-11
    Time: 10:41:09:732
    Category: com.sap.engine.messaging.impl.core.queue.consumer.ReceiveConsumer
    Location:
    com.sap.engine.messaging.impl.core.queue.consumer.ReceiveConsumer.invokeHandler(QueueMessage, MessageController)
    Application:Thread: MS Queue Worker [SOAP_http://sap.com/xi/XI/SystemRecv]
    Data Source:
    j2ee/cluster/server0/log/defaultTrace_00.trc
    Arguments:
    DSR Transaction: 0f3437c0fcc911de826200145ec71b45
    Message Code: 
    Session: 0
    Transaction: SAP J2EE Engine JTA Transaction : [6ffffffab3c2602ffffffa564]
    User: J2EE_GUEST
    Time Zone: 0-800
    CSN Component: BC-XI-CON-MSG
    DC Component: com.sap.aii.af.ms.svc
    Correlation ID: 111885350000000004
    DSR Root Context ID: 0F3437C0FCC911DE826200145EC71B45
    DSR Connection: 0f3437c0fcc911de826200145ec71b45
    DSR Counter: 0
    Log ID: 00145EC71B45510B0000000100137042
    Host: hdrpidev01
    System: DI1
    Instance: DVEBMGS11
    Node: server0
    ********************End of J2EE Log Viewer****************************
    We never came cross the situation of sending mutiple message out while there is system error in adapter.
    Any ideas and comments ?
    Thanks in advance
    Liang

    Solved by creating new adapter.

  • How do I add mutiple horizontal submenus to one menu label.

    For Muse, how do I add mutiple horizontal submenus to one menu label. In other words, I have Interior,Graphic and Web as one menu. Under Interior I want a horizontal submenu with Kitchens, bathrooms, closets,etc. Then under Kitchens I may want Bars, Islands and pantries.. Windows 7.

    In plan view drag all of the pages you want in a submenu under the page you have set for the top level menu. So in your situation you would want kitchens, bathrooms, clostets etc under the interior page in plan view.

  • Ensure field sequence is correct for data for mutiple source structure

    Hi,
    I'm using LSMW with IDOC message type 'FIDCC2' Basic type 'FIDCCP02'.
    I'm getting error that packed fields are not permitted.
    I'm getting Ensure field sequence is correct for data for mutiple source structures.
    Source Structures
           HEADER_STRUCT            G/L  Account Document Header
               LINE_STRUCT              G/L Account Document Line
    Source Fields
           HEADER_STRUCT             G/L  Account Document Header
               BKTXT                          C(025)    Document  Header Text
               BLART                          C(002)    Document Type
               BLDAT                          DYMD(008) Document Date
               BUDAT                          DYMD(008) Posting Date
               KURSF                          C(009)    Exchange rate
               WAERS                          C(005)    Currency
               WWERT                          DYMD(008) Translation Date
               XBLNR                          C(016)    Reference
               LINE_STRUCT               G/L Account Document Line
                   AUFNR                          C(012)    Order
                   HKONT                          C(010)    G/L Account
                   KOSTL                          C(010)    Cost Center
                   MEINS                          C(003)    Base Unit of Measure
                   MENGE                          C(013)    Quantity
                   PRCTR                          C(010)    Profit Center
                   SGTXT                          C(050)    Text
                   SHKZG                          C(001)    Debit/Credit Ind.
                   WRBTR                          AMT3(013) Amount
    I have changed PAC3 field for caracters fields of same length to avoid erreur message of no packed fields allowed.
    Structure Relations
           E1FIKPF FI Document Header (BKPF)         <<<< HEADER_STRUCT G/L  Account Document Header
                   Select Target Structure E1FIKPF .
               E1FISEG FI Document Item (BSEG)          <<<< LINE_STRUCT   G/L Account Document Line
                   E1FISE2 FI Document Item, Second Part of E1FISEG   (BSEG)
                   E1FINBU FI Subsidiary Ledger (FI-AP-AR) (BSEG)
               E1FISEC CPD Customer/Vendor  (BSEC)
               E1FISET FI Tax Data (BSET)
               E1FIXWT Extended Withholding Tax (WITH_ITEM)
    Files
           Legacy Data          On the PC (Frontend)
               File to read GL Account info   c:\GL_Account.txt
                                              Data for Multiple Source Structures (Sequential Files)
                                              Separator Tabulator
                                              Field Names at Start of File
                                              Field Order Matches Source Structure Definition
                                              With Record End Indicator (Text File)
                                              Code Page ASCII
           Legacy Data          On the R/3 server (application server)
           Imported Data        File for Imported Data (Application Server)
               Imported Data                  c:\SYNERGO_CREATE_LCNA_FI_GLDOC_CREATE.lsmw.read
           Converted Data       File for Converted Data (Application Server)
               Converted Data                 c:\SYNERGO_LCNA_FI_GLDOC_CREATE.lsmw.conv
           Wildcard Value       Value for Wildcard '*' in File Name
    Source Structures and Files
           HEADER_STRUCT G/L  Account Document Header
                         File to read GL Account info c:\GL_Account.txt
               LINE_STRUCT G/L Account Document Line
                           File to read GL Account info c:\GL_Account.txt
    File content:
    Document  Header Text     Document Type     Document Date     Posting Date     Exchange rate     Currency     Translation Date     Reference     
    G/L Account document     SA     20080401     20080409     1.05     CAD     20080409     Reference     
    Order     G/L Account     Cost Center     Base Unit of Measure     Quantity     Profit Center     Text     Debit/Credit Ind.     Amount
         44000022                    1040     Line item text 1     H     250
         60105M01     13431     TO     10          Line item text 2     S     150
    800000     60105M01                         Line item text 3     S     100
         60110P01     6617     H     40          Line item text 4     S     600
         44000022                    ACIBRAM     Line item text 5     H     600
    The file structure is as follow
    Header titles
    Header info
    Line titles
    Line1 info
    Line2 info
    Line3 info
    Line4 info
    Line5 info
    Could someone direct me in the wright direction?
    Thank you in advance!
    Curtis

    Hi,
    Thank you so much for yout reply.
    For example
    i have VBAK(Heder structure)
              VBAP( Item Structure)
    My file should be like this i think
    Identification content         Fieldnames
         H                               VBELN      ERDAT     ERNAM        
                                          Fieldvalues for header
          H                              1000          20080703   swapna
    Identification content         Fieldnames
        I                                   VBELP     AUART 
                                          Fieldvalues for item
        I                                  001             OR
                                           002             OR
    Is this format is correct.
    Let me know whether i am correct or not

  • Issue on How to mimic Deski document from CMS to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Would you know if there's a way to mimic Deski
    document from BOXI server(CMS) to local machine, pass parameter, execute and
    save in a mutiple report format then store in a local drive or network
    drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only and not desktop intelligence.  Please let me know your ideas. I would really appreciate your help. Thanks.

    Post Author: usaitconsultant
    CA Forum: JAVA
    Hi Ted,
    Thanks for the reply.The file is not available in the server. Though, I checked CMS and I found an instance in history tab and the status is failed with error below. 
                Error Message:
                A variable prevented the data provider Query 1 with BANRRD30 from being refreshed. (DMA0008).When I checked my codes, I found out that the object Im using is for web intelligence data provider. However, I cannot find any documentation and example for passing parameter values in desktop intelligence data provider. Any idea on this? You think this is not suported by Report Engine SDK?Thanks.    

  • How do I set up mutiple icloud accounts using my Apple ID but giving my children (and their ipod touches) their own icloud e-mail, so we do not share contacts photos etc

    How do I set up mutiple icloud accounts using my Apple ID but giving my children (and their ipod touches) their own icloud e-mail, so we do not share contacts photos etc

    Welcome to the Apple Community.
    Create an iCloud account for each of them.

  • How to get rid of mutiple events showing in calenders for the same event

    How do you get rid of mutiple events that show up in your calender of the same event. It doesn't matter what kind of event it is whether personel or yearly holiday it shows up mutiple times in the month view, list view. I've gone through and deleted events manually and said for all future events but this is time consuming, because you have to do it for each event. Is there a qicker way of getting this done? Also just an off note I found out that my bluetooth headsets stop ringing throught the ear piece like they did before the upgrade, any insight into this?

    If I understand your question correctly...
    try the following
    from Sources, choose the greyed out streaming library that you want to be rid of...in your case, make sure it is the right one, since they both have the same name.
    You should get a screen that says "Library Unavailable" with 2 menu choices below that, "OK" and "Disconnect from iTunes".
    Choose disconnect from iTunes and the library should be gone from your Sources.

  • I can only delete one old bookmark at a time. How can I delete mutiple old bookmarks at once?

    ''dupe of https://support.mozilla.org/en-US/questions/911712''
    I can only delete one bookmark at a time? How Can I delete mutiple old bookmarks?

    Did this answer your question or do you still have a question about deleting Bookmarks --> https://support.mozilla.org/en-US/questions/911712
    Deleting multiple Bookmarks is covered in the article referenced in my reply to the above post.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • HT1473 Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Generally adding a common album artist will fix things.
    tt2

  • Select One Choice-select multiple attributes into mutiple columns

    Select One Choice-select multiple attributes into mutiple columns does not work.
    read-only view object view1 - columns a, b, c
    updatable view object view2 - also columns a, b, c
    Select One choice has the capability to bind multiple columns to multiple columns. I understand how this wizard is to be used for these multiple mappings, i.e., view2.a mapped to view1.a, view2.b mapped to view1.b, etc., and using 'select multiple...' for the display attribute. When I complete the 'List Binding Editor" correctly, in this example, only column a will be updated. Columns b,c, etc. will not be effected.
    Has anyone solved this? Please do not reply telling me how to use the editor, I know how, it just is not working.
    Here is my jspx segment,
    <af:selectOneChoice value="#{bindings.Eis000tv1SlOffice.inputValue}"
    label="#{bindings.Eis000tv1SlOffice.label}">
    <f:selectItems value="#{bindings.Eis000tv1SlOffice.items}"/>
    Here is pageDef segment:
    <list id="Eis000tv1SlOffice" IterBinding="Eis000tv1Iterator"
    StaticList="false" ListOperMode="0" ListIter="OfficeSpaceV1Iterator"
    NullValueFlag="1" NullValueId="Eis000tv1SlOffice_null">
    <AttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="FloorArea"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="SlOffice"/>
    <Item Value="Floor"/>
    <Item Value="Area"/>
    </ListDisplayAttrNames>
    </list>
    Here is the iterator:

    can u set as specified here
    -Djps.app.credential.overwrite.allowed=true http://radalcove.com/blog/?p=34

  • Can we map mutiple Account ID's with a single House Bank in OBVCU? (FI-TRM)

    Hi,
    I want to map mutiple account ID's with single house bank in OBVCU for the purpose of making Automatic Payment Transaction(F111) for my Treasury postings.
    For eg:-
    Bank Master-FI12
    House Bank  Acc ID      GL                  
    BOB         BOB01         10251030
    BOB         BOB02          23506010
    BOB         BOB71          23506380
    BOB         BOB72          23506390
    These  account IDu2019s are linked to Main Accounts.
    Maintained Sub accounts, Issue & receipt in the GL Master with numbering convention as :
    Issue Accounts ends with 1 & Receipt Accounts ends with 2
    For eg:-For account ID BOB01
    Issue A/c: 10251031
    Receipt A/c: 10251032
    Bank Determination -FBZP
    Created Payment Methods I & O,Inflow & Outflow.
    But, OBVCU, the fields in grey are House Bank,Payment Method & Currency.
    In treasury module for clearing the payment request, I want to map the House Banks and Account ID's in following manner.
    House Bank   Pay. Method  Curr       Acc ID     Bank Sub A/c
    BOB                   I               INR       BOB01     10251032
    BOB              O               INR       BOB01     10251031
    BOB               I               INR       BOB02     23506012
    BOB              O               INR       BOB02     23506011
    BOB               I               INR   BOB71     23506382
    BOB              O               INR   BOB71     23506381
    BOB                   I               INR   BOB72     23506392
    BOB              O               INR   BOB72     23506391
    But system allows me only to link a single Account ID to House Bank(BOB) and If I try to add BOB02, BOB71 and BOB72 with house bank BOB, the system will through an error message as " Target key should be different from Source key".
    I could have masked the issue/receipt in treasury  account determination as follows:-
    Eg :- Account Symbol  3 :  GL 1025103+
    But,since all the other modules except Treasury has gone live ,it is not possible to change the numbering convention or account IDu2019s.
    Kindly revert with the suggestions.
    Thanks & Regards
    Ramesh Nair

    Hi Ramesh,
    It is not the problem of linking different account ids to a single house bank, you had done assigning a payment method for a single currency to different account ids for the same house bank.
    SAP doesnt allow this scenario
    BOB I INR BOB01 10251032
    BOB O INR BOB01 10251031
    BOB I INR BOB02 23506012
    BOB O INR BOB02 23506011
    BOB I INR BOB71 23506382
    BOB O INR BOB71 23506381
    BOB I INR BOB72 23506392
    BOB O INR BOB72 23506391
    Here above you tried to assign payment method I with currency INR to different account ID's (BOB02 & BOB71) apart from BOB01 which SAP doesnt allow. You can assign a payment method with a currency to only one account id.
    HOpe u understood.
    Your criteria cant be met.
    Regards
    srikanth

  • How do I disable "this connection is untrusted" I visit the same web site mutiple times in a day visit I get this same error, these are trusted sites within my work

    How do I disable "this connection is untrusted" I visit the same web site mutiple times in a day and every visit I get this same dam error, these are trusted sites within my work environment. This is getting really old, and I am thinking that I should just uninstall, which is a pity becuase I do like firefox

    Okay, before you copy 'n paste canned responses, you should read the post first.
    '''The date & time on my computer is correct''' I've already checked this.
    '''I don't give a damn why the site is untrusted''', I probably know why in fact (behind corporate proxy server).
    As for exporting a known good certificate from another browser, sure good idea, but it doesn't seem to work. I tried exporting from IE, Firefox did the import without complaint, but it still complains. At any rate, I don't care about that. '''I just want to permanent disable it for ALL SITES for ALL TIME'''. Is that too much to ask for?
    Judging by the number of posts on this topic, apparently I am not the only one complaining about this.

  • How to mimic Deski document from BOXI server to local machine, pass parameter, execute and save in a mutiple report format then store in a network drive.

    Post Author: usaitconsultant
    CA Forum: JAVA
    To Guru's, Would you know if there's a way to mimic Deski document from BOXI server to local machine, pass parameter, execute and save in a mutiple report format then store in a local drive or network drive? Most examples and tutorials in BO XI R2 I've seen are scheduling while drilling report is for web intelligence only.  Please let me know your ideas. I would really appreciate your help. Thanks. 

    Give Chronosync a go - have been using for over a year and it works great; if you like Syncback you'll like this app.

  • Can you share one apple id between mutiple devices ?

    can you share one apple id between mutiple devices ?

    As far as i know, yes. What devices are you using, and try iCloud depending on your device type.

Maybe you are looking for