‎2009 Jun 08 10:01 AM
Hi all,
I am using the Std BAPI
BAPI_AGREEMENTS to create the rebate agreements. But it is throwing an error as follows.
Internal error: agreement initial
How can i resolve this issue ? Am i missing any other parameters.......
For your reference i am pasting the code too.......................
data: it_BAPI_AGREEMENTS type table of BAPIAGRMNT WITH HEADER LINE.
data: it_BAPIRET2 type table of BAPIRET2 with header line.
data: it_BAPIKNUMAS type table of BAPIKNUMAS with header line.
start-of-selection.
it_BAPI_AGREEMENTS-SALES_ORG = 'MXCO'.
it_BAPI_AGREEMENTS-DISTR_CHAN = '20'.
it_BAPI_AGREEMENTS-DIVISION = 'TV'.
it_BAPI_AGREEMENTS-AGR_TYPE = 'ZA62'.
it_BAPI_AGREEMENTS-RECIPIENT = '31300'.
it_BAPI_AGREEMENTS-AGRMT_CURR = 'MXN'.
it_BAPI_AGREEMENTS-VALID_FROM = '08062008'.
it_BAPI_AGREEMENTS-VALID_TO = '30602008'.
it_BAPI_AGREEMENTS-OPERATION = '009'.
it_BAPI_AGREEMENTS-CATEGORY = 'A'.
it_BAPI_AGREEMENTS-APPLICATIO = 'V'.
append it_BAPI_AGREEMENTS.
CALL FUNCTION 'BAPI_AGREEMENTS'
EXPORTING
PI_INITIALMODE =
PI_BLOCKNUMBER =
TABLES
ti_bapiagrmnt = it_BAPI_AGREEMENTS
to_bapiret2 = it_BAPIRET2
to_bapiknumas = it_BAPIKNUMAS
EXCEPTIONS
UPDATE_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
read table it_bapiret2 index 1.
if sy-subrc eq 0.
write:/ it_bapiret2-MESSAGE.
endif.
ENDIF.
Regards,
Venkatesh
‎2009 Jun 08 10:05 AM
‎2009 Jun 08 10:10 AM
HI,
i am getting the same problem. Actually that it is not a problem as of now. But any how i have changed the format of date. and still the same.
Regards,
Venkatesh.
‎2009 Jun 08 10:35 AM
Hello
Are you sure that date is correct ?
it_BAPI_AGREEMENTS-VALID_TO = '30602008'.
‎2009 Jun 08 10:36 AM
HI,
it_BAPI_AGREEMENTS-VALID_FROM = '20080608'.
it_BAPI_AGREEMENTS-VALID_TO = '20080630'.
these are the dates i am giving in my code.
Regards,
Venkatesh.
‎2009 Jun 08 1:26 PM
‎2012 Dec 12 9:58 AM
Hi,
Please use AGREE_COND = $00001 along with other details, it works. Let me know if you still face any issues.
Regards,
Shanth