SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI BAPI_BUS2054_CREATE_MULTI



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
r00xus
Участник
Участник



Joined: 30 Mar 2010
Posts: 8

PostPosted: Fri Jun 28, 2013 11:00 pm    Post subject: BAPI BAPI_BUS2054_CREATE_MULTI Reply with quote

здравствуйте коллеги у меня не получается создать иерархию СПП с помощью данной BAPI. если указать один СПП то все получается. а если попробовать добавить дочерний заполнив wbs_up в it_wbs_element то получаю ошибку:

E CNIF_PI 070 Заключительная проверка определения проекта и элементов СПП: Ошибка

вот код:
Code:
* str
  DATA lv_prj_def TYPE bapi_bus2001_new-project_definition.
* str
  DATA ls_wbs_elm TYPE bapi_bus2054_new.
* str
  DATA ls_ret TYPE bapiret2.
*----------------------------------------------------------------------*
* tab
  DATA lt_wbs_elm TYPE STANDARD TABLE OF bapi_bus2054_new.
* tab
  DATA lt_ret TYPE STANDARD TABLE OF bapiret2.
* tab
  DATA lt_ret_pr TYPE STANDARD TABLE OF bapiret2.
************************************************************************
* определение проекта
*----------------------------------------------------------------------*
  lv_prj_def = 'U-D-1406-11-001'.
*----------------------------------------------------------------------*
* спп элементы
*----------------------------------------------------------------------*
*
  CLEAR ls_wbs_elm.
  ls_wbs_elm-wbs_element = 'U-D-1406-11-001'.
  ls_wbs_elm-description = 'СПП 1'.
  ls_wbs_elm-proj_type = '04'.
  ls_wbs_elm-priority = '1'.
  ls_wbs_elm-company_code = '1400'.
  ls_wbs_elm-business_area = '1405'.
  ls_wbs_elm-plant = '1406'.
  ls_wbs_elm-user_field_char20_1 = ''.
  ls_wbs_elm-equipment = ''.
  ls_wbs_elm-funct_loc = ''.
  ls_wbs_elm-responsible_no = '14000001'.
  ls_wbs_elm-respsbl_cctr = ''.
  ls_wbs_elm-invest_profile = ''.
  ls_wbs_elm-scale = '2'.
  ls_wbs_elm-inv_reason = '01'.
  ls_wbs_elm-wbs_basic_start_date = '20111201'.
  ls_wbs_elm-wbs_basic_finish_date = '20140701'.
  ls_wbs_elm-wbs_forecast_start_date = '20111201'.
  ls_wbs_elm-wbs_forecast_finish_date = '20140701'.
  APPEND ls_wbs_elm TO lt_wbs_elm.
*
  CLEAR ls_wbs_elm.
  ls_wbs_elm-wbs_element = 'U-D-1406-11-001-01'.
  ls_wbs_elm-wbs_up = 'U-D-1406-11-001'.
  ls_wbs_elm-description = 'СПП 2'.
  ls_wbs_elm-proj_type = '04'.
  ls_wbs_elm-priority = '1'.
  ls_wbs_elm-company_code = '1400'.
  ls_wbs_elm-business_area = '1405'.
  ls_wbs_elm-plant = '1406'.
  ls_wbs_elm-user_field_char20_1 = ''.
  ls_wbs_elm-equipment = ''.
  ls_wbs_elm-funct_loc = ''.
  ls_wbs_elm-responsible_no = '14000001'.
  ls_wbs_elm-respsbl_cctr = ''.
  ls_wbs_elm-invest_profile = '100040'.
  ls_wbs_elm-scale = '2'.
  ls_wbs_elm-inv_reason = '01'.
  ls_wbs_elm-wbs_basic_start_date = '20111201'.
  ls_wbs_elm-wbs_basic_finish_date = '20140701'.
  ls_wbs_elm-wbs_forecast_start_date = '20111201'.
  ls_wbs_elm-wbs_forecast_finish_date = '20140701'.
  APPEND ls_wbs_elm TO lt_wbs_elm.
*
  CALL FUNCTION 'BAPI_PS_INITIALIZATION'.
* создаем спп-элементы
  CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
      i_project_definition = lv_prj_def
    TABLES
      it_wbs_element       = lt_wbs_elm
      et_return            = lt_ret.
*
  CALL FUNCTION 'BAPI_PS_PRECOMMIT'
    TABLES
      et_return = lt_ret_pr.
  READ TABLE lt_ret_pr INTO ls_ret WITH KEY type = 'E'.
  IF sy-subrc EQ 0.
    EXIT.
  ENDIF.
*
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait = 'X'.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.