Skip to Content
avatar image
Former Member

Rounding issue in method CORRECT_ROUNDING_DIFF (Class CL_ACCOUNT_MMSRV)

Hello SAP expert.

I am using the BAPI_PR_CREATE to create Purchase Requisition (Service PR) with multiple account assignment. I have 2 service lines with multiple Account Assignment with difference cost centers like cost center COSTC1 & COSTC2. Distribution for multiple account assignment is quantity-based distribute. Total quantity of service line 1 is 3, COSTC1-quantity = 2, COSTC2-quantity = 1. Total quantity of service line 2 is 3, COSTC1-quantity = 2, COSTC2-quantity = 1. After using BAPI_PR_CREATE, I got message class 06 , message Number 410 : "Sum of quantities >&< smaller than total quantity.

After debugging, I found that the method CORRECT_ROUNDING_DIFF (Class CL_ACCOUNT_MMSRV) is not correct. I think that rounding the quantity,percent,amount should used for each service line. Coding in this method should be updated.

LOOP AT my_t_service_data INTO ls_service_data WHERE del_ind IS INITIAL.

* Begin- My suggestion. CLEAR: lv_sum_for_rounding_menge,lv_sum_for_rounding_wproz, lv_sum_for_rounding_netwr.

* End- My suggestion LOOP AT my_t_acc_line INTO ls_acc_line WHERE outline = ls_service_data-outline AND srv_line = ls_service_data-srv_line. ..... ENDLOOP.

Please suggest if it is correct.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers