Documents in product master

Hi,
I'm writing an extension to the product catalog on ISA B2B to add some extra links into custom JSP pages from the catalog items.
On the CRM system, my functional people have set up a document (specifically a URL)  against relevant products, on the documents tab of the product master.   I need to be able to check if a given product has this document assigned to it and if so, pass it back to my Java in the B2B application.  To do so I am writing a BAPI to be called from the Java on the CRM system.
What I can't find is an easy way to see what documents are created against a given product.  Does anyone know of a class/function module I can use that would return me the documents for a given product if I supplied either the material number or the GUID?
Thanks.

Gareth,
Try class CL_CRM_DOCUMENTS.  There is a static method called GET_INFO which will return a list of documents for the business object.  It has been a long while since I used this class, but this will definitely return what you will need. 
The Business Ojbect will need to be filled with the following
INSTID - <Product Guid>
TYPE - 'BUS1178'
CA - BO
The resulting LOIOS, PHIOS table will contain the documents that are linked to the product master.
This technique will work with all business objects using CRM document management.  Once you have this data you can also use the method GET_DOCUMENT to actually retrieve the physical document if desired.
Good Luck,
Stephen

Similar Messages

  • Activate Change Document - Product Master Data

    Hi Experts,
    I am looking for comments on the following things. I hope the experts could share experience related to real time projects that you have worked / are working.
    I am considering the option to activate Change Documents for Product Master data, Product Location Master data and Transportation Lanes.
    Question I have (Please answer on any or all of the questions, if you can):
    1. Have you activated change documents on Product Master data? If so, how many products you have in total (number of entries in /SAPAPO/MATKEY)?
    Have you turned it off later due to performance reasons? Or Storage/hardware constraints?
    2. Do you have the change documents active on Location product master data? How many location products do you have in total (no. of entries in /SAPAPO/MATLOC)?
    3. Transportation lanes - Change documents activated? Does it also say if the external procurement relationship is activated or deactivated and the user who did this and date? How many transportation lanes do you have in total? Is there a possibility to activate the change documents on transportation lanes only for those which are procured from external vendors (not for Stock transfers... only for those arrives in from Suppliers)?
    Thanks,
    Suresh

    Hi Satish,
    Thanks for your reply
    2 more question:
    1. Are you logging the changes to all fields of product/product-location master data? Or you are logging only some of the data like: Product UoM changes / Product Header / etc?
    2. Also, regarding transportation lanes, does it also say who activated or deactivated the external procurement relationship and when?
    Thanks,
    Suresh

  • Document Tab page in Product Master(commpr01)?

    Hello CRM Gurus,
    I wolud like to know in which business context the Document Tab Page used in creation of Product Master.
    I see that i can attach any Document at my wish.of formats .doc,.xls,.pdf etc.
    But why is it given.?
    If i am creating an IP(Intellectual Property say a Movie Title)
    what can i attach or upload ?what is the business requirement?
    please clarify
    Thanks
    Arshad

    Hi Arshad,
    Document Tab is nothing more then a Informaton storage Point of location.
    For Ex; Say a company for which you are Implementing Deals with Product like Boilers, Lights etc.
    IF there  are mtuliple of choices and infomation related to eachd evice they can store those information in document tab.
    Information like Pictures, Some Text Description message.
    Document tab over here is also the same as you have in Activity, Opportunity Transaction.
    And in that we call them as Long Text storage Areas, so same rule Implies for products Document Tab as well.
    Hope this helps.

  • Change of UOM in Product Master with outstanding documents.

    Hi all,
    SRM allows the change of base UOM for product master even though there is outstanding document  using that particular product master. Shouldn't it be the case whereby change of base UOM for product master is not allowed if there is outstanding documents?
    Furthermore, I did a document check for the outstanding document and no error/warning message complaining that UOM in document does not match UOM as defined in product master. Any idea if this is correct?
    Thanks.

    hello weishan
    i will check once again from my side and let you know shortly.
    if you could change UOM in SRM master data , then it may not sync with ECC.
    i think best practice master data change in source system and synchronise with srm system.
    regards
    muthu

  • Multi-page document with multi Master-pages

    Using InDesign CS6 (Mac): 
    I'm to start a 50-page document that's single-pages (not spreads) for 3-hole-punch book. I'm using 2 Master pages, which are alternating between the front and back of each sheet. So page 1 is master A, page 2 is B, 3-A, 4-B, etc.
    So that I don't have to manually add alternate pages to the Pages window — is there an elegant way I could tell InDesign at the "New Document" level to create those 50 alternating pages?
    Thanks!

    Thanks, Jdanek, but after posting my question here I realized a better place to post it is in the InDesign forum, and I already got the answer there, which is to create a facing-page document with one master page, that has a larger margin at the binding side. The pages will be read as spreads, even if this a 3-hole-punch book. I then will save it as a single-page PDF for production.
    You can see the thread at Re: Create multi-page document with multi Master-pages

  • Drawing document in Production Order

    Hi,
    My scenario is as follows -
    There is a drawing  number for each material produced in-house.
    So when we are making a production order (manually or thru MRP) for each in-house produced material,
    I want the drawing document to automatically appear in the production order. The drawing document
    should also appear in the print out of the production order.
    This is needed so that the shop floor people can refer to the correct drawing while executing the production order.
    I am using document type - DRW
    In the schedulling  profile i have checked - Document links to BOM and also Material
    Kindly advise, how to go about this problem.
    Regards,

    Dear,
    For linking a document to production order, The prerequisite is do some customizing in SPRO.
    SPRO-->cross-application components>Document management>control data--> document types  in the document type you have to establish a object link to the document type and production orders.
    So select a document type and Define object link ---define a object --PORDER with screen 251 and save.
    Then goto production---Shop floor control --- master data --production schedul.profile
    and enable - document links material or Bom on release or creation.
    Then create a document using CVo1n.
    Provide the document type and name then enter
    In the next screen give the document description and below the originals sub header click on the OPEN Originals.
    Here you select your document and attach then save the document.
    Now got to Co02 and select the Document overview icon(Next to component overview icon) and provide the details of the operation to which the document to be attached and save.
    Document is attached to the Production order.
    Else Pressgo to CO02 and press SHIFT + F7..... then you can attach a document to a production order there manually also.
    Regards,
    R.Brahmankar

  • Attaching a document to production order.

    Hi.
    how can i attach a documet to the production order.
    generally we can attach a .txt to our production order. but i want  to attach a document  to the production order.
    how do i do that.
    need reps fast.

    Hi,
    For linking a document to production order, The prerequisite is do some customizing in SPRO.
    SPRO-->cross-application components>Document management>control data--> document types
    in the document type you have to establish a object link to the document type and production orders.
    So select a document type and Define object link ---define a object --PORDER with screen 251 and save.
    Then goto production---Shop floor control --- master data --production schedul.profile
    and enable - document links material or Bom on release or creation.
    Then create a document using CVo1n.
    Provide the document type and name then enter
    In the next screen give the document description and below the originals sub header click on the OPEN Originals.
    Here you select your document and attach then save the document.
    Now got to Co02 and select the Document overview icon(Next to component overview icon) and provide the details of the operation to which the document to be attached and save.
    then the Document is attached to the Production order.
    Hope this helps,
    Regards
    CSM Reddy

  • Transfer of Product Master and Contract data from SRM server to CAT

    Hi,
    We are using XI system to send product master data from SRM system to CAT (catalogue authorising tool) wherein both the SRM and the CAT add-on have been installed on the same web application server.
    On the SRM-> XI part, we are going to use ABAP client proxy. My question is can we use ABAP server proxy to send data from XI to CAT ? In other words, is CAT a part of ABAP system so that we can use proxy ?? 
    I am new to SAP environment and hence this question.
    Regards
    Ramesh

    Hello Ramesh,
           for uploading SRM master data to CCM u need not do any developements in ABAP , u have to just import SAP predefined SWCV's in Integration repository and configure required scenario "MasterDataInclusionInCatalogOnWAS" for u r corresponding WAS version.
          U can download configuration document from service marketplace named " Configuration Fact Book CCM 2.0 "
    Regards,
    Keith

  • Default date into Classification Period on GTS Customs Product Master

    Hello -
    Does anybody know if there is a way to default dates into the Classification Period dates that appear on the Customs Product Master when assigning a Tariff or Commodity Code to a Product?
    I am trying to default the current date into the Valid From date & a specific date in the future in the Valid To date so that a user does not need to enter these every time they classify a product.
    Your help is appreciated.

    Hi Ralf,
    try report /SAPSLL/PRODUCT_DELETE it deletes customs products.
    --> Disadvantage is 2000 entries per selection.
    --> Advantage is this report wont delete product which is used in customs or compliance document.
    Best regards,
    Gabriel.

  • 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

  • Configuration Guide for BP, Product master, number ranges

    Hi all,
    I am an experienced SD consultant but new to CRM, Right now I have very little knowledge of CRM. I needed configuration steps/guides for BP, product master, and org model mgt. Please no links to market place since i have to access to it.
    thanks in advance.
    Vikrant

    hi
    for people like you SAP has its best practice documents avaiable freely on net
    for your case you need
    C17
    just search it on google,
    you will get it
    it has BP,product and ORg base customisation
    best regards
    ashish

  • Pricing: New condition type not getting listed in options in product master

    Hi,
    I have created a new pricing procedure and also created a new condition type for it. I am trying to create a condition record in the product master for this  condition type but the condition is not there in the list of conditions. How can I inlcude it in the condition list?
    Even the new condition type I have created by copying 0PR0 is not getting listed in the options, whereas 0PR0 is getting listed.
    Regards,
    Meenakshi
    Edited by: Meenakshi Sawhney on Sep 9, 2010 8:27 AM
    Edited by: Meenakshi Sawhney on Sep 9, 2010 8:29 AM

    Hi Meenakshi,
    you need to enhance the condition maintenance group in the customizing, which is assigned to the product master. Please check: IMG: Customer Relationship Management -> Master Data -> Products -> Special Settings for Sales Operations -> Assign Condition Group to Application CRM and IMG: Customer Relationship Management -> Master Data -> Conditions and Condition Technique -> Condition Technique: Basics -> Create Maintenance Group.
    Best Regards,
    Michael

  • APO Product Master: New Freely Defined Attribute

    Dear Experts,
    We know than in the spro, you can defined up to 5 free attributes for the product Location master than appear in the Tab EXTRA.
    We would like to create a new one, I mean, a 6th one. The issue is that, even we are able to create it in the spro, we do not see it in the Product Master and therefore, we are not able to maintain it.
    Does anybody have the same issue? Wich kind of posibilities do we have?
    Thanks a lot for your help,
    Susana

    I concur with the previous reply.
    This is not possible.
    I have used all the 5 additional Fields in the past in DP Macros to store & use values on product-locations that are not available in Standard APO Product screen.  But the Limit is 5 and this can be seen in /sapapo/matkey table and /sapapo/matloc tables as well (via Trnx. SE11).
    However In addition, you can create 'Z' Tables in ABAP.  Alternatively you can save Additional masterdata in your own customer created TimeSeries Planning Area of which the Characteristics will be Product and Location only to save anything additional you need in TS Planning areas.  Alternatively a BI InfoCube can be created with same characteristics. The Userexit can then Grab data from this InfoCube or Z Table to do whatever you want.
    Typically it is common that Demand Planning MACROS use it in their Code Logic.  Remember, none of the additional attributes are used in the Standard Planning Algorithms / Logic of SNP, PPDS, DP or TPVS.  You have to write Custom Logic which is possible via Demand Planning Macros in Planning Books created on that Planning area.
    So the Best Option for Additional Fields is a TimeSeries Planning area which DP Macros can be built to use. Of course the Standard 5 can be in Product Master (/sapapo/mat1) and then additional to whatever number you want can be in the TimeSeries Planning area.
    Hope you find this usefull.  Reward points if you do.
    Regards,
    Ambrish Mathur

  • Check mode in APO product master

    Hi - it is understood from SAP HELP that the check mode in the product master corresponds to the requirement class in ECC. I tried to understand for my case but couldn't get it. Below is the snap from SAP doc which explains this case. Can anyone please elaborate on this so I can understand it clear. I basically want to know exactly from where the check mode is getting updated in APO. Thanks.

    GC,
    Requirement class is determined in ECC.  There can be more than one way it is determined, the illustration you have supplied is an example of how default Strategy 40 determines the default of two different requirements classes; one for Planned Independent Requirements, and one for Sales Requirements.  You can see this in ECC by looking at the configuration for a Planning Strategy (OPPS).  Strategy group determines Strategy,  Strategy determines requirements TYPE, and requirements type determines requirements CLASS (OVZH/OVZG).
    During sales order processing, the sales order contains a requirements type (which as I said before, can be determined by the ECC Planning strategy, but also can be determined in other ways).  When ATP is triggered in ECC for execution in SCM, the requirements TYPE in the Sales Doc determines a requirements CLASS, which is sent to APO for ATP processing.  Requirements CLASS is integrated in SCM as CHECK MODE.
    When a new SCM system is delivered, there are usually no check Modes defined; YOU have to do that.  You select the Requirements classes you wish to manage (from ECC) and you define them in SCM.  They can behave the same as in ECC, or you can make them behave differently.
    So, when a sales order arrives in SCM from ECC, for an availability check, and containing a requirements class, the sales order goes to the SCM configuration you have created, looks up the CHECK MODE that you created, and performs the availability check according to YOUR configuration.
    Best Regards,
    DB49

  • % Remaining SL Field in the APO product master

    Hi All,
    Any body have used the field % Remaining SL field maintained in the product master. Does CTM or SNP Optimzer does consider this?
    What is the significance of the field?
    We have distribution center DC1 and plant PL1
    We have two minimum shelf life requirements for given product X e.g. Minimum Shelf life guarantee of 30 days for X at PL1 and Inter-company minimum shelf life of 45 days between DC1 and PL1.
    How can we design solution for this where for the stock transfer requisitions from DC1 to PL1 we want to use Inter-company minimum shelf life and Minimum Shelf life guarantee for sales order at the PL1. I am just thinking % Remaining SL (where I can define Ingtercompany Shelf life) is the one which helps me meet this inter-company shelf life, but it seems to be not working. May be I am not sure how do define and use it.
    Please share your thoughts, experience and ideas on addressing these two minimum shelf life requirements.
    Thanks.
    J.

    Try MAT_SET()
    MAT_SET ( ‘field name’ ;  field_value' ; <'product'> ;  '<version>' ) sets the value of the specified field in the product master record for the specified product in the specified version. The arguments for product and version are optional. If you do not specify an argument for the product, the system uses the currently planned product. However, it is better for performance reasons to use the function ACT_PRODUCT.
    MAT_EXTRA_SET() i think sets the fields in the extras tab

Maybe you are looking for

  • Unable to block or throw credit limit message while posting Sales Order.

    Dear All, I hv created new customer and extended credit limit through FD32, assigned Risk Categeory and set the limit to 10,000/-. When i am posting Sale Order with 15,000 or more value, i am not getting any warning or error message while saving Sale

  • HP AIO: Scan to Computer STILL missing under Snow Leopard?

    Has anyone gotten any info on the status of the "Scan to Computer" and "Copy to Computer" (for reading memory card) under Snow Leopard? Being able to scan and copy files from my AIO directly to my Mac under Leopard was freaking awesome. Now I have to

  • Create document links and attributes in Portal KM

    Hi, I'm not sure if this has been done before but it's an interesting issue: We have an external Open Source Document Management System with which a large number of documents and graphics are managed (including translations). This DMS also contains v

  • EJB client needs both source and generated jars?

    From within JDeveloper, I created a basic EJB with a default package called EJBHello. Here is my directory structure after building and deploying this EJB: h:\EJBHello\EJBHello\EJBHome.java, etc. h:\EJBHello\EJBsource.jar h:\EJBHello\EJBgenerated.jar

  • Video Grayed Out

    When I connect my iPhone, some of the videos in the iTunes list are grayed out and do not sync to the device, even though I check them for syncing to the iPhone. Why is this?