Update, Delete, Create Product Master in SRM 5.5
Hi peeps!
As mention in the subject title I need help in Update, Delete, Create Product Master in SRM 5.5 . I need to know which bapi or fm to be used to update(create & delete as well) the product master.
Points will be give! Hope to hear from u all soon! Cheers!
Okie probably this will help. Bapis or FM used for tnx:Commpr01 (product workbench) for update create and delete?
Anyone?
Message was edited by: Chee Jason
Message was edited by: Chee Jason
Similar Messages
-
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 -
Is the file update=delete+create?
It seems that when a user edits(updates) some file the iFS completely deletes old copy and creates a new one, that is file update operation = delete + create, isn't it? Or there is some indication (in the IFSSYS DB schema) that allows to tell the difference between the update and delete operations?
Best regards,
VasiliyHi, I assume you can use the default schemas and customize it to add your business rules and use that for quality check of incoming XML payload before you push data into crmondemand while integrating withe external systems
-- Venky CRMIT -
Safety stock data update in APO product master
Hi Gurus
I have an active IM for a product . when i change the safety stock in R/3 , the same is not getting updated in APO. The method maintianed is SB
Please suggestFinally i need to apply the below code in Exit EXIT_SAPLCMAT_001
INCLUDE ZXCIFU01 *
IF CT_CIF_MATLOC IS REQUESTED.
if no saftystock-method is explicitly set
use method 'SM' if safty stock & time is transfered
use method 'SB' if only safty stock is transfered
use method 'SZ' if only safty time is transfered
LOOP AT CT_CIF_MATLOC.
LOOP AT CT_CIF_MATLOCX WHERE MATNR = CT_CIF_MATLOC-MATNR AND
LOCNO = CT_CIF_MATLOC-LOCNO.
CT_CIF_MATLOCX-MSDPSBMETH = 'X'.
*APO und R/3: Safety stock
IF CT_CIF_MATLOCX-SAFTY = 'X' AND
NOT CT_CIF_MATLOC-SAFTY IS INITIAL.
*APO: Safety days' supply R/3: Safety time/act.cov.
IF CT_CIF_MATLOCX-SVTTY = 'X' AND
NOT CT_CIF_MATLOC-SVTTY IS INITIAL.
*Maximum of stock und safety time
CT_CIF_MATLOC-MSDPSBMETH = 'SM'."Maximum
ELSE.
*Safety Stock
CT_CIF_MATLOC-MSDPSBMETH = 'SB'.
ENDIF.
ELSE.
IF CT_CIF_MATLOCX-SVTTY = 'X' AND
NOT CT_CIF_MATLOC-SVTTY IS INITIAL.
*Safety days' supply
CT_CIF_MATLOC-MSDPSBMETH = 'SZ'.
ENDIF.
ENDIF.
MODIFY CT_CIF_MATLOC.
MODIFY CT_CIF_MATLOCX.
ENDLOOP.
ENDLOOP.
ENDIF.
Thanks all for the input -
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 -
Hello All,
I have a task where I need to create/update the Product Master in SRM from a flat file. On the ECC side I would typically create a BDC session from the incoming flat file and do a Call Transaction. Is there a transaction you can suggest in SRM that I can make a recording of or a direct input function module to accomplish this update? I'm developer on SRM 7.0 and a SRM newbie.
Thank you,
JRHi,
Check tx LSMW. There is a method to record a direct input coming from a file. Its quite easy to follow the instructions.
Thanks and Regards,
Abraham -
Hi Gurus,
While creating a shopping cart by selecting the account assignment as taxable asset then in the account assignment screen we can see a Create Asset Master button when we click this, an asset will be created in the R/3.
Please help me how this asset is created in R/3 suggest me any BADI or FM in SRM so that I can debug and see.
Regards
PaulActivate RFC trace in R/3 t-code ST05 for the RFC user before clicking Create Asset Master in SRM. Then decativate the trace after the asset is created in R/3. This shoudl give any RFC FM used (if any).
BTW SRM uses the FM META_CREATE_ASSET to route this request. You can start debugging form this FM.
Hope this solves your problem.
Regards
Kathirvel
Edited by: Kathirvel Balakrishnan on Aug 20, 2008 11:43 AM -
Replicating Products/Catalog from SRM to MDM
I am implimenting SRM and MDM on 7.1 and SRM-MDM Catalog 3.0
I wanted to replicate catalog data from SRM. As we know each catalog record in MDM contains Product, Supplier, Info record data. I am not sure if we have to map all these in MDM or It will be mapped by SAP delivered content for replication.
I am using BBP_CCM_TRANSFER transaction in SRM to transfer data to MDM. In the selection screen I am using 'Category Hierarchy', Category ID and Language fields. I did unchek/check Force Intial Transport and P_debug. There was not much difference.
However I am getting following info messages, but unable to see any data in MDM
16.06.2010 09:27:41: Initial transfer for catalog SRM_EXTRACTED_CTLG
16.06.2010 09:27:42: Determine category TELEPHONE (5 products)
16.06.2010 09:27:42: Start of catalog transfer for 1
16.06.2010 09:27:42: catalog transfer ended
I am now stuck here. Can any one share details of the replication process and steps involved.Hi Sudha,
Please explain your business scenario. What data you want to replicate from SRM to MDM. We can replicate Suppliers, Contracts and Product Master from SRM to MDM through XI. Make sure you hae configured XI settings for that. You have to download the pre-delivered XI content from SAP Markeplace. Please check Note # 1177779 & 1177780 regarding that.
We can use following reports in SRM to replicate following data in MDM
BBP_CCM_Transfer_Catalog-----Product master
ROS_SUPPLIER_SEND_TO_CATALOG-----Supplier data
SRMMDM_CTR_Transfer----Contract data from SRM
In your case, you are running BBP_CCM_TRANSFER. Please check the SXMB_MONI t-code to monitor the XML messages whether XML files are processing correctly or getting stuck.
Thanks,
Anshuk Saxena -
ABAP dump error while updating product master in APO
Hi All,
Greetings from Vijay!
I need to your help to resolve below issue ;
I am getting error '
No simulation parameters could be set for the
active version'
While i am updating and trying to assign active version to my product master in APO which are created in APO for regression testing
and also sometimes system throwing dump error'
Error in the ABAP Application Program
The current ABAP program "/SAPAPO/SAPLDM_LC_SQL" had to be terminated because
it has
come across a statement that unfortunately cannot be executed.;
I appreciate your help
Thanks
Vijay JobHi Vijay,
Can you check note 1465462 ?
The same problem is mentioned in the note with correction .
Regards,
Mukesh pandey -
Update field "Country of origin" in Product Master in SAP EWM system.
Hi Team
I have a requirement like as follows:
I need to update the country of origin (HERKL) field into the product master transaction /SAPAPO/MAT1 ( Tab: Properties Field name Ctry of Origin) through BAPI. So i want to know what is the BAPI Name to update the Product master.
Any prerequisites for this Please help me.
Thanks in Advance.
Abhishek.Hi,
The function module BAPI_PRDSRVAPS_SAVEMULTI2 (Create or Change Products) can be called in the z pogram like any other function module call in a z program. After the data definations, tables "product_head" and "product_head_X" need to be passed the values, along with other import values like Logical system , business system group etc.
Your technical consultant should be able to work out smoothly.
Hope this helps.
Regards
Datta -
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 -
Update Condition records of an existing Service master in SRM
Hi All,
I want to develop a functionality to update Condition records like add new Vendor or delete vendor or change Amount etc. of an existing service master in SRM, which can be possible manually by using tcode COMMPR01.
Can you please suggest any standard FM or BAPI name to update existing Service Master. If you please provide sample code to update service master then it will be more helpful for me.
Regards
AnirbanFYI, the output of this call returns something like:
<?xml version="1.0" encoding="UTF-8"?>
<queryplan>
<union>
<fullOuterJoin>
<statement index="1">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="2">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.nb_guests) FROM SALES, INVOICE_LINE, SERVICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) AND ( SERVICE.SL_ID=SERVICE_LINE.SL_ID ) AND ( SERVICE_LINE.service_line = 'Accommodation' ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
<fullOuterJoin>
<statement index="3">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), count( distinct SALES.inv_id) FROM SALES GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
<statement index="4">SELECT 'FY' || to_char(SALES.invoice_date,'yy'), sum(INVOICE_LINE.days * INVOICE_LINE.nb_guests * SERVICE.price) FROM SALES, INVOICE_LINE, SERVICE WHERE ( SALES.INV_ID=INVOICE_LINE.INV_ID ) AND ( INVOICE_LINE.SERVICE_ID=SERVICE.SERVICE_ID ) GROUP BY 'FY' || to_char(SALES.invoice_date,'yy')</statement>
</fullOuterJoin>
</union>
</queryplan> -
Update error while creating production order (TCODE CO01)
Hello,
We have created new plant into development server for testing. We have created production Order few days back at that time we have not faced any problem. But from last two days , when we create new production Order , system gives following error:
ORA-00947: not enough values
DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB
SAPLCOVB" or "LCOVBF10"
HEADER_POST"
and
Update was terminated
System ID.... DEV
Client....... 500
User..... HPLSU
Transaction.. CO01
Update key... 4B6E4F48C08D027FE1008000C0A802F3
Generated.... 08.02.2010, 10:35:48
Completed.... 08.02.2010, 10:35:49
Error Info... 00 671: ABAP/4 processor: DBIF_RSQL_SQL_ERROR
Our work is held up.
Please also note that If we increase the QTY in the existing Order ( already created few days back) , System accept the same and Order is saved.
We are looking for the solution for the above.
Early reply will be highly appreciated.
thanks
harishHi Rishi,
You better check with your BASIS team.
Check this link also
Supervisor Error ADM0015
Regards,
Satyajit Kumar
Edited by: Satyajit Kumar on Feb 8, 2010 7:47 AM -
Bapi to Create/Update/Delete/Block G/L Accounts Centrally
Hello experts,
I'm searching for a BAPI to achieve some functionalities already done throw transaction FS00.
After uploading account data from an input file I should:
- Create G/L accounts
- Update G/L accounts
- Mark for deletion G/L accounts
- Block G/L accounts
Depending in a flag existing for each line of this file.
I saw some threads advising BAPI: BAPI_ACC_GL_POSTING_POST to replace FS00 transaction.
But, I don't see a way to use this BAPI in my case.
If this BAPI is the right solution then where could I specify the flag for (deletion, update, blocking, creating)?
If not, then could you please advice me the better way to deal with this issue?
Thank you in advance.
Moez.Hi Thomas,
The case which is missing for me is when I should update an account corresponding to an alternative chart of account (which is normally done via FSP0).
I'm pretty sure that I could not call directly transaction FSP0 (as I did with FS00) according to documentation of rfbisa00. The response could be 'FSP0 not supported'.
Do you think that we could deal with this issue also with RFBISA00 for Tx FSP0?
Or is there another standard code for FSP0?
Best Regards,
Moez. -
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
RameshHello 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
Maybe you are looking for
-
Itunes says my computer is not authorized to play songs on the nano.
I connected my Nano( 2nd gen) synched it with my itunes and transferred some songs a few days ago. Today, I wanted to add some songs I missed but now Itunes is saying my computer isn't authorized to play songs on it. When I try to authorize it (the w
-
How do I make fonts larger i photoshop?
how can I make my fonts larger in photoshop?
-
Hi friends, Where we can define scale in pricing (in vk31 or vk11) Thanks Raj
-
Hello Gurus, We are having strage issue with Integration Broker. When we include proxy server settings in Integration Broker properties file we are unable to ping certain nodes but when we remove Proxy server details we are able to ping nodes. We are
-
How to get messages in to iPhone and iPad too