Hi experts.
the problem that i have is that i am trying to create wbs elements from the BW to the ERP system with the bapi : BAPI_PROJECT_MAINTAIN, i test the function module in the se37 in the ERP and works, but when i write the code in the BW system with the same parameters the system close the debbug window. this is the code:
wa_def_proy_m-description = txtante.
wa_def_proy_m-project_definition = 'E.PE3.11'.
wa_wbs_m-wbs_element = 'E.PE3.11/01'.
wa_wbs_m-project_definition = 'E.PE3.11'.
wa_wbs_m-description = 'ALLOCATIONS'.
wa_wbs_m-short_id = 'ALLOCATIONS'.
wa_wbs_m-comp_code = '3001'.
wa_wbs_m-co_area = 'C001'.
wa_wbs_m-user_field_char20_1 = 'AN.IA4.001'.
wa_wbs_m-user_field_char20_2 = 'MMENDOZA'.
wa_wbs_m-user_field_char10_1 = '1234567'.
wa_wbs_m-user_field_char10_2 = '800'.
wa_wbs_m-request_cctr = 'EPRYDI0001'.
APPEND wa_wbs_m TO it_wbs_m.
wa_method-refnumber = 000001.
wa_method-objecttype = 'WBS-ELEMENT'.
wa_method-method = 'CREATE'.
wa_method-objectkey = 'E.PE3.11/01' .
APPEND wa_method TO it_method.
wa_method-refnumber = 000000.
wa_method-objecttype = space.
wa_method-method = 'SAVE'.
wa_method-objectkey = space .
APPEND wa_method TO it_method.
CALL FUNCTION 'BAPI_PS_INITIALIZATION' DESTINATION p_erp_rfc_dest.
CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
DESTINATION p_erp_rfc_dest
EXPORTING
i_project_definition = wa_def_proy_m " bapi_project_definition
i_project_definition_upd = wa_def_proy_up " bapi_project_definition_up
IMPORTING
return = it_return_m " bapireturn1
TABLES
i_method_project = it_method " bapi_method_project
i_wbs_element_table = it_wbs_m " bapi_wbs_element
As you can see is a very simple code, but it doesn´t work.
Thanks.
.