Classifiction View in material master --- ausp

Hi all,
I am using the BAPI_MATERIAL_SAVEDATA to create or save the material.
In that i dont know how to create or update the classification view which concerns the ausp table.
Any one help me how to update the Classifiction view.
Anyother bapi has to be used in addition to that of bapi_material_savedata.
Please suggest me the way.
Thanks & Regards,
S.Shankar

Hi Shankar,
I once faced the similar problem. I got a code which will give you a clear picture,
report zc1_bapi_classification .
This is a dummy program designed to show how to create a batch and  *
then apply/change characteristics via BAPI control.                 *
tables: klah, ksml, cabn.
holds data for charcateristics with type NUM
data: begin of numtab occurs 0.
        include structure bapi1003_alloc_values_num.
data: end of numtab.
holds data for charcateristics with type CHAR/DATE
data: begin of chatab occurs 0.
        include structure bapi1003_alloc_values_char.
data: end of chatab.
holds data for charcateristics with type CURR
data: begin of curtab occurs 0.
        include structure bapi1003_alloc_values_curr.
data: end of curtab.
Error return table
data: begin of rettab occurs 0.
        include structure bapiret2.
data: end of rettab.
data: begin of it_ksml occurs 0.
        include structure ksml.
data: end of it_ksml.
characteristic names
data: begin of it_cabn occurs 0,
        atinn like cabn-atinn,
        atnam like cabn-atnam,
        atfor like cabn-atfor,
      end of it_cabn.
data: begin of it_object occurs 0.
        include structure bapi1003_object_keys.
data: end of it_object.
example of an object key 00000000000730000007505847897897
data: w_object like bapi1003_key-object.
Change these defaults to suit your system
parameters: p_matnr like mara-matnr    obligatory default '7300000',
            p_werks like t001w-werks   obligatory default '0750',
            p_charg like mcha-charg    obligatory default '5847897898',
            p_lgort like dfbatch-lgort obligatory default '1000',
            p_klart like klah-klart    obligatory default '022',
            p_class like klah-class    obligatory default 'RETREAD'.
initialization.
  perform get_characteristics.
start-of-selection.
  perform create_batch.
  perform bapi_commit.
  perform build_object_key.
  perform extract_original_batch.
end-of-selection.
  perform update_original_batch.
  perform bapi_commit.
      FORM get_characteristics                                      *
form get_characteristics.
extract the characteristic names for KLART/CLASS
  clear: klah, ksml, it_cabn.
  refresh it_cabn.
  select single clint from klah
  into corresponding fields of klah
  where klart = p_klart
    and class = p_class.
  if syst-subrc = 0.
    select * from ksml
    into corresponding fields of ksml
    where clint = klah-clint.
      select single * from cabn
      into corresponding fields of cabn
      where atinn = ksml-imerk.
      if syst-subrc = 0.
        it_cabn-atinn = cabn-atinn.
        it_cabn-atnam = cabn-atnam.
        it_cabn-atfor = cabn-atfor.
        append it_cabn.
      endif.
    endselect.
  endif.
endform.
      FORM create_batch                                             *
form create_batch.
  clear: rettab.
  refresh: rettab.
create the batch using screen values, you will most likely have to
determine the next batch number from the number range.
  call function 'BAPI_BATCH_CREATE'
       exporting
            material             = p_matnr
            batch                = p_charg
            plant                = p_werks
            batchstoragelocation = p_lgort
       tables
            return               = rettab.
endform.
      FORM build_object_key                                         *
form build_object_key.
build the object key
  clear: it_object, rettab.
  refresh: it_object, rettab.
  it_object-key_field = 'MATNR'.
  it_object-value_int = p_matnr.
  append it_object.
  it_object-key_field = 'WERKS'.
  it_object-value_int = p_werks.
  append it_object.
  it_object-key_field = 'CHARG'.
  it_object-value_int = p_charg.
  append it_object.
  call function 'BAPI_OBJCL_CONCATENATEKEY'
       exporting
            objecttable    = 'MCHA'
       importing
            objectkey_conc = w_object
       tables
            objectkeytable = it_object
            return         = rettab.
endform.
      FORM extract_original_batch                                   *
form extract_original_batch.
extract the original characteristic data if exists
  clear:  numtab, chatab, curtab, rettab.
  refresh:  numtab, chatab, curtab, rettab.
  call function 'BAPI_OBJCL_GETDETAIL'
       exporting
            objectkey       = w_object
            objecttable     = 'MCHA'
            classnum        = p_class
            classtype       = p_klart
       tables
            allocvaluesnum  = numtab
            allocvalueschar = chatab
            allocvaluescurr = curtab
            return          = rettab.
endform.
      FORM update_original_batch                                    *
form update_original_batch.
Below are some examples of characteristics to update, obviously you
would change these to match the ones in your system
ATNAM is the characteristic name.
find characteristic format in it_cabn and call update routine
  read table it_cabn with key atnam = 'TREAD'.
  perform update_table using it_cabn-atfor it_cabn-atnam 'HW203'.
  read table it_cabn with key atnam = 'ORRETREAD'.
  perform update_table using it_cabn-atfor it_cabn-atnam '11225HW203C'.
  read table it_cabn with key atnam = 'CASINGCODE'.
  perform update_table using it_cabn-atfor it_cabn-atnam '7100044'.
  read table it_cabn with key atnam = 'CASINGSTATUS'.
  perform update_table using it_cabn-atfor it_cabn-atnam 'CUSTOMER'.
  read table it_cabn with key atnam = 'CASEVAL'.
  perform update_table using it_cabn-atfor it_cabn-atnam '0'.
  read table it_cabn with key atnam = 'CUSTOMER'.
  perform update_table using it_cabn-atfor it_cabn-atnam '0276933500'.
  read table it_cabn with key atnam = 'FROMLOC'.
  perform update_table using it_cabn-atfor it_cabn-atnam '0584'.
  read table it_cabn with key atnam = 'BRAND'.
  perform update_table using it_cabn-atfor it_cabn-atnam 'BRI'.
  read table it_cabn with key atnam = 'NOCAPS'.
  perform update_table using it_cabn-atfor it_cabn-atnam '1'.
  read table it_cabn with key atnam = 'RETURNLOC'.
  perform update_table using it_cabn-atfor it_cabn-atnam '0584'.
  read table it_cabn with key atnam = 'RECDATE'.
  perform update_table using it_cabn-atfor it_cabn-atnam '26.07.2004'.
  read table it_cabn with key atnam = 'SENTDATE'.
  perform update_table using it_cabn-atfor it_cabn-atnam '26.07.2004'.
  read table it_cabn with key atnam = 'FLOC'.
  perform update_table using it_cabn-atfor it_cabn-atnam '0750'.
  read table it_cabn with key atnam = 'AUTOCLAVE'.
  perform update_table using it_cabn-atfor it_cabn-atnam '4'.
  read table it_cabn with key atnam = 'REPAIRCODE'.
  perform update_table using it_cabn-atfor it_cabn-atnam 'MINOR'.
perform the update
  perform bapi_change.
endform.
      FORM update_table                                             *
form update_table using atfor atnam value.
depending on data format, start building the characteristics table
ready for update
  case atfor.
    when 'NUM'.
      read table numtab with key charact = atnam.
      if syst-subrc  = 0.
        numtab-value_from = value.
        modify numtab index syst-tabix.
      else.
        numtab-charact = atnam.
        numtab-value_from = value.
        append numtab.
      endif.
    when 'CURR'.
    when 'CHAR' or 'DATE'.
      read table chatab with key charact = atnam.
      if syst-subrc  = 0.
        chatab-value_neutral = value.
        modify chatab index syst-tabix.
      else.
        chatab-charact = atnam.
        chatab-value_neutral = value.
        append chatab.
      endif.
  endcase.
endform.
      FORM bapi_change                                              *
form bapi_change.
Apply the characteristics to the batch.
  call function 'BAPI_OBJCL_CHANGE'
       exporting
            objectkey          = w_object
            objecttable        = 'MCHA'
            classnum           = p_class
            classtype          = p_klart
       tables
            allocvaluesnumnew  = numtab
            allocvaluescharnew = chatab
            allocvaluescurrnew = curtab
            return             = rettab.
endform.
      FORM bapi_commit                                              *
form bapi_commit.
commit the changes
  call function 'BAPI_TRANSACTION_COMMIT'.
endform.
Hope this will solve your problem.
Thanks
Kathirvel

Similar Messages

  • Adding fields in costing view of material master

    Hi gurus,
    I need to add 4 fields in costing view of material master. I have followed the steps in SPRO, for configuring customized screen in material master.
    1) Created a function group YMMCO and copied the screen 2904 from program SAPLMGD1.
    2) Added 4 fields in my customized screen.
    3) Created copy of 01 ( Screen reference ) to z1 in OMT3B.
    Since 2904 is not there in the sequence . I changed one 0001 sequence at the end to 2904 . I also assigned my program
    SAPLYMMCO to it. I can see the changed fields in data screen and subscreen.
    4) Then I assigned the SSq to z1 in transaction OMT3E.
    But unfortunately, when I go to MM01 to create a material , I am not able to view the fields I added in costing view.
    I have checked the screen for the previous field, it shows 2904 only.
    Two days back, I did the same thing in basic data view 1 , it was working properly. As per client's suggestion I put it in
    costing view, it is not working . Please give me suitable suggestions.
    Thanks in advance.
    D. Mallick

    Hi,
    I also need to add custom fields to Basic data view. After copying & changing the screen sequence in Config, I could able to see the custom fields in Basic Data view.
    I have appended structure with custom fields to MARA table.
    But the values I enter in the screen is not getting updated to the table MARA.
    Can you please let me know the code, I should have have in PAI (Process After Input) module in the Sub Screen to update the values?
    Thanks,
    Dasa

  • Current period in Accounting 1 view of Material Master

    Dear Experts,
    In Accounting 1 view of Material Master there is a current period, now it is 12 2009.
    Is it possible to make it 11 2009, if yes how to do it.
    Please help if you have solution. it is very crucial for me.
    Thank you for your support.
    Regards,
    Zusen

    Hi,
    Please read the Solution part of  note 487381. There is still a few things need to be carry out before you can proceed
    with the initialization :
    Bear in mind that the initialization of a posting period has the
    following effects concerning the period stocks:
        o  The initialization of the posting period to a previous or to any
           posting period may lead to the loss of the information of the
           inventory balances of the previous periods.The book value of the
           current posting period is taken as the basis also for values of
           the previous period in this case.
           If you want to continue working with this new posting period, in
           addition you should execute report Z_DEL_HIST_ENTRIES attached so
           that history entries greater or equal to the new posting period
           will be deleted.
        o  If you have to briefly reset the posting period by one period
           (for example, postings must still be posted in a certain period)
           just to make a correction (and for a small number of postings),
           you should initialize the posting period back again to the old
           value so that the values of the previous period will not be lost
           (you should forbid postings when carrying out corrections).
           However, afterwards the values of the previous period or the
           history records (as of Release 4.5) of the materials posted in
           this case are inaccurate.
           You should NOT execute report Z_DEL_HIST_ENTRIES in this case.
        o  However, if the posting period is generally reset again to a
           previous posting period and if postings were made during this
           time, all information on the inventory balance of the previous
           periods is lost.
           As of Release 4.5a, you should use the cited correction report
        Z_DEL_HIST_ENTRIES in order to delete history records that are
        more current than the current posting period.Otherwise, it can
        result in deviations (inconsistencies) for the update of the
        history records.
    o  Important! If there are open physical inventory documents that
        have status 'counted' or for which indicator 'Freeze inventory
        balance' has been set, you should reject these if they refer to a
        previous period or have been created in the former previous
        period.The inventory difference to be posted can be determined
        from the current book value of the previous period and the book
        quantity frozen in the physical inventory document (ISEG-BUCHM)
        and does not match the inventory balance of the previous period
        that is currently valid.

  • Problem with *serial no. profile* in work sheduling view of material master

    Hi ! !
    I am here with a problem with serial no. profile in work sheduling view of material master.
    By mistake for some FHMI type ( PRODUCTION RESOURCE TOOLS )materials, serial no profile exist in 'work sheduling' view. Due to that we are facing problem in GRN.
    when I am trying to remove that with MM02. i m getting a message as Serial numbers already assigned to this material
    Please suggest how to remove serial no. profile.
    Thanks in advance,
    Prab

    Hi,
    go to MMBE and check the Current Serial number...for  FHMI type
    and go to IQ02 and close the Serial number range at the Current number range...
    Now you can assign this serial number range to another material type...
    Thx
    Raju

  • View in material master

    Hi Gurus,
    How to delete the view of material master say ex:storage location view for a material
    Regards,
    Subbu

    Hi Subbu,
    Views are dependent on the the material type.
    if u do not want a view for a material type then, u can go to tcode OMS2 and there u can deselect the view in the userdepartment. and save.
    Now that view wont be their for that material type.
    Hope it wud have answered ur question
    Reward if useful
    Shawn

  • PO creation without Purchasing view in material master

    Hi
    i am using 4.6 version
    system is allowing to create PO without purchasing view in material master.
    how it would be possible ?
    Regards
    Rahul

    Hi,
    i have checked with MARA for that material PSTAT value it is showing there "KDALBPCGV"
    please suggest
    regards
    rahul

  • Purpose of maintaining classification view in material master

    Hi gurus
    can anyone explain Purpose of maintaining classification view in material master with example
    Regards
    Vishal...

    Hi
    One of the reason we maintain classification is for batch management where characteristics like shelf life expiry date is being attached to a class & that class is maintained in material master so whenever transactions takes place it will read from the characteristics value.
    the other purpose is with variant configruation, for a configurable material there will be more than one characteristics for ex: in a car it comes with A/C - non a/c, metallic - non metallic, normal steering - power steering all these are mainatained as characteristics & assigned to a class & we use that class in classification for materials.
    there is many more advantages & ways of using classification in material master.
    Regards
    Rang

  • Significance of purchasing view in Material master

    Hi,
    What is the significance of purchasing view in Material master.
    What could be effect if this view is not maintained?
    Like for material type FERT there is no Purchasing view, but we can do procurement for FERT items.
    So what is the significance of purchasing view in Material master?
    Uts

    Hi,
    I cant Agree your statement,because for the Purchasing Activities it is mandatory that you Maintain the Purchasing view of the Material.
    it Gives a error ..material not maintained by Purchasing.
    Material XXXXXX not maintained by Purchasing
    Message no. ME046
    For Inhouse Production through Quota arrangement,it can be optional.
    but for the remaining cases ,it is Mandatory.
    and the Material type your are speaking is FERT.which is standard material type for Finished products.
    if you are having External Procuremnt 100% sure it would be having Purchasing Tab activated .
    if not so that,if it is a inhouse production.
    check it in OMS2 ..for clear information
    Regards
    Anjanna.

  • Sequence of maintaining views in material master

    Hi
    Is it possible to maintain sequence of maintaining different views in material master.
    For example: Basic Data 1 should be maintained first & then Basic Data 2 and then General Plant Data/Storage 1 and then General Plant Data/Storage 2 and so on.
    If the user misses the sequence, it should give a error message.
    Regards
    Pradipta Sahoo

    Hi,
    u r requirment is possible, that u change screen sequence of material master so the apperance will be as per u r requirement. In changes can be done in OMT3B in SPRO.
    Rdg
    Shekhar

  • What is the concept of  view in material master?

    Hello sap gurus
    Some quetions regarding Material Master
    what is  the concept of views in material master ?
    what is determined by specifying industry sector in material master ?
    To sell material which views are material are maintened in Material master?
    Regards
    Amit

    Hi,
    <b>Material master  for finished ggods is related with SD, MM & PP departments</b>. If you carefully go through the various screens in MM record you will realize the importance of the respective fields and the department to which they belong.
    <b>1.Suppose Base unit of measure</b> in Basic data 1 screen. The production people will keep the stock of the item using this UOM.
    <b>2. In Sales:Sales Org.1</b> screen we have sales unit in which we will sell the material.
    <b>3. Then we have the plant</b> data in which we enter the delivering plant. Also the taxes are determined from the plant so we have the settings for taxes also - whether this material is fully taxable/50% tax/Tax exempted.
    <b>4. Then we have purchasing</b> screen in which the data like the purchasing group, variable units,etc are entered. This will effect the purchasing cycle when we are procuring a material from outside. This is related to MM.
    <b>5. The we have MRP</b>, this is related to PP as to how to manufacture the product, the MRP type, the strategy group - whether it is MTO/MTS like that.
    <b>5. Sales:Sales Org.2 screen</b> - Here we mainatin the account assignment group which is very important as far as the generation of the accounting document is concerned. This triggers the system where to post the value in which G/L account. Accounting document is generated when we create the invoice in VF01 & save it.
    <b>6. Work scheduling</b> - Related with the sceduling of the production as to whether underdelivery or overdelivery is allowed, the storage location
    <b>7. Quality</b> - Here you can select for a particular finished item where where it has to be checked for quality during its journey from the raw material stage to the finished goods store as a finished item.
    <b>8. Accounting</b> - Related to accounting, product costing, total value of the stock in hand, etc. Also related with FI & PP
    So all the screens have data which effects one or more modules for the proper functioning of the system to give the optimum results.
    <b>Industry Sector:</b>
    Key that specifies the branch of industry to which the material is assigned.
    <b>Use</b>
    When you create a material master record, the industry sector you specify determines
    1. which screens appear and in what order
    2. which industry-specific fields appear on the individual screens
    <b>Screens for Sales:</b>
    Sales:Sales Org.1, Sales:Sales Org.2. But other screens also have data which is related to sales. You cannot just maintain the sales views and save the master. It has to be properly linked with the other modules also for the proper functioning of the system. That is why the system is called as "Enterprise Resource Planning" You have to paln the resources of your company and these resources are related with all the modules.
    Reward points if solution helps.
    Regards,
    Allabaqsh G. Patil

  • Sales org 2 view in material master

    hi gurus,
    Iam not able to see all fields in sales org 2 view in material master and i would like to know how to configure to restrict end users not to change it . thank you in advance.
    regards,
    Gopio

    Hi naga gopathi
    go to Spro->logistics general ->materials management->  there you select the options of material feilds and select the material type and click on till you reach the sales orgn 2  view , .
    In MMR settigs you can see table  wise so i think it should me MARA table. for sales orgn 2 view
    There you check the feilds wat you want is in display or supress mode 
    Regards
    Srinath

  • Control inspection lot in QM view of material master

    Hi
    this is regarding the setting for control inspection in QM view of material master.
    can anyone give me a prictical example of
    1.  'X' An inspection lot for each purchase order item/order item
    2. '1' An inspection lot for each material document and material
    3. '2' An inspection lot for each material and batch
    If my requirement is to create one inspection lot out of several batches made from a production order( eg, 10 batches are created, only 1st one needed for RR and UD), which one should I use?

    Hi,
    the concept of batch comes when there are some property changes (property in terms of business, that may be quality or something else). if you are confirming production order partially, it means there is something that changes with batches. that's why std sap does not allow to create single lot though all those batches have been created from same production order.
    and henceforth, your requirement cannot be fulfilled by any config. you can try for development.
    partha

  • Label Data View in Material Master

    Dear Team,
    Despite of performing all below standerd steps, i am not able to view Label Data view in Material Master.
    pls guide
    steps performed.
    1. Check whether the screen sequence SP exists in Customizing for the Material Master under Define Structure of Data Screens for Each Screen Sequence.
    2. Check whether screen 92 has been assigned to screen sequence SP and has the screen type 1 (main screen).
    3. Check under Subscreens whether the subscreens were assigned to screen 92 of the screen sequence SP.
    4. In the Assign Screen Sequences to User/ Material Type/Transaction/Industry Sector IMG activity, set up the users who are allowed to edit the screen sequence and when it appears.
    also I have SAP_ALL Authorization.
    Regards,
    Amol Joshi

    Hello Amol,
    For IMG activity: Define Structure of Data Screens for Each Screen Sequence, for screen sequence 21, with logical screen 92, in subscreen, please see below settings:
    Program: SAPLMGD1 , screen no. is 1002
    Program: SAPLCBGL_LD00 , screen no. is 8020
    Program: SAPLCBGL_LD01, screen no. is 1010
    Regards,
    Niraj

  • Deleting of future price in accouning 1 View from material master.

    Hi,
    During month end process of CKMLCP, we have done the marking activity. so that the system updated the future price for all materails under specified plants. this is valid from 31.03.2008. by this time the system was not released the price automatically even, the valuation area (plant) is activated with automatic release. when doing of production confirmations for the current period, the system is throwing error as "future price and standard price exists". when we deleting the future price manually through MM02 transaction the systm is allowing to do production confirmation.
    Kindly suggest me any transaction code which deletes the future price in accounting 1 view of material master, which is  updated because of marking done through CKMLCP.

    Hi,
    Thanks for your reply,
    We tried to delete the price through CKR1 transaction. after giving of parameters of material and plant blant screen is coming.
    i think CKR1 is useful for deleting of future price updated through costing run i.e., CK40N marking.
    But in this case when we scrutinise, this is updated through CKMLCP transaction.
    after performing of "post closing"  activity through CKMLCP,
    i think SAP has provided another Tab i.e., Mark Material Prices. by this time the system will mark future price at current periodic cost. and at the same time there is a provision to give date either manual date or select the radio button of beginning of following period in parameters tab.there is no provision for giving of valid date upto.
    may be this is useful to update the standared cost estimate with current actual.
    I am also not sure why user have given data as 31.03.2008. usually they are not suppose to do this marking, but, by mistake they have performed.
    Kindly correct me if any mistake and suggest any other way which will delete the future price in accounting 1 view of material master.

  • How to maintain translation of views in material master

    Hi,
    How we can maintain translation of views in material master
    E.g.
    Basic Data
    Classification
    Purchasing
    MRP1
    MRP2
    Ect…
    We want to maintain translations in different languages.
    Thanks
    Sudhir

    Dear Sudhir,
    Check this link may be help you.
    https://help.sap.com/saphelp_nw70/helpdata/en/ad/06dcf1c4be11d291c70000e8a5f6e6/content.htm
    Regards,
    PK.

Maybe you are looking for

  • ICONS Not Showing Up on ESS/MSS pages

    Hi All, I'm Setting UP ESS / MSS on EP 6.0 SP9 with ERP2004 on the backend.  The basic pages for ESS/MSS are displaying ok in the portal, but none of the icons for the menus are displayed.  I checked the portal server, and all the images are there, b

  • Skype using High levels of RAM over time

    So recently i've noticed that Skype has been using increased levels of RAM over time.  Before i think 7.1 it sat at a steady 170k or lower but since the recent update, it seems to scale all the way up to nearly using 80% of my RAM after being on for

  • My Satellite C50D-A022 won't play DVDs

    I just got my toshiba and i was watching a dvd on it, mid way through viewing the movie toshiba video player froze and then stopped playing. I now cannot even open the video player and am unable to play any dvd at all on the computer. PLEASE help!

  • Sumproduct in Numbers driving me mad!

    Hi All, looking for someone to tell me im being really silly here, this is driving me mad!!! So, I've been trying to impliment the following sumproduct in Numbers, here are my two tables, both on the same sheet. This is a test workbook ive been playi

  • Disable lock screen?

    Is it possible to do this? I would prefer that the phone turn on to the current app when I push one of the hard buttons, rather than to the lock screen. That extra swipe before I do anything is annoying.