2008 Jun 17 6:08 AM
How to bypass rounding rules when create a PO using 'BAPI_PO_CREATE1'?
I faced a problem when using the BAPI to create PO. As the material has rounding rule, thus, when I create the PO using this BAPI, the quantity will be rounded according to the rule.
How can I bypass the rounding rule so that I can upload the quantity according to the quantity that specify in my upload file?
Edited by: Irene Sam on Jun 17, 2008 1:08 PM
2008 Jun 17 6:11 AM
when you are getting data from upload file to internal table.. you need to declare the table element of quantity as type p or like the same data element.. how it is in the SAP system..
ur problem looks like you might be placing the value in some other type variable..
2008 Jun 17 6:11 AM
when you are getting data from upload file to internal table.. you need to declare the table element of quantity as type p or like the same data element.. how it is in the SAP system..
ur problem looks like you might be placing the value in some other type variable..
2008 Jun 17 7:01 AM
Even I've changed to use the same data type as the PO item data type (LIKE EKPO-MENGE), this problem still exist.
Any other ways to solve this?
2008 Jun 17 7:04 AM
check with ur functional guy.. there might be some config changes to be done...
before doing it I would try changing the data element to P and all type of formats I can... just before passing value to the BAPI structure..
check this [link1|http://www.erpgenie.com/phpBB2/viewtopic.php?p=15364&sid=f5f5b0fc3315525c6291cc37cd9965b1]
[link2|http://www.sapfans.com/forums/viewtopic.php?f=13&t=313141&start=0&st=0&sk=t&sd=a]
2008 Jun 17 8:02 AM
the functional guy know it's caused by the rounding rule defined for the material, thus, we hope that there is a solution to bypass the rounding rule when using this BAPI to create the PO.
Any thing that I can put in the BAPI parameters to achive this?
2008 Jun 17 10:33 AM
I've solved the problem with passing the parameter no_rounding into the BAPI.
poitem-no_rounding = 'X'.
poitemx-no_rounding = 'X'.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = poheader
poheaderx = poheaderx
IMPORTING
exppurchaseorder = w_ebeln
TABLES
return = poreturn
poitem = poitem
poitemx = poitemx
poschedule = poschedule
poschedulex = poschedulex
potextheader = pohdrtext
poaccount = poaccount
poaccountx = poaccountx.
2013 Oct 10 2:26 PM
Lai Min,
I'd love to reward you some points for having the courtesy to update the thread with the solution, I was facing the same issue and your answer fixed my problems. Many Thanks.
Colm