on 04-29-2015 9:51 AM
Dear Experts,
I am trying to update the created SRM contracts through a upload program using BAPI BBP_PD_CTR_UPDATE.
I am able to update all fields in header and item level except ITEM STATUS field. The field in I_ITEM table is ITM_RELEASED which I am trying to make as "space"(Means item should be made inactive). The field in contract is currently active X (Item is active).
But I am getting below error - "Status and active flag in one item do not match"
Can you please suggest if anyone has faced similar issue, or if I am missing something while updating the item status ?
Thanks in advance!
Thanks
Sagar
Hi Sagar
This is coming from BBP_PD message class and number 433 ..
You may really have to debug to be able to figure out ..
IF ( sy-subrc EQ 0 AND it_item-itm_released EQ
c_item_status_inactive ) OR
( sy-subrc NE 0 AND it_item-itm_released NE
c_item_status_inactive ).
Abort if status and itm_released status are not matching
CALL FUNCTION 'BBP_PD_MSG_ADD'
EXPORTING
i_msgty = c_msgty_a
i_msgid = 'BBP_PD'
i_msgno = 433
Program SAPLBBP_PD
Include LBBP_PDF17
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinita,
yes through debugging I am able to see this message coming from Program SAPLBBP_PD Include LBBP_PDF17.
But as per the conditions in this program seems I can not make the item as Inactive.
My concerns here here is how I can change the status of particular line item to Inactive may be some other BAPI would be useful. As I think this BAPI BBP_PD_CTR_UPDATE wont be useful for making status inactive.
Any suggestion.
Thanks
Sagar
Hi Sagar
Did you try these?
BBP_PD_CTR_STATUS_CHANGE
BAPI_CONTRACT_CHANGE
Also I saw the code mentioned in the other threads try to use this one to see if it works?
* Lock contract
CALL FUNCTION 'BBP_PD_CTR_LOCK'
EXPORTING
i_header_guid = l_header_updated-guid.
*Update
CALL FUNCTION 'BBP_PD_CTR_UPDATE'
EXPORTING
i_park = 'X'
i_header = l_header_updated
iv_with_change_approval = ' '
it_conditions = lt_conditionsu
TABLES
i_item = wt_item2
e_messages = lt_message.
CALL FUNCTION 'BBP_PD_CTR_SAVE'
EXPORTING
iv_header_guid = l_header_updated-guid.
" Unlock contract
CALL FUNCTION 'BBP_PD_CTR_UNLOCK'
EXPORTING
i_header_guid = l_header_updated-guid.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
Refer links below
https://scn.sap.com/thread/1246768
https://scn.sap.com/thread/3168740
http://scn.sap.com/thread/3231231
http://scn.sap.com/thread/836267
Regards
Vinita
Hello,
I have added the function module BBP_PD_CTR_LOCK but the error message BBP_PD 433 is still raising.
I have locked the active version (if I try to lock the update version a error message is displayed) but I am updating the update version. Could it be the reason?
Thank you in advance.
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.