How  To Remove Tables Through SDK Code(Using MetaDataObject)

Hi Experts,
I am with a problem in my sdk code.As follows,I added a table with no object  into the database through the sdk code using OUsertablesMd object.Now My Query is i want to delete the same table through my code.I am using oUserTablesMD.Remove()
Method.It's throwing an error message.If any one culd send the sample of removing sap tables through dk code would be helpful
Help Would be appreciated!!
Thanking You,
Vijay Kumar

Hi,
try this one
Dim rsd As SAPbobsCOM.Recordset
        rsd = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
        rsd.DoQuery("SELECT T0.[TableName] FROM OUTB T0")
        Dim sTableID As String
        Do Until rsd.EoF
            sTableID = rsd.Fields.Item("TableName").Value.ToString.Trim
            Dim oTables As SAPbobsCOM.UserTablesMD
            oTables = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
            If oTables.GetByKey(sTableID) = True Then
                oTables.Remove()
            End If
            oTables = Nothing
            rsd.MoveNext()
        Loop
Regards,
Siva

Similar Messages

  • How to disable formsetting menuitem through sdk code

    hi experts,
    I am facing bit problem while loading my udo screen ,when my screen is getting opened sap's menuitem formsetting is enable'd,My requirement is to disable the formsetting menuitem only when udo screen opens through sdk code.so,that user cannot change any of the field in the matrix.
    help would be appreciated.
    regards,
    Vijay Kumar

    Hi Vijay ,
    Try This.....
    'After Loading form
    oform=sbo_application.forms.item("ur fromid")
    sbo_application.Menus.Item("5890").Enabled = False
    Thanks
    Shafi

  • How can i write the below code using "For all entries"

    Hi
    How can we write the below code using "for all entries" and need to avoid joins...
    Please help
    SELECT aaufnr aobjnr aauart atxjcd a~pspel
    agstrp awerks carbpl cwerks
    INTO TABLE t_caufv
    FROM caufv AS a
    INNER JOIN afih AS b
    ON aaufnr = baufnr
    INNER JOIN crhd AS c
    ON bgewrk = cobjid
    AND c~objty = 'D'
    WHERE ( a~pspel = space
    OR a~txjcd = space
    OR NOT a~objnr IN
    ( select OBJNR from COBRB AS e
    WHERE objnr = a~objnr ) )
    AND a~werks IN s_plant
    AND a~auart IN s_wtype
    AND NOT a~objnr IN
    ( select OBJNR from JEST AS d
    WHERE objnr = a~objnr
    AND ( dstat = 'A0081'OR dstat = 'A0018' )
    AND d~inact 'X' ).
    Reward points for all helpfull answers
    Thanks
    Ammi.

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • How can I pass through error code 1009

    How can I pass through error code 1009

    See this support document. While I do not see an explanation for error code 1009, the closest ones describe 3rd party security software or a hardware fault. You decide which direction you want to head in. http://support.apple.com/kb/TS3694

  • How to remove "Ads by Media Player" using Chrome? Online solutions are for Windows

    How to remove "Ads by Media Player" using Chrome? Online solutions are for Windows.
    Having relentless pop up ads which open new browser windows. Searched all over for a Mac solution and can't seem to find one. Help please!?

    http://www.adwaremedic.com/index.php
    (Read the whole page to learn about adware!)

  • Get Error while update the User defined row table through DSK Code

    Hi experts,
    I have got an error while updating the user row defined table.
    Error is - "Invalid row"
    I have created one master table "@CBF_FARM " and Child table "@CBF_FAR1"
    First i inserted 5 record in the child table so in my my child table there are 5 Line id (1,2,3,4,5 one for each row).
    after that i delete 2 rows (3rd & 4th row) from child table now in my child table there are 3 rows( Line id 1, 2, 5). Please See attachment.
    Now i am updating  the last record of child table through Code  (Line id is 5)  from other form, then i got error  invalid row.
    Following Code used for updating the user defined child table.
      SAPbobsCOM.GeneralService oGeneralService1 = null;
                                    SAPbobsCOM.GeneralData oGeneralData1 = null;
                                    SAPbobsCOM.GeneralDataParams oGeneralParams1 = null;
                                    SAPbobsCOM.CompanyService sCmp1 = null;
                                    SAPbobsCOM.GeneralData oChild1 = null;
                                    SAPbobsCOM.GeneralDataCollection oChildren1 = null;
                                    sCmp1 = clsAddOn.LDNA_Company.GetCompanyService();
                                    oGeneralService1 = sCmp1.GetGeneralService("CBF_FARM");
                                    // Get UDO record
                                    oGeneralParams1 = ((SAPbobsCOM.GeneralDataParams)(oGeneralService1.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)));
                                    oGeneralParams1.SetProperty("Code", oForm.Items.Item("edtFarmCd").Specific.Value);
                                    oGeneralData1 = oGeneralService1.GetByParams(oGeneralParams1);
                                    // Add lines on UDO Child Table
                                    oChildren1 = oGeneralData1.Child("CBF_FAR1");
                                    // Create data for rows in the child table
                                    SAPbouiCOM.Item oItem = oForm.Items.Item("cmbShed");
                                    oCombo = oItem.Specific;
                                    string ShedCode = oCombo.Selected.Value;
                                    ldna_Rec = clsAddOn.LDNA_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                                    string strQuery1 = "select LineId from [@CBF_FAR1] where U_ShedCd = " + ShedCode;
                                    ldna_Rec.DoQuery(strQuery1);
                                    oChild1 = oChildren1.Item(ldna_Rec.Fields.Item("LineId").Value - 1);
                                    oChild1.SetProperty("U_Status", "Ready For Schedule");
                                    //Update the UDO Record
                                    oGeneralService1.Update(oGeneralData1);
    Please Help me it is an urgent requirement,
    -Regards
    Vikas

    hi.
    Error is - "Invalid row"
    Now i am updating  the last record of child table through Code  (Line id is 5)  from other form, then i got error  invalid row.
    As per my knowledge
    What i understood is you have 5 lines and you are going to be update 5th line
    am i correct..
    while u are updating the line in child table
    you have to consider like this..
    line number         u have to update like
    1                                        0
    2                                        1
    3                                        2
    4                                        3
    5                                        4
    which means in child table treat
    line 1  as 0
    line 2 as  1
    line 5 as 4
    If you want to update the line 5 u have to mention 4 th line

  • Updating HRP table through abap codes - is it correct

    Hi all,
    In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
    For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
    Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP  table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
    REPORT  ZHRPAR0005 .
    TABLES: HRP1000, HRP1001.
    DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
    SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
    IT_1001-OTYPE = 'S'.
    APPEND IT_1001.
    INSERT INTO HRP1001 VALUES IT_1001.
    Thanks
    Ribhu

    Hi Ribhu..
    there are various FMs available for this purpose..
    use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
    then some related table might not be updated..
    So use FMs..
    RH_COPY_INFTY
    RH_CUT_INFTY
    RH_DELETE_INFTY
    RH_INSERT_INFTY
    RH_INVERT_RELA_INFTY
    RH_UPDATE_INFTY
    <b>For IT 1001 </b>
    RH_CUT_INFTY_1001_EXT
    RH_CUT_INFTY_1001_EXT_GENERIC
    RH_DELETE_INFTY_1001_EXT
    RH_DEL_INFTY_1001_EXT_GENERIC
    RH_INSERT_INFTY_1001_EXT
    RH_UPDATE_INFTY_1001_EXT
    RH_BASE_READ_INFTY_1001
    RH_READ_INFTY_1001
    RH_READ_INFTY_1001_EXT
    RH_READ_INFTY_1001_EXT_ONLY
    Reward if useful
    Regards
    Prax

  • Updating HRP tables through abap code- is it correct?

    Hi all,
    In my hrp1001 table,I want that All Qualifications (Q) and Tasks (T) assigned to all the functional roles (ZF) existing in the system should be transferred to the positions(S) tagged to those respective functional roles.
    For that I am supposed to write a code which copies the entries from Qualifications (Q) and Tasks (T) and tag the same to the positions (S).
    Below is the sample code which is adding just one record to HRP1001 through abap statment. What I am curious to know is wheather it is logically correct to update HRP table through abap statments or no. If not, Please let me know what should we do as a solution - should we update all records through LSMW of PP01 or any thing else we can do???
    REPORT ZHRPAR0005 .
    TABLES: HRP1000, HRP1001.
    DATA IT_1001 LIKE HRP1001 OCCURS 5 WITH HEADER LINE..
    SELECT SINGLE * FROM HRP1001 INTO IT_1001 WHERE OTYPE = 'CP' AND PLVAR = '01' AND SCLAS NE 'S'.
    IT_1001-OTYPE = 'S'.
    APPEND IT_1001.
    INSERT INTO HRP1001 VALUES IT_1001.
    Thanks
    Ribhu

    Hi Ribhu..
    there are various FMs available for this purpose..
    use those... becasue if u directly insert, update or modify record in HRP1000 or HRP1001...
    then some related table might not be updated..
    So use FMs..
    RH_COPY_INFTY
    RH_CUT_INFTY
    RH_DELETE_INFTY
    RH_INSERT_INFTY
    RH_INVERT_RELA_INFTY
    RH_UPDATE_INFTY
    For IT 1001
    RH_CUT_INFTY_1001_EXT
    RH_CUT_INFTY_1001_EXT_GENERIC
    RH_DELETE_INFTY_1001_EXT
    RH_DEL_INFTY_1001_EXT_GENERIC
    RH_INSERT_INFTY_1001_EXT
    RH_UPDATE_INFTY_1001_EXT
    RH_BASE_READ_INFTY_1001
    RH_READ_INFTY_1001
    RH_READ_INFTY_1001_EXT
    RH_READ_INFTY_1001_EXT_ONLY
    Reward if useful
    Regards
    Prax

  • ORA-02070: Error when updating an informix table through orcl view using HS

    Hello!
    I faced the following problem:
    I have a table in informix, and i want to reach this table through Oracle infromix gateway (Heterogenous Services). I succeeded to set up the gateway, and I created an Oracle view for my table in informix. It is working fine, I can query and modify data, except the following case: If I run the query (from SQL Developer) "UPDATE oracle_view SET float_field = '1.1' WHERE record_id = 1 AND float_field = '1.2'", I receive the following error:
    "SQL Error: ORA-02070: database database_link does not support TO_NUMBER in this context.
    *Cause: The remote database does not support the named capability in the context in which it is used.
    *Action: Simplify the SQL statement."
    If I modify the query as "UPDATE oracle_view SET float_field = '1.1' WHERE record_id = 1", it is running without any error messages. I found, that to_number is not supported by Oracle HS gateway, but I do not use explicitly the to_number Oracle function! But I must use the above version, because of concurrent users.
    Does anybody have an idea how I could get rid of the implicit call of to_number?
    Thanks, Gyula

    user11229789 wrote:
    Yes, float_field is a numeric-type field, which is a 8-byte FLOAT in informix. This field gets automatically FLOAT datatype in the Oracle view, and can not be modified. record_id is some integer unique id field.Well, as the float_field is numeric it makes sense that the SQL issued from Oracle treats it as numeric, so leaving out the quotes can only be the correct thing to do. If you introduce quotes then you are providing strings and the HS is having to do a convertion to numeric (hence where the TO_NUMBER would have been coming into the initial issue.
    If I try the update query without '-s you suggested, like this: "UPDATE oracle_view SET float_field = 1.1 WHERE record_id = 1 AND float_field = 1.2" , i receive the following error message:
    SQL Error: ORA-28534: "Heterogeneous Services preprocessing error"
    *Cause:    One of the things that the Heterogeneous Services can do is
    to preprocess parts of SQL statements that contain implicit
    coercions or calls to explicit coercion functions like TO_CHAR
    TO_NUMBER or TO_DATE. For example, it could convert a call to
    TO_DATE to a bind variable, pre-evaluate the TO_DATE function
    call and pass the resulting value to the non-Oracle system as
    the bind value. This behavior is controlled by some coercion
    related capabilities. If the capabilities are set incorrectly,
    the HS could encounter errors when it attempts to do the
    preprocessing. If it does then this error will be signaled.
    *Action:   The capability table settings are controlled by the agent
    vendor and can be modified by the DBA. Contact your DBA and
    agent vendor and get the correct set of capabilities installed.I can't see why the HS would be trying to do any coercion of anything except to perhaps convert the parts of the where clause to bind variables and pass the actual values in. Does it work ok without the "AND float_field = 1.2" ? If so, I'm guessing there's some configuration issue of the HS required to get it to deal with the floats.... perhaps in the capability settings as the error message "action" indicates.

  • How can I navigate through tabs without using the mouse?

    I want to know how to navigate through tabs without using a mouse... just like you can navigate through multiple windows by using <alt><tab> ... because it's extremely annoying when I'm working on something to have to take my hands off the keyboard and go to the mouse.

    You can also use Ctrl + Page Up and Ctrl + Page Down to go to the next and previous tab. I prefer those because it doesn't require the Shift key (Shift + Ctrl+ Tab) to go to the previous tab.
    See also [[Tabbed browsing]]

  • How to remove namespaces in mapping when using External Definition

    Hi,
    I read in the blog (/people/sameer.shadab/blog/2005/12/05/how-to-remove-namespaces-in-mapping--xi) that you are able to remove namespaces in mapping by deleting the value from XML Namespace under the Message Type. However, is it possible to do this when you are using External Definition (xsd) ? The blog only describe how to do this if you define a Data Type.

    Hi ,
    No ..it is not possible to remove the namespace once you imported into IR of external defintion.You can remove your namesapce from external definition before importing into IR.
    Sekhar

  • How to pass table in RFC and use that table to populate fields in Mapping?

    Hi,
    I have a requirement FIle to CSV, the file consists of thousand lines...
    What I did first is to put RFC look up per line. It is taking too long to process the message.
    One work around that I could think of is to pass all the values to a table then pass the table to RFC then RFC returns another table, so only one RFC call is required.
    How am I going to use the table returned by the RFC? Please advise how to achieve this scenario.

    Hi,
    I use an ABAP RFC function, which has a parameter that contains many rows.
    In ABAP, I create a two types. First is a ROW - contains some fields, for example, param1, param2, etc.
    Second is a TABLE - contains multiple count of ROW.
    Then I create a Remotecallable Function that has this TABLE-type as parameter (you can make this parameter as INPUT and OUTPUT). So in my mapping program after import RFC Function, I see a message looks like this:
    MY_TABLE_PARAM (Occurences: 1)
    item (Occureces: 0..unbounded)
    param1 (Occureces: 1)
    param2 (Occureces: 1)
    etc (Occureces: 1)
    Regards.

  • How to delete meeting through API for Using Adobe Connect 8 Web Services

    Using Adobe Connect 8 Web Services support "Create meetings" API to create a Adobe Connect meeting.
    But I can't find "Delete meeting" API similar to delete meeting,Could you tell me how to delete meeting through API.
    Thanks!

    You must have used sco-create to create meeting. To delete a meeting, use sco-delete API call.
    Find its documentation here.

  • HT1212 How do i change a pass code useing icloud?

    How do i change a pass code on icloud?

    Your iCloud password is the same as your Apple ID password. You change your password at Manage your Apple ID: https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Cheers,
    GB

  • How do I Loop through a recordset using PHP

    I have a recordset containing a MySql table with 5 columns, each one containing an email address of an official in a club.
    Each row represents a different club, and each column a different type of official.
    The first column represents chairmen, the next treasurers etc...
    The recordset is called $mailset.
    I need to loop through each row of $mailset and extract the email addresses of each column and concatenate them into a string seperated by semi colons ; so it ends up like this:
    [email protected];[email protected];[email protected]; and so on.
    This is how the recordset is set up:
    mysql_select_db($database_dummyread, $dummyread);
    $query_mailset = "SELECT club_chair_email, club_treas_email, club_sec_email, club_delegate_email, club_deputy_email FROM clubs";
    $mailset = mysql_query($query_mailset, $dummyread) or die(mysql_error());
    $row_mailset = mysql_fetch_assoc($mailset);
    $totalRows_mailset = mysql_num_rows($mailset);
    ?>
    I tried using a  loop to step through the recordset, but it always shows the first record, so its not moving the pointer through the file.
    The pseudo code aught to be something like this:
    Initialise variables and move to the first record
    If there are records to process
                   Read a record
                        Process all columns
                Move on to the next record
    else
         if there are no records
              print an error message
    else
    Print the results.
    Can anyone give me a hint as to how to move from row to row in a recordeset under the control of a loop.
    I am using PHP and MySql. (as far as I know, it is the original - not PDO or MySqli)

    Each call to mysql_fetch_assoc($mailset) retrieves the value at the current location and increments the pointer in the recordset array. So use either a do or while loop and call mysql_fetch_assoc($mailset) from within the loop.
    From the docs:
    Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC for the optional second parameter. It only returns an associative array.

Maybe you are looking for

  • BADI/User exit for MIGO fi postings

    Hello Experts, I have one requirement regarding at the time of MIGO accounting entry is generating based on the OBYC settings,now the client want along with this entry, want to create one more FI document through background,In the background we will

  • Slow down after scanner attached

    I have been scanning photos with the HP scanner that Apple gave away with the computer. Everything I scan is followed by the pinwheel spinning for four to five minutes before anything goes back to normal. Is this 200GB computer full already? Not even

  • Servlet Server Socket Communication problem

    Hi Iam having this problem ...when I read data in server line by line it works but when I try to read byte by byte server hangs. This is my code BufferedReader in = new BufferedReader( new InputStreamReader( clientSocket.getInputStream())); //it work

  • Problem with the currency JPY

    Hi. I have set up a table, in which a column is as price inputfield and another as currency column defined. The price column is defined as 'currency' with 2 decimals, and the currency defined as 'cuky' Now the problem comes, if I change the currency

  • Slight yellow color in the top left of my i phone 5

    there is a slight yellow mark in the top left side of my i phone 5. I noticed just one week before only.