Skip to Content
0

Unexpected Condition Delete with BAPI_CONTRACT_CHANGE

Jan 12 at 11:04 AM

81

avatar image
Former Member

Hi all,

I'm new of this community, so, if I do something wrong, please tell me.

I've a problem with BAPI_CONTRACT_CHANGE:

I've created a program for insert new conditions in a contract (like t-code ME32K). During test of this program, I've tried to delete a condition already in contract and I've tried to insert the same condition in the same contract using the program. Launching the t-code ME33K, I seen the condition has been perfectly added but another one has been deleted and re-added.

This is what I passed in the BAPI:

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

CALL FUNCTION 'BAPI_CONTRACT_CHANGE'
EXPORTING
purchasingdocument = ls_ebeln
header = ls_header
headerx = ls_headerx
TABLES
item = lt_item
itemx = lt_itemx
item_cond_validity = lt_item_cond_validity
item_cond_validityx = lt_item_cond_validityx
item_condition = lt_item_condition
item_conditionx = lt_item_conditionx
item_cond_scale_quan = lt_item_scale_quan
return = lt_return.

In table lt_item_condition I have all the conditions, also the one deleted (with a flag in DELETION_IND), also the one that I want to insert (with 'I' in CHANGE_ID field).

In table lt_item_conditionx I have just the condition that I want to insert (The COND_COUNT in lt_item_conditionx is the same of lt_item_condition).

VALID_FROM field of lt_item_cond_validity is enhanced by sy-udate, and VALID_TO of the same table is enhanced by 99991231.

In debug mode I've tried to delete in lt_item_condition the condition with a flag in DELETION_IND but nothing. I've also tried to insert rows in lt_item_conditionx but I have the same problem.

Is there anyone who has the same problem? How can I solve it?

Certain of your kind reply,

Best Regards

Alessio

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers