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.

Similar Messages

  • Query Custom Infotype from a PCR

    Hi,
    Can we query a percentage stored in custom infotype from a PCR ? If yes, can you please explain how ?
    Appreciate if anyone could please help.
    Thanks,

    Hi,
    Create a custom function to do that.
    1. Go to t-code PE04, input function name and create
    2. Define country assignment and input/output parameters, if your function need access parameter(e.g function with PCR, p0014 xxxx), also define parameter list and values.
    3. Save and activate your function.
    4. Check the payroll driver again and will tell you form FU_XXXX  is missing, then create a include program with form FU_XXXX and implement your function logic.
    5. In payroll driver, find the proper location(customer function operation include) to include your program logic.
    Good luck,
    Chen Jian

  • How to call & pass values to custom page from seeded page table region

    Hi All,
    can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
    it is urgent. plssss
    Regards,
    purna

    Hi,
    Yes, we do this by extending controller, but you can also try this without extending controller.
    1. Create Submit Button on TableRN using personalization.
    2. Set "Destination URI" property to like below
    OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
    Give your custom page path instead of EmpDetailsPG.
    EmployeeId and EmployeeName are VO attributes(Table Region)
    If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
    In this case, only personalization will do our job. Hope it helps.
    Thanks,
    Venkat Y.

  • Calling an external shell script program from ABAP.

    Hi,
      Can i call an external shell script program from abap which is there on application server.
    The FM WS_EXECUTE i know can be used for calling this purpose.
    But i am getting a doubt that how can i call the external program from there.
    Please clear my doubts.
    Thanks in advance.
    Vikash

    search in SCN for sm49 and sm69 Tr. you will surely find solutions for it, with a simple search.

  • Error while calling MII transaction as web service from ABAP

    Hello Experts,
    I want to call a MII transaction from ABAP program, as a web service.
    Following is output of http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX  (TAG_TRX is name of my transaction).
      <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
    - <!--  Types
      -->
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
    - <s:complexType name="InputParams">
    - <s:sequence id="InputSequence">
      <s:element maxOccurs="1" minOccurs="0" name="WEIGHT" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="BATCHID" type="s:string" />
      </s:sequence>
      </s:complexType>
    - <s:element name="XacuteRequest">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="Rowset">
    - <s:sequence>
      <s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
      </s:sequence>
      <s:attribute name="Message" type="s:string" />
      </s:complexType>
    - <s:complexType name="Row">
      <s:sequence id="RowSequence" />
      </s:complexType>
    - <s:element name="XacuteResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </types>
    - <!--  Messages
      -->
    - <message name="XacuteSoapIn">
      <part element="s0:XacuteRequest" name="parameters" />
      </message>
    - <message name="XacuteSoapOut">
      <part element="s0:XacuteResponse" name="parameters" />
      </message>
    - <!--  Ports
      -->
    - <portType name="XacuteWSSoap">
    - <operation name="Xacute">
      <input message="s0:XacuteSoapIn" />
      <output message="s0:XacuteSoapOut" />
      </operation>
      </portType>
    - <!--  Bindings
      -->
    - <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="Xacute">
      <soap:operation soapAction="http://www.sap.com/xMII" style="document" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
    - <!--  Service mapping
      -->
    - <service name="XacuteWS">
    - <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
      <soap:address location="http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX" />
      </port>
      </service>
      </definitions>
    Now, when I am using http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX to create a Enterprise Service in SAP (i.e. SE80 transaction-> Create Enterprise Service-> Service Consumer-> URL/HTTP Destination-> URL ... I am getting following error.
    Incorrect value: Entity "<<document>>"(5 /93 ). unexpected symbol: '<'     
    But, whenever I am using the same URL in MII BLS, it does not give any error. It correctly shows all input and output parameters.
    Please help me to resolve this issue.
    Regards
    Neeta.

    Now, I am able to create the Web Service in SAP and it is now showing the respective class, attribute and methods to execute this web service (web service to call MII transaction).
    But when I am calling it from ABAP (a simple Web Dynpro for ABAP method), it is showing me the following error:
    Error (id=GET_BUSINESS_SYSTEM_ERROR): An error occurred when determining the business system (LD_ERROR)
    Thought this error is coming from ABAP program, but I am sure that this is related to some configuration at SAP level. (Let me inform you that there are two different servers for SAP Web Dynpro ABAP and SAP MII.
    Please help.
    Thanks in advance.

  • Problem using webservice method consumer proxy with rawdata from abap

    Hello Gurus,
    I am struggling with an error using a proxy consumer service from ABAP. The proxy was generated using the WSDL from the web service provider. For a specific method we need to send a rawstring as seen bellow:
    The file to be sent on this call is a ZIP file XAdES-BES signed and on BASE64. I’ve implemented the proper code to get the original file from local PC, and convert it to BASE64 before moving the content to the webservice structure and call the service proxy. At SOAMANAGER I also configured the webservice and the proper port with the WSDL:
    The communication is working properly but my problem is with the binary content. When calling the webservice the response is that the structure of the file is wrong. I found it very strange since I used a tiny SOAPUI project with the same WSDL and it worked with no problem.
    After debugging I could see that the content moved to the rawdata string before calling the proxy does not match the content that I can see from the call payload on web services util (srt_util)!
    So the sample code for my method:
    * get the file from the specified folder
    call function 'GUI_UPLOAD'
    exporting
    filename                = ld_zipfilename
    filetype                = 'BIN'
    importing
    filelength              = zip_size
    tables
    data_tab                = t_zip_data[]
    exceptions
    file_open_error         = 1
    file_read_error         = 2
    no_batch                = 3
    gui_refuse_filetransfer = 4
    invalid_type            = 5
    no_authority            = 6
    unknown_error           = 7
    bad_data_format         = 8
    header_not_allowed      = 9
    separator_not_allowed   = 10
    header_too_long         = 11
    unknown_dp_error        = 12
    access_denied           = 13
    dp_out_of_memory        = 14
    disk_full               = 15
    dp_timeout              = 16
    others                  = 17.
    * convert to string
    clear buffer_zip.
    call function 'SCMS_BINARY_TO_STRING'
    exporting
    input_length = zip_size
    importing
    text_buffer  = buffer_string
    tables
    binary_tab   = t_zip_data[]
    exceptions
    failed       = 1
    others       = 2.
    * encode base 64
    perform encode_base64 using buffer_string
    buffer_zip. 
    form encode_base64 using in_string type string
    out_string type xstring.
    data: l_sbuff     type string.
    * convert the file to BASE64
    call method cl_http_utility=>encode_base64
    exporting
    unencoded = in_string
    receiving
    encoded   = l_sbuff.
    call function 'SCMS_STRING_TO_XSTRING'
    exporting
    text   = l_sbuff
    importing
    buffer = out_string
    exceptions
    failed = 1
    others = 2.
    endform.                    "encode_base64
    calling the webservice:
    l_input-xxxx-dokument = buffer_zip.
    try.
    call method l_proxy_test->webservice
    exporting
    input  = l_input
    importing
    output = l_output.
    catch cx_ai_soap_fault into lr_exc_soap_fault.
        endtry.
    From my understanding rawstring should be the same as ABAP xstring. If I debug the program and check the content of the  l_input-dokument before calling the proxy I get binary content: “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” that is in fact correct
    If I check the payload after call I can see that the binary content sent on the XML is not the same, in fact it is totally different: ”SXp3L2VHMXNJSFpsY25OcGIyNDlJakV1TUNJZ1pXNWpiMlJw…” !!
    I’ve tried a lot of different conversions, changed configuration on the communication, port, etc and nothing seems to work. I really can’t figure out why the binary content on the call is not the same as I move to the webservice structure.
    If I use the project from SOAP UI and send the proper binary content, that is “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” it works perfectly and the response is successfully.
    Anyone has a clue what could be causing this?
    Appreciate any kind of input.
    Regards,
    João Silva Pinto.

    Anyone? Any clue would be appreciated.

  • Calling methods located inside ActiveX objects from Java

    Hi folks,
    I understand that I can wrap ActiveX methods in C and call using JNI, but I am looking for an elegant way to call methods inside of Active X controls directly. There are a set of classes in com.ms.ActiveX package that allow this, but I am receiving a java.lang.UnsatisfiedLinkError: initPolicyEngine at runtime. I can't find any documentation from Microsoft on this (go figure). Has anyone ever used the com.ms packages, or does anyone know of an elegant solution avoiding wrappers and JNI? I have sucessfully used the neva objects vendor classes, but I find them too bulky for mainstream use. Any thoughts are appreciated. Thanks.

    Hi,
    - If you use the package com.ms.* You'll need to run your application in the Microsoft VM (jview.exe).
    - If you run it inside the browser you cannot use the java plugin, and your applet needs to be signed.
    If this doesn't help, please provide the version of your msjava.dll.
    Regards,
    Kurt.

  • How to call force render on custom effect from AEGP?

    Hi All,
              I want to call a force render on my custom effect from AEGP. I tried setting PF_OutFlag_Force_Rerender flag in PF_CMD_COMPLETELY_GENERAL (Called from AEGP via AEGP_EffectGeneric()). But it did not work. Is there any other way to force a rerender on the custom effect?
    Thanks,
    Dheeraj.

    Thanks a lot Shachar for the reply. But if I use AEGP_SetStreamValue AE
    will add the action to Undo/Redo stack. Please correct me if I'm wrong.
    I don't want AE to add it to undo/redo stack. So is there any way to
    tell AE not to add AEGP_SetStreamValue() action to undo/redo stack? Or is there a call to force render from AEGP?

  • Calling a secured external web service from ABAP

    Hi,
    I've created a client proxy from a wsdl to call a secured external WS from ABAP.
    The question is: how to pass in the user/password in the client proxy?
    thanks

    Hi Rika,
      have a look to the blog: https://weblogs.sdn.sap.com/pub/wlg/1645. [original link is broken] [original link is broken] [original link is broken] [original link is broken]
      Screen shots are "old" but the concepts are already there. Serach the chapter "SAP Side - Setup".
      Basically: define your RFC destination via SM59 of type G. There you'll define the target host and the user/password.
      Then in LPCONFIG you can specify the defined RFC destination.
      Have a look also to http://help.sap.com/saphelp_nw2004s/helpdata/en/16/285d32996b25428dc2eedf2b0eadd8/content.htm
      and to
    http://help.sap.com/saphelp_nw04s/helpdata/en/da/11df3a9b10355ae10000000a11405a/content.htm
    Sergio
    PS
    Kindly close the thread and award appropriate a points to the answer given.
    Message was edited by:
            Sergio Ferrari

  • Call WD Interactive Form with Values from ABAP Report

    Hallo together,
    i have a simple ABAP report with some values.
    How to call a webdynpro passing these values and using them in Select-Statements to prefill the called Interactive Form
    Thanks
    Philip

    Hi Runal,
    i tried this and i get the parameters in the defaulthandler event.
    but now i need these values in the supply function of my node to get the values which should be display.
    How to access from supply function to the defaulthandler event? I read some threads but none answered my question i think.
    METHOD handledefault .
      DATA: it_parameter TYPE tihttpnvp,
            wa_parameter LIKE LINE OF it_parameter.
      wdevent->get_data(
        EXPORTING
          name =  if_wd_application=>all_url_parameters
        IMPORTING
          value = it_parameter  ).
    ENDMETHOD.
    Thanks
    Philip

  • Call agreement processing in WEB UI from ABAP WebDynpro

    Dear all,
    I have two problems:
    1) I create agreement (BUS200071, object type ZGAG) in web dynpro application. After successfull creation I want to call  agreement processing within web dynpro application or via new browser window.
    2) I managed to call Display method of BUS200071, but it didn't work good. Only the first screen of WEB UI was displayed with error message "Without access for action Display object type agreement GAG", however I tried to display agreement type ZGAG, which was created by my web dynpro application.
    Could You please help me, how to accomplish this task.
    Thank You in advance
    Martin

    Hello GopalY,
    In my experience its not possible to call OLE object in Webui. Maybe customer 3 party application will be supply some web service to handle credit card payments. I think this is the simple way to access 3party application.
    Regards,
    Zafer,

  • How do I call methods with the same name from different classes

    I have a user class which needs to make calls to methods with the same name but to ojects of a different type.
    My User class will create an object of type MyDAO or of type RemoteDAO.
    The RemoteDAO class is simply a wrapper class around a MyDAO object type to allow a MyDAO object to be accessed remotely. Note the interface MyInterface which MyDAO must implement cannot throw RemoteExceptions.
    Problem is I have ended up with 2 identical User classes which only differ in the type of object they make calls to, method names and functionality are identical.
    Is there any way I can get around this problem?
    Thanks ... J
    My classes are defined as followes
    interface MyInterface{
         //Does not and CANNOT declare to throw any exceptions
        public String sayHello();
    class MyDAO implements MyInterface{
       public String sayHello(){
              return ("Hello from DAO");
    interface RemoteDAO extends java.rmi.Remote{
         public String sayHello() throws java.rmi.RemoteException;
    class RemoteDAOImpl extends UnicastRemoteObject implements RemoteDAO{
         MyDAO dao = new MyDAO();
        public String sayHello() throws java.rmi.RemoteException{
              return dao.sayHello();
    class User{
       //MyDAO dao = new MyDAO();
       //OR
       RemoteDAO dao = new RemoteDAO();
       public void callDAO(){
              try{
              System.out.println( dao.sayHello() );
              catch( Exception e ){
    }

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • Call XML Schema based Adobe form from ABAP Program

    Hi,
      I have a scenario where an online Interactive form is designed and its working fine. Now i have a requirement to call the same Adobe form from a report for viewing purpose. Since it is XML Schema based Interface, is it possible to call the same form instead of creating a new one with the same template? Because i tried to call the same Adobe form by passing the values and converting those to XML(By Creating Transformation). Then i converted the XML to XSTRING and passed to the Generated Function Module for Input paramter "/1bcdwb/docxml". This resulted in an error "com.adobe.ProcessingException: com.adobe.Processin".
    Please help me out in solving this and check the attachment for code.
    Thanks,
    Raj

    Hi,
    outputparams-NODIALOG   = 'X'.
    outputparams-PREVIEW     = 'X'.
    outputparams-dest = 'LP01'.  "give ur printer name.
    CALL FUNCTION 'FP_JOB_OPEN'
      CHANGING
        ie_outputparams = outputparams
      EXCEPTIONS
        cancel          = 1
        usage_error     = 2
        system_error    = 3
        internal_error  = 4
        OTHERS          = 5.
    and Now call the generated function module
    pass the following in docparams
    docparams-langu = 'E'.
    docparams-country = 'US'.
    and finally close the job.
    It should work.
    Please let me know if u need further details.
    Regards,
    sasi

  • Are calls to another EE customer exempt from the plan? On T Mobile they were.

     On my T mobile plan, all calls to other T mobile users were exempt from my allowance. Is this still the case on EE?

    Calls to other EE custs are just the same as to any other mobile and come out your allowance.

  • Calling methods of business objects

    hi
    pls post some docs on calling methods in business obj's from abap programs.
    thkx
    P.S

    Do you share your solution?
    For other people interested, example for FMPSO object:
    INCLUDE <cntn01>.
      DATA : l_lotkz TYPE bkpf-lotkz,
             l_order TYPE swc_object,
             lt_fimsg LIKE fimsg1 OCCURS 0.
      DATA : BEGIN OF ls_key,
            sourcecompanycode LIKE vbkpf-ausbk,
            requestnumber LIKE vbkpf-lotkz,
             END OF ls_key.
        swc_container lt_container.
        ls_key-sourcecompanycode = 'value'.
        ls_key-requestnumber     = 'value'.
        swc_create_object l_order 'FMPSO' ls_key.
        IF sy-subrc EQ 0.
    * Validate
          swc_call_method l_order 'FlagReleaseSet' lt_container.
          IF sy-subrc NE 0.
            MESSAGE  e000(zz).
          ELSE.
    * Post
            swc_call_method l_order 'PostAll' lt_container.
            swc_get_table lt_container 'TFimsg' lt_fimsg.
            IF sy-subrc NE 4 AND sy-subrc NE 0.
               MESSAGE  e000(zz).
           ENDIF.
         ENDIF.
       ENDIF.

Maybe you are looking for

  • Should I restart the migration from my iMac to my new MacBook Pro?

    Hi everyone, I've been a Mac user for many years now but I'm stuck with my current situation. I've just received my new MacBook Pro 13" 2.4Ghz and it's the first Mac I've owned for many years without Firewire. In the past transferring everything to a

  • Cannot move some applications

    Hi, I have a 8900 Curve, on Vodafone in the UK. I have pulled the battery out a couple of times, without any change in behaviour. I want to put some apps in a different folder to downloads. I open the downloads folder, select Google maps, push the me

  • Unused assets clanup in OER 11.1.1.7

    Hi all, is there any way how to delete all assets from the Oracle Enterprise Repository?  I know that there is logical delete of an asset (Asset is marked as deleted but still in DB) but it not enough. Is is possible to recreate DB schema without usi

  • Crash in OpenCL clBuildProgram for ATI Radeon 5870

    Hi, Need some help in understanding why the following simple OpenCL kernel crashes during runtime build on Mac OS 10.6.4 (EFI driver version 01.00.436 for ATI Radeon 5870) ==================== __kernel void KernelThatDoesntWork(__global const float*

  • User Profile Sync - Fields That Appear Under the "Person or Group" Column

    As I go to add a new column to a list on SharePoint 2010, I notice some fields under the drop down labeled "Show field". Inside that drop down there is a "Test" and a couple others I see in there that I don't notice in the User Profile Sync. Forgive