Create items using func mod crm_order_maintain
Hi,
I am trying to create items within a service order with higher level item. Items are create but higher level item field is blank.
insert fieldnames
ls_fldnames-fieldname = 'MODE'.
insert ls_fldnames into table lt_fldnames.
ls_fldnames-fieldname = 'ORDERED_PROD'.
insert ls_fldnames into table lt_fldnames.
ls_fldnames-fieldname = 'NUMBER_PARENT'.
ls_fldnames-fieldname = 'PARENT_HANDLE'.
insert ls_fldnames into table lt_fldnames.
ls_fldnames-fieldname = 'ITM_PROC_IDENT'.
insert ls_fldnames into table lt_fldnames.
ls_ordm_i-header = gv_hdrguid.
ls_ordm_i-itm_proc_ident = 'SRVC'.
if gs_hier-parent is not initial.
ls_ordm_i-ordered_prod = ls_outtab-sor.
else.
ls_ordm_i-ordered_prod = ls_outtab-svc_act.
endif.
lv_prodid = ls_ordm_i-ordered_prod.
if lv_prodid co '0123456789 '.
unpack lv_prodid to lv_prodid.
endif.
add 1 to lv_handle.
ls_ordm_i-mode = 'A'. "create
ls_ordm_i-handle = lv_handle.
if gs_hier-parent is not initial.
ls_ordm_i-parent_handle = ls_parent-handle.
endif.
insert ls_ordm_i into table lt_ordm_i.
ls_parent-posnr = gv_posnr.
ls_parent-handle = lv_handle.
append ls_parent to lt_parent.
ls_product-ref_handle = lv_handle.
insert ls_product into table lt_product.
insert input fields
ls_inputflds-field_names[] = lt_fldnames[].
ls_inputflds-ref_handle = lv_Handle.
ls_inputflds-objectname = 'ORDERADM_I'.
insert ls_inputflds into table lt_inputflds.
endloop.
return selected products back to service order's items
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_product_i = lt_product
CHANGING
CT_ORDERADM_I = lt_ordm_i
ct_input_fields = lt_inputflds
EXCEPTIONS
ERROR_OCCURRED = 1
DOCUMENT_LOCKED = 2
NO_CHANGE_ALLOWED = 3
NO_AUTHORITY = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Amit,
I am calling a action from a service order which will popup a window containing product tree. User will select the products. If a higher level product is select, child product will also be created as items with higher level item.
As I said the items are showing in the service order, but child item's higher level item is blank.
Cheers.
Similar Messages
-
Creating items in executions mode
can i create items or camps in execution in forms
The simple answer is no.
But you can have items allready defined but with visible property off, and in runtime change their visibility and even their position.
null -
An issue with multiple selection using Func mod COMPLEX_SELECTIONS_DIALOG
Hi All,
I am using COMPLEX_SELECTIONS_DIALOG function module to display mutliple selection pop up for materials.
The problem that Iam facing is that if a material is deleted in multiple selection pop up, it is not been returned in the returning table.Only the materials avalible in the pop-up are returned in the internal table.
Is there any way by which the deleted values could be tracked.
Pls find below the code
*Display the value in Multpl Selection pop up.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Include/Exclude Materials'
TEXT = 'Pls select the materials'
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = 'X'
JUST_DISPLAY = ' '
JUST_INCL = 'X'
EXCLUDED_OPTIONS =
DESCRIPTION =
HELP_FIELD =
SEARCH_HELP = 'MAT1'
TAB_AND_FIELD =
TABLES
RANGE = T_MAT_INCLU_EXCLU
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
Any help in this regard is highly apprecited.
Warm regards,
Partha.Applogise for posting this thread under a wrong node - ERP HCM .
Closing the thread from this node .
Regards
Sarmistha
Edited by: sarmistha das on Mar 9, 2012 9:52 AM -
Using func mod fmca_event_9503 for transaction FPE1?
HI
am trying to upload data in the transaction FPE1 and in turn it generates the document no but while using this FM , i tried passing all the fields that i had passed in the transaction FPE1 ,but it doent generate the document no neither it throws any error!!
any help will b apprecited!!
Thx
gunjanHI
GOOD
GO THROUGH THE FOLLOWING LINKS.
http://help.sap.com/bp_waterutilv1472/BBLibrary/Documentation/05_FinancialMgt_Scen_Guide_EN_US.doc
THANKS
MRUTYUN -
Importing Items using Items Open Interface
Hi ,
I am creating items using Items Open interface program. I have populated the data in the MTL_SYSTEM_ITEMS_INTERFACE. Itemcode, oganization, primary_uom and template id and getting the following error.
TRANSACTION ID : 18739
ORGANIZATION ID : 103
TABLE NAME : MTL_ITEM_REVISIONS_INTERFACE
COLUMN NAME : ITEM_ID
MESSAGE NAME : INV_IOI_REV_NO_ITEM
ERROR MESSAGE : The revision entered is for an item that does not exist in MTL_SYSTEM_ITEMS nor MTL_SYSTEM_ITEMS_INTERFACE.
Item is not revision control and them same is in the template also. still system is giving this error. Whats needs to be done.
Regards/Prasanth@ ABOVE ALL
Hi all,
Please see this document from meta-link,most probably it WILL solve your problem.
Note: 801354.1 INV_IOI_REV_NO_ITEM Error - The revision entered is for an item that does not exist
else you can refer following doc from meta-link
Note: 268968.1 Understanding Item Import and Debugging Problems with Item Import
Hope this helps. :)
Regards,
-sDJ -
Create ticket using CRM_ORDER_MAINTAIN
I am creating a service ticket using the above mentined RFC. I want to insert the problem area and actual fault as Level1 (parent) and Level2 (child) within the problem area. For that I am making use of the lt_service_os table and building the subject table within it, on the OBJECTS tab of the ticket.
The problem is both the problem area and fault go into the ticket at parent levels.
I do not want to follow 2 step process of creating the ticket first with parent subject and adding the child subject to it as it takes lot of time.
FORM subject_create USING P_GV_HANDLE p_gv_product p_gv_l1 p_gv_l2
ibaseid
CHANGING
P_GT_INPUT_FIELDS type crmt_input_field_tab
P_GT_OSSET type crmt_srv_osset_comt.
DATA:
ls_subject TYPE crmt_srv_subject_com,
ls_object TYPE crmt_srv_refobj_com,
ls_input_field TYPE crmt_input_field,
ls_input_field_names TYPE crmt_input_field_names,
gc_mode_create TYPE crmt_mode VALUE 'A',
gc_object_kind_orderadm_h TYPE crmt_object_kind VALUE 'A',
gc_object_name_orderadm_h TYPE crmt_object_name value 'ORDERADM_H',
lv_service_h TYPE crmc_service_h,
ls_osset TYPE crmt_srv_osset_com2,
lt_refobj TYPE crmt_srv_refobj_comt,
lt_subject TYPE crmt_srv_subject_comt,
lv_handle TYPE crmt_handle,
lt_service_os TYPE crmt_srv_osset_comt,
lt_input_fields_f TYPE crmt_input_field_tab.
DATA: BEGIN OF lt_code OCCURS 0.
INCLUDE STRUCTURE com_code_f4.
DATA: END OF lt_code.
REFRESH: lt_subject, lt_refobj.
CALL FUNCTION 'CRM_ORDER_SERVICE_H_SELECT_CB'
EXPORTING
iv_process_type = 'YRMS'
IMPORTING
es_service_h = lv_service_h
EXCEPTIONS
entry_not_found = 1
OTHERS = 2.
Read subject profile LEVEL 1
Refresh lt_code.
CALL FUNCTION 'CRM_SUBJECT_PROF_CODES_PROVIDE'
EXPORTING
i_subject_profile = lv_service_h-subject_profile
I_HIERARCHY_LEVEL = '1'
TABLES
e_code_tab = lt_code
EXCEPTIONS
no_valid_entry = 1
no_entry = 2
OTHERS = 3.
read table lt_code with key
katalogart = 'Y1' codegruppe = p_gv_product code = p_gv_l1.
clear ls_subject.
MOVE-CORRESPONDING lt_code TO ls_subject.
CLEAR ls_subject-ref_guid.
CLEAR ls_subject-ref_guid_h.
CLEAR ls_subject-ref_handle_h.
CALL FUNCTION 'CRM_INTLAY_GET_HANDLE'
IMPORTING
ev_handle = ls_subject-ref_handle.
ls_subject-mode = gc_mode_create.
ls_subject-hierarchy_level = 1.
INSERT ls_subject INTO TABLE lt_subject.
lv_handle = ls_subject-ref_handle.
Read subject profile LEVEL 2
Refresh lt_code.
CALL FUNCTION 'CRM_SUBJECT_PROF_CODES_PROVIDE'
EXPORTING
i_subject_profile = lv_service_h-subject_profile
I_HIERARCHY_LEVEL = '2'
TABLES
e_code_tab = lt_code
EXCEPTIONS
no_valid_entry = 1
no_entry = 2
OTHERS = 3.
read table lt_code with key
katalogart = 'Y2' codegruppe = p_gv_product code = p_gv_l2.
clear ls_subject.
MOVE-CORRESPONDING lt_code TO ls_subject.
CLEAR ls_subject-ref_guid.
CLEAR ls_subject-ref_guid_h.
CLEAR ls_subject-ref_handle_h.
CALL FUNCTION 'CRM_INTLAY_GET_HANDLE'
IMPORTING
ev_handle = ls_subject-ref_handle.
ls_subject-ref_handle = lv_handle + 1.
ls_subject-ref_handle_h = lv_handle.
ls_subject-mode = gc_mode_create.
ls_subject-hierarchy_level = 2.
INSERT ls_subject INTO TABLE lt_subject.
MOVE p_gv_product to ls_object-product_id .
CLEAR ls_object-ref_guid.
ls_object-type_object = 'A'.
CALL FUNCTION 'CRM_INTLAY_GET_HANDLE'
IMPORTING
ev_handle = ls_object-ref_handle.
ls_object-mode = gc_mode_create.
INSERT ls_object INTO TABLE lt_refobj .
IF NOT ibaseid IS INITIAL.
MOVE:
p_gv_handle TO ls_object-ref_handle,
'B' TO ls_object-type_object,
ibaseid TO ls_object-ib_instance,
'A' TO ls_object-mode.
APPEND ls_object TO lt_refobj.
ENDIF.
Set Osset for subject and Reference object
CLEAR ls_osset.
ls_osset-ref_handle = p_gv_handle.
ls_osset-subject_profile = lv_service_h-subject_profile.
ls_osset-profile_type = 'A'.
lv_handle = p_gv_handle.
CALL FUNCTION 'CRM_SERVICE_OS_SET_DATA'
EXPORTING
is_srv_osset_com = ls_osset
iv_ref_handle = lv_handle
iv_ref_kind = 'A'
it_srv_refobj_com = lt_refobj
it_srv_subject_com = lt_subject
EXCEPTIONS
error_occurred = 1
invalid_guid = 2
no_record_exist = 3
OTHERS = 4.
CALL FUNCTION 'CRM_SERVICE_OS_PUT_DATA'
IMPORTING
et_srv_osset_com = lt_service_os
et_input_fields = lt_input_fields_f.
INSERT LINES OF lt_service_os INTO TABLE p_gt_osset.
INSERT LINES OF lt_input_fields_f INTO TABLE p_gt_input_fields.
Please suggest how to create parent child relation. The code for creating the subjects in the ticket is pasted below for reference.Hi Thomas,
The FM CRM_ORDER_MAINTAIN has two changing parameters:CT_ORDERADM_H and CT_ORDERADM_I.You can set the mode in these two changing parameters for header or item.
ls_orderadm_i-mode = gc_mode-create.
INSERT ls_orderadm_i INTO TABLE lt_orderadm_i.
and then pass this to the FM:
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
CHANGING
ct_orderadm_h = lt_orderadm_h
ct_orderadm_i = lt_orderadm_i
ct_input_fields = lt_input_fields
EXCEPTIONS
OTHERS = 0.
The possible values for mode are:
BEGIN OF gc_mode,
create TYPE crmt_mode VALUE 'A',
change TYPE crmt_mode VALUE 'B',
display TYPE crmt_mode VALUE 'C',
delete TYPE crmt_mode VALUE 'D',
END OF gc_mode.
Hope this helps!
Thanks and Regards,
Rohit
Edited by: rohit raturi on Jul 28, 2008 9:26 AM -
Crm_order_maintain . create items.
hi all.
i have to update order using fm crm_order_maintian.
i am able to update header but when i c order using crm_order_read there is no item data now i have to craete items of header.
please suggest how to create items in order using crm_order_maintain....
Message was edited by:
gaurav jainHi Gaurav,
The following the code i used to add a product( Item ) to Service order.
Service Contract Updating while Sales Order Creation
FUNCTION zzomotc_sc_update.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IV_GUID) TYPE CRMT_OBJECT_GUID
*" CHANGING
*" VALUE(CV_OWN_MESSAGE) TYPE CRMT_BOOLEAN OPTIONAL
***& Constants *
CONSTANTS: c_stparty TYPE comt_partner_fct VALUE '00000001'. "Sold-To-Party
*& Internal Tables Declaration *
DATA:i_orderadm_h TYPE crmt_orderadm_h_wrkt,
i_orderadm_i TYPE crmt_orderadm_i_wrkt,
i_orderadmsc_i TYPE crmt_orderadm_i_wrkt,
i_itemdet TYPE crmt_orderadm_i_comt,
i_product_i TYPE crmt_product_i_wrkt,
i_sales TYPE crmt_sales_wrkt,
i_orgman TYPE crmt_orgman_wrkt,
i_shipping TYPE crmt_shipping_wrkt,
i_schedlin TYPE crmt_schedlin_wrkt,
i_partner TYPE crmt_partner_external_wrkt,
i_guid_header TYPE crmt_object_guid_tab,
i_status TYPE crmt_status_wrkt,
i_text TYPE crmt_text_wrkt,
i_billing TYPE crmt_billing_wrkt,
i_service_contracts TYPE TABLE OF crmt_portal_resultlist,
i_customer_h TYPE crmt_customer_h_wrkt,
i_customer_i TYPE crmt_customer_i_wrkt,
i_input_fields TYPE crmt_input_field_tab,
i_sales_sc TYPE crmt_sales_comt,
i_field_names TYPE crmt_input_field_names_tab,
i_guid_save TYPE crmt_object_guid_tab.
*& Local structure/Work Area Declaration *
DATA:st_sales TYPE crmt_sales_wrk,
st_shipping TYPE crmt_shipping_wrk,
st_orderadm_i TYPE crmt_orderadm_i_wrk,
st_orderadmsc_i TYPE crmt_orderadm_i_wrk,
st_orderadmsc1_i TYPE crmt_orderadm_i_wrk,
st_partner TYPE crmt_partner_external_wrk,
st_billing TYPE crmt_billing_wrk,
st_customer_i TYPE crmt_customer_i_wrk,
st_service TYPE crmt_portal_resultlist,
st_input_fields TYPE crmt_input_field,
st_field_names TYPE crmt_input_field_names,
st_itemdet TYPE crmt_orderadm_i_com.
*& local Variables Declaration *
DATA: l_guid TYPE crmt_object_guid,
l_flag TYPE c VALUE ' ',
l_partner_fct TYPE crmt_portal_service_search-partner_fct,
l_partner_no TYPE crmt_portal_service_search-bu_partner.
CHECK iv_guid IS NOT INITIAL.
COLLECT iv_guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadm_i
et_product_i = i_product_i
et_customer_h = i_customer_h
et_customer_i = i_customer_i
et_sales = i_sales
et_orgman = i_orgman
et_shipping = i_shipping
et_billing = i_billing
et_schedlin = i_schedlin
et_partner = i_partner
et_text = i_text
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc <> 0.
** SO Order doesn't exists
ENDIF.
***Get partner function as sold-to-party
DELETE ADJACENT DUPLICATES FROM i_partner.
READ TABLE i_partner WITH KEY partner_fct = c_stparty INTO st_partner.
LOOP AT i_orderadm_i INTO st_orderadm_i.
IF ( st_orderadm_i-itm_type EQ 'ZTAP' ) OR ( st_orderadm_i-itm_type EQ 'ZWVN' ) OR
( st_orderadm_i-itm_type EQ 'ZCPP' ) OR ( st_orderadm_i-itm_type EQ 'YWVN' ).
** Search a valid Service contract based on customer i.e.sold-to-party and product combination
l_partner_fct = c_stparty.
l_partner_no = st_partner-partner_no.
CALL FUNCTION 'CRM_SERVICE_CONTRACTS_SEARCH'
EXPORTING
partner_function = l_partner_fct
partner_number = l_partner_no
* product_id = st_orderadm_i-ordered_prod
* to = sy-datum
TABLES
service_contract_list = i_service_contracts.
IF i_service_contracts[] IS NOT INITIAL.
LOOP AT i_service_contracts INTO st_service WHERE date_end GE sy-datum.
REFRESH i_guid_header.
COLLECT st_service-guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_i = i_orderadmsc_i
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i
WITH KEY ordered_prod = st_orderadm_i-ordered_prod.
IF sy-subrc EQ 0.
l_flag = 'X'.
l_guid = st_service-guid.
EXIT.
ENDIF.
ENDLOOP.
**** Deactivate the line item of existing service contract and add new service item to this contract
IF l_flag EQ 'X'.
REFRESH : i_guid_header, i_orderadm_h, i_orderadmsc_i.
COLLECT l_guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadmsc_i
* et_pricing_i = i_pricing_i
et_status = i_status
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i INDEX sy-tabix.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'ORDERADM_I'.
st_field_names-fieldname = 'MODE'.
APPEND st_field_names TO i_field_names.
st_field_names-fieldname = 'ORDERED_PROD'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'PRODUCT_I'.
st_field_names-fieldname = 'PROCESS_QTY_UNIT'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'SCHEDLIN'.
st_field_names-fieldname = 'QUANTITY'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
MOVE-CORRESPONDING st_orderadmsc_i TO st_itemdet.
* st_orderadmsc1_i-header = st_orderadmsc_i-header.
* st_orderadmsc1_i-ordered_prod = st_orderadm_i-ordered_prod.
APPEND st_itemdet TO i_itemdet.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
* EXPORTING
** it_pricing_i = i_pricing_i
* it_product_i = i_product_i
* it_schedlin_i = i_schedlin_i
CHANGING
ct_orderadm_i = i_itemdet
ct_input_fields = i_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc EQ 0.
COLLECT l_guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ELSE.
REFRESH: i_guid_header, i_orderadmsc_i.
READ TABLE i_service_contracts INTO st_service INDEX 1.
COLLECT st_service-guid INTO i_guid_header.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = i_guid_header
IMPORTING
et_orderadm_h = i_orderadm_h
et_orderadm_i = i_orderadmsc_i
* et_pricing_i = i_pricing_i
et_status = i_status
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
READ TABLE i_orderadmsc_i INTO st_orderadmsc_i INDEX sy-tabix.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'ORDERADM_I'.
st_field_names-fieldname = 'MODE'.
APPEND st_field_names TO i_field_names.
st_field_names-fieldname = 'ORDERED_PROD'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'PRODUCT_I'.
st_field_names-fieldname = 'PROCESS_QTY_UNIT'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_input_fields-ref_guid = st_orderadmsc_i-guid.
st_input_fields-ref_kind = 'B'.
st_input_fields-objectname = 'SCHEDLIN'.
st_field_names-fieldname = 'QUANTITY'.
APPEND st_field_names TO i_field_names.
st_input_fields-field_names = i_field_names.
APPEND st_input_fields TO i_input_fields.
REFRESH i_field_names.
st_orderadmsc1_i-header = st_orderadmsc_i-header.
st_orderadmsc1_i-ordered_prod = st_orderadm_i-ordered_prod.
APPEND st_orderadmsc1_i TO i_orderadmsc_i.
MOVE-CORRESPONDING st_orderadmsc1_i TO st_itemdet.
APPEND st_itemdet TO i_itemdet.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
* EXPORTING
** it_pricing_i = i_pricing_i
* it_product_i = i_product_i
* it_schedlin_i = i_schedlin_i
CHANGING
ct_orderadm_i = i_itemdet
ct_input_fields = i_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc EQ 0.
COLLECT st_service-guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ENDIF.
ELSE.
*** Create a new service contract for it and add line item to it.
DATA: st_servicec_h TYPE crmt_iservice_baskethead_il,
st_servicec_i TYPE crmt_srv_webreq_item_il ,
st_screate_h TYPE crmt_orderadm_h_com,
st_screate_i TYPE crmt_orderadm_i_com.
READ TABLE i_partner INTO st_partner WITH KEY partner_fct = '00000001'.
st_servicec_h-handle = '00001'.
st_servicec_h-ref_handle = '00001'.
st_servicec_h-process_type = 'ZSC'.
st_servicec_h-description = 'Service Contract'.
st_servicec_h-descr_language = 'E'.
st_servicec_i-handle = '00002'.
st_servicec_i-ref_handle = '00001'.
* st_servicec_i-ITM_TYPE =
st_servicec_i-ordered_prod = st_orderadm_i-ordered_prod.
* st_servicec_i-ORDER_QTY =
* st_servicec_i-QTY_UNIT =
CALL FUNCTION 'CRM_SERVICE_ORDER_CREATE'
EXPORTING
is_service_baskethead = st_servicec_h
is_service_basketitem = st_servicec_i
iv_service_productguid = st_orderadm_i-product
iv_partner_ag = st_partner-partner_no
iv_partn_fct_ag = '00000001'
IMPORTING
es_orderadm_h = st_screate_h
es_orderadm_i = st_screate_i
EXCEPTIONS
error_occured = 1
OTHERS = 2.
IF sy-subrc EQ 0.
COLLECT st_screate_h-guid INTO i_guid_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = i_guid_save
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
REFRESH i_guid_save.
l_flag = 'X'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFUNCTION.
Actually, this FM was created for updating the service contract while creation of sales order with serivce product as its line item. It search for valid SC for sold-to-Party and checks for the products if not there adds the same product as line item to SC. If SC not avaliable , Creates SC and adds the same product
Hope it will help you.
Regards,
Arjun
<b>Pl. Reward points</b> -
Hi
I have Signature Manager Exchange Edition 2.0.3.0 installed on the hub servers.
I have enabled Sent Items update.
some clients are not getting signature update in the sent items of outlook while using cached mode.
from OWA, and MS Outlook when connected online, the signature is updated in the sent items.
I have two CAS servers and two mailbox servers. all with Exchange 2013 SP1
I tested each CAS server for the URLs of Autodiscover and EWS, with no errors or warnings.
I also test Autodiscover through
https://testconnectivity.microsoft.com . I go successful result.
Outlook clients are updated to the latest version 15.0.4701.1000
for outlook clients; I deleted outlook profile, deleted outlook folder in the user profile, re-created the outlook profile, with no luck.
from Exclaimer event logs on the Hub servers. the sent items update is successfully updating clients. below is the screenshot of an event for one email message which is successfully updated from exclaimer but it did not update on the client outlook while
using cached mode.
Since the issue is with multiple users, I am searching for a centralized solution
Mashhour FarajDear Mashhour
Here you go
Employees can see their email signatures and disclaimers
With Exchange 2013, a Microsoft Outlook user can’t see any added email signatures or disclaimers as they are added to an email when it passes through the Exchange server.
Signature Manager Exchange Edition lets email users see their email signature and corporate disclaimer within the Sent Items of their inbox, giving them visual confirmation of the processed email
Source -
http://blog.exclaimer.com/exclaimer-signature-manager-vs-microsoft-exchange-2013/
Updating to the latest version of signature manager exchange edition will help you to resolve this problem for sure
Or you need to contact them to find a solution on this .
I'm pretty much sure that this problem is related with some version mismatch on their s/w on exchange 2013 which is causing this issue.
Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
(MVP) -
Vendor not intended when create SC using create limit item
Hi All,
This is a challenging issue for all of us...
SRM : 5.0
ECC : 6.0
I am facing the problem when creating the Shopping cart..
When i click on Centralized purchasing -- > Shop -- > Create Limit item
and give the Desc, Product category, Value limit, Expected value, Date between, Supplier and Follow-up actions as Confirmation and Invoice and account assignment as Known and click add to shopping cart..
It is giving a message vendor not intended for purchaing org.. in the Item under Good/Service field value LIMIT is getting created automatically.. I dont understand how it is getting created..
If i try to create one more item and specify the Good/service as our custom field value , for this item there are no error and
no message saying Vendor not intended for Purchasing organization..
Please help me in finding out the issue.So that will be greatful to you..
Advanced thanks
Points will be rewarded..
Regards
RajuHi Teja,
I agree with you answer..
When i tryo to create SC using the Product which are repliacted from ECC to SRM.. I am able to create SC successfully. That means vendor is properly intended to the Porg and Pgrp right...
When i click on Centralized purchasing -- > Shop -- > Create Limit item
and give the Desc, Product category, Value limit, Expected value, Date between, Supplier and Follow-up actions as Confirmation and Invoice and account assignment as Known and click add to shopping cart..
It is giving a message vendor not intended for purchaing org.. in the Item under Good/Service field value LIMIT is getting created automatically.. I dont understand how it is getting created and Product type is neither a Material nor service.. The product type field vale is blank....
Please help me in finding out the issue.So that will be greatful to you..
REgards
Kumar -
Create Stop and Start Table item using HTMLDB_ITEM - APEX 2.2.0
Hi, all,
I guess the subject says it all. How can I create a Stop and Start Table item using HTMLDB_ITEM? I think I can just output "< /table >< table>", but I'd like to use the built-in function if there is one, in case the way tables are rendered were to change, or in case my thinking is wrong, which is always possible ; - )
Thanks, for this and for all of your help!Don, there is no function provided for this.
Scott -
How to update list item using client object model without changing created/modified dates?
Hello All,
I want to update list item using the SharePoint Client Object
Model without updating the created / modified date. Is it possible?
Please help.
Thanks.Using the SystemUpdate method should do the trick, according
to its literature.
Additionally, would something like this be of any use for you? Taken from this
Stack Exchange thread: -
public static class SPListItemExtensions
/// <summary>
/// Provides ability to update list item without firing event receiver.
/// </summary>
/// <param name="item"></param>
/// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
public static void Update(this SPListItem item, bool doNotFireEvents)
SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
if (doNotFireEvents)
try
rh.DisableEventFiring();
item.Update();
finally
rh.EnableEventFiring();
else
item.Update();
/// <summary>
/// Provides ability to update list item without firing event receiver.
/// </summary>
/// <param name="item"></param>
/// <param name="incrementListItemVersion"></param>
/// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
public static void SystemUpdate(this SPListItem item, bool incrementListItemVersion, bool doNotFireEvents)
SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
if (doNotFireEvents)
try
rh.DisableEventFiring();
item.SystemUpdate(incrementListItemVersion);
finally
rh.EnableEventFiring();
else
item.SystemUpdate(incrementListItemVersion);
/// <summary>
/// Provides ability to update list item without firing event receiver.
/// </summary>
/// <param name="item"></param>
/// <param name="doNotFireEvents">Disables firing event receiver while updating item.</param>
public static void SystemUpdate(this SPListItem item, bool doNotFireEvents)
SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling();
if (doNotFireEvents)
try
rh.DisableEventFiring();
item.SystemUpdate();
finally
rh.EnableEventFiring();
else
item.SystemUpdate();
private class SPItemEventReceiverHandling : SPItemEventReceiver
public SPItemEventReceiverHandling() { }
new public void DisableEventFiring()
base.DisableEventFiring();
new public void EnableEventFiring()
base.EnableEventFiring();
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
Create List Item using REST API
Hi All
I try create list item using REST in SharePoint 2013. when code is try add new item in list , getting error :
A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected.
Please help me
function addData() {
var title = $('#txtTitile').val();
//alert(title);
var items = {
__metadata: { "Type": "SP.Data.OrderDetailsListItem"},
Title:title
var exec = new SP.RequestExecutor(appweburl);
exec.executeAsync(
url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbytitle('OrderDetails')/Items?@target='" + hostweburl + "'",
method: "POST",
data: JSON.stringify(items),
headers: {
Accept: "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: function (data) { alert(JSON.parse(data)); },
error: function (error)
{ alert(JSON.stringify(error)); }
with Regards SivamHi,
Here is a demo which works in my environment for your reference:
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
$("#Button1").click(function(){
createListItemWithDetails("list2", "http://sp2013sps", "item1");
// Getting the item type for the list
function GetItemTypeForListName(name) {
//alert("GetItemTypeForListName: "+name);
return"SP.Data." + name.charAt(0).toUpperCase() + name.slice(1) + "ListItem";
// CREATE Operation
// listName: The name of the list you want to get items from
// siteurl: The url of the site that the list is in. // title: The value of the title field for the new item
// success: The function to execute if the call is sucesfull
// failure: The function to execute if the call fails
function createListItemWithDetails(listName, siteUrl, title) {
var itemType = GetItemTypeForListName(listName);
//alert("itemType :"+itemType);
var item = {
"__metadata": { "type": itemType },
"Title": title
$.ajax({
url: siteUrl + "/_api/web/lists/getbytitle('" + listName + "')/items",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
success: function (data) {
location.href=location.href;
//success(data);
error: function (data) {
alert("error");
//failure(data);
</script>
<input id="Button1" type="button" value="Run Code"/>
Best regards
Patrick Liang
TechNet Community Support -
Create Limit Items using Catalog
Hi Experts,
Can anyone advice how to create limit items using Catalogs.
I tried to change the catalog data in BADI BBP_CATALOG_TRANSFER, it results error "Interface data contains error".
Please let me know what are key fields to be changed in the BADI to create limit item.
Regards
Praveenpraveen,
we wanted to do this but found that it was not possible, i.e. you cannot put limit items into a catalog.
In our business the Procurement dept wanted to control the vendors that can be used for a product category in a limit order by Purch Org and even in some cases right down to Purch grp.
We have a Z table that allows Procurement to configure this.
ZFREEVEND table has fields for
Purch org - mandatory
Purch Grp - Can be blank in which case all Groups in the purch Org can use the record
Product Category - we use UNSPSC codes
Vendor Number - FMS/SRM supplier number
Product Category Description - For reference
Vendor Name - again for reference
Our Procurement Department can maintain this table using a Z transaction in the SRM GUI
If a shopper raises a Limit Order and enters values that correspond to a table entry the Shopping cart item is processed the same as a catalog item and the cart goes for approval, as per standard workflow.
If they enter a value that is not in the table they receive an error message and cannot complete the limit order screen unless they remove the supplier from the screen. Carts without a supplier for the limit item are treated as free text items, (sometimes called describe requirement), and the cart is sent to an operational purchaser for processing.
The check and error message is performed using the DOC_CHECK_BADI and although I am functional, not ABAP, I am told the code is quite trivial.
Hope this assists you
Allen -
Any body used this func mod CRMXIF_COND_REC_COMPL_SAVE
Hello guys,
If any body used this func mod CRMXIF_COND_REC_COMPL_SAVE earleir , please send me the exmple.
this is to update condition records.
regards
ramI saw this function module was used in another funciton module for IDOC:
This could be useful:
DATA: DATA TYPE BAPI_CT_COND_REC_COMPL_MSG_T,
E101I_CT_COND_REC_COMPL_MSG TYPE
E101I_CT_COND_REC_COMPL_MSG,
appl_ret TYPE BAPIRETM,
h_01I_CT_COND_REC_COMPL_MSG TYPE BAPI_CT_COND_REC_COMPL_MSG.
E101I_CT_COND_REC_COMPL_MSG = s_edidd-sdata.
MOVE-CORRESPONDING E101I_CT_COND_REC_COMPL_MSG
TO h_01I_CT_COND_REC_COMPL_MSG.
APPEND h_01I_CT_COND_REC_COMPL_MSG
TO DATA.
CLEAR h_01I_CT_COND_REC_COMPL_MSG.
IF NOT DATA IS INITIAL.
call application function module
CALL FUNCTION 'CRMXIF_COND_REC_COMPL_SAVE'
EXPORTING
DATA = DATA
IMPORTING
RETURN = appl_ret.
ENDIF. -
Creation of po with mutiple line items using BDC
Hi Gurus,
Can any body hav notes for creating po's using BDC with multiple line items in transaction ME21. I hav created po for single line item but if i tried to create multiple line items, it ll create multiple po's...
thanks in advance
arunSee the Below Logic for me22 and it is also same for me21
report zpochange.
data : i_error like bdcmsgcoll occurs 0 with header line.
data : i_bdcdata like bdcdata occurs 0 with header line.
tables : ekko, ekpo.
data :c1(10) value 'ME22',
c2(1) value ',',c3(10).
data : var1(20). " LIKE EKKO-EBELN.
data : var2 like ekko-ebeln.
data : begin of i_ekko occurs 0,
header(2),
ebeln like ekko-ebeln,
end of i_ekko.
data : begin of i_ekpo occurs 0,
item(2),
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
menge(10), " LIKE EKPO-MENGE,
end of i_ekpo.
data : v like ekpo-ebelp.
data: begin of itab occurs 0,
text(300),
end of itab.
parameters: p_file like ibipparms-path.
*PARAMETERS: PONUMBER LIKE EKPO-EBELN.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
importing
file_name = p_file
start-of-selection.
*SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
SELECT EBELN EBELP MENGE FROM EKPO INTO TABLE I_EKPO WHERE EBELN
*= PONUMBER.
perform get_data.
*LOOP AT ITAB.
WRITE :/ ITAB.
ENDLOOP.
loop at itab.
var1 = itab-text+0(1).
if var1 = 'H'.
*I_EKKO-EBELN = ITAB-TEXT.
split itab at c2 into i_ekko-header
i_ekko-ebeln.
SPLIT ITAB AT ',' INTO I_EKKO-EBELN.
" I_EKPO-EBELP
" I_EKPO-MENGE
" var1.
append i_ekko.
else.
split itab at c2 into i_ekpo-item
i_ekpo-ebeln
i_ekpo-ebelp
i_ekpo-menge.
append i_ekpo.
endif.
*var2 = i_ekpo-ebeln.
MOVE VAR1 TO I_EKPO-EBELN.
MOVE VAR1 TO I_EKKO-EBELN.
APPEND: I_EKPO.
*if not var1 is initial.
split var1 at ',' into i_ekpo-ebelp
i_ekpo-menge.
i_ekpo-ebeln = var2.
append i_ekpo.
*endif.
endloop.
loop at i_ekpo.
write :/ i_ekpo.
endloop.
loop at i_ekko.
perform fill_data. " TABLES I_EKPO.
endloop.
LOOP AT I_EKPO.
WRITE :/ I_EKPO.
ENDLOOP.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
*LOOP AT I_ERROR.
WRITE :/ I_ERROR.
ENDLOOP.
form get_data.
call function 'WS_UPLOAD'
exporting
codepage = ' '
filename = p_file
filetype = 'ASC'
headlen = ' '
line_exit = ' '
trunclen = ' '
user_form = ' '
user_prog = ' '
dat_d_format = ' '
IMPORTING
FILELENGTH =
tables
data_tab = itab
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10
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. " GET_DATA
*& Form FILL_DATA
text
-->P_I_EKPO text
form fill_data. " tables i_ekpo .
perform bdcscreen using 'SAPMM06E' '0105'.
perform bdcfield using 'RM06E-BSTNR' i_ekko-ebeln.
perform bdcfield using 'BDC_OKCODE' '/00'.
loop at i_ekpo where ebeln = i_ekko-ebeln.
V = I_EKPO-EBELP.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'RM06E-EBELP'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'BDC_OKCODE' '/00'.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'EKPO-MENGE(01)'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'EKPO-MENGE(01)' i_ekpo-menge.
perform bdcfield using 'BDC_OKCODE' '/00'.
*PERFORM BDCSCREEN USING 'SAPMM06E' 0120.
*PERFORM BDCFIELD USING 'BDC_CURSOR' 'RMO6E-EBELP'.
*CLEAR V.
endloop.
perform bdcfield using 'BDC_OKCODE' '=BU'.
call transaction c1 using i_bdcdata mode 'A'
messages into i_error.
refresh i_bdcdata.
endform. " FILL_DATA
*& Form BDCSCREEN
text
-->P_0140 text
-->P_0120 text
form bdcscreen using p_program p_screen.
i_bdcdata-program = p_program.
i_bdcdata-dynpro = p_screen.
i_bdcdata-dynbegin = 'X'.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCSCREEN
*& Form BDCFIELD
text
-->P_0145 text
-->P_I_EKPO_EBELN text
form bdcfield using fnam fval.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCFIELD
Reward Points if it is helpful
Thanks
Seshu
Maybe you are looking for
-
I'm wondering how I can update my iPhone after having updated my computer to Lion. Suddenly, I can't get proper software updates to my phone. It didn't help matters that I changed my email shortly thereafter, and one of these issues is making me so
-
Hi, I have a document based AppleScript Application, and I have the Main Menu and Document Interfaces completed, but when I click on "New" when running the app, the new "document" window shows, but does not make itself active. Is there some way of ma
-
I have a upgrade from elements 9 to elements 11
Hi I have a mac and Elements 9 and an upgrade to Elements 11 serial < removed by forum host>. Can all the Adobe Photoshope Elements 9 and 11 be deleted and I start the loading again will this fix? When I upgraded to 11 the first time with the trial i
-
Scripts in CS6 64bit Illustrator - win, which folder to place then in
HI all, I just got CS6, and I can't figure out which folder to place all of my scripts in. In CS4 version, once the scripts were in the correct folder, they would show up in the the scripts list,. In CS6, I have to keep finding them. Any help wou
-
We have several iphones, ipod touches, ipad and mac's if we all install icloud under the same apple account will they all sync together...we don't want that to happen!!