How many ways we can create an object?

how many ways we can create an object?

rcnraju wrote:
how many ways we can create an object?Why does it matter?
add: clazz.newInstance();
add: clazz.getConstructor(parameterTypes).newInstance(parameterValues);
add: Unsafe.allocateInstane(Class clazz);
add: any native method can create a new instance,

Similar Messages

  • In how many ways we can create new document and how to implements this ways?

    I found that we can create new document by 3 ways
    1)by using session object of application ,document list as follow
    InterfacePtr<IApplication> firstdoc(GetExecutionContextSession()->QueryApplication());
              InterfacePtr<IDocumentList> docList(firstdoc->QueryDocumentList());
      docList->NewDoc(25089,IDataBase::ProtectionLevel.kProtectSave, nil);
    but in this case i am not getting how to use newdoc method i.e which parameter we have to pass(not even clear from API reference )
    2)by using command
    InterfacePtr<IApplication> firstdoc(GetExecutionContextSession()->QueryApplication());
              InterfacePtr<IDocumentList> docList(firstdoc->QueryDocumentList());
      InterfacePtr<ICommand> new1(CmdUtils::CreateCommand(kNewDocCmdBoss));
              UIDList asd(docList);
              new1->SetItemList(asd);
              CmdUtils::ProcessCommand(new1);
    3)bu using some util or facade interface
    Utils<IDocumentCommands>()->New( . . .)
    in this case also  i am not geeting how to use new method 
    I try all this method but none of them working .i knew i am doing some mistake  in all these method so please correct me where i am wrong .
    Main problem is in the first parameter of newdoc method i.e what is class id how to use them 

    1. add to your project "SDKLayoutHelper.cpp", "SDKLayoutHelper.h"
    2. #include "SDKLayoutHelper.h"
    insert code:
    do{
             SDKLayoutHelper helper;
             UIDRef docRef = helper.CreateDocument();
             if (UIDRef::gNull == docRef)
                 break;
             helper.OpenLayoutWindow(docRef);
        }while(kFalse);
    Regards!

  • How many ways we can create authorization for user groups in sap query reports

    Hi Gurus, I am getting a problem when I am assigning users to user group in sap query report .The users other than created in user groups are also able to add &change  the users .So please suggest me how to restrict users outside of the user group.
    Please send me if u have any suggestions and useful threads.
    Thank You,
    Suneel Kumar.

    I don't think it can be done. According to the link below 'Users who have authorization for the authorization object S_QUERY with both the values Change and Maintain, can access all queries of all user groups without being explicitly entered in each user group.'
    http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3f89455611d189710000e8322d00/content.htm
    Although I think you can add code to your infoset and maybe restrict according to authority group, i.e.:
    Use AUTHORITY-CHECK to restrict access to the database based on user.
    Press F1 on AUTHORITY-CHECK to find out how to use it in the code

  • How many ways you can invoke JSP from OBPM

    Hi All,
    I just wanted to know how many ways we can invoke JSP Page from BPM.
    1. BPM Interactive component call
    2. ?.
    Thanks
    Sunil.

    When you are using a jsp, its for user interaction only. and in any case, you require interactive component call.
    this is the only way you can use a jsp in OBPM.
    However, in a bpm interactive activity - you can also choose external as implementation type.
    For this, you need to have your jsp source code reference added as an external resource in the project and the external resource is to be specified at configuration while setting implementation type.
    HTH
    Sharma

  • How many pushbuttons u can create in application toolbar in selection scree

    Hi
    How many pushbuttons u can create in application toolbar in selection screen? 
    Thank You

    Hi,
    Use SET PF-STATUS 'ZABC'.
    Double click on it.
    It will display Application toolbar. Create the buttons.
    I think the limitation is bcz of the LABEL of button, if you create buttons with a Single TEXT, then you would be able to create many buttons, including toggle button. The Toggle button would switch the buttons.
    i.e say initially 10 buttons are displayed along with toggle button. You click the toggle button , then remaining 10 buttons are displayed.
    Best regards,
    Prashant

  • In how many ways we can load hierarchies to SAP BW and which transfer mthd

    Hi guru's,
    In how many ways we can load hierarchies to SAP BW and which transfer method is best.
    can anyone explain me with suitable example.
    Thanks,
    Madhu Raj.

    There are standard datasources available for hierarchies also. If the standard datasource does not satisfy your requirement you can always load a hierarchy using flat file. Refer to the below link for the same
    http://help.sap.com/saphelp_nw04/helpdata/en/fa/e92637c2cbf357e10000009b38f936/frameset.htm

  • How many ways we can configure SMTP Mail server on windows to get CCP mails

    Hello IAC's,
    I have configured SMTP server and teleneted  in CCP server and also I'm receving mails too when I submit the orders.
    I wondered with an update given by my  friend that he is using pmail server for SMTP mails.
    Can any one suggest me in how many ways we can enable the SMTP server.. on windows..??
    Thanks,
    Noor.

    Hi
    if i use String provider = "imap"; then it shows the following error message..
    javax.mail.MessagingException: Connection refused: connect
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
    at javax.mail.Service.connect(Service.java:275)
    at javax.mail.Service.connect(Service.java:156)
    at javamail.AllPartsClient.main(AllPartsClient.java:39)
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
    at java.net.Socket.connect(Socket.java:507)
    at java.net.Socket.connect(Socket.java:457)
    at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
    at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
    at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)
    at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
    at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
    ... 3 more
    pls any one give idea

  • How many ways we can block the vendor

    hi friends,
                 How many ways we can block the vendor

    Hello
    Adding further,
    Within Accounts Payable, you can block a vendor account for posting. You have to block a vendor master record before you can mark it for deletion. You would also block a vendor that you use only as an alternative payment recipient, so that nobody can post to it by mistake.
    There are several fields in the vendor master record available to you. You can set the following blocks:
    Posting block for certain company codes or for all company codes
    Purchasing block for certain purchasing organizations or for all purchasing organizations. This is of course only if you have purchased and installed the purchasing application component.
    This topic describes how to block a vendor account and blocking an account for the accounting department only. A separate topic explains how you block a vendor from being paid.
    You can cancel a vendor account block at any time. To do this, simply remove the relevant indicator.
    Only block an account if there are no more open items in the account. If an account is blocked, you cannot clear any open items in it.
    Reg
    assign points if useful

  • In how many ways we can filter this select statement to improve performance

    Hi Experts,
    This select statement taking 2.5 hrs in production, Can we filter the where condition, to improve the performance.Plz suggest with coding ASAP.
    select * from dfkkop into  table t_dfkkop
               where   vtref   like 'EPC%'        and
                   ( ( augbd      =  '00000000'   and
                       xragl      = 'X' )
                               or
                     ( augbd between w_clrfr and  w_clrto )  )  and
                       augrd      ne '03'         and
                       zwage_type in s_wtype .
    Regards,
    Sam.

    if it really takes 2.5 hours, try the followingtry to run the SQL trace and
    select *
              into table t_dfkkop
              from dfkkop
              where vtref like 'EPC%'
              and augbd = '00000000' and xragl
             and augrd ne '03'
             and zwage_type in s_wtype .
    select *
              appending table t_dfkkop
              from dfkkop
              where vtref like 'EPC%'
             and augbd between w_clrfr and w_clrto 
             and augrd ne '03'
             and zwage_type in s_wtype .
    Do a DESCRIBE TABLE after the first SELECT and after the second,
    or run an SQL Trace.
    What is time needed for both parts, how many records come back, which index is used.
    Siegfried

  • HT204053 How many iCloud account can created in one iOS device?

    Is in one iOS device just can created max 3 account of iCloud? I created 3 on my iPhone, and can't create anymore. I need your help. Thanks.

    Thanks! And if I restore the iPhone will affect to 3 accounts that I havecreated?

  • How many software components can create maintenance requests/notifications? So far, I count three...

    These are all in EA-PLM
    ILM_UI 'Basic Maintenance Processing: User Interface'
    RPLM_QIMT 'Quality Inspector and Maintenance Technician Roles'
    EAM_SIMPL'Simplification Project in Enterprise Asset Management'
    I can find portal business packages for iViews, but I'm looking for the Web Dynpro ABAP applications. Are there any more?
    Thanks!

    Wow! Thank you guys for the quick response and pointing me in the right direction!
    Altenbach, your example does exactly what I need! 
    Moving forward I should be able to reference the actual total torque number from the call by reference subvi and have the event structure initiate based on the change of that number correct?
    I tried something like this already and for some reason when I add a terminal to the terminal pane on the subvi it does not show up on the main vi. I can only imagine this is because the sub vi is "call by reference". The subvi already outputs an indicator to the front panel of the main vi called "total torque". This is inside a case structure so I don't know how to reference it for the subvi which you created.
    Again, I just want to say I am very thankful I am for the help. I am not here looking for free programming help. I am here asking questions because I truly want to learn. I know I will have to spend a lot more time reading tutorials and practicing basics. This program was just given to me last minute and I'm doing my best. Usually I am very resourceful and can find solutions on my own. This one was just over my head. Thank you.
      -Sean-
    Attachments:
    Impact Tester Main_03.vi ‏245 KB
    ITS_Data Graphs.vi ‏567 KB

  • How many ways Checks can be reprinted, apart from FBZ5 and "Void and reprint" Options

    Hello All - Some times, when there is issue with Printer, Checks are not printed. In such a case, Users ask us how to print Checks.
    Some options I know are that (1) Checks can be reprinted through T Code - FBZ5 and
    (2) if Users are Ok with voiding Checks and use next available Check numbers, We use the option in the Variant - "Void and reprint" Option.
          Some Users are not happy with this Solution as they do not want to waste Checks.
    I am aware of only these 2 options. Can you please suggest me other alternatives we have to reprint Checks. Your valuable inputs are very helpful to us in this regard.
    Thanks

    Hi Hoysala,
    Please use the the FBZ5 as per attached screenshot for reprint check.

  • How many ways a catalog can be published?

    Hello,
    Can somebody tell me how to publishing catalogs and in how many ways that can be done?
    plz provide some links ..
    thanx
    vevaik

    Hi,
    I suppose you are speaking about a CCM catalog, aren't you?.
    In that case you can publish the catalog using the bsp administration interface of CCM, only you have to select the master or procurement catalog and push publish. (You could emule this from a standard module function call in ABAP)
    I hope this help
    BR

  • How many ways to create servlets

    Hi
    i have some confusion. how many ways to create servlets.
    as of my knowledge 3 ways 1) implementing Servlet 2) extending GenericServlet 3) extending HttpServlets.
    can any one tell me this is correct or not.

    The only correct way (IMHO) to declare a Servlet is to implement Servlet... Extending GenericServlet or HttpServlet has (almost) the same effect it's not self documentingIf it's an HTTP servlet the only correct way is to extend HttpServlet, unless you really want to reinvent the wheel. You can add 'implements Servlet' if you insist but it is entirely redundant. The Javadoc will be the same in either case.
    In other words I don't know what this poster is talking about.

  • How many primary keys can w have in cube, ods objects?

    how many primary keys can w have in cube, ods objects?

    Hi Naresh,
    16 primary keys only possible(for cube: 16 dimensions, ODS - Keyfields)
    For ODS:
    -         You can create a maximum of 16 key fields (if you have more key fields, you can combine fields using a routine for a key field (concatenate).)
    -         You can create a maximum of 749 fields
    -         You can use 1962 bytes (minus 44 bytes for the change log)
    -         You cannot include key figures as key fields
    More info: [Creating ODS Objects|http://help.sap.com/saphelp_nw04/helpdata/EN/4a/e71f39488fee0ce10000000a114084/content.htm]
    Hope it Helps
    Srini
    [Dont forget to close the call by assigning poings.... - Food for Points: Make a Difference through Community Contribution!|https://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/007928c5-c4ef-2a10-d9a3-8109ae621a82]

Maybe you are looking for

  • Report to check price condition

    Hi All, Is it possible to check existing price conditions on all customers to make sure we have a valid price (i.e no ZERO price) in any condition, any report or fuction to help me do the above. Thanks in advance.

  • Final Cut Pro X - second document cannot be opened

    Help  !   I have a very irritating problem I cannot get rid of.     Every time I open FCPX  I get an error  message (below).      Mac Pro Desktop,  RAID0  6TB array,   3TB  backup drive   (also internal)   (i.e. we have four 3TB drives,  3 form the a

  • How to access sdo_geometry.sdo_elem_info with occi

    if I use occi,how to access a varray of number(sdo_geometry.sdo_elem_info) in a table such as cola_markets.

  • View/modify catalog is inactive

    hello, I added an asset hours ago, and since then the option "view/modify catalog is inactive" is still not accessible. What am I missing? -- Nick

  • Struts validator framework

    i need script to validate more than two fields using struts validator ,it is possible