By-product material

Dear All,
Please give me solution for this....
there are some by-product material. 70% of material are there, 50% we sell and 20% of material we dispose it some place or scrap it. How do i show this in SAP that this 20% material has been dispose or gone for scrap. Please guide me....
I have seen that we can issue this 20% of material in MB1A using 551 mov type for scrapping material, while doing this an error message occur that G/L---- does not exist in chart of account -
Please help..

HI,
For Scrap you can use Movement type 551 but u have to do some changes in obyc also.
1) Run OMJJ with Movement type 551 you can see Account Modif. VNG which is used to post value into specific Scrap account.
2) Now in obyc you have to Assign G/L Account for GBB-VNG i.e. WRITE OFF  TO SCRAP GL Account. Ask from your FI People also.
When you post material document with Movement type 551 Accounting Entries will be :
Write off to Scrap Ac Dr.
Material Consumption Ac Cr. 
-Vikram raj

Similar Messages

  • Service to ask if a product/material is configurable or not

    Hello,
    I'm looking for a service to find out if a product/material is configurable or not. Is there an existing ES? I have allready tried:
    - FIn Material by Elements
    - Find Material by GTIN
    - Find Material by ID and Description
    - FInd Material by Search Text
    - Find Material Customer Information By ID and Customer ID
    - Find Material Sales Specification by Elements
    - FInd Material Simple By Customer Information
    But none of these services seems to handle me the needed Information. Ok, in "Find Material Sales Specification by Elements" the Description sometimes includes Information if a Product is configurable. But this infomation is very uncomfortable to handle in WD Java.

    Not sure what you mean.
    But it looks like you'll need to use an exception handler, in your case it would be NO_DATA_FOUND.
    Try
    create or replace function punto2_a
      (pelcod_param in varchar2)
    return varchar2
    as
      ret pelicula.pelcod%type;
    begin
      select pelcod into ret
      from pelicula
      where pelcodrmk=pelcod_param;
      return (ret); 
    exception
      when no_data_found 
      then
        return null;
    end punto2_a;And if you want to return NULL as a literal value (as a 'meaningless string') then just use single quotes:
    exception
      when no_data_found 
      then
        return 'NULL';

  • Running MRP for finised product material

    i have a material BOM (finished product material and it consist of some raw material) those materials have MRP
    when i run MRP for this BOM i want to generate PR for the raw materials and a production order for the finised product material
    Please i want all the steps for these senario

    Nehad,
    You need to create PIR(Demand) for the finshed product for the MRP to trigger Planned order for the Finished product and Dependent requirments/PR for the Raw materials.
    1. Use transaction MD61 to enter demand for the finished product with respect to the plant and requirement type "LSF" if it was strategy "10" or "BSF" for strategy "11". You can check the planning strategy used for the finished product using transaction "MM03" in the MRP3 view... if no strategy is assigned you can still use "LSF" requirement type.
    2. Now run MRP using "MD02", you should get planned order for the finished materail and PR for raw material. Please note the MRP type for both the materails should be "PD" you can check this in "MM03" - MRP1 view of the materails.
    Regards,
    Prasobh

  • Obtain Category-ID for product/Material.

    I would like to know how I can obtain the Category-ID for the product/Material. One of our Functional people have mentioned the field 'COML_PROD_CAT-ACTEGORY-ID' as the field to use, but as this references a structure it's not a great deal of use. Ideally I need either a table that I can read, or maybe an FM that's does the job for me and returns the Category-ID for a given product.
    Anyone ?.
    Gary King

    Hi Gary,
    If u prefer use a FM, u can use this: <b>COM_PROD_CAT_REL_READ_WITH_PR</b>
    If u want to obtain only one record u have to set in the select the hierarchy_guid.
    For example:
      select single CATEGORY_ID from COMM_PRPRDCATR
      into my_category
      where PRODUCT_GUID = my_guid
      and HIERARCHY_GUID = my_hierarchy.
    Where
    my_hierarchy
    is the guid of the hierarchy u use. U can get from the table <b>COMM_HIERARCHY</b>.
    Regards,
    Mon

  • What's the safest product/material to clean my iPad air screen with?

    What's the safest product/material to clean my iPad air screen with?

    Read through what Apple recommends: http://support.apple.com/kb/ht3226

  • Bi product material receipt

    Hi experts,
    I want to know the the material analysis data for monthwise.
    If i check in MCPO ,i can get the report for FG,SFG.
    I couldn't able to get the Biproduct GR.
    Is there any standard to find Biproduct GR monthwise.
    Awaiting for ur reply
    Thanks
    Bhuvaneswaran

    Hi,
    There is no standard report to fetch the Bi-product Material Analysis Data. But you can use the Tcode : MB51 itself with the selection fields Movt type :531 and Period : Mention the reqd period (month you require).
    Otherwise you can create a query using the Tables : MSEG
    Hope this will help you.
    regards
    radhak mk

  • SRM Product / Material creation - Data flow to SAP MDM

    Dear SAP friends,
    I need your help with 2 issues. Thanks in advance for your collaboration.
    Our client needs to create products and make them available to purchase almost immediately.
    The scenario we had working for the last 2 years was: product creation in SRM (fields: short description / product category / measure unit), that would then be sent to SAP MDM for data enrichment, through BBP_CCM_TRANSFER_CATALOG (JOB running every 1 minute). This solution worked well for the last 2 years.
    Recently, we are having some problems with this job. We noticed that, sometimes SRM doesn´t send the new products to MDM, and we think it´s a report performance problem. The report doesn´t maintain is normal behavior when executed every 1 minute.
    SAP advice is to only run this report once a day. That would obviously require having a minimum time frame of 1 day between product creation and its availability (purchase), which isn´t acceptable in this client business model.
    Question 1: Did anyone have a client with similar requirement? What was the implemented solution?
    Because of report performance problems, we are running it (BBP_CCM_TRANSFER_CATALOG) every 5 minutes. It happens that sometimes, more than one catalog manager creates products in that time frame, and MDIS when importing the products to MDM, creates one unique workflow JOB making it impossible to assign it to both catalog managers for enrichment.
    Question 2: How can we ensure that SRM sends only one product per xml files sent to XI / PI ? Or, perhaps, ensure that XI / PI splits the xml file sent from SRM into several files with one product each.
    Thank you very much for your help in advance,
    Best Regards,
    João S. Carvalho

    Hi meka
    In product costing values flows as follows;
    In product cost calculation raw material prices are costed which comes from material master in MM01
    Product operations: i.e material BOM and master receipe or routings from PP module.From PP module operation costs comes in product costing.
    In CO module: In Tcode KP26 we maintain activity\cost center planning for activities like machine hours, set up hours, labour hours etc.Here we define plan quantity and plan prices.
    In Cost Sheet (KZS2) we maintain base cost elements & overheads and While order creation we calculate planned cost of that particular  material.and then check the variances after getting actual cost of product.
    Hope this will help you and if found useful assign points.
    Let me know if you need more information.
    Regards
    Nilesh.

  • Payment terms accoring to product/material range

    Hi SAP experts,
    We would like to be able to define different payment terms for a vendor, this is based on a subset of material, generally where one vendor is shared by multiple buyerships different payment terms have been negotited for different product ranges.
    e.g. ABC Ltd supplies stationery @ 0 days, and hardware at 45 days.
    Is there any way we can define different payment terms in for one vendor in one invoice as per different matarial/product range?
    Cheers
    Sam

    Hi,
    You can use the vendor sub range to define parameters based on differences in products.  Read the link below:
    [Vendor sub Range|http://help.sap.com/saphelp_46c/helpdata/en/12/084445470311d1894a0000e8323352/frameset.htm]
    [Sub Range details|http://help.sap.com/saphelp_46c/helpdata/en/2c/614e3981187116e10000000a114084/frameset.htm]
    You can also use alternative data for vendor at plant level, if your need is to differentiate between plants and not materials.
    You will find the alternative data button in the Purchasing data view of the vendor master.
    Cheers...

  • Service Product/material

    Dear all.
    What is thr Diff between Service product and Service material..in Which scenario we can use it ...these..(I mean in Customer Service Point of view)
    Plzz give some information with general Example
    Thanks in Advance
    Regards
    LUckky
    Edited by: lucky on Sep 15, 2008 9:17 AM
    Edited by: lucky on Sep 15, 2008 9:17 AM

    Hello,
    The Service product and the material is same. The material is of material type DIEN / LEIS (Service). This is used to capture the service costs.
    It can be explained like When you do a standard repair with a repair item the costs should be XX. When do some other kind of repair with Premium repair, item the costs should be YY.
    Prase

  • Vendor approval wrt Product & material

    Dear all,
    My client has the requirement that material from the vendor has to be approved based on the product
    for eg:
    1) material A is procured from vendor "123" for finished product XYZ . it should be approved
    2) Same material A is procured from vendor "123" for finished product PQR . it should not be approved.
    Please advice hw to do this as when we go for QI01, we approve wrt material-vendor-plant, but nw I want to do material-vendor-plant-product
    Thanks & Regards,
    Ramesh Guthula

    Hi,
    Ask your ABAPer to customise the same through Z Tables.
    Regards,
    Mohd Ali.

  • WM- -Production Material Staging process

    hi friends
                 i cant do material staging ,i configured the following steps
                 1 OMK0 - Check all the settings are ok
                 2 PK05 - Supply area is created and assigne to Plant/Storage location
                 3 WM PP staging control - check what staging indicator is assigned
                 4 Check any storage bin created for Production supply storage type 100 in LS03N
                 5 Check in LPK3 whether control cycle is created for ST 100 with bin for plant and suplply area
                 6 Also check Supply area is assigned to Work center in CR03
                 7 maintain WM1 & 2 views for compnents
    i  issued the stock against production order. i did TR and TO and stock is showing in the  914 storage   type..
    i have the error"no wm relevant components exist function not possible"
    then what i do next steps....
    pls suggest to me to do production order process
    with regards
    dinesh
    Edited by: code acess on Sep 29, 2011 9:25 AM
    Edited by: code acess on Sep 29, 2011 12:04 PM

    The system determines the material staging type on the basis of the control cycle and determines the production storage bins, in which the components should be staged. 
    Please take a look at this topic: WM-PP interface - material staging
    This information: Material Staging - Warehouse Management System (WMS) - SAP Library
    And this one too: Control Cycle - Warehouse Management System (WMS) - SAP Library
    This will help you understand the staging process in detail and is quite easy to read.

  • Can we Delete the Product/Material  from Product Master in CRM

    Hi Gurus,
    I want to delete some test products from Product master, I don't see any link for delete there in product master transaction.
    Can we Delete the Product from Product Master in CRM??
    Thanks in Advance.
    Regards,
    Manoj Tiwari

    Try this:
    *& Report  ZVB_PRODUCT_DELETE          (release CRM 4.0 SP03)          *
    *&         Instructions are in OSS Note #427332                        *
    report  zvb_product_delete line-size 300.
    const, include
    include com_product_const001.
    include com_product_const003.
    include com_product_const009.
    include com_product_const011.
    include com_settype_attribute_const03.
    tables:  comm_iproduct,                                     "#EC NEEDED
             comm_product.
    constants:
           gc_program type programm value 'COM_PRODUCT_DELETE_SINGLE'.
    data:  gv_product_guid type comt_product_guid,
           gv_prty  type comt_product_type,
           gv_syslog(70)  type c,
           lv_mobile_active  type comt_boolean,
           lv_delete  type comt_boolean value 'X'.
    data:  lt_settypes      type  comt_frgtype_tab_ext,
           lt_status_guid   type comt_prd_status_guid_tab.
    data: begin of lt_products occurs 0,
             product_id   like comm_product-product_id,
             product_guid like comm_product-product_guid,
          end of lt_products.
    Screen User query
    selection-screen comment /1(60) text-006.
    selection-screen skip 2.
    select-options: s_prid for comm_product-product_id.
    *parameters: p_prid type comt_product_id   obligatory,
    parameters: p_prty type comt_product_type obligatory default '01',
                p_logs type comt_logsys       obligatory,
                p_objf type comt_product_object_family,
                p_send  as checkbox modif id 001 default on,
                p_usage as checkbox modif id 001 default off,
                p_test  as checkbox default 'X'.
    at selection-screen output.
      perform check_mobile_download
          changing lv_mobile_active.
      if lv_mobile_active is initial.
        loop at screen.
          check screen-group1 = '001'.  "disable field p_send, p_usage
          screen-active = '0'.
          modify screen.
        endloop.
      endif.
    start-of-selection.
    perform check_authority.
    Write syslog entry
    concatenate 'Rep. ' sy-repid ': ' p_prid(30) '/' p_prty '/' p_logs
            into gv_syslog.                                    "#EC NOTEXT
    call 'C_WRITE_SYSLOG_ENTRY'
       id 'TYP' field ' '
       id 'KEY' field 'C00'
       id 'DATA' field gv_syslog  .
    inactive product are not supported here
    select * from comm_iproduct
            where product_id    = p_prid
            and   product_type  = p_prty
            and   object_family = p_objf
            and   logsys        = p_logs.
    endselect.
    if sy-subrc = 0.
       write: / text-001, text-005.
       exit.
    endif.
    read products according to the selection criteria
      select * from comm_product
             into corresponding fields of table lt_products
             where product_id    in s_prid
             and   product_type  = p_prty
             and   object_family = p_objf
             and   logsys        = p_logs.
      if sy-subrc ne 0.
        write: / text-010.
        exit.
      endif.
      loop at lt_products.
      read product and enqueue
        perform product_enqueue
             using lt_products-product_id
                   p_prty
                   p_logs
                   p_objf
             changing gv_product_guid
                      gv_prty.
        check not gv_product_guid is initial.
        if p_usage = on.
          perform check_usage
                  using gv_product_guid
               changing lv_delete.
        endif.
        check lv_delete = on.
        check p_test = space.
      first delete the component of the IBase
        perform delete_ibasecomponent
             using gv_product_guid.
        perform delete_extensions
             using gv_product_guid
                   lt_settypes.
        perform delete_settypes
             using gv_product_guid
                   lt_settypes
          changing lt_status_guid.
        perform delete_interlinkages
             using gv_product_guid.
        perform delete_pme_data                      "multivalue attributes
             using gv_product_guid.
        perform delete_decoupled_data                "long text, longmatnr,
             using gv_product_guid.                  "ibase prodvar,...
        perform delete_status
             using lt_status_guid.
        perform delete_favorites
             using gv_product_guid.
        perform delete_clear_case
             using gv_product_guid.
        if p_send = 'X'.
          perform send_deletion_to_mw
               using gv_product_guid.
        endif.
        delete from comm_product     where product_guid = gv_product_guid.
        delete from comm_producth    where product_guid = gv_product_guid.
        delete from comm_product_idx where product_guid = gv_product_guid.
        delete from comm_prwb_user_2 client specified
               where client = sy-mandt and last_object = gv_product_guid.
        call function 'BAPI_TRANSACTION_COMMIT'
          exporting
            wait = 'X'.
        write: / text-001, lt_products-product_id, text-004.
      endloop.
    *&      Form  product
    form product_enqueue
       using   iv_prid  type comt_product_id
               iv_prty  type comt_product_type
               iv_logs  type comt_logsys
               iv_objf  type comt_product_object_family
      changing ev_pguid type comt_product_guid
                          ev_prty type comt_product_type.
      data ls_product type  comt_product.
      call function 'COM_PRODUCT_GUID_GET'
        exporting
          iv_product_id    = iv_prid
          iv_product_type  = iv_prty
          iv_logsys        = iv_logs
          iv_object_family = iv_objf
          iv_show_popup    = 'X'
        importing
          ev_product_guid  = ev_pguid
        exceptions
          not_found        = 1
          wrong_call       = 2
          internal_error   = 3
          others           = 4.
      if sy-subrc <> 0.
        write: / text-001, space, iv_prid.
        write:   text-003.        "Product not found
        exit.
      else.
        write: / text-001, space, iv_prid.
        write:   text-002.        "Product found
      endif.
      call function 'COM_PRODUCT_READ_SINGLE'
        exporting
          iv_product_guid = ev_pguid
          iv_enqueue_mode = ' '
        importing
          es_product      = ls_product
        exceptions
          not_found       = 1
          wrong_call      = 2
          foreign_lock    = 3
          enqueue_failed  = 4
          others          = 5.
      if sy-subrc <> 0.
        if sy-subrc > 2.
          write: / text-001, space, iv_prid.
          write:   text-007. "Product enqueued
          exit.
        else.
          message id sy-msgid type sy-msgty number sy-msgno
             with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          exit.
        endif.
        exit.
      endif.
      ev_prty = ls_product-product_type.
    special authotirty check (with considering the assigned
    categories)
    call function 'COM_PRODUCT_CT_AUTHORITY_CHECK'
       exporting
         iv_auth_act     = '06'
         iv_product_guid = ev_pguid
       exceptions
         no_authority    = 1
         wrong_call      = 2
         internal_error  = 3
         others          = 4.
    if sy-subrc <> 0.
       message id sy-msgid type sy-msgty number sy-msgno
               with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    endform.                               " product
    *&      Form  delete_extensions
    form delete_extensions
         using iv_product_guid type comt_product_guid
               et_settype      type comt_frgtype_tab_ext.
      data:  lv_db_tab        type ddobjname,
             lv_subrc_pr_guid like sy-subrc,
             table_name_ref   type ref to data,
             lt_extension     type comt_frgtype_tab_ext,
             ls_extension     type comm_frgtype_ext.
      field-symbols: <table_name> type any,
                     <field_name> type any.
      check not iv_product_guid is initial.
    delete extensions e.g. COMM_PRFREEATTR, CRMM_PR_TAX, COMM_PR_UNIT,
                           COMM_PR_SHTEXT,COMM_PR_GTIN, comm_prprdcatr,..
      perform load_extensions
              using  iv_product_guid
           changing  lt_extension
                     et_settype.
      loop at lt_extension into ls_extension.
        lv_db_tab = ls_extension-frgtype_tab.
        check not lv_db_tab is initial. "CRM_CAT_SAT & CRM_CAT_PUR
      does table exist ?
        call function 'DDIF_NAMETAB_GET'
          exporting
            tabname   = lv_db_tab
          exceptions
            not_found = 1
            others    = 2.
        check sy-subrc = 0.
      Due to any reason (I don't know why) sometimes we have product_guid
      and sometimes we have frg_guid as name of the key field.
        create data table_name_ref type (lv_db_tab).
        assign table_name_ref->* to <table_name>.
        assign component 'PRODUCT_GUID' of structure <table_name>
               to <field_name>.
        lv_subrc_pr_guid = sy-subrc.
        if lv_subrc_pr_guid = 0.
          delete from (lv_db_tab)
                 where product_guid = iv_product_guid.
        else.
          delete from (lv_db_tab)
                 where frg_guid     = iv_product_guid.
        endif.
      delete history of extension table
        concatenate ls_extension-frgtype_tab 'H' into lv_db_tab.
        create data table_name_ref type (lv_db_tab).
        assign table_name_ref->* to <table_name>.
        assign component 'LOGSYS' of structure <table_name>
                                  to <field_name>.
        check sy-subrc = 0.
        call function 'DDIF_NAMETAB_GET'
          exporting
            tabname   = lv_db_tab
          exceptions
            not_found = 1
            others    = 2.
        check sy-subrc = 0.
        if lv_subrc_pr_guid = 0.
          delete from (lv_db_tab)
                 where product_guid = iv_product_guid.
        else.
          delete from (lv_db_tab)
                 where frg_guid     = iv_product_guid.
        endif.
      endloop. "  end of loop for all extensions
    endform.                    " delete_extensions
    *&      Form  delete_settypes
    form delete_settypes
         using iv_product_guid   type comt_product_guid
               it_settypes       type comt_frgtype_tab_ext
        changing et_status_guid  type comt_prd_status_guid_tab.
      data: ls_reldesc type  coms_pr_org_rel,
            lt_reldesc type  comt_pr_org_rel_tab,
            lt_reltab  type  ref to data,
            ls_settype type  comt_settype_ext,
            ls_table   type  tabname,
            ls_status_guid   type crmt_object_guid.
      field-symbols:
           <fs_reltab>   type any table,
           <fs_relrow>   type any,
           <fs_settype>  type comt_frgtype_guid,
           <fs_setguid>  type comt_frg_guid,
           <fs_statguid> type crmt_object_guid.
    memorise product status guide
      ls_status_guid = iv_product_guid.
      append ls_status_guid to et_status_guid.
    load description of relation tables
      call method cl_com_product_org_type=>comc_pr_org_link_read_all
        importing
          et_pr_org_rel = lt_reldesc
        exceptions
          no_desc       = 0.
    for all relation types (e.g. comm_pr_frg_rel, comm_pr_frg_rod)
      loop at lt_reldesc into ls_reldesc.
      read product/settype relations
        create data lt_reltab type (ls_reldesc-link_table_ttyp).
        assign lt_reltab->* to <fs_reltab>.
        call function ls_reldesc-func_rel_read_pr
          exporting
            iv_product_guid = iv_product_guid
          importing
            et_rel          = <fs_reltab>
          exceptions
            wrong_call      = 1
            not_found       = 2
            others          = 3.
        check sy-subrc = 0.
      for all links...
        loop at <fs_reltab> assigning <fs_relrow>.
          assign component 'FRAGMENT_TYPE' of structure <fs_relrow>
                                                     to <fs_settype>.
          assign component 'FRAGMENT_GUID' of structure <fs_relrow>
                                                     to <fs_setguid>.
          assign component 'STATUS_OBJECT' of structure <fs_relrow>
                                                     to <fs_statguid>.
          read table it_settypes with key frgtype_guid = <fs_settype>
                                 into ls_settype.
          check sy-subrc = 0.
        settype table
          delete from (ls_settype-frgtype_tab)
                 where frg_guid = <fs_setguid>.
        history table
          concatenate ls_settype-frgtype_tab 'H' into ls_table.
          delete from (ls_table)
                 where frg_guid = <fs_setguid>.
        memorise settype status guide
          if not <fs_statguid> is initial.
            ls_status_guid = <fs_statguid>.
            append ls_status_guid to et_status_guid.
          endif.
        endloop. "of links
      relation table (e.g. comm_pr_frg_rel)
        delete from (ls_reldesc-link_table)
               where product_guid = iv_product_guid.
      history table
        concatenate ls_reldesc-link_table 'H' into ls_table.
        delete from (ls_table) where product_guid = iv_product_guid.
      endloop. " of relation types
    endform.                    " delete_settypes
    *&      Form  delete_interlinkages
    form delete_interlinkages
         using iv_product_guid type comt_product_guid.
      constants: cv_db_name(8)  type c value 'COMM_IL_',
                 cv_suffix_h(2) type c value '_H'.
      data: lt_ilinks   type  comt_il_data_tab,
            lt_reltype  type  comc_il_reltype_tab with header line,
            lv_ddictype type  dd02v-tabclass,
            lv_dbname        type  comt_structure.
    CHECK p_objf IS INITIAL.
    first we have to read all ILs where the productguid is sourceguid
      refresh lt_ilinks.
      call function 'COM_IL_API_WHERE_USED'
        exporting
          iv_objectguid   = iv_product_guid
          iv_objtype      = gc_bus_objtype_bus1178
          iv_direction    = 'S'
        importing
          et_interlinkage = lt_ilinks.
      check not lt_ilinks[] is initial.
      delete adjacent duplicates from lt_ilinks comparing reltype.
    read ilinkage customizing
      select * from comc_il_reltype into table lt_reltype
         for all entries in lt_ilinks where reltyp = lt_ilinks-reltype.
    delete interlinkages
      loop at lt_reltype.
        if lt_reltype-streltyp ne space.
          concatenate cv_db_name lt_reltype-streltyp into lv_dbname.
        else.
          concatenate cv_db_name lt_reltype-reltyp   into lv_dbname.
        endif.
      delete data
        call function 'DDIF_NAMETAB_GET'
          exporting
            tabname   = lv_dbname
          importing
            ddobjtype = lv_ddictype
          exceptions
            not_found = 1
            others    = 2.
        check sy-subrc = 0 and lv_ddictype = 'TRANSP'.          "#EC NOTEXT
        delete from (lv_dbname) where sourceguid = iv_product_guid.
      delete history
        check lt_reltype-change_doc = 'X'.
        concatenate lv_dbname cv_suffix_h into lv_dbname.
        call function 'DDIF_NAMETAB_GET'
          exporting
            tabname   = lv_dbname
          importing
            ddobjtype = lv_ddictype
          exceptions
            not_found = 1
            others    = 2.
        check sy-subrc = 0 and lv_ddictype = 'TRANSP'.          "#EC NOTEXT
        delete from (lv_dbname) where sourceguid = iv_product_guid.
      endloop.
    endform.                    "delete_interlinkages
    *&      Form  delete_pme_data
    form delete_pme_data
         using iv_product_guid type comt_product_guid.
    delete multivalue attributes from PME
      data: lt_pmemap  like standard table of comm_pme_prd_map,
            ls_pmemap  like comm_pme_prd_map.
      select *  into table lt_pmemap
                from comm_pme_prd_map
                where crm_object_guid = iv_product_guid.
      check sy-subrc = 0.
      loop at lt_pmemap into ls_pmemap.
        call function 'CRM_SCE_DB_KB_DELETE'
          exporting
            iv_kbid = ls_pmemap-kbid.
      endloop.
      delete comm_pme_prd_map from table lt_pmemap.
    endform.                    "delete_pme_data
    *&      Form  send_deletion_to_mw
    form send_deletion_to_mw
         using iv_product_guid type comt_product_guid.
      data:  cv_function_module like  rs38l-name
                  value 'CRM_PROD_SEND_DELETION_MESSAGE'.       "#EC NOTEXT
      data:  lt_product_guid  type comt_product_s_tab with header line.
      lt_product_guid-product_guid = iv_product_guid.
      append lt_product_guid.
      call function 'FUNCTION_EXISTS'
        exporting
          funcname           = cv_function_module
        exceptions
          function_not_exist = 1
          others             = 2.
      check sy-subrc = 0.
      call function cv_function_module
        exporting
          it_product_guid = lt_product_guid[]
          iv_test_only    = space
        exceptions
          internal_error  = 1
          others          = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.                    " send_deletion_to_mw
    *&      Form check_mobile_download
    form check_mobile_download
      changing ev_mobile_active type comt_boolean.
      data:
            cv_db_tab   type ddobjname value 'SMOMARA'.
      data: lv_lines    type i value 0.
      clear ev_mobile_active.
      call function 'DDIF_NAMETAB_GET'
        exporting
          tabname   = cv_db_tab
        exceptions
          not_found = 1
          others    = 2.
      check sy-subrc = 0.
      select count( * ) into lv_lines
        from (cv_db_tab) up to 10 rows.                     "#EC CI_NOWHERE
      if lv_lines > 0.
        ev_mobile_active = on.
      endif.
    endform.                    " check_mobile_download
    *&      Form check_authority
    form check_authority.
      tables:  t000, comc_pr_tool_reg.                          "#EC NEEDED
    check productiv system - report must not be executed
      select single * from t000 client specified             "#EC CI_CLIENT
                      where mandt = sy-mandt.
      if t000-cccategory = 'P'.
        message e807(com_product) .
        leave.
        leave to transaction '    '.
      endif.
    Check authority for product delete
      call function 'COM_PRODUCT_AUTHORITY_CHECK'
        exporting
          iv_auth_act    = '06'
        exceptions
          no_authority   = 1
          wrong_call     = 2
          internal_error = 3
          others         = 4.
      if sy-subrc ne 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      MESSAGE e808(com_product).
        leave.
        leave to transaction '    '.
      endif.
    Additional step: registration
      select single * from comc_pr_tool_reg
             where program_name = gc_program
             and   user_name    = sy-uname
             and   exec_date    = sy-datum.
      if sy-subrc ne 0.
        message e809(com_product).
      endif.
    endform.                    " check_authority
    *&      Form  delete_decoupled_data
    form delete_decoupled_data
         using iv_product_guid type comt_product_guid.
      include com_product_const018.
    Deleting decoupled and customer requested data (long_text, longmatnr,
      upload registry, ibase product variants coming from R/3,
      archive verify registry). Documents like PDF,XLS,DOC,JPG stored in
      Content Management will not be deleted
    load BADI implementations
      class: cl_exithandler definition load.
      data:  exit_obj type ref to if_ex_com_product_delete.
      call method cl_exithandler=>get_instance
        exporting
          exit_name              = gc_badi-com_product_delete
          null_instance_accepted = on
        changing
          instance               = exit_obj.
    call BADI implementations (User Exit)
      call method exit_obj->delete_extra_data
        exporting
          iv_product_guid = iv_product_guid.
    endform.                    " delete_decoupled_data
    *&      Form  load_extensions
    form load_extensions
         using iv_product_guid type  comt_product_guid
      changing et_extension    type  comt_frgtype_tab_ext
               et_settype      type  comt_frgtype_tab_ext.
      data: lt_prd_cat      type  comt_prod_cat_rel_tab,
            ls_prd_cat      type  comt_prod_cat_rel,
            lt_cat_frg      type  comt_prcat_frag_rel_tab,
            ls_cat_frg      type  comt_prcat_frag_rel,
            lt_settype_guid type  comt_frgtypeguid_tab,
            ls_settype_guid type  comt_frgtype_guid,
            lt_settype      type  comt_frgtype_tab_ext.
      refresh et_extension.
    read categories assigned to product
      call function 'COM_PROD_CAT_REL_READ_WITH_PR'
        exporting
          iv_product_guid = iv_product_guid
        importing
          et_set          = lt_prd_cat.
      loop at lt_prd_cat into ls_prd_cat.
      read allowed settypes for categories
        call function 'COM_PRCAT_FRAG_REL_READ'
          exporting
            iv_category_guid  = ls_prd_cat-category_guid
          importing
            et_prcat_frag_rel = lt_cat_frg
          exceptions
            wrong_call        = 1
            others            = 2.
        check sy-subrc = 0.
        refresh lt_settype_guid.
        loop at lt_cat_frg into ls_cat_frg.
          ls_settype_guid = ls_cat_frg-frgtype_guid.
          append ls_settype_guid to lt_settype_guid.
        endloop.
      read settype defintions
        call function 'COM_SETTYPE_READ_MULTIPLE'
          exporting
            it_settype_guid = lt_settype_guid
          importing
            et_settype      = lt_settype
          exceptions
            nothing_found   = 1
            others          = 2.
        if sy-subrc =  0.
        only settypes
          et_settype[] = lt_settype[].
          delete et_settype[] where
            ( prod_comp_type = gc_prod_comp_type-extension or
              prod_comp_type = gc_prod_comp_type-simple_extension ).
        only extensions
          delete lt_settype[] where
            ( prod_comp_type ne gc_prod_comp_type-extension and
              prod_comp_type ne gc_prod_comp_type-simple_extension ).
          et_extension[] = lt_settype[].
        endif.
      endloop. " end of product categories
    endform.                    " load_extensions
    *&      Form  delete_status
    form delete_status
      using it_status_guid type comt_prd_status_guid_tab.
      data:
        lt_status like crm_jsto_pre occurs 0,
        ls_status type crm_jsto_pre,
        ls_status_guid type crmt_object_guid.
      loop at it_status_guid into ls_status_guid.
        ls_status-objnr = ls_status_guid.
        append ls_status to lt_status.
      endloop.
      call function 'CRM_STATUS_DELETE_MULTI'
        tables
          objnr_table = lt_status.
    endform.                    " delete_status
    *&      Form delete_favorites
    form delete_favorites
         using iv_product_guid type  comt_product_guid.
      call function 'COM_PRODUCT_DELETE_FAVORITES'
        exporting
          iv_object_guid = iv_product_guid.
    endform.                    " delete_favorites
    *&      Form delete_clear_case
    form delete_clear_case
         using iv_product_guid type  comt_product_guid.
      data:   ls_customizing type comc_product,
              lv_clear_case_guid type comt_clear_case_guid.
    Is cusotmizing-flag INACTIV_PROD activated ?
      call method cl_com_product_general=>comc_product_read_all
        importing
          es_prod_general = ls_customizing
        exceptions
          not_found       = 1
          others          = 2.
      check ls_customizing-inactive_prod = on.
      select single clear_case_guid from comm_clear_targ        "#EC *
               into lv_clear_case_guid
               where object_guid = iv_product_guid  "active
                 and object_class = 'PROD'.
    normaly two entries for active and inaktive product version
      delete from comm_clear_targ
               where clear_case_guid = lv_clear_case_guid
                 and object_class = 'PROD'.
      delete from comm_clear_stack
             where guid = lv_clear_case_guid
               and application = 'PROD'.
    endform.                    "delete_clear_case
    *&      Form check_usages
    form check_usage
         using iv_product_guid type  comt_product_guid
      changing ev_delete type comt_boolean.
      include sbal_constants.
      data:  cv_function_module like  rs38l-name
                  value 'COM_PRODUCT_USAGE_CHECK'.              "#EC NOTEXT
      data:  ls_product  type comt_product,
             lt_product  type comt_product_tab.
      data:  ls_logheader     type bal_s_log,   "Kopfdaten des Protokolls
             lv_loghandle     type  balloghndl.
      data:  ls_msg_filter type bal_s_mfil,
             ls_log_filter type bal_s_lfil,
             lt_msg_handle type bal_t_msgh,
             ls_log_handle type bal_s_logh,
             ls_msg_handle type balmsghndl,
             ls_msg        type bal_s_msg,
             ls_string     type string.
    does CRM function exist
      call function 'FUNCTION_EXISTS'
        exporting
          funcname           = cv_function_module
        exceptions
          function_not_exist = 1
          others             = 2.
      check sy-subrc = 0.
    create log handle
      ls_logheader-aldate    = sy-datum.
      ls_logheader-altime    = sy-uzeit - 10.
      ls_logheader-aluser    = sy-uname.
      ls_logheader-alprog    = sy-repid.
      call function 'BAL_LOG_CREATE'
        exporting
          i_s_log                 = ls_logheader
        importing
          e_log_handle            = lv_loghandle
        exceptions
          log_header_inconsistent = 1
          others                  = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      ls_product-product_guid = iv_product_guid.
      append ls_product to lt_product.
    call usage checks
      call function cv_function_module
        exporting
          it_product   = lt_product
          iv_loghandle = lv_loghandle.
    filter settings
      ls_log_handle-sign   = 'I'.
      ls_log_handle-option = 'EQ'.
      ls_log_handle-low    = lv_loghandle.
      append ls_log_handle to ls_log_filter-log_handle.
    get messages
      call function 'BAL_GLB_SEARCH_MSG'
        exporting
          i_s_log_filter = ls_log_filter
          i_s_msg_filter = ls_msg_filter
        importing
          e_t_msg_handle = lt_msg_handle
        exceptions
          msg_not_found  = 1
          others         = 2.
      check sy-subrc = 0.
      ev_delete = space.
      write: / text-001, text-008.
    read messages
      loop at lt_msg_handle into ls_msg_handle.
        call function 'BAL_LOG_MSG_READ'
          exporting
            i_s_msg_handle = ls_msg_handle
          importing
            e_s_msg        = ls_msg
          exceptions
            log_not_found  = 1
            msg_not_found  = 2
            others         = 3.
        check sy-subrc = 0.
        message id ls_msg-msgid type ls_msg-msgty number ls_msg-msgno
            with ls_msg-msgv1 ls_msg-msgv2 ls_msg-msgv3 ls_msg-msgv4
            into ls_string.
        write: /, ls_string.
        clear ls_msg.
      endloop.
    endform.                    " check_usages
    *&      Form  delete_ibasecomponent
          text
         -->P_GV_PRODUCT_GUID  text
    form delete_ibasecomponent using p_product_guid.
      data: lv_guid22 like sysuuid-c22,
            ls_comp   type  ibas_dat1.
      tables: ibin.
      break pvho.
      call function 'GUID_CONVERT'
        exporting
          iv_guid_x16            = p_product_guid
        importing
          ev_guid_c22            = lv_guid22
        exceptions
          no_unicode_support_yet = 1
          parameters_error       = 2
          others                 = 3.
    find the component
      select * from ibin
             where objnr = lv_guid22.
        clear ls_comp.
        ls_comp-instance = ibin-instance.
        ls_comp-ibase = ibin-ibase.
        call function 'IBASE_COMP_DELETE'
          exporting
            i_comp              = ls_comp
          exceptions
            data_not_consistent = 1
            ibase_locked        = 2
            not_succesful       = 3
            others              = 4.
        if sy-subrc eq 0.
          call function 'IBASE_SAVE'.
        endif.
      endselect.
    endform.                    " delete_ibasecomponent

  • PDO Lock on a product/material

    Hello SAP Gurus
    again i am in need of your advise/help.
    I currently have an item that is showing available on both EWM and ERP due to it having a PDO lock.please see screen shot below:
    I need to remove the PDO lock on this item so that my stock shows zero for this item as we donot have stock physically.The dcument in ERP has GI completed,does any one know how to remove the PDO reference?Please assist urgently.

    HI Sathish
    The delivery is already completed in EWm and in ERP as well.is there an laternative to this?like a table that i can edit/change this?
    Regards
    Leonard

  • Creation of production order without material reference

    Hi Guys,
    Can anybody propose the solution for the following scenario :
    When a raw material issued to a production order gets scrapped but at the same time that raw material which is scrapped can aslo be cut through some seperate operation and can be used for someother purpose later time for the same industry  then in that case how to deal with the scenario????
    Thanx in advance
    Venkat

    Dear Venkat,
    when ever a raw material sis getting scrapped, you need to decide where you want to scrap wit as a product or as a byproduct or return to store as damaged raw material by reversing the movement -261.
    If you got for the first option-as a product
    then perform the confirmation with qty as rework qty. go for rework order configuration (order with out material).
    If you want to treat it as a by product
    then do the GR with 0 qty, but in the good movement screen enter this product material with -ve qty and movement type which supports the byproduct-531(in std SAP),
    effect is the cost of this will be removed from parent product order.
    Now you got back the material in stores, identify the material by means of a batch.
    You can now think of reissuing it to other order or scrap if it is completely damaged at the end of period.
    If you want to return it as a damaged raw material
    reverse the transaction of 261 and send the material back to stores with a identification by means of batch or manual identification.
    Please come back if required

  • Material Group,Product Group

    Hi ,
    Can any one explain what is meant by Material Group, Product Group. Where is it used. What is the difference between
    Material and Product Group. Do we need to have any prequisites for creating Product Group with Tcode MC84?.
    Thanks in advance

    Aditya,
    Material Group:
    This is basically a field in Material master Basic data1. This field is available in most of the Purchasing Reporting transactions and you can run reports based on them.  Material Group is also used as a reference when creating Purchase Inforecord without any material number reference.
    Product Group:
    Product Group is a material master of type "PROD". This type of material master can only be used for planning purpose, you can assign finished materials(FERT) as members to them. Example: If you are manufacturing a product which goes in for several type of packings then you create a product group and assign the individual finished product material numbers as members, here we also define the proportional factors for aggregation and disaggregation.
    Hope this helps your understanding.
    Regards,
    Prasobh

Maybe you are looking for

  • How get all released production orders

    Hi experts, I need to get all released Production Orders for a specific plant. I noticed that usually you don´t select directly from table AUFK. Most of people use function module WCFS_STTXT_GET to get the status of an order. I know that table AUFK h

  • Getting error while generating Business Blueprint Document for Project

    Hello Experts, I hv created a project in Solution manager 3.2 through solar_project_admin . Now iam in the phase of defining its Business Blueprint . I hv completed the steps, at the end when iam generating Business Blueprint document ,following erro

  • How to get 2011 PLANS in TEVEN?

    Hi I have this problem that i need to populate the position field in TEVEN table. Users can do that from SE30->2011 and edit the position there. but that doesn't refeclt the TEVEN position field even though there are two position field in there (i am

  • Trying to blend 2 objects in Illustrator cs4

    Hello again, I am trying to create a blend/gradient with a linked photo and a square object in my design, creating a seamless blend.  The way I am doing this is by selecting the topmost layer (in this case, an orange square), opening the transparency

  • MMS messages on 5500

    I'm having some problems sending images and videos in MMS messages. First, the image scaling works a bit illogically. If I take a picture using the max resolution 1600x1200 and image size is set to 'Large' in MMS settings, the image sent ends up bein