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

How to bypass material rounding rules when using 'BAPI_PO_CREATE1'?

Former Member
0 Likes
3,243

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

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
2,133

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..

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

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
2,134

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..

Read only

0 Likes
2,133

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?

Read only

0 Likes
2,133

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]

Read only

0 Likes
2,133

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?

Read only

Former Member
2,133

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.

Read only

0 Likes
2,133

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