Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Bapi call failed;Formal parameter doesn't exist

$
0
0

Hi I am writing code for a function import in execute actionmethod of dpc_extclass of my gateway service.

Following is the code:

 

DATA: ls_parameter  TYPE /iwbep/s_mgw_name_value_pair,

         lv_prodef    TYPE string,

         ls_entity     TYPE  ZCL_ZSAP_EPM_INT_MPC=>ts_Response,

         lt_entityset  TYPE ZCL_ZSAP_EPM_INT_MPC=>tt_Response,

         pdef TYPE bapipr-PROJECT_DEFINITION..

 

  DATA:it1 TYPE  BAPI_PROJECT_DEFINITION_EX,

       wa1 TYPE  BAPI_PROJECT_DEFINITION_EX,

 

       it2 TYPE TABLE OF BAPI_WBS_ELEMENT_EXP,

       wa2 TYPE BAPI_WBS_ELEMENT_EXP,

 

       it3 TYPE TABLE OF BAPI_NETWORK_ACTIVITY_EXP,

       wa3 TYPE BAPI_NETWORK_ACTIVITY_EXP.

 

   IF iv_action_name = 'Response_Fi'. " Check what action is being requested

     IF it_parameter IS NOT INITIAL.

* Read Function import parameter value

       READ TABLE it_parameter INTO ls_parameter WITH KEY name = 'StartValue'.

       IF sy-subrc = 0.

         lv_prodef = ls_parameter-value.

       ENDIF.

 

       IF lv_prodef IS NOT INITIAL.

 

         pdef = lv_prodef.

 

CALL FUNCTION 'BAPI_PROJECT_GETINFO'

  EXPORTING

    PROJECT_DEFINITION           = pdef

    WITH_ACTIVITIES              = '1'

*   WITH_MILESTONES              =

*   WITH_SUBTREE                 =

  IMPORTING

    E_PROJECT_DEFINITION         = it1

*   RETURN                       =

* TABLES

*   I_WBS_ELEMENT_TABLE          =

    E_WBS_ELEMENT_TABLE          = it2

*   E_WBS_MILESTONE_TABLE        =

*   E_WBS_HIERARCHIE_TABLE       =

    E_ACTIVITY_TABLE             = it3

*   E_MESSAGE_TABLE              =

           .

 

****Project fields

 

**        Populate the fields, loop is required in wbs and activities

**        internal tables are populated, we have the work areas

**        all we need to do is to transfer the data from internal tables to lt_entity via ls entity

 

ls_entity-start_value = wa1-project_definition.

ls_entity-description = wa1-description.

ls_entity-person_resp = wa1-responsible_no.

 

  APPEND ls_entity TO lt_entityset.

 

  LOOP AT it2 INTO wa2.

 

    ls_entity-wbs_element_def = wa2-wbs_element.

    ls_entity-short_description = wa2-description.

    ls_entity-planning_ind = wa2-WBS_PLANNING_ELEMENT.

 

   APPEND ls_entity TO lt_entityset.

  ENDLOOP.

 

  LOOP AT it3 INTO wa3.

 

   ls_entity-activity = wa3-activity.

   ls_entity-work = wa3-WORK_ACTIVITY.

   ls_entity-act_desc = wa3-description.

 

   APPEND ls_entity TO lt_entityset.

  ENDLOOP.

 

ENDIF.

ENDIF.

ENDIF.


Now when I am testing it in gateway client I am getting response code 500 and error :

..ERROR_INFOCall of the function BAPI_PROJECT_GETINFO failed; the formal parameter E_ACTIVITY_TABLE does not exist


Unable to resolve this error, please guide me.

When I am using this bapi with same process in SE38, I am able to get results.


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>