!Important! Custom InfoObject - Unit Of Measure

Hi Experts,
i have a quite complex requirement.
we have an infoobject that has Unit Of measure or in other words something like product group.
the problem is that when we do reporting. the key figures are cumulated per UOM "PC".
we want a to cummulate the keyfigures per "UOM" = custom infoobject. this infopackage has values like "System" "Pieces" and so on.
any Good ideas how to do this?
thank you.
regards,
Younes

OK i'll try.
so we have an infoobject called item, this has an attribute called unit
i.e.
item      unit             key fig. QUAN
12029   System         192
12313   TCM              288
12238   BUM              28
12257   BUM              123
how can i make a query to see for example a resutl with a unit
BUM.
the query is displaying every item each and the result for
12238 BUM 28
12257 BUM 123
i would like to see a result like this
      BUM  151
12238 BUM 28
12257 BUM 123
i hope i could give you an overview of the problem.
thanks
Younes

Similar Messages

  • Customer dependent unit of measure

    Folks,
    We have items which have alternative UOM: PCE and PAK. We have set the sales UOM in material master on PAK's, which results in default PAK in the sales order. However, some customers always order in PCE and in that case, the default PAK should not be proposed but a PCE.
    Any suggestions?
    MZ

    Hi
    You can use Function Module - /DSD/SL_FSR_UNIT_CONVERSION or /sapxcqm/get_uom to convert from or to Alternate or Base unit of Measure.
    Best Regards

  • Error R7 245 while importing custom infoobject

    BW Gurus,
    We are tring to transport infoobjects from DEV to Q environment. Transport fails with return code 12. It cancels job RDDEXECL with error R7245 "InfoObject ZHRLOCAT is not available in version A" and object ramins inactive in Q. Infoobject is active in DEV. My transport contains around 250 infoobjects. Though job log shows error for only one. There are lot in Q with status inactive.
    I searched OSS note. No success.
    P.N: We recently upgraded support pack for below mentioned component from 14 to 17.
    SAP_ABA   640       0017 SAPKA64017
    SAP_BASIS 640       0017 SAPKB64017
    Any help appreciated.
    Thanks,
    Milind

    hi Milind,
    how did you collect the objects ?
    250 objects in one go are too much i think,
    if any dependencies, error will occured,
    try to re transport will less infoobjects,
    you can use infocube e.g to collect 'only necessary objects', one by one infocube.
    take a look transport tips
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3010ba90-0201-0010-2896-e58547c6757e
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e883de94-0501-0010-7d95-de5ffa503a86
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/57/38e1824eb711d182bf0000e829fbfe/frameset.htm
    hope this helps.

  • Decimal places for unit of measure

    Dear All ,
    If i change the Decimal Places for rounding in Customizing for Unit of measure ( CUNI tcode) for KG as 6 from 3 whether it will calculate with the 6 decimal places like 0.004756 ( earlier with 3 decimal places it will calculate any multiplication with 0.004 now i want the same with 0.004756 Kg )
    whether it will work ?
    and where it will impact

    Hi
    No it will not work like that. And it depend on the transaction where you enter that. In case of Purchase order quntity field it will be always with 2 decimal places because field MENGE has 2 decimal places only. If your system is already live then it is not advisible to do such changes.
    Regards
    Antony

  • Supplement Units of Measurement and Units of Measure

    Hi All,
    The company i work for, the WM system fabrics are stored in the Roll based form and in the QM module i have to create inspection lot for it. I found in the customizing "Supplement Units of Measurement and Units of Measure" which i think will help me in my process. Please explain the procedure for the "Supplement Units of Measurement and Units of Measure" in customizing.
    Regards,
    DTD

    http://help.sap.com/erp2005_ehp_04/helpdata/EN/c6/f83bb94afa11d182b90000e829fbfe/frameset.htm

  • Units of measure in taxonomy

    Hello -
    I would like to know if it is possible to delete custom created units of measure.
    If so, is there a particular process to follow?
    Thanks

    Hello,
    In this case, you need to make sure those attribute values you want to delete are not used by any record in the main table.
    You can do that using a search in record mode. You select the category, attribute and values that you would like to delete. If you have any record using that value, you need first to change the value, to something else. Once you don't have any record using the value you can proceed to delete it in Taxonomy mode at the Attribute Details section.
    I hope this helps,
    Alejandra

  • Import of Unit Of Measures XML into Sourcing fails

    Hi All ,
    I am checking imports of Master Data from ERP in Sourcing 7.0 for Integration Scenario with single records, but I am failing in import for Unit of Measures.XML file , It throws error saying "This field is required and must have a valid value. [DISPLAY_NAME]."
    The Standard XML which was generated didn't had <DISPLAY_NAME>field , so I have included it to check and upload , but the error persists.
    Note:This XML was generated with BBP_ES_CUSTOMIZINGDATA_EXTRACT report from ERP
    <?xml version="1.0" encoding="utf-8"?><sapesourcing defaultlanguage="" xsi:noNamespaceSchemaLocation="UnitsOfMeasure.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><objects><object classname="masterdata.UnitsOfMeasure"><fields><NAME><values><value language="EN">Percentage_test</value></values></NAME><INACTIVE>FALSE</INACTIVE><CATEGORY>Power</CATEGORY><DISPLAY_NAME>MPH</DISPLAY_NAME><DESCRIPTION><values><value language="EN">Percentage_test</value></values></DESCRIPTION><ISO_CODE>MPH</ISO_CODE><DEFAULT_FOR_ISO>FALSE</DEFAULT_FOR_ISO><CONVERSION>0.0100 </CONVERSION><CONVERSION_SCALE>0</CONVERSION_SCALE><UNIT_PLUGIN></UNIT_PLUGIN><SYNONYMS>0 </SYNONYMS><PRECISION>0 </PRECISION><SCALE>0 </SCALE><PRIMARY_UNIT></PRIMARY_UNIT></fields><collections/></object></objects></sapesourcing>                             
    Any pointers on why this XML is failing would be great.
    Regards,
    Uday

    Hi Uday,
    There shouldnu2019t be a need to make any updates to the output xml created by BBP_ES_CUSTOMIZINGDATA_EXTRACT. I would raise a message with SAP.
    Regards,
    Vikram

  • US Unit of Measure (UOM) conversion to British UOM for a specific customer

    Hi SAP Guru’s,
    How can I convert the US Unit of Measure (UOM) for materials to British UOM for a specific customer? I want to keep the US UOM for all the other customers.
    Thanks,
    Best regards,
    Ketan

    Hi
    It should be available check for the field in customer info record for UOM & key in for requried UOM.
    If you get in touch with SD person they will help you to resolve this issue.
    Regards

  • Reporting data in alternate unit of measure

    hi
    I was going through the document " How to report data in alternate unit of meaure" .
    There they have talked about modification in program LRRSVF20.
    Can anyone tell me what does this include "LRRSVF20" does?
    Regards,
    Moniika

    Hi,
    Please tell me when i create a program "YBW_AUNIT_ENHANCEMENT" UNDER se38 and type: include...
    what code i should write under this program?
    i am pasting the program LRRSVF20 AND please tell me what should i write in program ""YBW_AUNIT_ENHANCEMENT"?
    ***INCLUDE LRRSVF20 .
    *& Form varchavl_atr_get
    form varchavl_atr_get using i_t_sid type rrsi_t_sid
    i_chanm type rsd_iobjnm
    i_th_var_atr type rro01_th_var_lrech
    i_srdate type sy-datum
    i_mostrecent type rsr_mostrecent
    changing c_th_varchavl type rrsv_th_varchavl.
    call method l_r_reader->sid_read_master
    exporting
    i_readatr = rsdm_c_readatr-specified
    i_t_req_atr = l_t_req_atr
    i_date = i_srdate
    i_mostrecent = i_mostrecent
    importing
    e_tx_atr = l_tx_atr
    changing
    c_t_chavlinfo = l_t_chavlinfo
    exceptions
    others = 1.
    if sy-subrc <> 0.
    raise inherited_error.
    endif.
    *{ INSERT
    Enhancement Alternate U.o.M.
    INCLUDE ybw_aunit_enhancement.
    *} INSERT
    PERFORM varchavl_atr_fill USING i_th_var_atr
    l_tx_atr
    CHANGING c_th_varchavl.
    endform. " varchavl_atr_get
    ***INCLUDE YBW_AUNIT_ENHANCEMENT.
    TYPE-POOLS: rrs0.
    DATA:
    l_vnam LIKE rszglobv-vnam,
    l_s_cob_pro TYPE rsd_s_cob_pro,
    l_s_rkb1d TYPE rsr_s_rkb1d,
    l_periv TYPE rro01_s_rkb1f-periv,
    l_t_var_range TYPE rrs0_t_var_range,
    l_s_var_range TYPE rrs0_s_var_range,
    l_t_range TYPE rsr_t_rangesid,
    l_s_range TYPE rsr_s_rangesid,
    l_unit LIKE rszglobv-meeht,
    l_currency LIKE rszglobv-waers.
    FIELD-SYMBOLS:
    <l_sx_atr> TYPE rsdm_sx_atr,
    <l_s_var> TYPE rro01_s_var_lrech,
    <l_s_atr> TYPE rsdm_s_atr,
    <l_s_atr_cu> TYPE rsdm_s_atr.
    Loop over all characteristic values
    LOOP AT l_tx_atr ASSIGNING <l_sx_atr>.
    Loop over all variables to be replaced by attributes
    LOOP AT i_th_var_atr ASSIGNING <l_s_var>.
    Fill additional information into pseudo variables
    REFRESH l_t_var_range.
    InfoObject (i.e. characteristic)
    CLEAR l_s_var_range.
    l_s_var_range-sign = 'I'.
    l_s_var_range-opt = 'EQ'.
    l_s_var_range-vnam = '1CHANM'.
    l_s_var_range-iobjnm = i_chanm.
    l_s_var_range-low = <l_sx_atr>-chavl.
    APPEND l_s_var_range TO l_t_var_range.
    Attribute
    READ TABLE <l_sx_atr>-t_atr ASSIGNING <l_s_atr>
    WITH KEY attrinm = <l_s_var>-attrinm.
    IF sy-subrc <> 0.
    RAISE x_message.
    ENDIF.
    CLEAR l_s_var_range.
    l_s_var_range-sign = 'I'.
    l_s_var_range-opt = 'EQ'.
    l_s_var_range-vnam = '1ATTRINM'.
    l_s_var_range-iobjnm = <l_s_atr>-attrinm.
    l_s_var_range-low = <l_s_atr>-attrivl.
    APPEND l_s_var_range TO l_t_var_range.
    Unit of measure (only for amounts and quantities)
    IF ( <l_s_var>-mwkz = 'M' OR <l_s_var>-mwkz = 'Q' ) AND
    ( <l_s_var>-fixcudim IS INITIAL ).
    CLEAR l_s_var_range.
    l_s_var_range-sign = 'I'.
    l_s_var_range-opt = 'EQ'.
    l_s_var_range-vnam = '1CUNM'.
    READ TABLE <l_sx_atr>-t_atr ASSIGNING <l_s_atr_cu>
    WITH KEY attrinm = <l_s_var>-cunm.
    IF sy-subrc = 0.
    l_s_var_range-iobjnm = <l_s_atr_cu>-attrinm.
    l_s_var_range-low = <l_s_atr_cu>-attrivl.
    APPEND l_s_var_range TO l_t_var_range.
    ENDIF.
    ENDIF.
    Key date of query
    CLEAR l_s_var_range.
    l_s_var_range-sign = 'I'.
    l_s_var_range-opt = 'EQ'.
    l_s_var_range-vnam = '1DATE'.
    l_s_var_range-iobjnm = '0DATE'.
    l_s_var_range-low = i_srdate.
    APPEND l_s_var_range TO l_t_var_range.
    InfoObject properties
    CALL FUNCTION 'RSD_COB_PRO_GET_ALWAYS'
    EXPORTING
    i_iobjnm = i_chanm
    IMPORTING
    e_s_cob_pro = l_s_cob_pro
    EXCEPTIONS
    infocube_not_found = 1
    error_reading_infocatalog = 2
    iobjnm_not_found = 3
    illegal_input = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    l_vnam = <l_s_atr>-attrinm.
    Call variable exit to get virtual attribute
    CALL FUNCTION 'EXIT_SAPLRRS0_001'
    EXPORTING
    i_vnam = l_vnam
    i_vartyp = rrkg_c_vartyp-formula
    i_iobjnm = i_chanm
    i_s_cob_pro = l_s_cob_pro
    i_s_rkb1d = l_s_rkb1d
    i_periv = l_periv
    i_t_var_range = l_t_var_range
    IMPORTING
    e_t_range = l_t_range
    e_meeht = l_unit
    e_waers = l_currency
    EXCEPTIONS
    OTHERS = 1.
    IF sy-subrc = 0.
    READ TABLE l_t_range INTO l_s_range INDEX 1.
    IF sy-subrc = 0.
    Attribute value
    <l_s_atr>-attrivl = l_s_range-low.
    Attribute unit of measure (only for amounts and quantities)
    IF <l_s_var>-mwkz = 'M' AND <l_s_var>-fixcudim IS INITIAL.
    <l_s_atr_cu>-attrivl = l_unit.
    ELSEIF <l_s_var>-mwkz = 'W' AND <l_s_var>-fixcudim IS INITIAL.
    <l_s_atr_cu>-attrivl = l_currency.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDLOOP. " variables for attributes
    ENDLOOP. " characteristic values
    Thanks,
    Vijaya.

  • Alternate units of measure

    Hi,
    In order to implement the Alternate units of measure -
    I need to implement user exit and activate enhancement RSR0001. In the description below is listed what to implement of includes. In the function group XRSR - I have added the code to the includes ZXRSRTOP and ZXRSRU01. These are both a part of the group. But the last one ZXRSRF01 is not in the include folder. I tried to create an include by right click on the include folder and choose create - I named it ZXRSRF01 and copied the code into it. But it is still not to be found in the XRSR function group and when I check the program the get_form call raises and error in the code of the include ZXRSRU01. How to get the include in the function group or is there another solution?
    From SAP - How to...report data in alternate units of measure.
    3.7 User Exit for Variables
    Implement user exit for variables and activate enhancement RSR00001.
    ***INCLUDE ZXRSRTOP.
    Enhancement: Alternate U.o.M.
    DATA: g_aunit TYPE /bi0/oimat_unit.
    ***INCLUDE ZXRSRU01.
    Enhancement: Alternate U.o.M.
    DATA:
    l_s_range TYPE rsr_s_rangesid,
    l_s_var TYPE rrs0_s_var_range.
    l_dummy(72) TYPE c. "delete
    DATA:
    l_factor TYPE f,
    l_factor1 TYPE f,
    l_factor2 TYPE f,
    l_msgv1 LIKE sy-msgv1, "insert
    l_msgv2 LIKE sy-msgv2, "insert
    l_msgv3 LIKE sy-msgv3, "insert
    l_material LIKE /bi0/pmaterial-material,
    l_base_uom LIKE /bi0/pmaterial-base_uom.
    Called after user input
    IF i_step = 3.
    Get variable for alternative unit entered by user
    Validate entry and store as global variable
    READ TABLE i_t_var_range WITH KEY vnam = 'YTAUNIT' INTO l_s_var.
    IF sy-subrc = 0.
    TRANSLATE l_s_var-low TO UPPER CASE. "#EC TRANSLANG
    CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
    EXPORTING
    input = l_s_var-low
    language = sy-langu
    IMPORTING
    output = g_aunit
    EXCEPTIONS
    unit_not_found = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    Error: Please enter a valid unit of measure
    l_msgv1 = 'Unknown unit of measure:'.
    l_msgv2 = l_s_var-low. "insert
    l_msgv3 = '. Please enter a valid unit of measure.'.
    CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
    EXPORTING
    i_class = 'R9'
    i_type = 'E'
    i_number = '000'
    i_msgv1 = l_msgv1
    i_msgv2 = l_msgv2 "change
    i_msgv3 = l_msgv3
    EXCEPTIONS
    dummy = 0
    OTHERS = 0.
    CALL FUNCTION 'RRMS_MESSAGES_SHOW'.
    CALL FUNCTION 'RRMS_MESSAGES_DELETE'.
    sy-subrc = 4.
    RAISE again. "#EC *
    ENDIF.
    ENDIF.
    ENDIF.
    Called from "Get Attribute" Function (Modification)
    I_VNAM Attribute (not the name of the formula variable)
    I_IOBJNM InfoObject
    I_T_VAR_RANGE Contains characteristic value, attribute value,
    unit of measure, query key date
    IF i_step = 0 AND i_vnam = 'YUOMCNVF' AND i_iobjnm = '0MATERIAL'.
    read material and base uom from variables
    LOOP AT i_t_var_range INTO l_s_var.
    CASE l_s_var-iobjnm.
    WHEN '0MATERIAL'. l_material = l_s_var-low.
    WHEN '0BASE_UOM'. l_base_uom = l_s_var-low.
    ENDCASE.
    ENDLOOP.
    get factor for base UoM
    PERFORM get_factor USING l_material l_base_uom l_factor1.
    get factor for alternate UoM
    PERFORM get_factor USING l_material g_aunit l_factor2.
    return conversion factor for variable
    IF l_factor2 <> '0.0'.
    l_factor = l_factor1 / l_factor2.
    e_meeht = g_aunit. "insert
    ELSE.
    When the UoM conversion is not maintained, instead of showing 0, the
    base UoM with a factor of 1 is used. Therefore, the user sees MIXED
    VALUES in the total line and knows right away that there is something
    wrong. That way it’s easier to track inexistent conversion factors.
    l_factor = 0. "delete
    l_factor = 1. "insert
    e_meeht = l_base_uom. "insert
    ENDIF.
    CLEAR l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    l_s_range-low = l_factor.
    APPEND l_s_range TO e_t_range.
    e_meeht = g_aunit. "delete
    ENDIF.
    ***INCLUDE ZXRSRF01.
    *& Form get_factor
    Get conversion factor from /bi0/pmat_unit
    FORM get_factor USING i_material TYPE /bi0/oimaterial
    i_mat_unit TYPE /bi0/oimat_unit
    e_factor.
    TYPES:
    BEGIN OF ys_mat_unit,
    material TYPE /bi0/oimaterial,
    mat_unit TYPE /bi0/oimat_unit,
    numerator TYPE /bi0/oinumerator,
    denomintr TYPE /bi0/oidenomintr,
    END OF ys_mat_unit.
    DATA:
    l_s_mat_unit TYPE ys_mat_unit.
    STATICS:
    s_t_mat_unit TYPE SORTED TABLE OF ys_mat_unit
    WITH UNIQUE DEFAULT KEY.
    CLEAR: l_s_mat_unit, e_factor.
    READ TABLE s_t_mat_unit INTO l_s_mat_unit WITH KEY
    material = i_material
    mat_unit = i_mat_unit.
    IF sy-subrc <> 0.
    SELECT SINGLE * FROM /bi0/pmat_unit
    INTO CORRESPONDING FIELDS OF l_s_mat_unit
    WHERE material = i_material
    AND mat_unit = i_mat_unit
    AND objvers = 'A'.
    IF sy-subrc = 0.
    INSERT l_s_mat_unit INTO TABLE s_t_mat_unit.
    ENDIF.
    ENDIF.
    IF l_s_mat_unit-denomintr <> 0.
    e_factor = l_s_mat_unit-numerator / l_s_mat_unit-denomintr.
    ENDIF.
    ENDFORM. " get_factor
    Hope someone can help.
    Thanks

    Hi Karin,
    I am also facing the same problem for alternate units of measure...i tried to access the path
    websmp201.sap-ag.de/~sapdownload/011000358700000488512003E/Howto_alternate_uom5.pdf
    but it is not found...can u please give me this document if u have it with you.?
    Thanks,
    Vijaya

  • How to Report on Alternate Unit of Measure

    Hi All,
        We recently implemented SAP for our Canadian operations. The Canadians want to see all our custom and standard reports in Alternate units of measure ( KG's & Ltr's ) but our reports only display in Lbs & Gal's. We were able to change our custom reports but is there any setting that SAP provides for the standard reports/transactions to display Alt UoM. We don't want to rush in and start changing standard reports. I'm sure, lot of you faced this situation before.
    Regards,
    Srini

    hi,
    use the FM UNIT_CONERSION_SIMPLE
    hope this helps
    check this code
    unit_in = itab-meins
    unit_out = 'GLL'.
        CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
             EXPORTING
                  input                = itab-meins
              NO_TYPE_CHECK        = 'X'
              round_sign           = ' '
                  unit_in              = unit_in
                  unit_out             = unit_out
             IMPORTING
              ADD_CONST            =
              DECIMALS             =
              DENOMINATOR          =
              NUMERATOR            =
                  output               = factor
             EXCEPTIONS
                  conversion_not_found = 1
                  division_by_zero     = 2
                  input_invalid        = 3
                  output_invalid       = 4
                  overflow             = 5
                  type_invalid         = 6
                  units_missing        = 7
                  unit_in_not_found    = 8
                  unit_out_not_found   = 9
                  OTHERS               = 10.
        IF sy-subrc <> 0.
          e_error = 1.
          EXIT.
        ENDIF.
    Message was edited by: srinu k

  • Report for Units of measurement for Material

    Hi
    Is there any report to extract the alterante unit of measurements for materials in a plant.
    Thanks

    Hi,
    Please use the below table,
    Related to Materials:
    MARA - Material Master: General data
    MAKT - Material Master: Description
    *MARM - Material Master: Unit of Measure*
    MAPE - Material master: Export control file 
    MARC - Material master: Plant data
    MARD - Material master: Storage location 
    MAST - Material link to BOM
    MBEW - Material valuation
    MLGN u2013 Material Master: WM Inventory
    MLGT u2013 Material Master: WM Inventory type
    MDIP - Material: MRP profiles (field contents) 
    MKOP - Consignment price segment (old versions of SAP)
    EBEW - Valuation of sales order stock
    QBEW - Valuation of project stock
    MVER u2013 Material Master: Consumption <Plant>
    DVER u2013 Material Master: Consumption <MRP Area>
    MVKE u2013 Material Master: Sales <Sales Org, Distr Ch>
    MLAN - Material Master: Tax indicator
    MARC - Material Master: Plant data
    MAPR u2013 Material Master: Forecast
    MARD u2013 Material Master: Storage Location
    MCH1 u2013 Material Master: X Plant Batches
    MCHA u2013 Material Master: Batches
    MCHB u2013 Material Master: Batch Stock
    MDMA - MRP Area data
    DBVM - MRP Planning File Entry: MRP Area
    MOFF - Outstanding Material Master Records (Maintenance status)
    MARCH - Material Master C Segment: History
    MARDH - Material Master Storage Location Segment: History
    MBEWH - Material Valuation: History
    MCHBH - Batch Stocks: History
    MKOLH - Special Stocks from Vendor: History
    MSCAH - Sales Order Stock at Vendor: History
    MSKAH - Sales Order Stock: History
    MSKUH - Special Stocks at Customer: History
    MSLBH - Special Stocks at Vendor: History
    MSPRH - Project Stock: History
    MSSAH - Total Sales Order Stocks: History
    MSSQH - Total Project Stocks: History
    Regards,
    Mohd Ali.

  • Sub:Stock report with sales unit of measurement - reg.,

    Hi guru's
    we have a requirement to have the stock report with sales unit of measure instead of base unit of measure can anybody guide me how to do this.
    thanks in advance
    tulja singh.

    From std. , I think your requirement can not satisfied.
    Make customized report.
    Take the help of ABAPER.

  • AffineTransform - Is there a way to glean units of measurement for pixels?

    Assuming I get a pointer to a java.awt.geom.AffineTransform from:
    java.awt.geom.AffineTransform CurTransform = ((java.awt.Graphics2D)this.getMainFrame().getGraphics()).getDeviceConfiguration().getDefaultTransform();
    Assuming I've gotten the right AffineTransform... How do I get, or can I get, the scaling factor between horizontal pixels and vertical pixels for the current screen (or whatever device). In other words I want to place components... buttons, textboxes, etc. in a dialog box so that they are "square". i.e. 10 units in x look on the screen equal to 10 units in y.
    Once I know what the "square pixel scale factor" is I can then worry about making the units relative to whatever font size.
    This question is usually posed as "How do I get dialog units?". I haven't done that because of the "legacy problems" associated with what most people think dialog units come from. It is true that way back when dialog units were derived from a textmetrics ONLY, but unless I'm mistaken, Charles Petzold, was describing something that could only be gotten that way at that time (circa 1990).... The width of the fixed system font by the height of the fixed system font ended up being as close to a unit that was 8 units high looked like 8 units wide in the screen. The object of the exercise is to most importantly get units of measurement that translate to pixels and look "square" on the screen. Secondarily, but not unimportant, is to be a unit that has some relevance to the current font size. It's been a long time dialog units in windows maybe a 2:1 ratio. I made my own cDialogUnits so long ago I can't remember what the "standard windows" dialog unit is. In windows I can very easily get the screen dpi x and y, I think it's a devicecontext but Java's "devicecontext" only gives one dimension of the dpi?
    Also this query is mute if I was "painting" on a device. The units are for pixels NOT points and are (mostly) for placing controls on the screen. I am aware of and have used the various addPreferredGap and setAutoCreateContainerGaps available in a GroupLayout... Great gizmos but, still dialog units would be very handy for setting the prefered width of a textbox/label with too much text. (Note: dialog units are NOT for calculating the height of text... )
    I did search the sun forums for an answer first... It might be here I just didn't find it. It seems to be a question either avoided like the plague or considered a dumb question in Java.

    This might be OK?
    BE AWARE!! This is NOT a painting gizmo. It is used in conjunction with the Layout gizmos. It drives me crazy that the Layout gizmos have "default" gaps and spacers of some kind and yet ALL the tutorials immediately and unabashedly trash any "device independence" by mixing in pixel measurements... Not to mention I don't like the size of the gaps and spacing provided with the Layout gizmos anyway.
    Does anyone know if this will fail? I am aware of the caveats provided... "Information about the device is only as good as has been provided." However if there is bad information in the device info I doubt using these units will do anything much different that the end user experiences with the errant device anyway.
    AGAIN... This is NOT a painting gizmo. It's a helper when Laying out controls usually in conjunction with a Layout and only for spaces and gaps.
    public class DialogUnits
        private double m_x;
        private double m_y;
        public DialogUnits( java.awt.Graphics2D g2 )
            java.awt.GraphicsConfiguration gc = g2.getDeviceConfiguration();
            java.awt.geom.AffineTransform at = gc.getDefaultTransform();
            at.concatenate( gc.getNormalizingTransform() );
            double fs = g2.getFont().getSize2D();
            m_x = at.getScaleX() * fs;
            m_y = at.getScaleY() * fs;
        public int CalcX( double units )
            return (int)Math.round( ( units * m_x ) / 8.0 );
        public int CalcY( double units )
            return (int)Math.round( ( units * m_y ) / 8.0 );
        public int ContainerGapX()
            return this.CalcX( 8.0 );
        public int ContainerGapY()
            return this.CalcY( 8.0 );
        public int FontSize2dX( int crude_columns )
            return (int)Math.round( crude_columns * m_x );
        public int FontSize2dY( int crude_rows )
            return (int)Math.round( crude_line_height * m_y );
        public int X( int units )
            return this.CalcX( units );
        public int Y( int units )
            return this.CalcY( units );
        } // end of class DialogUnits

  • Unit of measure in condition table

    Hi,
    I'm creating a new condition type and it should be maintained in MEK1/2/3.
    The new condition type is copied from RUC1.
    According to the business requirement, I have set REST as the access sequence to the new condition type.
    Requirement;
    1. The condition record should be determined by vendor
    2. The validity period will not in use (i.e. 1900/01/01-9999/12/31)
    3. The unit of measure of the material to be purchased can be either PCE or PR
    Issue;
    It seems I can create a condition record per one vendor per only one UoM.
    I have create a condition record for PCE, and set a scale 1PR = 1PCE for that condition record.
    However, when I've tried to create a PO, I've got a quantity conversion error.
    Does any one know  how I can configure the 2 UoM for one vendor?
    Restriction;
    The material master is shared with other companies.
    Therefore, we cannot maintain material master for this local requirement.
    It has to be managed only by configuration.
    Your help would be much appreciated.
    Best Regards,
    Mari

    Test once by using your own custom condition table.
    Create a condition table for the fieldCatlg Vendor, Material, Oder Unit etc (as per your requirement)
    Then rest of all as per your settings. Then you can maintain the condition record as per order unit.
    For more about create condition table refer to the blog Pricing procedure Steps and Details in SAP MM

Maybe you are looking for

  • HP PSC 1410 All in One

    My HP Solution Center for this device, with no warning, failed to operate. I can click on the desktop icon or in "All Programs" and get no response. However the HP Photosmart Essential 3.5 , inttaslled at the same time, opens as usual. I can still pr

  • Canon Powershot TX1 clips to .Mac via iWeb??

    Does anyone have experience with this camera? I am considering it as a smaller alternative (extra camera) to take when I travel light vs my HDR-HC1 HDV camcorder. Any feedback is appreciated - this would primarily be for my wife. The main thing I am

  • Create User and Add to Group in a single call using ActiveADAPTER

    Hi Folks, I can successfully create a user in a specific OU and I can subsequently add the user to a Group within another OU using two sequential calls with ActiveADAPTER's one-way send functionality.  Has anyone successfully done this in a single ca

  • Payroll infotypes disappearing after a client copy

    Hi everyone, Our project team has done a client copy to two new clients (configuration and master data), and then decommissioned the source client. However, for some reason a number of infotypes do not appear against employee records in PA30. The inf

  • [LR 4.1] Graduated filter bug

    Hi, I have an image horizontally divided in two parts : 2/3 (sky) and 1/3 (ground). I have created 2 graduated filters, each fully and exactly covering one part of the image. I created the biggest one (2/3) first. The two graduated filters do not ove