Connect to COM(OBJECTS/METHODS) FROM ABAP

Dear all.
How can I connect to COM objects/methods from abap?
Could give me link to example.

Yes this method raises and exception with this message
Message ID:          FDT_CORE
Message number:      085
DO_IM_DATETIME is not in the context
The method SET_VALUE corresponds to IF_FDT_CONTEXT. This is the method's calls
      lv_name = 'DO_IM_DATETIME'.
      TRY.
          o_context->set_value( iv_name =  lv_name
                                ia_value = lv_element_tzone ).
        CATCH cx_fdt INTO lx_fdt.
          RAISE incorrect_parameter.
      ENDTRY.
I reactivate the aplication, the function, the expression and the data objects.
But the method is still giving this exception.
I have only this exception when I try to set up this two parameters:
DO_IM_DATETIM of type Timepoint
DO_IM_LANGU which is binding to the element type LANGU
But in my BRFPlus Function Context I do have this two parameters.
Thanks !

Similar Messages

  • Calling Business objects Methods from ABAP program

    Hi All,
    Can anyone please tell me the procedure to call methods of business object(Ex: BKPF) from an ABAP program. My requirement is to check the existence of a object key by using the method EXISTENCE CHECK from BKPF. Please help

    Here is an example from the SAP documentation.
    [http://help.sap.com/saphelp_nw70ehp2/helpdata/en/c5/e4ad71453d11d189430000e829fbbd/content.htm]
    Cheers
    Graham Robbo

  • Calling custom Infotype method from ABAP report

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Hi,
    This is the code we are using. Just calling the read and modify methods of the check class. Very simple actually .. we just want once update/insert to work but it does not.
    <CODE>
    REPORT  ZTESTRAD_WD.
    FIELD-SYMBOLS <p9106> TYPE p9106.
    DATA : infty_container_tab TYPE hrpad_infty_container_tab ,
           message_list        TYPE REF TO cl_hrpa_message_list,
         w_ok type boole_d  ,
         ref_class TYPE REF TO ZCL_HRPA_INFOTYPE_9106,
         container        TYPE REF TO if_hrpa_infty_container,
         it9106_container TYPE REF TO cl_hrpa_infotype_container,
         p9106_ref        TYPE REF TO data,
        busilog type ref to if_hrpa_masterdata_bl.
    CREATE OBJECT  message_list.
    TRY.
            CREATE OBJECT ref_class
              EXPORTING
                tclas = 'A'
                infty = '9106'.
          CATCH cx_hrpa_violated_assertion .
            write :/ 'Error during initialization'.
      ENDTRY.
    call method cl_hrpa_masterdata_bl=>get_instance
       importing
         masterdata_bl = busilog.
    TRY.
    CALL METHOD ref_class->IF_HRPA_INFTY_BL~read
      EXPORTING
        tclas           = 'A'
        pernr           = 'XXXXXXXX'
        infty           = '9106'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = abap_true
        message_handler = message_list
      IMPORTING
        container_tab   = infty_container_tab
        is_ok           = w_ok.
    CATCH cx_hrpa_violated_assertion .
       WRITE :/ 'Infotype could not be read'.
    ENDTRY.
    *" Fill the local structure with container data:
      loop at infty_container_tab into container.
        it9106_container ?= container.
        TRY.
        CALL METHOD it9106_container->primary_record_ref
          IMPORTING
            pnnnn_ref =  p9106_ref.
         CATCH cx_hrpa_violated_assertion .
        ENDTRY.
        ASSIGN p9106_ref->* to <p9106>.
        write :/ <p9106> .
      endloop.
    *" Just change some field values of the record
      <p9106>-C1name2 = 'Test name'.
      <p9106>-C2name2 = 'Test name 2 3 4'.
    data : return TYPE BAPIRETURN1,
           return1 TYPE BAPIRETURN1.
    *CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
       number        = <p9106>-pernr
    IMPORTING
      RETURN        = return1
    *PERFORM do_nothing(sapfp50p).
    The container itself is modified
      container ?= it9106_container->modify_primary_record( <p9106> ).
    CREATE OBJECT message_list.
    the invocation - errors are always fatal !!!
      DATA : lx_exception  TYPE REF TO cx_root,
             update_mode type HRPAD_UPDATE_MODE,
             massn type massn,
             massg type massg.
      TRY.
          CALL METHOD ref_class->IF_HRPA_INFTY_BL~MODIFY(
            EXPORTING
               old_container =                   it9106_container
               massn                          = massn
               massg                         = massg
               update_mode =                 update_mode
               no_auth_check =                   'X'
               message_handler =                 message_list
            IMPORTING
               is_ok =                           w_ok
            CHANGING
               container =                       container
        CATCH cx_hrpa_violated_assertion INTO lx_exception.
          RAISE EXCEPTION TYPE cx_wd_no_handler
            EXPORTING previous = lx_exception.
      ENDTRY.
    </CODE>
    I have also tried by instantiating the cl_hrpa_masterdata_bl and then calling the methods on that object...... makes no difference.
    I used this link to proceed with the modifications:
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/21d2254bba2bebe10000000a1553f7/frameset.htm
    The funny thing is that the WHOLE logic executes without any error messages or dumps or anything. I have now debugged almost every line of code that these methods call. PA30 works just fine. HR_INFOTYPE_OPERATION does not .. that's a whole differnt story.

  • Call Java Class and Methods from ABAP

    Hi
    I install de JCo, But how i can call java class and methods from ABAP?. somebody has an example?
    The tutorial say that's is possible,  but don't explain how do that?
    Thanks.
    Angel G. Hurtado

    If you need only simple java program, you do not need to install JCo. The following codes can call java class.
    DATA: COMMAND TYPE STRING VALUE 'C:\j2sdk1.4.2_08\bin\java',
          DIR TYPE STRING VALUE D:\eclipse\workspace',
          PARAMETER TYPE STRING VALUE 'Helloworld'. "here the name of your java program
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
       EXPORTING
         APPLICATION = COMMAND
         PARAMETER = PARAMETER
         DEFAULT_DIRECTORY = DIR
       MAXIMIZED =
         MINIMIZED = 'X'     "If you need the DOS window to be minimized
      EXCEPTIONS
        CNTL_ERROR = 1
        ERROR_NO_GUI = 2
        BAD_PARAMETER = 3
        FILE_NOT_FOUND = 4
        PATH_NOT_FOUND = 5
        FILE_EXTENSION_UNKNOWN = 6
        ERROR_EXECUTE_FAILED = 7
        OTHERS = 8.
    Tell me if it works.
    Nuno.

  • Calling https web service POST method from ABAP

    Hi all,
    I'm having some problems trying to call a credit card https web service from ABAP on 2004s SP11. I'm not using a proxy server and a call from a test https page on my local machine works fine. The page does not require a certificate.
    Do I need to do anything in particular to make https work ? I've done calls to http services without any problems. The only difference from a programming perspective as far as I know is the scheme 2 instead of 1, and the server protocol changed to HTTPS.
    All is fine until  I call method http_client->receive, at that point I get a return code of 1, http_communication_failure. 
    Your suggestions & contributions will be greatly appreciated.
    Cheers,
    Wouter.
    report zcreditcardtest .
    data: wf_user type string .
    data: wf_password type string .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: crcard(16) type c lower case default '4242424242424242',
                cvn(4)     type c lower case default '564',
                year(2)    type c lower case default '07',
                month(2)   type c lower case default '11',
                amount(10) type c lower case default '100.00',
                cukey(4)   type c lower case default 'AUD',
                order(10)  type c lower case default 'AB1322-refund'.
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default '' ,
                p_port(4) default ''.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
      clear wf_string .
      concatenate
      'order.type=capture&customer.username=SOMEUSER'
      '&customer.password=SOMEPASSWORD'
      '&customer.merchant=SOMEMERCHANT'
      '&card.PAN=' crcard
      '&card.CVN=' cvn
      '&card.expiryYear=' year
      '&card.expiryMonth=' month
      '&order.amount=' amount
      '&customer.orderNumber=' order
      '&card.currency=' cukey
      '&order.ECI=IVR'
      '&customer.captureOrderNumber=' order
      '&order.priority=1'
      '&message.end=null'
      into wf_string .
      break-point.
      clear :rlength , txlen .
      rlength = strlen( wf_string ) .
      move: rlength to txlen .
      clear: wf_proxy, wf_port .
      move: p_proxy to wf_proxy ,
            p_port to wf_port .
      call method cl_http_client=>create
        exporting
          host          = 'api.somewhere.com'
          service       = '80'
          scheme        = '2'                        "https
          proxy_host    = wf_proxy
          proxy_service = wf_port
        importing
          client        = http_client.
      http_client->propertytype_logon_popup = http_client->co_disabled.
      wf_user = user .
      wf_password = password .
    * proxy server authentication
      call method http_client->authenticate
        exporting
          proxy_authentication = 'X'
          username             = wf_user
          password             = wf_password.
      call method http_client->request->set_header_field
        exporting
          name  = '~request_method'
          value = 'POST'.
      call method http_client->request->set_header_field
        exporting
          name  = '~server_protocol'
          value = 'HTTPS/1.0'.
      call method http_client->request->set_header_field
        exporting
          name  = '~request_uri'
          value = '/post/CreditCardAPIReceiver'.
      call method http_client->request->set_header_field
        exporting
          name  = 'Content-Type'
          value = 'application/x-www-form-urlencoded; charset=UTF-8'.
      call method http_client->request->set_header_field
        exporting
          name  = 'Content-Length'
          value = txlen.
      call method http_client->request->set_header_field
        exporting
          name  = 'HOST'
          value = 'api.somewhere.com:80'.
      call method http_client->request->set_cdata
        exporting
          data   = wf_string
          offset = 0
          length = rlength.
      call method http_client->send
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2.
      call method http_client->receive
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3.
      if sy-subrc <> 0.
        message e000(oo) with 'Processing failed !'.
      endif.
      clear wf_string1 .
      wf_string1 = http_client->response->get_cdata( ).
    * Further Processing of returned values would go here.

    Well, finally got this running !
    First of all I needed to download SAP Cryptographic Software and install it on the Web Application Server. Added some parameters to the profile, then set up some nodes in strust. Note 510007 describes the full process.
    I then installed the certifcate I needed by opening the website in internet explorer and exporting it to a CER file and then importing it into the SSL client (Anonymous). The blog from Thomas Yung, "BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP" describes the process of exporting and importing certificates.
    I then had to start the HTTPS service on my NW 2004s ABAP preview edition SP11. I set this up for port 443.
    /osmicm --> GOTO --> SERVICES --> SERVICE --> CREATE
    Then finally, the program needed a few changes :
      call method cl_http_client=>create
        exporting
          host          = 'api.somewhere.com'
          service       = '443'                       " <<-----  443 NOT 80
          scheme        = '2'                        "https
          ssl_id        = 'ANONYM'              " <<----- SSL_ID Added
          proxy_host    = wf_proxy
          proxy_service = wf_port
        importing
          client        = http_client.
    and further in the program (thanks Andrew !) :
      call method http_client->request->set_header_field
        exporting
    *   name  = '~server_protocol'             " <<<--- DELETE
          name  = '~request_protocol'         " <<<-- INSERT must be request
          value = 'HTTPS/1.0'.
    and presto, we can now consume a https webservice via a POST method from within an ABAP program ! Nice.... Can I give myself 10 points ?

  • Connecting to COM objects

    Hi everyone,
    I've got a project on the horizon that involves using an API to access a database. The API uses COM objects. 
    Can I connect to the API using <cfobject> like this:
    <cfobject 
        class = "program ID"
        name = "myneatobject"
        action = "connect"
        context = "remote"
        server = "http://someserverip">
        type = "com">
    If the server is remote, isn't there some security involved? Login credinentials?  I'm trying to ge my head around this.  There's an exisiting website in place using the API, however we're planning on redoing everything in CF. 
    Thanks for any tips in to set me straight!

    Thanks Guys.
    To be sure I'm describing this properly, I've got the manual for the API (updated in 2009) and it states
    "The  API is a COM+ application (formerly MTS). It
    provides a set of COM objects that can be manipulated by COM-
    compliant development tools such as Visual Basic, Visual C++, Visual
    C#, VSTA and so on.
    The API provides the ability to search and locate accounts across
    multiple  databases. It uses an advanced data cache mechanism to
    minimize round-trips to database servers.
    Once the account is located using a 10-digit telephone, and
    optionally an account number, each subsequent attempt to connect to an
    database requires a company number as well as a valid account
    number."
    The following example shows how to modify an existing user profile information:
    Dim objUserProfile as Object
    Dim lRetCode as Integer
    Set objUserProfile = CreateObject("EnergyAPI.cUserProfile")
    lRetCode = objUserProfile.ModifyUserInfo (sEmailAddress,
    sPassword,sName,sPAsswordHint,sHintAnswer,lPreferences,cSysUser)
    If lRetCode <> 0 Then
      ‘ Failure - Display error message
      Else
        ‘ Success
      End If
    COM+ much different than COM?? Not from what I'm reading.

  • Invocking Business Objects Explorer from ABAP

    hello all,
    Is there any class available in ABAP which can be used to invoke BOE from ABAP so that we can pass the data in our internal tables to it and display it visually using business objects explorer.
    Is there any other such way in which the data in internal tables can be displayed in form of graphs to the user in ABAP
    Warm Regards,
    Naveen M

    Check if this FM is what u r looking for : SWO_TREE_GET_BUSINESS_OBJECTS

  • Calling object methods from other objects

    ok im trying to build a little windows application which shows a few thumbnails of pictures in a folder.
    I have a mainForm class that runs all the jFrame and menus, status bar etc, it has 2 jPanes, one with a jTree that browses the directories and the other is set blank and adds a few custom component objects depending on how many images are in the directory it does contains a few objects all from one custom component class that shows an image and a label below it.
    What i want to do is call the mainForm statusbar from within my custom component class. I have tried many things but cant seem to do it.
    How do i do this in java? or can anyone point me in the right direction for some reading material, websites etc?
    thanks

    if i have correctly understood what you are asking (big assumption)...
    you could just pass a reference to the main form into the custom class when you construct it (the custom class) - but this introduces unnessary coupling between the two classes and this approach will quickly get messy and hard to maintain.
    a better approach is to use the Mediuator pattern.
    have a look at
    www.mindspring.com/~mgrand/pattern_synopses.htm for example.

  • Overlap/ connect / get info / change / method from another class

    I have checked this out but it did not help me much
    http://java.sun.com/docs/books/tutorial/java/javaOO/arguments.html
    Now the problem : I got 4 classes and they are connected together.
    The first MAIN class is Student witch lets you create a student with his student number and studio point.
    StudentTest is a class witch creates a new student in Student class...
    now the Student and the StudentTest work great togather, and they both check information and give a system.out.print with no problem.
    I have to make a class called Eksamenskontor ( SOrry its not in english ) and this will allow you to connect to the STUDENT class and modify ( add more studentPoeng )
    Then I have to make another class that test the Eksamenskontor to see if it really add and edit the studentPoeng method and returns the correct answer.
    Note that the max studentPoeng allowed is 500 and more.
    Posting code: this is what i have been working on so far and i cant greate or modify the studentPoeng from the new class witch edit the Eksamenskontor class... Im sorry if this is to confusing ! Im very new to java
    STUDENT CLASS
    public class Student
        private String navn;
        private int alder;
        private String studentNummer;
        private int studentPoeng;
        public int hentStudiepoeng() { return studentPoeng; } // CHECK THIS !!!
        public Student()
            this.navn = "Ukjent Student";
            this.alder = 0;
            this.studentNummer = "00000";
            this.studentPoeng = 0;
        public Student (String navn, int alder, String studentNummer, int studentPoeng)
            settNavn(navn);
            settAlder(alder);
            settStudentNummer(studentNummer);
            settStudentPoeng(studentPoeng); 
            // ALDER CHECK !
            if( alder >= 18 && alder <= 88 )
                System.out.println(navn + " er " + alder +  " ?r og er mellom 18-88 ?r sonen !");
            } else
            System.out.println(navn + " er " + alder + " ?r og er under 18 eller er over 88 ?r sonen !");
            // END ALDER CHECK !
            //STUDENTpoeng CHECK !
            if( studentPoeng <= 500 && studentPoeng >= 0)
                System.out.println(studentPoeng + ": Ditt student Poeng er mindre enn 500 eller er 500");
            } else
            System.out.println(studentPoeng + ": Ditt Student Poeng er mindre enn 0 eller h?yre enn 500");
            //END STUDENTpoeng CHECK !
            //STUDENTnummer CHECK !
            int stNumLength = studentNummer.length();
            if( stNumLength == 5 )
                System.out.print(studentNummer + ": Student nr innholder 5 tall !");  
            if ( stNumLength < 5 )
                System.out.print(studentNummer + ": Student nr innholder mindre enn 5 tall !");
            if ( stNumLength > 5 )
                System.out.print(studentNummer + ": Student nr innholder mer enn 5 tall !");
            //END Studentnummer CHECK !
        }// END STUDEN CONSTRUCTOR WITH PARATMITER
        // return methods !
        public String settNavn ( String navn )
            this.navn = navn;
            return navn;
        public int settAlder ( int alder )
            this.alder = alder;
            return alder;
        public String settStudentNummer( String studentNummer )
            this.studentNummer = studentNummer;
            return studentNummer;
        public void settStudentPoeng( int studentPoeng )
            this.studentPoeng = studentPoeng;
        // end return METHODS
        //?K STUDIO POENG ! METHOD !
        public int ?kStudentPoeng ( int nyPoeng )
            studentPoeng = nyPoeng + studentPoeng;
            if(studentPoeng > 500)
                System.out.println("\n*****************************************************");
                System.out.println("\n\nStudent Poeng er OVER grensen som er 500 max ! - Du har endret studie poeng eller legget mer enn nok!");
            } else if ( studentPoeng < 0 )
                System.out.println("\n\n\nNy verdi er satt til: " + nyPoeng + "\nStudentPoeng er under 0 OG DET ER ULOVELIG !");  
            return studentPoeng;
        //END ?K STUDIO POENG METHOD !
        //TO STRING !
        public String toString()
            return "\n\nDitt Studie Poeng er: " + studentPoeng + " og du er: " + navn + " og er : " + alder + " ?r gammel -\n se opp for noe feil !";
        //END TO STRING !
    }STUDENT TEST CLASS
    public class StudentTest
        public static void main ( String [] args )
            Student Milo = new Student("Milo", 18, "48588", 450);
            Milo.?kStudentPoeng(2);
            System.out.println(Milo.toString());
    }Eksamenskontor CLASS
    public class Eksamenskontor
        public Student tildelStudiepoeng (Student studentNummer, int studentPoeng )
            studentPoeng = studentPoeng;
            return studentNummer;
    }TEACHER CLASS ( WITCH CONNECT AND EDIT )
    public class Teacher
        public static void main(String [] args)
            Eksamenskontor tull = new Eksamenskontor();
            tull.tildelStudiepoeng(Student,5);  // THE PROBLEM IS HERE !!!! I CANNOT CONNECT IT RIGHT ! THIS IS IT THIS CANNOT CHANGE THE NEW ADDED STUDENTPOENG ! WHY ?!
    }I cannot connect teacher class to edit what in Eksamenkontor witch also is connected in Student.
    Edited by: hdMilo on Oct 17, 2007 7:10 AM

    the method returns the textfield, so you just need to get its text
    import java.awt.*;
    class Testing
      public Testing()
        Login login = new Login();
        System.out.println(login.getUsernameTF().getText());//<----
      public static void main(String[] args){new Testing();}
    class Login
    private TextField usernameTF = new TextField("Joe Blow");
    public TextField getUsernameTF() {
        return usernameTF;
    }

  • How to connect to Indesign object model from VBA (Macintosh_Office)?

    In PC it was: find/load tlb-file and chek box to activate. In Mac i don't see any tlb-files, so can't add this lib to VBA reference. Can i do this at all?

    Hi,
    According to your description, you might want to connect SharePoint Online environment using Client Object Model.
    For the authentication, you can take a look at the link below with code demo provided:
    http://www.vrdmn.com/2013/01/authenticating-net-client-object-model.html
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Calling DLL method from ABAP

    Hi there,
    Is there any way of IMPORTING return variables from DLL methods? The CALL METHOD of mydll only provides an option of EXPORTING variables from to a DLL method.
    For eg. consider the following method:
    Result = dll.FileOpen(hWnd,DocName,Flag)
    This method opens a popup box that displays a list of files and allows the user for selecting a file, the name of which is returned in the DocName variable.
    Any help will be appreciated.
    John

    Calling DLL using form 6i
    Regards,

  • Calling method of a custom infotype from ABAP

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Had the same problem (probably copied from the same program). The answer is that you need to commit the work at the end using something like
    * Commit
    CALL METHOD busilog->flush
      EXPORTING
        no_commit = space.
    Here is an example of my code for IT0002 which works.
    *& Report  Z_TEST2
    REPORT  z_test2.
    DATA: a_masterdata_bl TYPE REF TO if_hrpa_masterdata_bl,
          p0002         TYPE p0002,
          lo_0002 TYPE REF TO cl_hrpa_infotype_0002,
          ls_p0002_ref TYPE REF TO data,
          container_tab    TYPE hrpad_infty_container_tab,
          container  TYPE REF TO if_hrpa_infty_container,
          message_handler TYPE REF TO cl_hrpa_message_list,
          infotype_logic TYPE REF TO if_hrpa_infty_bl,
          update_mode TYPE hrpad_update_mode VALUE 'XXX',
          lt_0002_container TYPE REF TO cl_hrpa_infotype_container,
          key TYPE pskey,
          l_is_ok          TYPE boole_d.
    FIELD-SYMBOLS <p0002> TYPE p0002.
    * get business logic from masterdata factory
    CALL METHOD cl_hrpa_masterdata_factory=>get_business_logic
      IMPORTING
        business_logic = a_masterdata_bl.
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    *TRY.
    CALL METHOD a_masterdata_bl->read
      EXPORTING
        tclas           = 'A'
        pernr           = '508'
        infty           = '0002'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = 'X'
        message_handler = message_handler
      IMPORTING
        container_tab   = container_tab
        is_ok           = l_is_ok
    * CATCH cx_hrpa_violated_assertion .
    *ENDTRY.
    READ TABLE container_tab INTO container INDEX 1.
    lt_0002_container ?= container.
    TRY.
        CALL METHOD lt_0002_container->primary_record_ref
          IMPORTING
            pnnnn_ref = ls_p0002_ref.
      CATCH cx_hrpa_violated_assertion.
    ENDTRY.
    ASSIGN ls_p0002_ref->* TO <p0002>.
    MOVE-CORRESPONDING <p0002> TO key.
    break stantric.
    <p0002>-vorna = 'Rick'.
    container ?= lt_0002_container->modify_primary_record( <p0002> ).
    TRY.
        CREATE OBJECT lo_0002
          EXPORTING
            tclas = 'A'
            infty = '0002'.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    CREATE OBJECT message_handler.
    TRY.
        CALL METHOD lo_0002->get_specific_bl
          EXPORTING
            versionid      = '01'
            tclas          = 'A'
            pskey          = key
          IMPORTING
            infotype_logic = infotype_logic.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    TRY.
        CALL METHOD infotype_logic->modify
          EXPORTING
            old_container   = lt_0002_container
            massn           = space
            massg           = space
            update_mode     = update_mode
            no_auth_check   = 'X'
            message_handler = message_handler
          IMPORTING
            is_ok           = l_is_ok
          CHANGING
            container       = container.
      CATCH cx_hrpa_violated_assertion .
    ENDTRY.
    * Commit
    CALL METHOD a_masterdata_bl->flush
      EXPORTING
        no_commit = space.

  • Calling a method in acrobat plugin as COM obj method

    Hi all,
    I want to call a method from my acrobat plugin as a COM objects method. Can i import i.e. add reference of plugin and call the perticular method which accepts two PDDoc parameters. For this I can use any platform (JS, C#, VB.net or anything). Please help me out.

    Consider I have exported the below plugin method via COM as Irosenth mentioned above, will I be able to see the highlighting happening visually in the PDF document which is currently active when I call this COM method from my C# Winform application?
    Also consider I have the Adobe Reader plugin license, will this functionality work in Reader?
    static ACCB1 void ACCB2 HighlightWord(void *data)
        DURING
        //Create a HiliteEntry object and set its attributes
        HiliteEntry hilite;
        hilite.offset = 3;
        hilite.length = 1;
         //Get the page number of the current page view
        AVDoc currentAVDoc = AVAppGetActiveDoc();
        PDDoc currentPDDoc = AVDocGetPDDoc(currentAVDoc);
        AVPageView currentPageView = AVDocGetPageView(currentAVDoc);
        ASInt32 pageNum = AVPageViewGetPageNum(currentPageView);
        //Highlight the tenth word
        PDPage pdPage = PDDocAcquirePage (currentPDDoc, pageNum);
        PDTextSelect textSelection = PDTextSelectCreateWordHilite(pdPage, &hilite, 1);
        AVDocSetSelection(currentAVDoc, ASAtomFromString("Text"), (void *)textSelection, true);
        AVDocShowSelection (currentAVDoc);
        PDPageRelease (pdPage);
        HANDLER
            AVAlertNote("Error highlighting word");
        END_HANDLER

  • Java calls from ABAP code in XI

    Java and ABAP gurus,
    Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
    Please help.
    Thanks.

    Hi,
    YES, Very well it  is Possible,
    This will help you
    /people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
    /people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    JCo Outbound( calling Java Function from ABAP )
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Call Java Class and Methods from ABAP
    Regards
    Agasthuri Doss

  • Passing SAFEARRAY of UDTs to a COM object

    Hi there,
    I am trying to interface with a legacy COM application from a Java client using
    jCOM. One of the methods of the COM program takes an input which is a VARIANT
    containg a SAFEARRAY of a custom type. The custom type is a simple structure
    consisting of two 'doubles'.
    The relevant bits of the IDL file looks like this (reverse engineered using OLEView):
    uuid(19CFAB24-06AC-11D7-9C30-0050DA7B5DE3),
    version(1.0),
    helpstring("XXX 1.0 Type Library")
    library XxxLib
    // TLib : // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");
    // Forward declare all types defined in this typelib
    interface IXxx;
    typedef [uuid(2EC68D72-0780-11D7-9C31-0050DA7B5DE3), helpstring("UNNAMED_POINT
    struct")]
    struct tagUNNAMED_POINT {
    double latitude;
    double longitude;
    } UNNAMED_POINT;
    uuid(19CFAB31-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("Xxx Class")
    coclass Xxx {
    [default] interface IXxx;
    odl,
    uuid(19CFAB30-06AC-11D7-9C30-0050DA7B5DE3),
    helpstring("IXxx Interface")
    interface IXxx : IUnknown {
    [helpstring("Set the points for a line symbol on the named overlay")]
    HRESULT _stdcall SetLineSymbol(
    [in] BSTR display_name,
    [in] BSTR line_type,
    [in] BSTR overlay_name,
    [in] VARIANT points);
    The parameter 'VARIANT points' is a SAFEARRAY containing an array of UNNAMED_POINTs.
    The problem I am having is that the COM client returns COM error 0x80070057 -
    Invalid arguments. Unfortunately I do not have access to the COM source code.
    I have, however, tried creating a test utility with the same function prototype
    so that I can debug it in Visual Studio. This shows that the VARIANT is being
    sent correctly as a SAFEARRAY with the correct number of elements but the contents
    of it are rubbish.
    Has anyone else had this problem, or is there a way round it? We have accessed
    the COM object successfully from a C++ client.
    Thanks in advance,
    Tim

    Assuming you have the pieces of information that need to go into the array, convert each one into a variant using the built-in LV function. Next, combine all the resulting variants into an array using an array builder. Finally wire the array of variants to the com object terminal where you need it.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for