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

Update price

Former Member
0 Likes
1,527

Hi

Iam using FM BAPI_M_REVAL_CREATEPRICECHANGE to update standard price in MR21.

when iam testing,its not returning error,but in table MBEW its not updating.

iam using commit also....

where iam missing

Inputs appreciated.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
873

Hi,

In the SAP version 4.6C I have at hands the BAPI contains the next lines:


* Im Standard deaktiviert
  error_flag = 'X'.
  IF ( NOT error_flag IS INITIAL ).
    EXIT.
  ENDIF.

This is put there as the first executable statements. So it will not perform its taks.

I don't know the reason behind the deactivation! The bapi is also not formaly released.

If you fill the next fields in the table call the bapi with this and by-pass the error_flag using the debugger, it should post.


  data:
    lt_mat_price type standard table of BAPI2027_PC_LIST,
    ls_mat_price type BAPI2027_PC_LIST.

  ls_mat_price-plant       = your_bwkey.   " Assumption!
  ls_mat_price-material   = your_matnr.
  ls_mat_price-CURR_TYPE  = '10'.
  ls_mat_price-CHANGE_STD_PRICE  = 'X'.

  ls_mat_price-STD_PRICE  = your_new_price.
  ls_mat_price-CURRENCY =   ls_mat_price-ISO_CODE = your_currency.

  ls_mat_price-PRICE_UNIT = your_price_unit.
  ls_mat_price-QUANTITY_UNIT = your_unit.
  ls_mat_price-ISOCODE_UNIT  = your_unit_in_iso.
  append ls_mat_price to lt_mat_price.

Happy debugging,

Frans.

Hi

Iam using FM BAPI_M_REVAL_CREATEPRICECHANGE to update standard price in MR21.

when iam testing,its not returning error,but in table MBEW its not updating.

iam using commit also....

where iam missing

Inputs appreciated.

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
873

Hi,

( just assign valuses to bapi structure and call BAPI function Miodule )

just fill the values and call the BAPI. You can use the function module GUI_UPLOAD to upload your file to internal table, then loop at the internal table and call the BAPI.

Regards,

Read only

Former Member
0 Likes
874

Hi,

In the SAP version 4.6C I have at hands the BAPI contains the next lines:


* Im Standard deaktiviert
  error_flag = 'X'.
  IF ( NOT error_flag IS INITIAL ).
    EXIT.
  ENDIF.

This is put there as the first executable statements. So it will not perform its taks.

I don't know the reason behind the deactivation! The bapi is also not formaly released.

If you fill the next fields in the table call the bapi with this and by-pass the error_flag using the debugger, it should post.


  data:
    lt_mat_price type standard table of BAPI2027_PC_LIST,
    ls_mat_price type BAPI2027_PC_LIST.

  ls_mat_price-plant       = your_bwkey.   " Assumption!
  ls_mat_price-material   = your_matnr.
  ls_mat_price-CURR_TYPE  = '10'.
  ls_mat_price-CHANGE_STD_PRICE  = 'X'.

  ls_mat_price-STD_PRICE  = your_new_price.
  ls_mat_price-CURRENCY =   ls_mat_price-ISO_CODE = your_currency.

  ls_mat_price-PRICE_UNIT = your_price_unit.
  ls_mat_price-QUANTITY_UNIT = your_unit.
  ls_mat_price-ISOCODE_UNIT  = your_unit_in_iso.
  append ls_mat_price to lt_mat_price.

Happy debugging,

Frans.