‎2010 Jan 07 8:33 AM
Hi Guys,
Iam trying to update a attribute uisng bapi BAPI_CASE_CHANGEATTRIBUTES
Iam trying to update a standard table SCMG_T_CASE_Attr with follwing bapi. it is giving me sy-subrc value = 0 but its not updating the table..
Iam passing the case id and based on the case id iam passing the table lt_attr ( the value which has to be updated ).
If i use update statement it is updating the database table perfectly....
But updating thestandard data base table using update statement is not correct way i need to use the below bapi..
can any one let me know any thing needs to be added for the below code
CALL FUNCTION 'BAPI_DISPUTE_ATTRIBUTES_CHANGE'
EXPORTING
case_guid = v_case_guid
IMPORTING
return = v_return1
TABLES
attributes = lt_attr.
IF v_return1-type <> 'E' AND v_return1-type <> 'A'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = v_return2.
endif.
‎2010 Jan 07 8:57 AM
Hi
Your code reflects that commit will never get executed as the variable will not have 2 values at any point of time and an AND condition in between will never result in a return of boolean TRUE.
Regards
Raj
‎2010 Jan 07 9:00 AM
Actaully there should be < > ( not equal to ) between v_return1-type & E whicg is not visible in the code copy..
The actual code is
IF v_return1-type NE 'E' AND v_return1-type NE 'A'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = v_return2.
endif.
‎2010 Jan 07 9:17 AM
Hi Satish,
You should use OR condition, else control never comes to BAPI commit.
IF v_return1-type NE 'E' OR v_return1-type NE 'A'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
IMPORTING
return = v_return2.
endif.
Regards,
Swarna Munukoti
‎2010 Jan 07 9:22 AM
BAPI is executing susccesfully but its not updating the data base table..
Regards
Satish Boguda
‎2010 Jan 07 11:20 AM
‎2010 Jan 11 8:56 PM
solved my self...actually i was trying to update the wrong screen field so i got problem..
Regards
Satish Boguda
‎2010 Jan 11 8:57 PM
‎2014 Apr 30 5:11 AM
Hello Satish,
I am having the same problem while updating the case attributes using BAPI_CASE_CHANGEATTRIBUTES.
Can you please kindly help me in the same.
Regards,
Vishal Chauhan