QUANTITY_CONVERT
Hi all,
While I am updating from update rules to transformation method,I got syntax error line perFORM QUANTITY_CONVERT .Is there any method or Class for QUANTITY_CONVERT in OOPS concept,can anybody please give me solution as soon as possible.
Regards
RamanaReddy.
The fact is .....
In 'MV45AFZZ'
data int1 type i.
p1 type p decimals 3.
p1 = 12.
int1 = p1.'
the result is 'int1 = 0.012'.
But in my test prograem
The result is 12.
Similar Messages
-
Can you help me interpret the following lines in UPDATE rule?
Hi,
Can you help me interpret the following lines in UPDATE rule?
1. What is the role of role of u201CCHANGING RESULT.u201D and u201CCHANGING lc_local_value.u201D?
2. What is the role of the CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY', in particular the Exporting and Importing parts?
3. Can I say that u201CCOMM_STRUCTURE-ORDER_VALu201D in the subroutine is passed to u201Clc_document_valueu201D in the u201CFORM loc_curr_convertu201D; and further passed to u201Cforeign_amountu201D in the u201CCALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'u201D?
4. Finally, what becomes of my original u201CActual Goods receipt quantityu201D( 0GR_QTY ) which I am writing the routine for? I donu2019t see any where in the code that it is being referred to? Do any of these codes affect the value of 0GR_QTY?
5. Also, if there are 3 different subroutines in the INCLUDE and I am making the change described in #4 above, how do I know which of the 3 subroutines to call?
===============================
===============================
So I am reviewing a transfer routine in for u201CActual Goods receipt quantityu201D and routine an INCLUDE statement: INCLUDE RS_BCT_MM_UPDATE_RULES.
The update rule also includes the following properties to run the following subroutine in the Include:
IF u2026..
perFORM LOC_CURR_CONVERT
USING COMM_STRUCTURE-ORDER_VAL
COMM_STRUCTURE-DOC_DATE
COMM_STRUCTURE-ORDER_CURR
COMM_STRUCTURE-LOC_CURRCY
COMM_STRUCTURE-EXCHG_RATE
CHANGING RESULT.
I verified in the INCLUDE (RS_BCT_MM_UPDATE_RULES) and the subroutine is as follows:
FORM loc_curr_convert
USING lc_document_value
lc_date
lc_document_currency
value(lc_local_currency)
lc_rate
CHANGING lc_local_value.
conversion of lc_rate from floating-point to decimal. Necessary for *
call of CONVERT_TO_LOCAL_CURRENCY.
data lc_rate_dec type p decimals 5.
lc_rate_dec = lc_rate.
IF lc_document_currency = lc_local_currency
no conversion necessary -> Main case 1
AND NOT ( lc_document_currency IS INITIAL
OR lc_local_currency IS INITIAL ) .
lc_local_value = lc_document_value.
ELSEIF NOT ( lc_document_currency IS INITIAL
OR lc_local_currency IS INITIAL OR lc_date IS INITIAL ) .
conversion necessary with lc_date -> Normally not possible
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = lc_date
foreign_amount = lc_document_value
foreign_currency = lc_document_currency
local_currency = lc_local_currency
rate = lc_rate_dec
IMPORTING
EXCHANGE_RATE =
local_amount = lc_local_value
EXCEPTIONS
NO_RATE_FOUND = 1
OVERFLOW = 2
NO_FACTORS_FOUND = 3
NO_SPREAD_FOUND = 4
DERIVED_2_TIMES = 5.
IF sy-subrc NE 0.
message a802 with lc_date lc_document_currency lc_local_currency
sy-subrc.
ENDIF.
ELSE.
if conversion not possible -> assign target values
lc_local_value = lc_document_value.
lc_local_currency = lc_document_currency.
ENDIF.
ENDFORM.HI,
Thanks so much the explanations.
I just verified again on our dev system and the update rule for 0GR_QTY (Actual goods receipt quantity) include the following:
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT
Now, in the include, I also found:
FORM QUANTITY_CONVERT
USING QC_SOURCE_VALUE
QC_SOURCE_UNIT
VALUE(QC_TARGET_UNIT)
QC_UMREZ
QC_UMREN
CHANGING QC_TARGET_VALUE.
i. Does it mean it actually does quantity conversion?
ii. If you have access to the INCLUDE I will appreciate some hints on what the subroutine QUANTITY_CONVERT is doing. It does not appear do to be saying anything about quantity conversion; but it is supposed to be doing something with the parameters being passed from the update routine.
iii. In your response to #5, after all the computation in the INCLUDE, what comes back to the Update rule i.e. what comes back to become the value of 0GR_QTY?
Is it the u201CRESULT.u201D in the update rule or u201CQC_TARGET_VALUE.u201D in the subroutine in the INCLUDE.
iv. So, am to create an Update rule for 0PSTNG_DATE and the source is BUDAT; and I need to write a routine using the include INCLUDE RS_BCT_MM_UPDATE_RULES.
I looked through the INCLUDE and identified all the subroutines in this INCLUDE as follows:
QUANTITY_CONVERT
LOC_CURR_CONVERT
GET_WEEK
WEEK_DAY
QUARTER_DAY
--Does it mean that to use this subroutine, I can only use the USING parameters of one of these listed subroutines?
--Also, does it mean that because 0PSTNG_DATE is a date, I can only use one of
GET_WEEK
WEEK_DAY
QUARTER_DAY
--Or, are there other includes to be used for 0PSTNG_DATE
Thanks -
Problem in getting correct datain DSO although routine is working!
I have two DSOs -DSO03 and DSO04 and in-between a transformation where a 0Order_Val field is getting calculated using the routine code as below:-
IF ( COMM_STRUCTURE-PROCESSKEY = '001' or
COMM_STRUCTURE-PROCESSKEY = '011' or
COMM_STRUCTURE-PROCESSKEY = '021' or
COMM_STRUCTURE-PROCESSKEY = '004' or
COMM_STRUCTURE-PROCESSKEY = '014' or
COMM_STRUCTURE-PROCESSKEY = '024' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-ORDER_VAL <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-ORDER_VAL
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
Problem:-
For few doc numbers, the Quantity convert is fetching correct data, after applying the convert subroutine.
But in some, (although it is not supposed to return 0 after applying the sub-routine of Quantity_Convert),
it is showing wrong result as "0" in DSO04,
(although there is value in DSO03 for the field 0Order_Val).
Example:-
Doc num Field name DSO 3 Value DSO4Value Remarks
4500000089 0Order_ Val 3686.21 3686.21 Correct
4500000084 0Order_Val 500000 0 Wrong
While trying to debug the ABAP routine through breakpoints, I have found that the result fetched is correct (i.e. 500000 for doc_num: 4500000084) but when displaying data in DSO04 it is showing "0".
I have checked the input parameters and all are same.
Only exception is difference in currency between the two records.
One is USD (Doc num :4500000089) and the other is ESD (Doc num :4500000084).
Although currency is not any input parameter.
Also have tried Overwrite/summation setting in the Transformation but with no result.
If anyone can indicate any solution to this peculiar problem then it will be very helpful.
Regards,
Ritu.
email: [email protected]Hi,
it is a bug in the Acrobat Reader. I had the same problem. Just add an input field called "myIndex" into the row and store there the current index when creating the line. With this solution you can programatically work with your own created index without the bug of the Acrobat Reader.
Take care,
Thomas -
TRCS 2LIS_02_ITM to 0PUR_C01 Mapping issue 0INV_RC_QTY/VAL
Dear All ,
I have installed the 0pur_c01 cube and its before and after objects successfully. Loaded the data into standard cube. But there is no data into the 0IV_RC_QTY / VAL ( Invoice QTY / VAL ) infoobjects.
There is no mapping from TRCS 2LIS_02_ITM to 0PUR_C01 Cube.
Can you please help me on this. What to map from source to target cube.
Your help highly appreciated.
Best Regards,
Milind.Hi Milind,
strange.
For me it looks like shown below
Could you try to reinstall this transformation from BI Content?
If still not provided there after reinstall, please let us know the BI Content Release and support package you are using.
Here is the information for the two transformation routines:
0INV_RC_QTY
Source IObj:
- 0BASE_UOM
- 0BWAPPLNM
- 0CPQUAOU
- 0DENOMINTR
- 0NUMERATOR
- 0PO_UNIT
- 0PROCESSKEY
Aggregation: Summation
Routine (unfortunately only in 3.x non ABAP-OO style, you would need to adapt it to 7.x ABAP OO):
* fill the internal table "MONITOR", to make monitor entries
IF ( COMM_STRUCTURE-PROCESSKEY = '023' or
COMM_STRUCTURE-PROCESSKEY = '003' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPQUAOU <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
0INV_RC_VAL
Source IObj:
- 0BWAPPLNM
- 0CPPVLC
- 0LOC_CURRCY
- 0PROCESSKEY
Aggregation: Summation
Routine (unfortunately only in 3.x non ABAP-OO style, you would need to adapt it to 7.x ABAP OO coding):
* fill the internal table "MONITOR", to make monitor entries
IF ( COMM_STRUCTURE-PROCESSKEY = '023' or
COMM_STRUCTURE-PROCESSKEY = '003' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPPVLC <> 0.
RESULT = COMM_STRUCTURE-CPPVLC.
* if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
* if abort is not equal zero, the update process will be canceled
ABORT = 0.
Regards,
Andreas -
Hi, i need understand how working fill for keyfigure 0INV_RC_QTY or 0IV_REC_QTY, Processkey concept is ok value needed is 003 and 013.
Using RSA3 or PSA in BI7 for analisis the data in extractor 2LIS_02_SCL, we look for all records values : 14257 in Field "BWMNG" and multiple values for PROCESSKEY.
After update rules for 0PUR_C01, we have bad total values for EM when PROCESSKEY EQ 002 OR 022 and Bad values when is INVOICE PROCESSKEY EQ 003 or 023.
For extractor 2LIS_02_ITM we not look use this Keyfigure 0INV_RC_QTY or 0IV_REC_QTY in update rule.
We have in BI7:
SAP_BW 700 0017
BI_CONT 703 0009
So in ERP:
SAP_APPL 600 0010
SAP_BASIS 700 0012
SAP_ABA 700 0012
PI_BASIS 2005_1_700 0012
My code in Update rutine in 0PUR_C01 is :
0IV_REC_QTY
IF ( COMM_STRUCTURE-PROCESSKEY = '023' or
COMM_STRUCTURE-PROCESSKEY = '003' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPQUAOU <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
0INV_RC_QTY
IF ( COMM_STRUCTURE-PROCESSKEY = '023' or
COMM_STRUCTURE-PROCESSKEY = '003' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPQUAOU <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
We need correct value in 0IV_REC_QTY and 0GR_QTY for PROCESSKEY (002 & 022).
Any idea how fix the problem ?
Thank you.Problem was detected in User-Exit code, other project was modify the standar values.
Thank you. -
Update Routine - Deaggegation - Net Price
Dear sdn's
For a object '0NETPRICE' , i am using the following update routine.
IF ( COMM_STRUCTURE-processkey = '002' OR COMM_STRUCTURE-processkey = '012' OR
COMM_STRUCTURE-processkey = '022')
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
Here GR Qty (31,969), GR Val (286,122.55) loading correctly. Net price getting aggreagted. In the folowing example i should get only 7.56 instead of 30.24. Inversion also problem, it will through only "0'.
Netprice GR Qty GR Val Document Number
7.56 50,819- 454,830.05- 4500008362
7.56 66,886 598,629.70 4500008362
7.56 66,886- 598,629.70- 4500008362
7.56 82,788 740,952.60 4500008362
30.24 31,969 286,122.55
Can anybody suugest me the logic in routine ...?
Regards
Raju SaravananHi,
( COMM_STRUCTURE-PROCESSKEY = '002' or
COMM_STRUCTURE-PROCESSKEY = '012' or
COMM_STRUCTURE-PROCESSKEY = '022' )
AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
AND COMM_STRUCTURE-CPQUAOU <> 0.
perFORM QUANTITY_CONVERT
USING COMM_STRUCTURE-CPQUAOU
COMM_STRUCTURE-po_UNIT
COMM_STRUCTURE-base_uom
COMM_STRUCTURE-numerator
COMM_STRUCTURE-denomintr
CHANGING RESULT.
if COMM_STRUCTURE-/BIC/ZPEINH ne 0.
RESULT = RESULT * COMM_STRUCTURE-/BIC/ZSTPRS1.
RESULT = RESULT / COMM_STRUCTURE-/BIC/ZPEINH.
else.
RESULT = 0.
Endif.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
else.
RETURNCODE = 4.
endif.
result value of the routine
RESULT = .
result value of the unit
UNIT = COMM_STRUCTURE-CURRENCY.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
ABORT = 0.
the above code using.....please suggest
Maybe you are looking for
-
How to Call a Class method in another class.
Hi All, I have created two class The class JavaAgent create a object of another TestFrame1 class . I am trying to call out.setSize(200,100); out.setVisible( true ); above two method. I am a doing some thing wrong. I am getting the error " symbol cann
-
Microsoft Jdbc driver for SQL Server memory leak
I'm using Microsoft Jdbc driver and see there's some leak after running application for a while. I'm sure that it's from Jdbc driver because I sitch to Jtds and the issue went away. My question is is there anybody knows which web sites talk about mem
-
Why is firefox sliding to the right and I can not open the window?
I have a status bar at the bottom...no problem. The problem is that when I open Firefox I see the icon for several windows opened over lapping and I can not get one of them to maximize for me. They, very quickly, slide to the right and off the screen
-
How to save pictures to a file outside of IPHOTO
How you do you save photos to another file that isn't in Iphoto? I was trying to upload some photos to a webhosting site and I had the hardest time trying to find the library they were in. I ended up dragging the all to the desktop and renaming them.
-
Itunes 10.7.0.21 CD burning slow
hi guys, i have tried different media. this makes no difference i have tried a 3rd party CD burning application (cdbxpp) this DOES make a difference. it burns at the speed (48) that you would expect itunes to burn at. i have tried burning using itune