cancel
Showing results for 
Search instead for 
Did you mean: 

Update Contract.

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Process type of Contract cannot be modified due to some SAP strict constraints.

Former Member
0 Kudos

Hi

Which SRM version are you using ?

Are you using any custom code.. Please ensdure mandatory fields are paased in the Function module, before executing it... Pleasepaste the complete code and other details in next reply..

Regards

- Atul

Former Member
0 Kudos

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.