Valuation class in MB51

hi gurus can any one please suggest me the sample code to add valuation class in the selection screen of standarD tcode MB51
Moderator message: duplicate post locked.
Edited by: Thomas Zloch on Aug 24, 2011 9:27 AM

Hi
I don't know enhancements or BADI's for this. You have two options:
1. Do a custom report using RM07DOCS as a template.
2. Train to your endusers in the use of help search for materials. If you don't have a search help for some field. You can create it. See Note 78093 - Display of alternative material identifiers to know how to do it.
I hope this helps you
Regards
Eduardo

Similar Messages

  • Valuation Class - Movement Type - Account

    Hi,
    I´m not yet that experienced in SAP but I´ll try to explain as good as I can.
    Is there any easy way to display all accounts that are used within a specific valuation class?
    The specific accounts per valuation class I have found using se16 in table t030.
    But this table is not telling me which movement type are using the accounts.
    So I currently go to spro -> MM -> Valuation and Account Asignment -> Account Determination -> Account Determination without Wizard -> Purchase Account Management -> Configure Automatic Postings -> Simulation
    - first problem: I do not know how to find a material for a specific valuation class (no filter criteria?)
    - second problem: no complete list I have to click through each movement type to see where a specific account is used -> a complete list over all movement types within a  selected/used valuation class would help a lot!
    Best regards,
    F.

    Hi,
    You can get the material list per valuation class through table MBEW (Valuation).You can use MB51 t.code to get the document list based on movement type.
    The movement type and valuation class relation is through transaction event key. Movement type will determine the transaction event key through value string (the same you can find in OMJJ t.code, here select movement type and enter any movement type and click on account groupign > You can find the relation).
    Transaction event key is assigned with G/L accounts based on Chart of accounts/Valuation grouping code/valuation class/account gouping(only for GBB,PRD & KON).
    Regards,
    Prabu

  • De-linking (Valuation class & GL A/c) automatic posting in Invoice booking

    Experts,
    I have a issue regarding link between FI & MM
    From what I understand,
    there is a link between Service & Valuation class
    & also a link between valuation class & GL.
    This link enables automatic FI line item posting while invoice booking.
    My question:
    1. Can we break the linkage between valuation class & GL i.e. we want to stop the automatic posting
    2. What is the effect of above
    3. Would you advise to do this .. ? Why?
    Regards,
    KPS007

    Hi,
    SAP standard process are the best business practises and it should changed only when we have genuine business problem and not for people issue.
    There are several scenarios will occur during MIGO and MIRO. For each scenario system should determine a correct Inventory account, GR/IR clearing account, Price difference account and etc. First you need to prepare an excel sheet with all your possible business scenario, valuation area/valuation grouping code and their respective GL accounts. Once you have listed out all the scenarios and correct GL accounts, you can configure the system as per your requirement. Initial home work is needed to avoid any difference in account posting. Hence try to fix the source of your problem rather than changing the best practise. Account determination is vast and it cannot be explained here but please refer the below link.
    http://help.sap.com/saphelp_46c/helpdata/en/12/1a39516e36d1118b3f0060b03ca329/content.htm
    Regards,
    Senthil

  • Problem with project stock valuation class

    Dear All,
    We have an issue regarding the Revenue Inventory and Capital Inventory. There is a certain balance amount which should be in capital but system is showing in Revenue and vice versa.
    The reason for this is that when the material was created, in some materials the main valuation class was 3032(Project) and in some it was maintained as 3030(revenue). But project stock valuation class was not maintained.
    Now the problem persists in the G/L balances, the G/L of project stock (132006)displays some amount of revenue(132000) and vice versa.
    We tried to maintain the project stock valuation class (3032) for materials for which the main valuation class is 3030 (Revenue),but still the G/L for revenue (132000) is getting hit.
    At the end, the requirement is that G/L for revenue (132000) should hit when revenue procurement is there and G/L for capital (132006) should hit when capital procurement is there.
    Kindly suggest the way forward.
    Regards,
    Harsh

    Thanks Venkat, we have thought of the same as a last stop but there are hundreds of materials which has this problem and there would be many open documents for them.
    If anything could be suggested other then this, and I wanted clarification on one more point that the materials for which main valuation class was 3030 and later we added 3032 in project stk Val class but after maintaining it. When we procure(Capital procurement), it is still showing the balance in G/L 132000(Revenue).
    Regards,
    Harsh

  • Valuation class wise stock report for opening and closing stock

    Dear all,
       My Clint is asking the report for the opening stock and closing stock with respect to valuation class is there any standard report is available please guide me
    regards
    pramod

    Dear sir,
    in my case matarial is split valuated matarial, matarial is maintained with two valuation classes
    when  seeing the report  MB5B its not showing the price valuation class vise, its showing combined together only, again i am using the MC.9 there also same problem its not showing both the valuation class vise price its showing only one valuation class price, if we check for another valuation class price for that particular matarial its telling no data is availabel for the valuation class
    regards
    pramod

  • Changeing Valuation class-what happens to deleted open docs.

    Hello,
    we are planning to change the valuation class for material. In order to change the class we would have to delete all open items that trace back to the material (PO, GR, IR). I run me2m to identify the open documents for that material.
    My issue is when I reverse or delete the IR, GR, and PO what happens to the those documents.? We have documents that go back to 2007.
    Do we have to recreate the PO, GR, IR after we change the class.?What are the long term effects when doing this change (Audit)?
    Please advise.
    Thanks.

    You don't need to worry about old documents as long as they are not open.
    You just need to invoice out all the open GRs or cancel all those GRs. In case of POs, you have to ensure the GR qty is equal to IR qty for each PO line, then you can mark the line as deleted so that the system will allow you to change the val. class. You also need to make the stock to zero.
    Once val. Class is changed, you can undo all the above.

  • Change Valuation class

    We have a need to change the valuation class of the material master with tcode MM02, and the material has a lot of open Purchase Orders and Sales orders, and many batches created for this material.  This material use by many countries, and we cannot replace it with a new material number for my plant.
    System issue message Valaution class cannot be changed because of a lot of open doc and batches exists,  in this situation how to change the Valuaiton class, it will be quite impossible to delete all those open doc and batches. ?? What can we do in order to change the valuaiton class of the material master MM02.??

    Hi,
    You have to eliminate those problems that is reported by SAP.
    E.g.:
    - no stock in current and previous period has to exist (eliminate stock: MB1A201posting date in the past; reset stock level: MB1A+202)
    - transactional data has to be deleted
    - if there are goods movement in current period you have to cancel all of them or you have to wait till the first day of the next period
    If you want to change valuation category as well, you have to archive batch master records.
    This is not an easy thing to do, you may face several difficulties...
    Mass transaction can be used if you have several transactional data to delete (check transaction MASS)
    You can search for threads on this forum or for OSS notes too.
    Regards,
    Csaba

  • GR/IR clearing per valuation class

    Hey all,
    I was trying to post the GR/IR clearing account per valuation class, so i changed the rule in OBYC in WRX to be per valuation class and account modifier, i entered the correct combination (WRX + VBR + V.Class + G/L a/c) but it's not picking the correct G/L in case of service purchasing, it's doing it with material purchasing only not service purchasing. even in the error the valuation class is not mentioned as it's saying ( WRX Z000 is missing ) and it's ignoring that there is a valuation class assigned to the service master, it works fine with material master records.
    Does anyone have a clue ?
    Thanks and regards all...

    Hi Jitesh,
    I believe, that though there are several debit and credit line amounts pertaining to GR/IR Clearing account. System will do clear with transaction F.13 based on sort key information at GL Account.
    If the GL Account Sort Key gets changed, then to be cleared manually with T.Code F-03. Here you will not be in a position to clear if the debit and credit items are huge.
    Then go to FBL3N, match the both credit and debit with same information at Assignment field and do Clearing with F.13
    As we know, it is very big taks. You have to struggle for which the mistake was happend and ensure that the sortkey should not be changed where there are line items to be cleared.
    Regards
    VG

  • Invalid Valuation Class for Plant

    Hello,
    I'm creating a material using t-code MM01, and when I enter a valuation class in the Accounting 1 view, I get error message ZA 038 "Invalid valuation class for this plant".  This valuation class was working before, so I want to look into the configuration to see what may have been changed.  Can anyone point me in the right direction?
    Thanks,
    Cynthia

    Hi,
    the message u got is custom defined message.
    The reason for the designing the message may be that the material that u want to create is not to be meant for the plant u used.
    i hope this will solve the issue.
    Thank You,
    Purnachandra RM

  • Currency problem in BAPI_MATERIAL_SAVEDATA while uploading valuation class

    Hello Experts,
    I am uploading valuation class using BAPI_MATERIAL_SAVEDATA.
    While uploading it is showing runtime error "Unable to interpret KG as a number".
    I have used the FM CONVERSION_EXIT_CUNIT_INPUT to convert the UOM from the file to Field symbol.
    still the same. please guide me.
    I have pasted my code below.
    Kindly go through and help would be highly appreciated.
    *& Report  ZPRI_MAT_PRICE_UPLOAD
    REPORT  ZPRI_MAT_PRICE_UPLOAD no standard page heading line-size 150.
    tables : mbew,      " Material valuation
             makt,      " Material description
             mara.      " General material master
    data : begin of t_matvclass occurs 0,
           material type matnr,     " Material
           ind_sec type mbrsh,      " Industry sector
           mat_typ type mtart,      " Material type
           val_class type BKLAS,    " Valuation class
           MOV_PR TYPE VERPR,       " MOVING PRISE
           STD_PR TYPE STPRS,       " STANDARD PRISE
           base_uom like mara-meins,     " Material unit
           mat_desc type maktx,     " Material description - MAKTX
           plant type werks,        " Plant
           langu(2),
           end of t_matvclass.
    data : wa like line of t_matvclass.
    data: begin of it_makt occurs 0.
          include structure bapi_makt.
          data end of it_makt.
    data :bapi_head like bapimathead,     " Header Segment with Control Info
          bapi_clientdata like bapi_mara,    " Material Data at Client Level
          bapi_clientdatax like bapi_marax,  "Checkbox Structure
          bapi_valclass like BAPI_MBEW,      " Valuation class
          bapi_valclassx like BAPI_MBEWX,    " Checkbox Structure
    *      BAPI_MOVING_PR LIKE BAPI_MBEW,     "MOVING PRISE
    *      BAPI_MOVING_PRX LIKE BAPI_MBEWX,   "MOVING PRISE
    *      BAPI_STD_PRISE LIKE BAPI_MBEW,     "STANDARD PRISE
    *      BAPI_STD_PRISEX LIKE BAPI_MBEWX,   "STANDARD PRISE
          bapi_return like bapiret2,         " Bapi return structrue
          returnm type table of bapi_matreturn2 with header line.
    data : it_excel type alsmex_tabline occurs 0 with header line.
    data: begin of it_ret occurs 0.
           include structure bapiret2.
          data end of it_ret.
    * Data objects for exception handling.
    data : lv_converr type ref to CX_SY_CONVERSION_ERROR,
           lv_dynerr type ref to CX_SY_DYN_CALL_ERROR.
    data : txt_converr type string,
           txt_converr_l type string,
           txt_dynerr type string,
           txt_dynerr_l type string.
    data : char_uom(4) type c.    " Global UOM after conversion
    * Declaring selection screen for selecting a data file
    * for uploading valuation class
    selection-screen begin of block b1 with frame title text-001.
    parameter : file_nam type rlgrap-filename obligatory default
                  'C:\master data UPDATED_test.xls'.
    parameter : p_begcol type i default 1,        " no-display,
                p_begrow type i default 2,        "   no-display,
                p_endcol type i default 9,        " no-display,
                p_endrow type i default 267.      " no-display.
    *parameters: p_valare type mbew-bwkey obligatory.    " Valuation area
    selection-screen end of block b1.
    at selection-screen on value-request for file_nam.
    perform F_get_file using file_nam.
    start-of-selection.
    perform F_xls_itab using file_nam changing it_excel.
    perform F_move_data.
    *perform F_get_data.
    perform F_Display_data.
    *&      Form  F_xls_itab
    *       text
    *      -->P_FILE_NAM  text
    *      <--P_IT_EXCEL  text
    form F_xls_itab  using    p_file_nam changing p_it_excel.
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = file_nam
        i_begin_col                   = p_begcol
        i_begin_row                   = p_begrow
        i_end_col                     = p_endcol
        i_end_row                     = p_endrow
      tables
        intern                        = it_excel
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3.
    endform.                    " F_xls_itab
    *&      Form  F_get_file
    *     Subroutine to get the file on F4
    *      -->P_FILE_NAM  text
    form F_get_file  using    p_file_nam.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
    *   STATIC              = ' '
    *   MASK                = ' '
      CHANGING
        file_name           = file_nam
    EXCEPTIONS
       MASK_TOO_LONG       = 1
       OTHERS              = 2.
    endform.                    " F_get_file
    *&      Form  F_Display_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form F_Display_data .
    skip 2.
    *write:/2 'Valuation area :', p_valare.
    *write:/2 'Standard price :', p_stdprc.
    skip 2.
      write:/29 sy-uline(120).
      write:/29 sy-vline,
             30 'Material' color 1,               " Material - MATNR
             50 sy-vline, 'Ind_sector' color 1,   " Industry sector  - MBRSH
             62 sy-vline, 'Mat_typ' color 1,   " Material type - MTART
             75 sy-vline, 'Valuation class' color 1,  " Valuation class
             85 sy-vline, 'Base UOM' color 1,          " Base UOM
             95 sy-vline, 'Material Decp' color 1,     " Material descp
             120 sy-vline, 'Mov Price',                 " Moving price
             130 sy-vline, 'Std Price',                 " Standard price
             140 sy-vline, 'Plant',                     " Plant
             150 sy-vline.
      write:/29 sy-uline(120).
    loop at t_matvclass into wa.
      write:/29 sy-vline,
             30 wa-material color 2,               " Material - MATNR
             50 sy-vline,
             55 wa-ind_sec color 2 right-justified, " Industry sector
             62 sy-vline,
             66 wa-mat_typ color 2,                " Material type - MTART
             75 sy-vline,
             78 wa-val_class color 2 right-justified, " Valuation class
             85 sy-vline,
             88 wa-base_uom color 2 right-justified,  " Base UOM
             95 sy-vline,
             98 wa-mat_desc color 2 left-justified,  " Material Desc
             120 sy-vline, wa-MOV_PR,                 " Standard price
             130 sy-vline, wa-STD_PR,                 " Moving price
             140 sy-vline, wa-plant,                     " Plant
             150 sy-vline.
    endloop.
    write:/29 sy-uline(64).
    endform.                    " F_Display_data
    *&      Form  F_move_data
    *      Subroutine to move data from excel to internal table
    *  -->  p1        text
    *  <--  p2        text
    form F_move_data .
    data : lv_index type i.
    field-symbols <fs>.
    * Sorting the internal table
    sort it_excel by row col.
    clear it_excel.
    loop at it_excel.
      move it_excel-col to lv_index.
    * Assigning each record to the internal table row.
      assign component lv_index of structure wa to <fs>.
    * Assigning the field value to a field symbol
    if lv_index eq 5.
    CALL FUNCTION 'CONVERSION_EXIT_CUNIT_INPUT'
      EXPORTING
        INPUT                = it_excel-value
       LANGUAGE             = SY-LANGU
    IMPORTING
       OUTPUT               = char_uom.
    ** Moving the converted UOM to  field symbol
    move char_uom to <fs>.
    else.
       move it_excel-value to <fs>.
    endif.
      at end of row.
      append wa to t_matvclass.
      clear wa.
      endat.
    endloop.
    endform.                    " F_move_data
    *&      Form  F_get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form F_get_data .
    loop at t_matvclass into wa.
    try.
    * BAPIHEAD --- > Header Segment with Control Information
    bapi_head-material = wa-material.
    bapi_head-ind_sector = wa-ind_sec.
    bapi_head-matl_type = wa-mat_typ.
    bapi_head-account_view = 'X'.
    * For Clien Data
    bapi_clientdata-BASE_UOM = wa-base_uom.
    bapi_clientdatax-base_uom = 'X'.
    bapi_clientdatax-base_uom_iso = 'X'.
    * For Valuation Class.
    bapi_valclass-val_area = wa-plant.
    bapi_valclass-val_class = wa-val_class.
    bapi_valclass-std_price = wa-STD_PR.
    bapi_valclass-MOVING_PR = wa-MOV_PR.
    * For Valuation Class control checkbox.
    bapi_valclassx-val_area = wa-plant.
    bapi_valclassx-val_class = 'X'.
    bapi_valclassx-std_price = 'X'.
    bapi_valclass-MOVING_PR = 'X'.
    refresh it_makt.
    wa-langu = SY-LANGU.
    it_makt-langu = wa-langu.
    it_makt-matl_desc = wa-mat_desc.
    append it_makt.
    clear it_ret.
    refresh it_ret.
    if t_matvclass[] is initial.
      write:/ 'Cannot be updated'.
    else.
    perform F_call_bapi.
    endif.
    catch CX_SY_CONVERSION_ERROR into lv_converr.
       txt_converr = lv_converr->get_text( ).
       txt_converr_l = lv_converr->get_longtext( ).
       write:/ 'Error:', txt_converr color 5.
       write:/ 'Error:', txt_converr_l color 3.
    endtry.
    endloop.
    endform.                    " F_get_data
    *&      Form  F_bapi_commit
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form F_bapi_commit.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =
    if sy-subrc eq 0.
      write:/2 ' Transaction commited' color 4.
    else.
      write:/2 'Unable to commit the transaction' color 4.
    endif.
    endform.                    " F_bapi_commit
    *&      Form  F_call_bapi
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form F_call_bapi .
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
        headdata                  = bapi_head
        CLIENTDATA                 = bapi_clientdata
        CLIENTDATAX                = bapi_clientdatax
        VALUATIONDATA              = bapi_valclass
        VALUATIONDATAX             = bapi_valclassx
    IMPORTING
       RETURN                     = it_ret
    TABLES
       MATERIALDESCRIPTION        =  it_makt
       RETURNMESSAGES        =  returnm.
       IF it_ret-type eq 'E' or it_ret-TYPE eq 'S'.
         Write:/1 it_ret-type,
                8 it_ret-id,
                30 it_ret-number,
                38 it_ret-message,
                190 it_ret-parameter,
                210 it_ret-row,
                220 it_ret-field.
       endif.
    endform.                    " F_call_bapi
    Regards,
    Ranjith N

    resloved.
    issue with the internal table structrue.

  • Service "No valuation class exists for account reference"

    Hi,
    in AC01 trx, I cannot create a Service.
    The error is:
    No valuation class exists for account reference
    I tried with trx OMSK to link the account category reference to material type but won't work.
    The error is always: No valuation class exists for account reference

    Hi,
    try also to check from SPRO, Materials Management, External Services Management, Service Master, "Define Service Category", you have to set the standard "Account category reference" 0006 or the one (custom) you have set in customizing also check (Valuation and Account Assignment trx OMSK)
    Regards

  • Split GR/IR accounts by Valuation Class (PO without material master)

    Hi Experts,
    I've an issue here, when I'm tried to do GR posting (PO without material master), system doesnt able to post GRIR account by valuation class.
    Scenario: PO issue without masterial number, enter description and with material group.
    In the configuration, I've configure "Entry aids for item without material master", assign material group "Asset" and material group "Services" into 2 different clearing account. However, when GR posting, system prompt error message and not able to do posting.
    Kindly advice.

    Yes , you can post to different GR/IR accounts based on the valuation class . In OBYC for WRX , you can choose your rules . In the Rules , select valuation class . Then the system will allow you to choose different GR/IR accounts for each valuation class .
    During the GR , the system will pick the corresponding GR/IR account based on the material grp valuation class .
    Regards,
    Hari.

  • How to shift valuation class from one material type to another material type ?

    I have came across following weird scenario:
    We already created huge no.of materials of material type say ZABC with two valuation classes say 1100 and 1200(GL accounts for these VCs for different posting keys in OBYC settings are same). Account category reference for this material type is 0010.
    After that we created new material type say ZPQR  with new Account category reference 0025, and valuation class 1200 is linked with this ACR 0025. Because of this, valuation class 1200 disappeared from material type ZABC. In order to avoid inconsistency, we need to have valuation class 1200 linked with older material type i.e.ZABC.How we can do this ? What impacts must have happened in this period (from MM/FI) in the system, where valuation class get shifted from one material type(ZABC) to another material type(ZPQR)....please help us in this scenario.

    Thanks Sana,
    We are also looking for the solution provided by you i.e. reassign ACR 0010 to Valuation class 1200.
    Your are also correct in terms of  statement "config doesnt allow me to assign same valuation class to 2 different AREF (Account reference number/Account category reference).
    I wanted to know, what are the possible impacts in the system during this re-assignment of ACR to old material type ZABC.
    Regards,
    Sudarshan.

  • How to change Valuation class in material master(have stock)

    HI,
    I would like to change the valuation class in material master, How to change VC? is there any process before changing VC?
    I heared when Material have nil stock then only it's possible to change VC, Is it correct? which TC can I use for change VC?
    Regards,
    venki

    Dear venki,
    To change Valuation class you must have zero stock in the current period, and zero stock at the end of the last period, plus no open PO lines .  flag for deletion all open PO lines,
    Regards
    shankar

  • How to get Valuation class in Material master?

    Dear all,
                I want to have valuation class in my report and i want to take is as a material attribute.Actually i have check all the attribute of material master but valuation class is not there. i am having valuation class as a master data as individual . How can i get the valuation type in the Material master?I need it in Material master only.
    Regards,
    Macwan James

    Dear venki,
    To change Valuation class you must have zero stock in the current period, and zero stock at the end of the last period, plus no open PO lines .  flag for deletion all open PO lines,
    Regards
    shankar

Maybe you are looking for