Application Development 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: 

Create Rebate agreements using BAPI:BAPI_AGREEMENTS

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

I got the solution

0 Kudos

HI,

May i know the solution what you had ..... to solve this issue.

i am having the same issue.

Regards,

Venkatesh

0 Kudos

Please let me know the solution.

i am also facing same problem please help me.

0 Kudos

you need to supply the condition group..it usually is the same as the aggreement type.

you can also do a rebate manually, and then check the data that was posted in the table KONA using se16....

Former Member
0 Kudos

Hi,

I am getting the same problem when trying to create a agreement by using BAPI_AGREEMENTS ??

pls let me know hw u hav solved the same ???

With Rgds,

S.bharani