Incorrect result of multiplication for quantity fields,coverting LB to KG.
Hi All,
The requirement is to convert LB(pounds) to KG.The formula goes as follows.
l_ntgew = vbap-kwmeng * w_mara-ntgew * l_zcazz .
l_brgew = vbap-kwmeng * w_mara-brgew * l_zcazz .
where kwmeng = '1' is ordered quantity,w_mara-ntgew = '0.157' is the net weight from mara and l_zcazz ='0.454' is the conversion factor from LB to KG.
This information is for material mara-matnr = '100014609'
The result I am getting is l_ntgew = '71278.000' which incorrect.
Actual result is = '0.071278' .
Similar issues with l_brgew.
The same code works fine in a custom program but the requirement is to modify userexit 'userexit_check_vbap using us_dialog' within include 'MV45AFZB'.Here it fails completely. We have tried all types of field declarations, be it float or packed or ntgew_ap(quantity field).
Please help.Its urgent.Full points will be awarded to the correct solution.
Thanks,
Shamia.
VBAP-KWLMENG is a quantity field associated with unit VBAP-VRKME. (sales unit)
Try to use FM to convert quantithy from sale unit to base unit
call function 'MD_CONVERT_MATERIAL_UNIT'
exporting
i_matnr = vbap-matnr
i_in_me = vbap-vrkme
i_out_me = mara-meins
i_menge = vbap-kwlmeng
importing
e_menge = <qty in base unit>
exceptions
error_in_application = 1
error = 2
error_message = 3
others = 4.
Then multiply by <b>mara-ntgew</b> giving a result in unit <b>mara-GEWEI</b> then convert from this unit to KG. (same FM)
Regards
Similar Messages
-
Best practice for "Quantity" field in Asset Master
Hi
I want to know what is the best practice for "Quantity field" in asset master. It should be made displayed only or required field in Asset Master creation.
Initially I made this field as required entry. So user entered 1 quantity. At the time of posting F-90, he again entered quantity. So my quantity in asset master got increased. Hence i decided to make that field display only in asset master creation.
Now i made that field as display only in asset master creation. At the time of posting F-90, that quantity field is not coming only. I check my field status group for posting key as well as GL account. Its optional field. Inspite of that user is able to make entry in F-90. Now quantity field is '0' only in asset master even though there is some value in asset.
Please help what is the best practice wrt quantity field. Should be open in asset master or it should be display only.Hi:
SAP Standard does not recommend you to update quantity field in asset master data. Just leave the Qty Field Blank , just mention the Unit of Measure as EA. While you post acquisition through F-90 or MIGO this field will get updated in Asset master data automatically. Hope this will help you.
Regards -
ALV Display for Quantity Field
Hi All,
I am working on ALV classes.
I have a quantity field which needs to be displayed without decimals.
When I declare the data type as type p decimals 0,It is displayed correctly but when I change the field with a value using the method handle_data_changed it gives a value multiplied by 10 always. i.e., when the new value is 5 it gives the value as 50.
I tried referencing the Unit value but it doesn't work.
Any views on suppressing the decimal values without getting the value multiplied by 10 is highly appreciated.
Thank you in advance.
Regards,
K.S.Hello Kandasamy,
Change the reference field that points to the ALV display field to a non decimal field and then use the Integer variable assignment for removing the decimals during teh BAPi or database fetch.
Hope this answers your question.
Thanks,
Greetson -
Incorrect result being returned for a formula
I'm getting incorrect result for a simple formula. Changing the value of Rs is not affecting the output correctly. I am new to labview and can use some help. VI attached.
Attachments:
testformula.vi 21 KBI'm getting incorrect result for a simple formula. Changing the value of Rs is not affecting the output correctly. I am new to labview and can use some help. VI attached.
Input values used:
Rp2 = -131.763
Rs2 = 0.321
Isc2= 8.21
Vmp= 26.3
Imp= 7.61
Io2= 9.735E-8
exp2= 8.404E+8
Output being shown as:
Pmax3 = 200.143
It should be Pmax3 = 192.688
Attachments:
testformula.vi 22 KB -
Exit for CO02-FOR QUANTITY FIELD FOR THE LIST OF LINE ITEMS
Hi,
Can anyone just let me know the user exit to code the authority check for the quantity field in CO02 for the screen SAPLCOMK.
The quantity assigned for the list of items should not be changed by the user.
For this in which exit should i go and write the code?
Regards,
P.S.ChitraCCOWB001 Customer exit for modifying menu entries
COIB0001 Customer Exit for As-Built Assignment Tool
COZF0001 Change purchase req. for externally processed operation
COZF0002 Change purchase req. for externally procured component
PPCO0001 Application development: PP orders
PPCO0002 Check exit for setting delete mark / deletion indicator
PPCO0003 Check exit for order changes from sales order
PPCO0004 Sort and processing exit: Mass processing orders
PPCO0005 Storage location/backflushing when order is created
PPCO0006 Enhancement to specify defaults for fields in order header
PPCO0007 Exit when saving production order
PPCO0008 Enhancement in the adding and changing of components
PPCO0009 Enhancement in goods movements for prod. process order
PPCO0010 Enhancement in make-to-order production - Unit of measure
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0013 Change priorities of selection crit. for batch determinati
PPCO0015 Additional check for document links from BOMs
PPCO0016 Additional check for document links from master data
PPCO0017 Additional check for online processing of document links
PPCO0018 Check for changes to production order header
PPCO0019 Checks for changes to order operations
PPCO0021 Release Control for Automatic Batch Determination
PPCO0022 Determination of Production Memo
PPCO0023 Checks Changes to Order Components
STATTEXT Modification exit for formatting status text lines
hi check your field where it is present
if it header then check with the description header most probably the first must be your exit -
Alternate unit of measurement for quantity field in Report
Hi All,
I got a requirement like to populate alternate unit of measurement also in the report so how best i can do this when taking consideration of performance issues and all. I got few suggestions like to write a field routine in tranformations...
So guide me how best i can do this, if any code is required let me know the code also.
Eg. material...PP_Ingot has 2 units of measurement .....Ton & Each.
So i need to display Qty in both Tons and Each in the report.
Please suggest me .
Thanks
Srini.Hi Gregory,
Thanks for the immediate reply.I was busy in some other issue so this is delayed.
I hav a key fig YLOSMENGE (inspection lot qty) in Base unit of Mea and mapped to r3 with losmenge and baseunit of mea.
Next i hav created a new kf ZLOSMENGE with unit of mea so i want to know how to map this with r3 field and with which unit.
So kindly suggest me.
Regards
Srini. -
Sign for Quantity field in classical Report
Dear All,
As we know, in SAP, by default negative sign ('-') gets displayed after value. I want to display the negative sign before the value.
i.e. I want to display '1000-' as '-1000'.
I want this for classical report unsing WRITE statement.
Please suggest the syntax or formating option available or the way-out.
Thanks a lot in advance.
Best Regards,
PrasadHi,
here is the format option:
report ztest.
Data: number type p decimals 2.
number = -12.
Write number using edit mask 'V__.__'.
Impüortant is the "V" at the beginning.
hope it helps.
Regards,
SDCrack
Edited by: SD-Crack on Dec 29, 2009 2:45 PM -
Hi all.
we are phasing a problem.
I am using alv to display in output.
I am using a Quantiti field (BDMNG),.
in this field if nodata is there then it is showing 0.000(that is the default value).
I don't want those zeros.I want only space(blank only).
Can any body help me to solve this issue.
Thanks in advance
Eswar.Hai,
While building field catalog For quantity field Set the NO-ZERO attribute to 'X'.
Or you can change the quantity filed to character in the alv display.
Mark points if helpful.
Regards,
Umasankar -
How to change the Display Pattern for Decimal Fields dynamically
hi all,
Can any one help me how to change the display pattern for decimal fields dynamically???
Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
Please help me how to solve this ASAP.
Thanks,
PrabhuHi,
Alternatively you can handle it in the context.
In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
<quan field> NE initial.
So the field will not be printed if there is no value.
Regards,
Vidya Chowdhary A. -
Defining a new quantity field in SD
Hi,
I added a custom Z....... field to VBAP table . I want
this field to be assgined to a user-defined CO-PA quantity field
so as to be accumulated for some analysis. However, when I run KE4M
(assign SD qty fields-CO-PA Qty fields) transaction, I can not
see my user-defined SD field in the available SD quantity
fields.
Is that possible to make such an assignment? or is there any other way to carry a custom quantity field from SD to PA?
thanks in advance
ihsanhi mukund,
I have an append structure including some custom fields for characteristics and I can use them properly. and I added my custom quantity field of data type FLTP in this structure, however, it is not listed in ke4m. Do I need any other append structure for quantity fields. -
Quantity field to be shown on 1ST line only for purchase order items in ALV
Dear All,
I am fetching data from purchase order history table (EKBE) where PO line items contains multiple times. User does not want to view fields that are repeating multiple times in all lines, but in the top line. By sorting the same in ALV , I can do the same with character type fields, but how to do the same with quantity fields. One way out is converting the same into character fields. Is there any other way. Please give me some solution. Also while sorting , the number which gets repeated (i.e Items in PO for different PO's ) does not gets displayed. I want my program to display them.
Thanks,
Debopriyo MallickTry this
loop at ist_mseg into wa_mseg.
ON CHANGE OF wa_mseg-con.
move '111' to wa_mseg-con1.
modify ist_mseg from wa_mseg.
ENDON.
endloop.
loop at ist_mseg into wa_mseg.
if wa_mseg-con1 ne '111'.
move 0 to wa_mseg-menge.
move 0 to wa_mseg-netpr.
endif.
modify ist_mseg from wa_mseg.
endloop.
mseg-con is the concatenation of ebeln and ebelp values.
pk -
Incorrect results for calculation based on diff dimensions - 11.1.1.5
Hello All,
OBIEE gives incorrect results when i try to perform a calculation (for eg: addition) based on 2 measures. For eg:
(Note: "->" signifies 1:M)
Rpd (Physical model & BMM): dim_fe -> dim_gl-> Fact_Legder <- Dim_param
Fact_Ledger (agg measures) -> YTD_01, YTD_02...... YTD_12 ( here 01,02...12 represent month i.e. if "Feb" selected in prompt then we need to use YTD_02 and so on for other months)
Answers: Created a report with following columns
Column Name : Formula
=================
Line Item : 'Net Profit'
Prev Yr Act: (filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013}-1 and "Dim_Param"."PL_Line" in ( 'Item 1','Item 2','Item 3') and "Fact_Ledger"."Code"=100)/1000) /
(filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013}-1 and "Dim_FE"."Item" in ( 'L1','L2','L3') and "Fact_Ledger"."Code"=100)/1000)
Curr Yr Act: (filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_Param"."PL_Line" in ( 'Item 1','Item 2','Item 3') and "Fact_Ledger"."Code"=100)/1000) /
(filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_FE"."Item" in ( 'L1','L2','L3') and "Fact_Ledger"."Code"=100)/1000)
Curr Yr Plan: case when '@{pmonth}{Jan}='Jan' then
(filter("Fact Ledger"."YTD_01" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_Param"."PL_Line" in ( 'Item 1','Item 2','Item 3') and "Fact_Ledger"."Code"=200)/1000)/
(filter("Fact Ledger"."YTD_01" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_FE"."Item" in ( 'L1','L2','L3') and "Fact_Ledger"."Code"=200)/1000)
when '@{pmonth}{Jan}='Feb' then
(filter("Fact Ledger"."YTD_02" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_Param"."PL_Line" in ( 'Item 1','Item 2','Item 3') and "Fact_Ledger"."Code"=200)/1000)/
(filter("Fact Ledger"."YTD_02" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_FE"."Item" in ( 'L1','L2','L3') and "Fact_Ledger"."Code"=200)/1000)
when '@{pmonth}{Jan}='Dec' then
(filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_Param"."PL_Line" in ( 'Item 1','Item 2','Item 3') and "Fact_Ledger"."Code"=200)/1000)/
(filter("Fact Ledger"."YTD_12" using "Fact_Ledger"."YEAR"=@{pYear}{2013} and "Dim_FE"."Item" in ( 'L1','L2','L3') and "Fact_Ledger"."Code"=200)/1000)
endthe results are incorrect. Any help appreciated.
Qry generated is like
(select...
case when year=.. and pl_lin=... and code=100 then ytd_01,
case when year=.. and pl_lin=... and code=100 then ytd_03,
case when year=.. and pl_lin=... and code=100 then ytd_04,....,
case when year=.. and pl_lin=... and code=200 then ytd_01,
case when year=.. and pl_lin=... and code=200 then ytd_03,
case when year=.. and pl_lin=... and code=200 then ytd_04,....,
from...
where ... year in (2013-1,2013) and pl_line('Item1,'Item2','Item3') or fe.item('l1','l2','l3') and code in (100,200)... ) D1
(select
case when 'Apr'='Jan' thne d1.c1 when 'Apr'='Feb' then d1.c2......
from D1
Regards..
ShrutiSee if this explains it better for my crosstab with page items of Vendor Number 1234.
Vendor 1234
Dc Nbr 1 2 4 AAAA
Sum Invoice Amt 1387.04 300.82 327.29 2015.15
Sum Cost 44.86 57.43 25.54 127.83
Sum Advanced Cost 102.44 0 0 102.44
Sum Consolidation Cost 30.37 0 0 30.37
Sum Allowance Amt 27.74 6.02 6.54 40.30
Net Freight Cost 149.93 51.41 19 220.34
Freight Percent 10.81 17.09 5.81 ****
As stated before, Frieght Percent is a calculation I created in Discoverer that looks like this :
( NVL(Sum Cost,0)+NVL(Sum Advanced Cost,0)+NVL(Sum Consolidation Cost,0)-NVL(Sum Allowance Amt,0) )/NVL(Sum Invoice Amt,0)*100
Column AAAA was created in Discoverer using Sum of field and show to the right.
What I need is for the **** to be the correct calculation for the totals in column AAAA. If I use do a total for Freight Percent using the Cell Sum I get 33.70., what I want is it to be 10.93, which is (127.83 + 102.44 + 30.37 - 40.30)/2015.15*100.
If I use an Average Total row for Freight Percent, I get 11.24 which is 33.70 / 3 (the 3 would be the # of dc nbr's)
I did start with using the detail level data to create this crosstab. Then I made a new version and used the SUM data. I seem to get the same results but am still having issues with the one **** value.
Hopefully this explains it better.
Thanks for the ideas so far. -
BAPI for PURCHASE ORDER with OPEN QUANTITY field
Hi All,
I wanted to use the BAPI_PO_GETDETAIL to get the Purchase Order details upon triggering from Warehouse management system,
But the details required contains a field called OPEN QUANTITY...which is not used in this BAPI.
I request to let me know if any BAPI exits for PO details having the structure for this field:Open Quantity.
Am using SAP version 4.0B.
If not exists please advise how to customize the existing BAPI to meet the requirement.
thanks
mahiHi,
Open quantity is a calculated field. I guess the BAPI gives the details of the delivery, so take the ordered qty and substract the delivered qty from that.
Delivery data is EKET table.
Regards,
Ravi -
Urgent : Problem with Editable ALV Grid for Quantity and Currency Fields
Hi All,
I am using Editable ALV Grid display and have quantity and value as editable fields in the display.
When user changes these values these values are not changing properly .
For the quantity field the domain is MENG13 with 3 deciamal places and here if we enter 500 it takes it as 0.500 .
The same problem is for the currency field. Here the Domain is WERT7 with 3 decimal places.
Here also it takes last 2 digits after decimal places by default.
Please advice how to get proper values in this case from ALV editable fields.
Thanks and Regards
Harshad
Edited by: Harshad Rahirkar on Dec 25, 2007 7:39 AMfor all the currency field , it will display like that only.
u have to manipulate uin program before displaying.
if they are giving 500, in program multiply with 100 and move it to table.
when u are getting from table, divinde and display.
this is what I am doing.
Reward if helpfull. -
Quantity field not getting update in PCA document for Goods Receipt
We have the Purchase Account activated for our company code.
For movement type 101 (Goods Receipt), I am getting the quantity field updated for GR/IR account and Stock Account (B/S item).
But the quantity field is not getting updated for the "Purchase Account" and the "other offsetting PL A/C).
Please advice whether I am missing something.
Regards
B.MohantyHi Aravind,
Check SAP notes 1063198 and 1117587.
FAGLL03 display quantity which is updated in FAGLFLEXA, BSEG is not
relevant in this case. This is clearly explained in the note 1063198.
The quantity posts through to FI on the 'goods receipt' items, but not on the
'invoice receipt' items.
In the FI normally the Quantity is not a 'real' important field, as it
is more related to the MM area.
But in the old 'Profit Center Accounting' and the old' Special Ledger'
the field has been important.
As the same logic of these areas to 'store' the Quantity is also used
in the NewG/L the field get only filled in the line, where it make
'sense' from our point of view, because only in the 'goods receipt'
lines a 'real' Quantity is posted to the system.
So as before in the PCA and SL, now also in the NewG/L the Quantity is
filled in the correct and important lines and postings.
In the BSEG ('old document segment table') the field is filled 'just'
as it is send to the FI, but this is not completely correct from the
business point of view.
This can also lead to issues with the reporting and summation to this
field. So with creating the new logic in the NewG/L the 'correct'
standard of the 'writing' for the Quantity has also been taken over.
So in the end, the update and display is correct according SAP standard behavior.
Actually,Quantities within G/L are never reliable,
because the purpose of FI is a view on the data according to amount
but not according to quantity.
In the FI normally the Quantity is not a 'real' important field, as it
is more related to the MM area.
I hope I could be of assistance.
Regards,
Fernando
Maybe you are looking for
-
Standard Radio Button Tabs missing in Material Master
Dear Experets, We have Upgraded from 4.5 to Ecc 6.0. We are finding an issue in Material Master. When we create a material with the required selected Views and maintaing the datas like Basic Data and other Views, we usually have standard Radio button
-
What does stopped (err = -50) mean?
After I downloaded a season for a TV show, there were some delays because my "start up disk was full." When I deleted some things, a few of episodes downloaded with some errors and I got on that said "stopped (err = -50). I have no idea what that mea
-
Error start SOA Suite(J2EE Server)
Usually J2EE Server successfully start and works. But sometimes server cannot start, and shows a following error: ================================================== ias-component: default_group process-type: home process-set: default_group Error Mess
-
Checking Repair History on Used MacBook Pro
I'm thinking of buying a used MacBook Pro off of someone. I believe there is a link where you can check the units repair history via its serial number? Does anyone know where that link is on the Apple Website? Thanks JB
-
Using Install DVDs for an iBook on a PowerBook
I recently purchased a 12" powerbook g4 1.5 GHz and I wanted to do a fresh install of the OS. However, the powerbook did not come with installation software. I have the installation discs from my iBook G4 (OSX - Tiger), though. Will these work for th