on 11-16-2007 10:26 AM
Hi experts,
I need to amend the process type of the contract which is of the header level. any idea wat function module i can use?
i did try the BBP_PROCDOC_UPDATE passing the header details. but i got message of type 'A' stating that "Interface data contains errors.". what does that mean?
thanks a lot
Process type of Contract cannot be modified due to some SAP strict constraints.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Atul,
Im using SRM version 5.0 and theres no custom code within the FM itself. the error happens when i tried to modify the process type fo the contract. if i didnt make any modification to the process type, there will not be any interface data error.
thanks
below is the code logic.
DATA: lt_message TYPE STANDARD TABLE OF bbp_pds_messages,
lt_item TYPE STANDARD TABLE OF bbp_pds_ctr_item_d,
lt_item2 TYPE STANDARD TABLE OF bbp_pds_item,
lwa_item TYPE bbp_pds_ctr_item_d,
lwa_item2 TYPE bbp_pds_item.
DATA: ls_header TYPE bbp_pds_ctr_header_d,
ls_header2 TYPE bbp_pds_header.
Declaration of internal table and workarea for storing results from function module
DATA: li_e_messages TYPE STANDARD TABLE OF BBP_PDS_MESSAGES INITIAL SIZE 0,
lwa_e_messages TYPE BBP_PDS_MESSAGES,
lwa_e_header TYPE BBP_PDS_CTR_HEADER_D.
DATA: lv_msg TYPE syst-msgv1,
lv_iscommit(1) TYPE c VALUE '1'.
LOOP AT so_src.
CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
EXPORTING
i_object_id = so_src-low
IMPORTING
e_header = ls_header
TABLES
e_item = lt_item.
IF ls_header IS NOT INITIAL.
MOVE-CORRESPONDING ls_header TO ls_header2.
lv_msg = ls_header2-OBJECT_ID.
ls_header2-process_type = so_type-low.
ls_header2-OBJECT_TYPE = 'BUS2000113'.
LOOP AT lt_item INTO lwa_item.
MOVE-CORRESPONDING lwa_item TO lwa_item2.
lwa_item2-OBJECT_TYPE = 'BUS2000136'.
APPEND lwa_item2 TO lt_item2.
CLEAR lt_item2.
ENDLOOP.
CALL FUNCTION 'BBP_PROCDOC_UPDATE'
EXPORTING
i_header = ls_header2
TABLES
i_item = lt_item2
e_messages = lt_message.
IF lt_message IS NOT INITIAL.
*_________Error returned from the function. If message is a warning, it will not fail.
LOOP AT lt_message INTO lwa_e_messages.
lv_msg = lwa_e_messages-MESSAGE.
CONCATENATE '(H)' ls_header2-OBJECT_ID lv_msg INTO lv_msg.
CASE lwa_e_messages-MSGTY.
WHEN 'E'.
lv_iscommit = '0'.
PERFORM msg_header_add USING 'E' 'ZDM_PCM' '008' lv_msg.
WHEN 'A'.
lv_iscommit = '0'.
PERFORM msg_header_add USING 'A' 'ZDM_PCM' '008' lv_msg.
WHEN OTHERS.
Do Nothing
ENDCASE.
ENDLOOP.
ENDIF.
IF lv_iscommit = '1'.
CALL FUNCTION 'BBP_PD_CTR_SAVE'
EXPORTING
IV_HEADER_GUID = ls_header2-GUID.
COMMIT WORK.
PERFORM msg_header_add USING 'S' 'ZDM_PCM' '007' lv_msg.
ENDIF.
ENDIF.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.