Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_CHARACT_CHANGE problem to delete values

Former Member
0 Likes
1,380

Hello,

has anybody had the same problem.

I try to delete values with function module BAPI_CHARACT_CHANGE.

In the  return table (BAPIRET2) I get the messages:

E  |C1  061  |Internal Error                                         

I  |27  101  |Start characteristics maintenance                     

I  |CL  808  |Start processing characteristic PLM_UGD_KON_FREIGABE_USE

I  |C1  147  |Processing characteristic PLM_UGD_KON_FREIGABE_USER   

E  |C1  106  |Value SACKERMANN cannot be deleted                     

If I delete the same value with transaction CT04 it works without any questions or problems.

Thanks in advance

Edgar

P.S.:  Problem is solved now:

when calling the BAPI, I forgot the flag

     ls_charactdetail-ADDITIONAL_VALUES = 'X'.  

3 REPLIES 3
Read only

Former Member
0 Likes
960

Hi,

When you use the BAPI first check the Import and Export parameters and check that fields and find some records from the tabel.

for Ex : for CHARACTNAME parameter check with the table CABN (ATNAM).

Like wise you just refer to the table records and give the input and it will work fine

127 CALL FUNCTION 'BAPI_CHARACT_CHANGE'

128 EXPORTING

129 KEYDATE = KEYDATE

130 CHANGENUMBER = CHANGENUMBER

131 CHARACTNAME = OBJECT-KEY-CHARACTNAME

132 TABLES

133 CHARACTVALUESDESCRNEW = CHARACTVALUESDESCRNEW

134 CHARACTREFERENCESNEW = CHARACTREFERENCESNEW

135 CHARACTRESTRICTIONSNEW = CHARACTRESTRICTIONSNEW

136 RETURN = RETURN

137 CHARACTVALUESCURRNEW = CHARACTVALUESCURRNEW

138 CHARACTVALUESCHARNEW = CHARACTVALUESCHARNEW

139 CHARACTVALUESNUMNEW = CHARACTVALUESNUMNEW

140 CHARACTDESCRNEW = CHARACTDESCRNEW

141 CHARACTDETAILNEW = CHARACTDETAILNEW

142 EXCEPTIONS

143 OTHERS = 01.

Thanks,

Pradeep.

Read only

0 Likes
960

"Insert" works, "delete" doesn't.

As insert works. I think the call of the function is correct.

Here is part of my coding:

I tested delete and insert by manipulating the tables in debugger.

CALL FUNCTION 'BAPI_CHARACT_GETDETAIL'

EXPORTING

charactname = p_merkml

  • KEYDATE = SY-DATUM

language = 'D'

  • IMPORTING

  • CHARACTDETAIL =

TABLES

charactdescr = lt_caractdescr

  • CHARACTVALUESNUM =

charactvalueschar = lt_val_char_old

  • CHARACTVALUESCURR =

charactvaluesdescr = lt_valdescr_old

  • CHARACTREFERENCES =

  • CHARACTRESTRICTIONS = lt_RESTRICTIONS

return = lt_bapiret

.

break ehuegle. <-- << << << << <-- here I inserted/deleted 1 entry in lt_val_char_old and lt_valdescr_old

CALL FUNCTION 'BAPI_CHARACT_CHANGE'

EXPORTING

charactname = p_merkml

  • CHANGENUMBER =

  • KEYDATE = SY-DATUM

TABLES

charactdetailnew = lt_charactdetail

charactdescrnew = lt_caractdescr

  • CHARACTVALUESNUMNEW =

charactvaluescharnew = lt_val_char_old

  • CHARACTVALUESCURRNEW =

charactvaluesdescrnew = lt_valdescr_old

  • CHARACTREFERENCESNEW =

  • CHARACTRESTRICTIONSNEW = lt_RESTRICTIONS

return = lt_bapiret

.

break ehuegle.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

The Table lt_RESTRICTIONS seems to have no influence.

Read only

0 Likes
960

facing the same issue. Did you resolve the issue? if so can you please post the solution?