Skip to Content
0

Problem in BAPI_OBJCL_CHANGE

Dec 28, 2016 at 03:18 PM

98

avatar image
Former Member

Hi!!! I have a problem with BAPI_OBJCL_CHANGE. I apply this code:

DATA: GT_VALUES_NUM TYPE TABLE OF BAPI1003_ALLOC_VALUES_NUM,

GT_VALUES_CHAR TYPE TABLE OF BAPI1003_ALLOC_VALUES_CHAR,

GT_VALUES_CURR TYPE TABLE OF BAPI1003_ALLOC_VALUES_CURR,

GT_BAPIRET2 TYPE TABLE OF BAPIRET2,

LS_BAPIRET2 TYPE BAPIRET2.


DATA: GS_VALUES_NUM TYPE BAPI1003_ALLOC_VALUES_NUM,

GS_VALUES_CHAR TYPE BAPI1003_ALLOC_VALUES_CHAR,

GS_VALUES_CURR TYPE BAPI1003_ALLOC_VALUES_CHAR,

GC_FLAG_X(1) TYPE C VALUE 'X'.

START-OF-SELECTION.


GS_VALUES_CHAR-CHARACT = 'Z_POSICION_DEL_ROLLO' .

GS_VALUES_CHAR-VALUE_CHAR = 'A'.

APPEND GS_VALUES_CHAR TO GT_VALUES_CHAR.

CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
OBJECTKEY ='000000000009001443TESTMARCO'
objecttable = 'MCH1'
classnum = 'LOTE_UNICO'
classtype = '023'
STATUS = '1'
* STANDARDCLASS =
* CHANGENUMBER =
KEYDATE = SY-DATUM
* NO_DEFAULT_VALUES = ' '
* KEEP_SAME_DEFAULTS = ' '
* OBJECTKEY_LONG =
* IMPORTING
* CLASSIF_STATUS =
TABLES
allocvaluesnumnew = GT_VALUES_NUM
allocvaluescharnew = GT_VALUES_CHAR
allocvaluescurrnew = GT_VALUES_CURR
return = GT_BAPIRET2.
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = LS_BAPIRET2.

WRITE: LS_BAPIRET2-TYPE .

LOOP AT GT_BAPIRET2 INTO LS_BAPIRET2.

WRITE: 'MESSAGE TYPE', LS_BAPIRET2-TYPE ,LS_BAPIRET2-MESSAGE.

ENDLOOP.
When I run this code it gives me the following error:"An exception was raised"Clarified that I am sure of: OBJECTKEY, classnum and classtype. Please i need help urgent. Thank you
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ankur Gokhale Mar 10, 2017 at 06:51 AM
0

I am facing the same error and there is no thread on SCN talking about error message : An exception was raised

Share
10 |10000 characters needed characters left characters exceeded