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_AGREEMENT_MAINTAIN Doesn't UPDATE

Former Member
0 Likes
1,591

Hi all

I have a problem with . I am trying modify WEBAZ field for transaction ME32L but although the bapi is executed successfully y and return the message 'Scheduling agreement 5500003590 changed' it is not modified.

Some body could help me or have any idea about it? Please

my code is:

LOOP AT t_ekpo INTO wa_ekpo.

READ TABLE t_ekko INTO wa_ekko WITH KEY ebeln = wa_ekpo-ebeln

BINARY SEARCH.

t_head-agmt_no = wa_ekpo-ebeln.

t_head-doc_cat = wa_ekko-bstyp.

t_head-comp_code = wa_ekko-bukrs.

t_head-doc_type = wa_ekko-bsart.

t_head-currency = wa_ekko-waers.

APPEND t_head.

t_heax-agmt_no = c_x.

t_heax-doc_cat = c_x.

t_heax-comp_code = c_x.

t_heax-doc_type = c_x.

t_heax-currency = c_x.

APPEND t_heax.

READ TABLE t_out_aux INTO wa_outtab WITH KEY lifnr = wa_ekko-lifnr

werks = wa_ekpo-werks

BINARY SEARCH.

t_item-agrmt_item = wa_ekpo-ebelp.

t_item-gr_pr_time = wa_outtab-webaz_n.

APPEND t_item.

t_itex-agrmt_item = wa_ekpo-ebelp.

t_itex-gr_pr_time = c_x.

APPEND t_itex.

AT END OF ebeln.

CALL FUNCTION 'BAPI_AGREEMENT_MAINTAIN'

EXPORTING

im_agreement_header = t_head

im_agreement_header_x = t_heax

im_all_items_passed = c_x

TABLES

ext_return = t_return

imt_agreement_items = t_item

imt_agreement_items_x = t_itex.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

APPEND LINES OF t_return TO t_message.

REFRESH: t_head, t_heax, t_item[], t_itex[], t_return.

ENDAT.

  • Limpia variables

CLEAR: wa_ekpo, wa_ekpo_aux, t_head, t_heax, t_item, t_itex, wa_outtab..

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,300

Hi,

I am not sure why you need this parameter:

im_all_items_passed = c_x

Comment this line and check.

Regards,

Subramanian

Hi,

I am not sure why you need this parameter:

im_all_items_passed = c_x

Comment this line and check.

Regards,

Subramanian

6 REPLIES 6
Read only

Former Member
0 Likes
1,301

Hi,

I am not sure why you need this parameter:

im_all_items_passed = c_x

Comment this line and check.

Regards,

Subramanian

Read only

0 Likes
1,300

to pass al positions of the agreement pos 0010, 0020...

Read only

Former Member
0 Likes
1,300

You are appending header values to itab, but passing only the header line of itab in EXPORTING parameters. Is this required ? Though ur current problem doesn't seem to be related, you never know. Try without APPEND t_head and see.


t_head-agmt_no = wa_ekpo-ebeln.
t_head-doc_cat = wa_ekko-bstyp.
t_head-comp_code = wa_ekko-bukrs.
t_head-doc_type = wa_ekko-bsart.
t_head-currency = wa_ekko-waers.
[APPEND t_head.]

t_heax-agmt_no = c_x.
t_heax-doc_cat = c_x.
t_heax-comp_code = c_x.
t_heax-doc_type = c_x.
t_heax-currency = c_x.
[APPEND t_heax.]



CALL FUNCTION 'BAPI_AGREEMENT_MAINTAIN'
EXPORTING
[im_agreement_header = t_head]
[im_agreement_header_x = t_heax]
im_all_items_passed = c_x
TABLES
ext_return = t_return
imt_agreement_items = t_item
imt_agreement_items_x = t_itex.

Read only

Former Member
0 Likes
1,300

hi

R u getting only the success message in the return parameters or also some other warnngs. Have u checked that...?

regards,

Surya.

Read only

Former Member
0 Likes
1,300

Hi Marisol,

Have you got the solution for your problem , if so, Please provide your inputs as i am also facing same issue exactly what you are getting.

I tried commenting " im_all_items_passed" parameter and also i am passing workarea component values to "im_agreement_header" and "im_agreement_header_x" parameters of below FM.

But it is not updated GR Processing time at Agreement level (i.e. in ME32K) as i am getting "Contract Has changed" Sucessage message alone in T_ERROR[] parameter of below BAPI FM.

CALL FUNCTION 'BAPI_AGREEMENT_MAINTAIN'

EXPORTING

im_agreement_header = wa_header

im_agreement_header_x = wa_header_x

  • im_all_items_passed = c_x

TABLES

ext_return = t_error

imt_agreement_items = t_bapiitem

imt_agreement_items_x = t_bapiitem_x.

Waiting for the solution , Please help me out As soon as possible.

Thanks,

Satish

Read only

Former Member
0 Likes
1,300

solved with a call transaction.