Skip to Content
0
Former Member
Jul 10, 2009 at 12:43 PM

Problem in calling Enterprise Service method.

14 Views

Hello !!!!!

I want to display the employee name by calling an Enterprise Servioce method.

As I am using class CL_PAD_EMPBASICDATA_EMPQR and method execute_synchronous.

But i am not able to retrieve the information.

PFB the code sippet.

REPORT  yempbasicdata.
PARAMETERS: pa_empid TYPE pa0000-pernr.
DATA: wa_input TYPE pad_empbasicdata_emp_qry,
      wa_output TYPE pad_empbasicdata_emp_rsp.
DATA: x TYPE REF TO cl_pad_empbasicdata_empqr_impl.
wa_input-employee_basic_data_by_employ-employee_basic_data_selection-employee_id = pa_empid.
TRY.
    CALL METHOD CL_PAD_EMPBASICDATA_EMPQR=>execute_SYNCHRONOUS
      EXPORTING
        input  = wa_input
      IMPORTING
        output = wa_output.
  CATCH cx_pad_standard_message_fault .
ENDTRY.
WRITE wa_output-employee_basic_data_by_employ-employee-common-name-given_name.

Any pointers would be really helpful.

Thanks

nitesh