"SET FLAG" at Material ID in product Master
Dear Frnds,
As per our scenario we have spare parts creating in commpr01 and when a person search's for a product we want to differntiate the Spare Part with Flag .
For example , when you have searched for product in crm then 10 product has been displayed , think in that 10 , three are spare parts so i want to differentiate that particular spare part with a flag . so were can i config or customise this . please replay me in detail .
Correct Answer will receive maximum points .
Thanks in Advance
Cheers
Ram
Hi
Create a New Search help.
In the search help use the Search help exit. Create your own function module .
For an example you can check the code in F4IF_SHLP_EXIT_EXAMPLE.
Thanks
Similar Messages
-
Restrict Authorization at Material level during production confirmation
Hi SAP Gurus,
I would like to ask if its possible to restrict authorization at Material Level during production confirmation.
Our scenario is we have SFG and FG which are handled by different group of people but it has the same Order Type. Now we want to restrict authorization such as one department can only confirm SFG and the other department can confirm FG only.
Is it possible to set authorization at material type or production scheduler level. IF not possible, is there other way except creation of new Order Type?
Thanks,
RaymondHi Raymond,
DO you mean I should create a customized table for this?
Yes
Are there no standard way?
As per my knowledge, you can control through production order type, so you need to create seprate order type for this
Thanks,
Sankaran -
Data Migration in Product Master
Hello Experts,
I've the below issue,
I'm changing the Set types to Org dependent in Product Master,
During this process I'll be deleting the current set type and 'll create a new set type.
Here, How do I transport/replace the existing records in the DB with the new changes?
Suggest me the best approach to do this?
Kindly do the needful ASAP.
Your help will be appreciated.
Kind regards,
Senthil.we've transport option in the menu to do this...while creation in "comm_attr_set"
-
Setting up a material master as Subcontractor
I am looking to set up a material master to pull items from the warehouse and send to alter as another number. This will of course be the standard method for this item. I have two questions
1. How do I set this up? I am use to production order material masters.
2. How would I define the costing for this item (cost of component + current quote from subcontractor)? Quotes typically last one year. Can I enter this so the planned order will pull this information? Where would this information be entered?
Thanks for everyone's assistance!!Hi,
Not sure if this is what you looking for.
Assuming your component is material A and your new material that this is going to alter into is material B. I will also assume that you are buy B from your subcontractor and giving them A in the process.
You need to setup B as a HALB and it should have a single component BOM A.
In the material master MRP view for material B, you will need to set the special procurement as 30 (subcontracting).
When you raise the Purchase Order for B, you will need to raise this with item category L.
Hope this help. -
Setting Material Ledger to Productive
All,
How do I set the material ledger to productive for a given plant ?
The accounts are all setup and everything is fine in transaction OMX1
(the active material ledger is checked for the plant\valuation area)
However in transaction CKM9 the material ledger is not yet productive.
How do I make it productive ?
Thanks,
MarkDear Mark,
After installing the Material Ledger it is necessary to run a transaction to define the Material Ledger as productive for a valuation area.
Note: Once defined as productive, the material ledger cannot be deactivated. This procedure must be executed only when there are no material movements for the period. Also, if there are material master data for production related materials (material types ROH, HALB and FERT) already in the system they must have a standard price registered .
Prerequisites:
To install the Material Ledger/WIP functions is also necessary that the extension EA-FIN (Financials Extension) has been activated. To check if this extension is active use the following path: IMG > SAP Customizing Implementation Guide > Activation Switch for SAP R/3 Enterprise Extension Set
1. Access the activity using one of the following navigation options:
Installation Role J18 Product Cost Planning / Material Ledger -> Material Ledger Installation -> Repeat Steps for each Productive Plant -> Production Startup of Material Ledger
or Transaction CKMSTART
2. Run the transaction CKMSTART for all valuation areas.
Reward points if it helps.
Regards,
Naveen. -
Mass update of product master (lock material record)
Hi! Does anyone know of any program that I can use to carry out mass update of product master in SRM? I am specifically looking at locking the materials. I originally intended to use LSMW and create a recording for it. However, the recording didn't work - when I clicked on the open button so that I can key in the product id, it returns back to the recording / LSMW transaction with the screen data. I did not even have a chance to proceed further.
Any idea would be appreciated.
Regards
SFreally . though you are ECS mode .
material master must be there right ?
How your SRM PO will reflected ( indeed really creates in ECC i.e copy of srm PO).
confusion here
can you create a SC for local material and order a successful PO ?
i know there is a product check in catalog web services - in SRM product master not necesary but your ECC must have material master right..
Muthu -
Need to Populate Material Type from ECC to APO Product Master
Hi All,
I need to update the material type field from ECC to APO.
I am using the userexit CIFMAT01 and component EXIT_SAPLCMAT_001.
I need to extract field MTART from MARA table and need to Populate it in APO Product master.
In APO i am using the ATT01 field of table /SAPAPO/MATKEY.
But this does not work the data of material type is not getting populated in APO.
We have tried to use a break point in the user exit and while executing the transaction CFM2 it does not stop at the break point.
Can anyonwe guide me as to how to go about in implemeting this user exit.
Regards
NitinHi Nitin,
Make sure that u r pass the material type as a below :
CT_CIF_MATKEY-ATT01 = Pass the Material Type.
CIF_MATKYX -ATT01 = 'X'.
Check the below thread to debug the CIF queue:
debugging CIF user exit
Regards,
Siva. -
PO Text from R/3 Material Master to Product Master in SRM
Hello Forum,
I want to replicate the PO Text from r/3 material master to Product master in SRM to be seen in commpr01..
I am not sure if this text can be seen in SC even if it is not seen in commpr01..
how can i achive this?
Thanks
ArshadHi,
You need to create a customer field or a new text in the documetnos brim at item level and to look for that text of the request through RFC using the badi DOC_CHANNGE.
Rgs,
Pedro Marques -
What function can I use set Product Master status = LOCKED?
I have several Product Master records that the business would like to set Product Status = I1103-LOCKED. Is there a function I can use to set product status?
Hi,
You can make lock objects via sm12. Your lock object name start with E.
Every lock object is having two function module.
enque_lock_object_name
deque_lock_object_name
hope it will useful.
thanks
Hemant -
How to set Material Ledger as Productive
In CKM9 ---> I am getting message as --> Material Ledger Not Yet Productive
how to set Material Ledger as Productive
Please helpIMG->Controlling->Product Cost Controlling->Actual Costing/Material Ledger-> Activate Valuation Areas for Material Ledger
In this step, you activate the material ledger for valuation areas - Before activating material ledger, check the additional currencies defined in the Co Cd. -
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 TiwariTry 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 -
Product master in CRM and R/3
Hi Gurus,
can anybody make my understanding clear regarding the difference of product master in CRM and R/3. any links to know more on it will also help.
Thank you in advance.
Regards,
sasmitaHi Sasmita,
Here are some of inputs will help for undersatnding:
<b>The CRM product master is a collection or arrangement of various settypes which contain specific data.</b>
Pre-defined settypes are delivered (e.g. basic product data; conversion of unit of measure)
Enhancement of the product master with own settypes is possible
Settypes correspond to database tables
Attributes correspond to your product characteristics.
<b>Attributes can be summarized with the help of set types</b>
In the system there are standard set types which are always available. However, you can also create and implement user-defined set types, to depict marketing data, for example.
The usage of set types can be restricted (e.g. certain set types only allowed for products of type product) Distribution chain-dependent set types can be created.
A set type is only permissable for a product when the set type is assigned to the category to which you then assign the product. To assign a set type to a category, use the function Edit categories and hierarchies.
You can assign a set type to several product categories within a category hierarchy. However, each set type can only be assigned within one hierarchy. In doing so, a multiple assignment of a set type to one and the same product (over contrasting categories) is prevented.
A product can be assigned to several categories, as long as these are within different category hierarchies. A product can also be assigned to only one category per hierarchy.
The assignment to the base hierarchy R3PRODSTYP is vital, so that basic data set types are available, for example.
R3PRODSTYP depicts the product types present in the R/3 system.
Customer product numbers can be assigned. This Customer product ID is stored in the relationships
Global Trade Item Number (GTIN)
Customer-own checks can be defined before a product can be saved. Enhancements  Consistency check
<b>Transaction :
COMMPR01-Maintain Products
COMMPR02-Mass Maintenance for Inactive Products
COMM_HIERARCHY-Maintain Categories and Hierarchies
COMM_ATTRSET- Maintain Set Types and Attributes
Tables:</b>
Product (active) COMM_PRODUCT
Product (inactive) COMM_IPRODUCT
Product description COMM_PRSHTEXT
Category hierarchy COMM_HIERARCHY
Category COMM_CATEGORY
Set types COMC_SETTYPE
Attributes COMC_ATTRIBUTE
Relationships COMM_IL_*
COMM_PRODUCT : Product header and administration data.
COMM_CATEGORY : Category
COMM_HIERARCHY : Category Hierarchy
COMM_PR_FRG_REL :
COMM_FRGTYPE :
COMC_SETTYPE :
COMC_PRODUCT : General Product Settings
COMC_R3_FIELDS : Assignment of R/3 material master fields to CFOP
COMM_CFGMAT : Basic Data for Materials
Hope this will help.
Regards,
Arjun
<b>Pl. Do reward the points</b> -
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 -
How to change product master data in GTS?
Hi Experts,
I want to change additional data of a product master in GTS.
I want to update the values in the screen below (Additional data)
How can I do this? are there any function modules?
Please help.
Thanks
GopalHi Gopal, guys
Sorry if i`m repeating what someone else said before as its a long thread.
The preferable option that we implemented is a small custom Z transactio where users maintain these attributes. Selection screen same as the ususal /sapsll/product_02, and then get the PRGEN entry and maintain on second screen.
Using the API FM used for ECC system sync... well maybe its a bit unnecessary & overcomplicated. Once you get the Product Object, you can use the maintain object/ maintain subobject methods that is standard and works without simulating inbound api call..
heres the screenshot
Hope this helps,
UPDATE : Mind you, that if you do changes to the attributes in GTS, they will stay for as long as there is no new update for the material in ECC...
Once a change pointer or manual transfer triggers a re-transfer, manuall changes will most likely be flushed and set back to what comes from ECC api.. just bear this in mind pls & test this case...
Branio -
Replication of product master and Product category
Hi
Please let me know steps involved in replicating
Product master and product category from R/3 to SRM
Regards
AshishHi Ashish,
The blogs mentioned by Kathirvel explains clearly the entire replication procedure of Master data from R/3 to SRM.
Neverthless find some points which needs to be taken care during replication :
1. Ensure that the tables CRMCONSUM, CRMSUBTAB, CRMPAROLTP, CRMRFCPAR are duly filled in R/3 system.
2. Endure that SMOFPARSFA table is duly filled in SRM system.
3. Maintain the filter settings using R3AC3 and R3AC1 as per your requirement in SRM system.
4. Set up the Administrative console using SMOEAC and create both R/3 and SRM nodes and define the site attributes.
5. Ensure that all the queues (both inbound and outbound) are empty in both the systems before replication.
6. Start initial load of customizing objects (DNL_CUST_BASIS3, DNL_CUST_PROD0 & DNL_CUST_PROD1) using R3AS and monitor the loaded jobs using R3AM1.
7. After successful replication of customizing objects, load the business objects (material_master, service master) using R3AS.
8. The replicated material groups and product types can be seen using COMM_HIERARCHY txn.
9. The replicated materials can be seen using COMMPR01.
Hope this makes you more clear about the settings required.
Clarifications are welcome.
Award points for helpful answers.
Rgds,
Teja
Maybe you are looking for
-
Simple SQL Query and Parameters and LOV
Newbie and trying to work thru building a simple sql query with a single table query and use a parameter and lov. Can anyone point me to an example. simple query: select cust_id, name_desc, name_add1, name_add2, name_city from customer_table where cu
-
Display column values as zeros
I am having three select queries with union below: select col1, col2 from table1 where condition; -> fetches 1 record union select col1, col2 from table2 where condition; -> fetches no row union select col1, col2 from table3 where condition; -> fetch
-
Searching in HTML-formatted CLOBs
Me and my colleagues are designing a database where some HTML documents have to be saved. The two obvious options for that are : 1. Storing the HTML in CLOB fields 2. Saving HTML files on the server and storing only the filenames in the database I wo
-
File (photo) management. Need to create folders and sub-folders
1. How do I manage thousands of photos when I can't create sub-folders under folders? 2. How do I rename photos once they have been downloaded to Ipad? 3. How do I download all my photos on Idisk to the Ipad? Is there an App to help with this? I am s
-
We are using OC4J as application server. At this moment we dont have any ejb module in our application. We just have servlets and JSP. How do I use connection pooling for my web application? Satish Juware