Skip to Content
0
Former Member
May 25, 2009 at 10:38 AM

Create Rebate agreements using BAPI:BAPI_AGREEMENTS

473 Views

Hi,

My requirement is to create the rebate agreement using BAPI.

For this I am using 'BAPI_AGREEMENTS'.

I am passing the below values to TI_BAPIAGRMNT

*ls_BAPIAGRMNT-OPERATION = .

*ls_BAPIAGRMNT-AGREE_COND =

ls_BAPIAGRMNT-SALES_ORG = 'BIC'.

ls_BAPIAGRMNT-DISTR_CHAN = '02'.

ls_BAPIAGRMNT-DIVISION = '00'.

ls_BAPIAGRMNT-AGR_TYPE = 'ZBMS'.

*ls_BAPIAGRMNT-CATEGORY =

*ls_BAPIAGRMNT-APPLICATIO =

*ls_BAPIAGRMNT-CREATED_BY =

*ls_BAPIAGRMNT-CREAT_DATE =

*ls_BAPIAGRMNT-CREAT_TIME =

*ls_BAPIAGRMNT-CHANGED_BY =

*ls_BAPIAGRMNT-CHANG_DATE =

*ls_BAPIAGRMNT-CHANG_TIME =

ls_BAPIAGRMNT-RECIPIENT = 'ST0000'.

ls_BAPIAGRMNT-AGRMT_CURR = 'USD'.

*ls_BAPIAGRMNT-AGCURR_ISO =

*ls_BAPIAGRMNT-EX_DESCR =

ls_BAPIAGRMNT-STATOFAGRE = 'A'.

ls_BAPIAGRMNT-VALID_FROM = '05/25/2009'.

ls_BAPIAGRMNT-VALID_TO = '05/31/2009'.

*ls_BAPIAGRMNT-COND_GROUP =

*ls_BAPIAGRMNT-AGRMT_TEXT =

*ls_BAPIAGRMNT-PAY_METHOD =

*ls_BAPIAGRMNT-FRMOBJ_TYP =

*ls_BAPIAGRMNT-FRMOBJ_KEY =

*ls_BAPIAGRMNT-DEL_FLAG =

append ls_BAPIAGRMNT to lti_BAPIAGRMNT.

CALL FUNCTION 'BAPI_AGREEMENTS'

  • EXPORTING

  • PI_INITIALMODE =

  • PI_BLOCKNUMBER =

TABLES

TI_BAPIAGRMNT = lTI_BAPIAGRMNT

TO_BAPIRET2 = lTO_BAPIRET2

TO_BAPIKNUMAS = lTO_BAPIKNUMAS

  • EXCEPTIONS

  • UPDATE_ERROR = 1

  • OTHERS = 2

.

i am getting the values in lTO_BAPIRET2

Type: E

ID:CND_EXCHANGE

Number:156

Message:Record KNUMA = , AG_GUID = 00000000000000000000000000000000: agrmt type deviates from Customizing

LOG_NO:

LOG_MSG_NO:00000

and i am not able to create rebate agreement using this BAPI.If i am passing same values in VBO1 am able to create the agreement.

Let me know what to do. Am i using correct BAPI or not.If it is correct what r the remaining fields need to be passed.If not let me know the correct procedure.

Thanks in advance.

Thanks,

Vidya.