‎2012 Aug 22 5:09 AM
Hi All,
I am trying to update valuation price field using FM 'BAPI_PR_CHANGE'.
But the field is not gettign updated. I am using 'BAPI_TRANSACTION_COMMIT' also after calling the above BAPI.
Could you please help me. I found out that SAP Note 1062000 has to be implemented.
But when i try to do that in SNOTE i am getting a message that it cannot be implmented.
Regards,
Indira.
‎2012 Aug 22 5:23 AM
‎2012 Aug 22 5:26 AM
‎2012 Aug 22 5:31 AM
‎2012 Aug 22 5:48 AM
Hi Karthik,
Ya it is implemented. Checked. But then too the valuation price field is not getting updated. Could you please give us an alternative.
Regards,
Indira
‎2012 Aug 22 5:54 AM
‎2012 Aug 22 6:54 AM
Hi Karthik,
I am callin the below BAPI by filling in the internal tables. In my case the internal tables gt_item, gt)itemx, gt_accassgn and gt_accassgnx are filled and remaining are empty.
*-->Call BAPI for changing the current PR
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
number = f_eban-banfn
TABLES
return = gt_return
pritem = gt_item
pritemx = gt_itemx
praccount = gt_accassgn
praccountx = gt_accassgnx
pritemtext = gt_item_text
extensionin = gt_extnin
serviceoutline = gt_service_outline
serviceoutlinex = gt_service_outlinex
servicelimit = gt_service_limit
servicelimitx = gt_service_limitx
serviceaccount = gt_service_account
serviceaccountx = gt_service_accountx.
After this i am callign the FM
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = gc_x.
Regards,
Indira.
‎2012 Aug 22 7:13 AM
‎2012 Aug 22 7:23 AM
‎2012 Aug 22 7:52 AM
Hi Karthik and Raymond,
Yes i did debug the code and see.
yes in the return parameter in gt_retun table there were entries. I could see messages in there saying that none of the fields were changed.
Below are the code lines to fill the price field
gf_itemx-preq_price = 'X'.
gf_item-preq_price = gf_eban-preis.
gf_accassgn-net_value = f_item-preq_price.
gf_accassgnx-net_value = 'X'.
The above lines fill the amount field with the correct amount. But once the BAPI is called the amount is not modified.
Reagards,
Indira
‎2012 Aug 22 9:19 AM
- Does the PR carry an info-record (INFO_REC, EBAN-INFNR)
- Does you check with Common Issues and Hints MM-PUR
Regards,
Raymond
‎2012 Aug 22 9:49 AM
Hi Raymond,
PLease fidn the below code used to fill the internal tables sent to the BAPI.
for gt_itemx the fields are given below.
gf_itemx-preq_itemx = 'X'.
gf_itemx-material = 'X'.
gf_itemx-plant = 'X'.
gf_itemx-pur_group = 'X'.
gf_itemx-store_loc = 'X'.
gf_itemx-quantity = 'X'.
gf_itemx-po_unit = 'X'.
gf_itemx-del_datcat_ext = 'X'.
gf_itemx-deliv_date = 'X'.
gf_itemx-fixed_vend = 'X'.
gf_itemx-des_vendor = 'X'.
gf_itemx-price_unit = 'X'.
gf_itemx-purch_org = 'X'.
gf_itemx-vend_mat = 'X'.
gf_itemx-mrp_ctrler = 'X'.
gf_itemx-matl_group = 'X'.
gf_itemx-acctasscat = 'X'.
gf_itemx-trackingno = 'X'.
gf_itemx-preq_price = 'X'.
gf_itemx-unit = 'X'.
gf_itemx-short_text = 'X'.
gf_itemx-preq_name = 'X'.
For gt_item the fields are given below:
* Fill Line Item Data of ZEC PR with ZAM PR data.
gf_item-material = gf_eban-matnr.
gf_item-short_text = gf_eban-txz01.
gf_item-plant = gf_eban-werks.
gf_item-pur_group = gf_eban-ekgrp.
gf_item-store_loc = gf_eban-lgort.
gf_item-mrp_ctrler = gf_eban-dispo.
gf_item-matl_group = gf_eban-matkl.
gf_item-acctasscat = gf_eban-knttp.
gf_item-trackingno = gf_eban-bednr.
gf_item-quantity = gf_eban-menge.
gf_item-preq_price = gf_eban-preis.
gf_item-po_unit = gf_eban-meins.
gf_item-unit = gf_eban-meins.
gf_item-del_datcat_ext = gf_eban-lpein.
gf_item-deliv_date = gf_eban-lfdat.
gf_item-fixed_vend = gf_eban-flief.
gf_item-price_unit = gf_eban-peinh.
gf_item-purch_org = gf_eban-ekorg.
gf_item-vend_mat = gf_eban-idnlf.
gf_item-preq_name = gf_eban-afnam.
For tables gt_accassgn and gt_accassgnx, the below fields
gf_accassgn-preq_item = w_bnfpo + '00010'.
gf_accassgn-serial_no = gf_zam_ebkn-zebkn.
gf_accassgn-gl_account = gf_zam_ebkn-sakto.
gf_accassgn-costcenter = gf_zam_ebkn-kostl.
gf_accassgn-orderid = gf_zam_ebkn-aufnr.
gf_accassgn-co_area = gf_zam_ebkn-kokrs.
gf_accassgn-quantity = gf_eban-menge.
gf_accassgn-net_value = gf_eban-preis.
gf_accassgnx-preq_item = w_bnfpo + '00010'.
gf_accassgnx-serial_no = gf_zam_ebkn-zebkn.
gf_accassgnx-gl_account = 'X'.
gf_accassgnx-costcenter = 'X'.
gf_accassgnx-orderid = 'X'.
gf_accassgnx-co_area = 'X'.