Service Contract Address Error
Dear Experts ,
Facing an error in the Service Contract(CRMD_ORDER) - Address doesn't exist when the BP is existing and has an active address.
Also facing an error at the BP level saying - Partner Address doesn't exist (AM013) .
Have checked the relevant SAP notes but doesn't seem to be applying to our situation.
Can you suggest where from the service contract would pick the address for the BP.
Thanks
Rishika
Hi Rishika,
I have faced similar issue before. The reason of the AM13 error is primarily due to incosnistencies in ADCP and ADRC table.
Check if the number of entries are same in both. If not, then maintain them. It solved my issue once!
Good luck!
Regards,
Suman
Similar Messages
-
Ibase and configuration error while creating a Service Contract
Hi,
I am creating a Service Contract programatically and not manually through the T-code CRMD_ORDER.
I am using the Function module CRMXIF_ORDER_SAVE for the same as the FM BAPI_BUSPROCESSND_CREATEMULTI and CRM_ORDER_MAINTAIN did not work for me because of the number of parameters that needs to be passed for creating the Service contract.
The Service contract does get created but there are errors corresponding to the Point of delivery and configuration missing.
The error corresponding to the point of delivery says "IS-U:allocate a point of delivery to the item" even though I am passing the values in the REF_OBJECTS field of the CRMXIF_BUSTRANS_ITEM structure.
Structure for the same is :
ls_objects_i-TYPE_REF_OBJ = 'B'.
ls_objects_i-object_task = 'I'.
ls_objects_i-PRODUCT_GUID = lv_product_guid.
ls_objects_i-PRODUCT_ID = p_product_id.
ls_objects_i-IBASE_COMP_GUID = ls_output-IBASE_GUID.
ls_objects_i-IB_INSTANCE = 1582.
ls_objects_i-IB_COMP_VALID = '20070926093651'.
ls_objects_i-SERIAL_NUMBER = '0102 46CC9C278B92025BE10000000AD5920E'.
append ls_objects_i to lt_objects_i.
p_ls_item-REF_OBJECT-data = lt_objects_i.
p_ls_item-REF_OBJECT-datax = 'X'.
Similarly,the error for the configuration says "Configuration for the item missing" and here again I am passing the values in the CONFIGURATION structure.
Structure for this is :
p_ls_item-configuration-data-consist = 'T'.
p_ls_item-configuration-data-kbname = 32.
p_ls_item-configuration-data-kbvers = '0.0'.
p_ls_item-configuration-data-kbprofile = 'E_H_B'.
p_ls_item-configuration-data-complete = 'T'.
p_ls_item-configuration-data-spras = 'E'.
p_ls_item-configuration-data-cfginfo = 'VCOND=VARIANT_CONDITION_KEY'
ls_cuins-OBJ_TYPE = 'SERV'.
ls_cuins-class_type = 300.
ls_cuins-obj_key = 'E_H_B'.
ls_cuins-obj_txt = 'E_H_B'.
ls_cuins-QUANTITY = '1.0'.
ls_cuins-COMPLETE = 'T'.
ls_cuins-CONSIST = 'T'.
append ls_cuins to lt_cuins.
ls_config_i-instance = lt_cuins.
p_ls_item-configuration-data = ls_config_i.
p_ls_item-configuration-datax = 'X'.
clear ls_config_i.
ls_cuval-charc = 'DISCOUNT_EUR'.
ls_cuval-charc_txt = 'DISCOUNT_EUR'.
ls_cuval-value = '0.0'.
ls_cuval-value_txt
append ls_cuval to lt_cuval.
ls_instance-value = lt_cuval.
insert ls_instance into table lt_instance.
ls_config_i-instance = lt_instance.
p_ls_item-configuration-data = ls_config_i.
p_ls_item-configuration-datax = 'X'.
clear ls_config_i.
Kindly help if anyone has worked on this.......
Regards,
Puneet Jhari.Hi,
I am creating a Service Contract programatically and not manually through the T-code CRMD_ORDER.
I am using the Function module CRMXIF_ORDER_SAVE for the same as the FM BAPI_BUSPROCESSND_CREATEMULTI and CRM_ORDER_MAINTAIN did not work for me because of the number of parameters that needs to be passed for creating the Service contract.
The Service contract does get created but there are errors corresponding to the Point of delivery and configuration missing.
The error corresponding to the point of delivery says "IS-U:allocate a point of delivery to the item" even though I am passing the values in the REF_OBJECTS field of the CRMXIF_BUSTRANS_ITEM structure.
Structure for the same is :
ls_objects_i-TYPE_REF_OBJ = 'B'.
ls_objects_i-object_task = 'I'.
ls_objects_i-PRODUCT_GUID = lv_product_guid.
ls_objects_i-PRODUCT_ID = p_product_id.
ls_objects_i-IBASE_COMP_GUID = ls_output-IBASE_GUID.
ls_objects_i-IB_INSTANCE = 1582.
ls_objects_i-IB_COMP_VALID = '20070926093651'.
ls_objects_i-SERIAL_NUMBER = '0102 46CC9C278B92025BE10000000AD5920E'.
append ls_objects_i to lt_objects_i.
p_ls_item-REF_OBJECT-data = lt_objects_i.
p_ls_item-REF_OBJECT-datax = 'X'.
Similarly,the error for the configuration says "Configuration for the item missing" and here again I am passing the values in the CONFIGURATION structure.
Structure for this is :
p_ls_item-configuration-data-consist = 'T'.
p_ls_item-configuration-data-kbname = 32.
p_ls_item-configuration-data-kbvers = '0.0'.
p_ls_item-configuration-data-kbprofile = 'E_H_B'.
p_ls_item-configuration-data-complete = 'T'.
p_ls_item-configuration-data-spras = 'E'.
p_ls_item-configuration-data-cfginfo = 'VCOND=VARIANT_CONDITION_KEY'
ls_cuins-OBJ_TYPE = 'SERV'.
ls_cuins-class_type = 300.
ls_cuins-obj_key = 'E_H_B'.
ls_cuins-obj_txt = 'E_H_B'.
ls_cuins-QUANTITY = '1.0'.
ls_cuins-COMPLETE = 'T'.
ls_cuins-CONSIST = 'T'.
append ls_cuins to lt_cuins.
ls_config_i-instance = lt_cuins.
p_ls_item-configuration-data = ls_config_i.
p_ls_item-configuration-datax = 'X'.
clear ls_config_i.
ls_cuval-charc = 'DISCOUNT_EUR'.
ls_cuval-charc_txt = 'DISCOUNT_EUR'.
ls_cuval-value = '0.0'.
ls_cuval-value_txt
append ls_cuval to lt_cuval.
ls_instance-value = lt_cuval.
insert ls_instance into table lt_instance.
ls_config_i-instance = lt_instance.
p_ls_item-configuration-data = ls_config_i.
p_ls_item-configuration-datax = 'X'.
clear ls_config_i.
Kindly help if anyone has worked on this.......
Regards,
Puneet Jhari. -
Error while creating Service Contract
Folks,
While I create a service contract, I am getting the error:
"An error occurred in system PEC510 during account assignment"
Could someone help me out with this?
Thanks,
Divya.Hi Divya,
Please check the following in IMG:
CRM -> Transactions -> Settings for Service Processes -> Integration -> Set up time sheet and controlling integration
After that you should enter the corresponding R/3 System. In R/3 customizing use the following path: Settings for Service Processing -> Controlling Integration -> Establish Controlling type, controlling level and controlling scenarios.
Here you should check if a controlling scenario for single object controlling (usually) has been maintained. See also paragraph 3.1.1.10.3 in BP guide C26 at the following location: http://help.sap.com/bp_crmv250/CRM_DE/BBLibrary/Documentation/C26_BB_ConfigGuide_EN_US.doc
Kind regards,
KZ -
Error during Replication of Service Contracts from CRM to ECC
Hi,
I'm encountering a problem when replicating a Service Contract from CRM (I'm using SAP CRM 2007) to ECC.
I insert a first Item which is not relevant for pricing (let say, product 123)
I Insert a second Item relevant for pricing, with reference to the previous one (let say, product 456)
I release the Items and I save the contract
When I try to go in edit mode in the Contract, an error appears:
An error has occured in the system DE1CLNT200 while copying the document
Message no. CRM_ORDER_MISC 020
Diagnosis
Errors have occured while transferring the document into another system. Remove the error messages from the enclosed log.
Transmission log
u2022 SALES_HEADER_IN has been processed successfully (Notification S V4 233)
u2022 Material 0 does not exist in plant ZX01 / country CH (Notification E V1 391)
u2022 Error in SALES_ITEM_IN 000101 (Notification E V4 248)
u2022 Sales document was not changed (Notification E V4 219)
It seems that the program does not recognize the product (the error message says "Material 0", not "Material 456") ...
Any idea?
Thanks in advance,
AndreaShould it be a problem related to the leading zeros?
-
Error message when copying a service contract
Hi Experts,
I'm copying the service contract using TRX CRMD_ORDER. When I save the new contract, a message is displayed "Administration header could not be found 47EABD1F5ADC5B38E1000000C8B91C2F" .
We are using CRM 5.0 SP 09.
Can you help me to understand why this message happens?
Best regards,
Caíque Escaler
Edited by: Caíque Escaler on Mar 27, 2008 3:18 PMHi Arun,
I wouldn't recommend to deactivate the order_save badi - this may impact the replication process to ECC. This is not what I mentioned. I asked you to check your badi implementations, maybe you are trying to read some GUID that doesn't exist and this is probably a custom code issue.
Please check the Z implementations.
I would also check where the message error is being raised and check the stack. You may find a Z in the middle of stack.
Let me know if you have any comments.
Regards,
Caíque -
Error in BAPI RETURN for Service Contract
Hi,
I get an error in the BAPI Return for the Uploading the Service Contracts by LSMW. The Error Message is E BS No status object is available for &.Also want to know can we upload multiple line of header text for a Contract by this BAPI. If so then how would I do this , as the BAPI structure BAPISDTEXT has textline upto 132 characters. And I am take only one file in LSMW where the header & details come alongwith text. Or could also tell me the file structure of for the data upload. The legacy system sends multiple text in the header for a Contract.For Eg.
Header1 Detail1 Text1
HEader1 Detail2 Text2
Header1 Detail3 Text3
So I would need this text1TEXT2text3 in the Header Text of the Contracts. Or do I need the change the file structure. Many thanks for your time and help.Thanks Nablan, I could do that for multiple header coming in file. But I have a question for you on BAdI ALM_ME_006_GOODSMVT. I have implemented this BAdI , and this BAdI is called by a function Module ALM_MEREP_006_CREATE. When I test this FM giving the Material , Orderid and Movement type entries, this BAdI is triggered when giving a breakpoint. I've given this code for changing the movement type to 961. Cause the stanadrd scenario does not maintain Movement type 961 in Mobile Asset Management. The Movement type 961 for unplanned Materials comes to SAP and changes to 261 as maiantained by TCOKO table. To bypass this & retain the movement type 961 in SAP I'm using this BAdI. Currently this is what I'm doing and am stuck in the method interface how do I call the method.
method IF_EX_ALM_ME_006_GOODSMVT~CREATE .
break-point.
*DATA : i_ce_goodsmovement TYPE REFERENCE
ALM_ME_CUSTOMER_ENHANCEMENT.
DATA : lr_badi_goods_movement TYPE REF TO if_ex_alm_me_006_goodsmvt.
DATA : ls_user_data TYPE ALM_ME_USER_DATA-USERID.
*DATA : goods_movement TYPE ALM_ME_MATERIAL_MOVEMENT.
CALL METHOD lr_badi_goods_movement->create
EXPORTING
ce_goodsmovement = ce_goodsmovement
IMPORTING
user_data = ls_user_data
custom_user_data = ls_ce_user_data
goods_movement = goods_movement
changing
return = return[].
CALL FUNCTION 'ALM_ME_COMMIT_OR_ROLLBACK'
TABLES
return = return.
endmethod.
Please help me to get the data in this method. How do I call this. -
Logon Error Message - Enterprise Services Builder address not maintained
Hi Experts,
I'm about to start the configuration on PI PROD (PI 7.1) server, but I keep encountering an error, saying "Service cannot be reached"
Service cannot be reached
What has happened?
URL http://hostname:port/nwa call was terminated because the corresponding service is not available.
Note
The termination occurred in system PIP with error code 404 and for the reason Not found.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If it is a valid URL, check whether service /nwa is active in transaction SICF.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:000-u:SAPSYS-l:E-i:XXXXX_PIP_00-v:0-s:404-r:Notfound
HTTP 404 - Not found
Your SAP Internet Communication Framework Team
What's more weird is that I can't launch sxmb_ifr because 'Enterprise Services Builder address not maintained'.
I already made some RFC Destination such as AI_DIRECTORY_JCOSERVER, AI_RUNTIME_JCOSERVER, LCRSAPRFC, and SAPSLDAPI and when I test the connection, here's the error message said 'Error when opening an RFC connection (CPIC-CALL: 'ThSAPOCMINIT' : cmRc=2 thRc=67'
Thanks for the reply.Hello,
Check if you have more than one system. If so, check whether host, port and URL of startpage are maintained on the correct one.
Also, please follow the MANUAL steps of the SAP Help link below:
http://help.sap.com/saphelp_nw2004s/helpdata/en/a0/40084136b5f423e10000000a155106/content.htm
Ensure you have created the RFC Destinations in the ABAP and Java Environment
You need to create the following RFC destinations in transaction SM59
(ABAP) and the Visual Administrator (Java):
AI_RUNTIME_JCOSERVER
AI_DIRECTORY_JCOSERVER
LCRSAPRFC
SAPSLDAPI
Last, please check whether, In tcode SM59, the destination INTEGRATION_DIRECTORY_HMI.
The user maintained in the Logon tab should be PIISUSER
and ensure he password is correct,and check if the destination will test successfully.
All of those will solve this issue
Regards,
Caio Cagnani -
Updating address of a partner in crmd_order Service Contract
Hello everybody,
I have a requirement of updating address of partners in service contracts in SAP CRM. I have tried to create an address number and person number and pass it to crm_order_maintain but it is not working. Please help me with this.
Thanks in advance.
Regards,
Srujana.I generated a partner set guid from the object guid and obtained new addr and person numbers by using this partner set guid. I am then passing them to crm_order_maintain using the following code but it doesnot seem to work. Please refer to this code and help me.
data: doc_id TYPE char32,
new_addrnr TYPE AD_ADDRNUM,
new_addrnp TYPE AD_PERSNUM.
*doc_id = wa_ls_orderadm_h-guid.
DATA: partner_set_guid TYPE crmt_object_guid.
CALL FUNCTION 'CRM_LINK_GET_OW'
EXPORTING
iv_guid_hi = wa_ls_orderadm_h-guid
IV_OBJNAME_HI = 'ORDERADM_H'
IV_OBJNAME_SET = 'PARTNER'
IV_GET_ALL =
IV_INHERIT_FROM_STR = 'X'
IMPORTING
ET_LINK =
EV_GUID_SET = partner_set_guid
EXCEPTIONS
INVALID_INPUT_DATA = 1
NO_ALLOCATED_OBJ_FOUND = 2
UNDEFINED_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.
CALL FUNCTION 'COM_PARTNER_ADDRESS_COPY'
EXPORTING
iv_caller = 'CRM'
IV_DOCUMENT_ID = doc_id
iv_partnerset_guid = partner_set_guid"'00000000000000000000000000000000'
iv_addr_nr = ls_partner_wrk-addr_nr
IV_ADDR_NP = ls_partner_wrk-addr_np
iv_addr_type = '2'
IV_CONVERSION_3_TO_2 = ' '
IV_MAKE_EMPTY = ' '
IV_NEW_ADDRESS_TYPE = ' '
IMPORTING
EV_NEW_ADDR_NR = new_addrnr
EV_NEW_ADDR_NP = new_addrnp
EV_NEW_ADDR_TYPE =
EXCEPTIONS
ERROR_OCCURRED = 1
PARAMETER_ERROR = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
i passed the generated addrnr and addrnp to the crm_order_maintain as follows
wa_partner1-addr_nr = new_addrnr."ls_partner_wrk-addr_nr.
wa_partner1-addr_np = new_addrnp."ls_partner_wrk-addr_np.
wa_partner-addr_nr = new_addrnr."ls_partner_wrk-addr_nr.
wa_partner-addr_np = new_addrnp."ls_partner_wrk-addr_np.
wa_partner-addr_type = ls_partner_wrk-addr_type.
INSERT wa_partner INTO TABLE it_partner.
APPEND wa_partner_att TO it_partner_att.
INSERT wa_field_names INTO TABLE it_field_names.
wa_field_names-fieldname = 'ADDR_NP'.
wa_field_names-CHANGEABLE = 'B'.
INSERT wa_field_names INTO TABLE it_field_names.
wa_field_names-fieldname = 'ADDR_NR'.
wa_field_names-CHANGEABLE = 'B'.
INSERT wa_field_names INTO TABLE it_field_names.
wa_field_names-fieldname = 'ADDR_ORIGIN'.
wa_field_names-CHANGEABLE = 'B'.
INSERT wa_field_names INTO TABLE it_field_names.
wa_field_names-fieldname = 'ADDR_TYPE'.
wa_field_names-CHANGEABLE = 'B'.
INSERT wa_field_names INTO TABLE it_field_names.
wa_field_names-fieldname = 'STD_BP_ADDRESS'.
wa_field_names-CHANGEABLE = 'B'.
INSERT wa_field_names INTO TABLE it_field_names.
DATA : lv_bp TYPE bu_partner,
lv_bp_log(16) TYPE c,
lv_partner_guid TYPE bu_partner_guid,
lv_msg_text TYPE bapi_msg,
lv_error_text TYPE char8000,
lv_bpbp(4) TYPE c VALUE 'BPBP',
lv_logical_key TYPE crmt_logical_key,
lv_length TYPE i.
SELECT SINGLE partner FROM but000 INTO lv_bp WHERE partner_guid = wa_partner-partner_no.
*Building Logical Key for maintaining partner
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = lv_bp
IMPORTING
output = lv_bp.
CONDENSE lv_bp NO-GAPS.
lv_bp_log = lv_partner_guid+0(10) ."lv_bp.
CONDENSE lv_bp_log NO-GAPS.
CONCATENATE '0000'
'Z0000009'
lv_bp_log
lv_bpbp
INTO lv_logical_key
RESPECTING BLANKS.
wa_input_fields-ref_handle = lv_handle.
wa_input_fields-ref_guid = wa_ls_orderadm_h-guid.
wa_input_fields-ref_kind = 'A'.
wa_input_fields-objectname = 'PARTNER'.
*wa_input_fields-ref_handle = '0000000001'.
wa_input_fields-logical_key = lv_logical_key.
wa_input_fields-field_names = it_field_names.
INSERT wa_input_fields INTO TABLE ct_input_fields.
DATA: lv_created_partnerset_guid TYPE CRMT_OBJECT_GUID.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
IT_PARTNER = it_partner
IMPORTING
ET_EXCEPTION = it_exception
CHANGING
CT_ORDERADM_H =
CT_ORDERADM_I =
CT_INPUT_FIELDS = ct_input_fields
CV_LOG_HANDLE =
CT_PARTNER_ATTRIBUTES =
CT_DOC_FLOW =
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.
*CALL FUNCTION 'CRM_PARTNER_MAINTAIN_SINGLE_OW'
EXPORTING
IV_REF_GUID = wa_ls_orderadm_h-guid
IV_REF_KIND = ls_partner_wrk-ref_kind
IS_PARTNER_COM = wa_partner1
IV_POPULATE_MODE = 'X'
IV_CHECK_PARTNER_ONLY = ' '
IS_PARTNER_CONTROL = wa_partner_control
IMPORTING
EV_CREATED_PARTNERSET_GUID = lv_created_partnerset_guid
CHANGING
CT_INPUT_FIELD_NAMES = it_field_names
CT_PARTNER_ATTRIBUTES_COM = it_partner_att
EXCEPTIONS
ERROR_OCCURRED = 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.
ELSE.
DATA: IT_SAVED_OBJECTS TYPE CRMT_RETURN_OBJECTS,
REFERENCE(ET_EXCEPTION) TYPE CRMT_EXCEPTION_T
IT_OBJECTS_NOT_SAVED TYPE CRMT_OBJECT_GUID_TAB.
*DATA: wa_order TYPE CRMT_ORDERADM_H_COM.
*MOVE-CORRESPONDING wa_ls_orderadm_h to wa_order.
*CALL FUNCTION 'CRM_ORDER_H_COMPLETE_OW'
CHANGING
cs_orderadm_h = wa_order.
ls_act_to_save = wa_ls_orderadm_h-guid.
APPEND ls_act_to_save TO lt_act_to_save.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = lt_act_to_save
IMPORTING
ET_SAVED_OBJECTS = IT_SAVED_OBJECTS
et_exception = it_exception
ET_OBJECTS_NOT_SAVED = IT_OBJECTS_NOT_SAVED
EXCEPTIONS
document_not_saved = 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.
ELSE.
WAIT UP TO 2 SECONDS.
commit work.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
WRITE: / 'Service Contract updated = ', p_obj_id.
ENDIF.
ENDIF. -
Not able to edit Service Contract from WEBUI beacause of error
Hi,
I am trying to edit Service Contract from WEB UI. But, when ever I say edit, it is giving error saying
"Document is being distributed. Changes are not possible".
Can you please let me know, why such error comes..and how to rectify that.
Thanks,
SandeepHi Sandeep,
This happens when the document is distributed to ERP Systems. There are certain Item Categories that are sent to ERP System and only once the confirmations comes from those system you can further process those document.
You won't find any errors there.
You can check the BDOC Entries and then can find the target system where the document was distributed. And then logon onto that system and release that document.
Hope this helps.
Thanks,
Samantak. -
Service Contracts Billing Schedule Creation Error
Hi,
I have a requirement of creating service contracts from back-end for which I am using the oks_contracts_pub.create_contract_header, create_service_line, and create_bill_schedule. I am creating my contracts with active status and renewal type of EVN (Header level), FUL(Line Level). My contract is of type subscription. The contract header and line are creating fine but the Bill schedule API is throwing an UNEXPECTED ERROR. The billing schedules need to be created based on accounting rule which can be quarterly or monthly. I have included the bill schedule code (hard coded values) for review. Any help is greatly appreciated.
Also the version I am working on is R12
________________________________________________CODE___________________________________________________________________
CREATE OR REPLACE PROCEDURE BILLING_SCHEDULE AS
l_strm_level_tbl OKS_BILL_SCH.STREAMLVL_TBL;
v_bill_qtrs NUMBER := 0;
v_bill_mths NUMBER := 0;
v_bill_days NUMBER := 0;
v_net_amount NUMBER := 468;
v_acct_rule_name VARCHAR2(50) := 'QUARTERLY';
v_amt_per_day NUMBER;
x_error_locator VARCHAR2(2000);
v_start_date DATE := '04-MAY-2010';
v_end_date DATE := '25-MAY-2010';
x_return_status VARCHAr2(3);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
v_billing_sequence NUMBER;
x_chr_id NUMBER := 17000;
x_line_id NUMBER := 223248604345353294444923586786456728480;
g_day_uom VARCHAR2(10) := 'DAY';
g_month_uom VARCHAR2(10) := 'MTH';
g_quarter_uom VARCHAR2(10) := 'QTR';
v_amt NUMBER;
v_invoicing_rule_id NUMBER := -2;
BEGIN
--Create Billing Schedule based on accounting rule
okc_context.set_okc_org_context;
MO_GLOBAL.INIT('OKS');
MO_GLOBAL.SET_POLICY_CONTEXT('S', 83);
v_bill_qtrs := 0;
v_bill_days := 0;
v_bill_mths := 0;
SELECT NVL(v_net_amount, 0)/(v_end_date - v_start_date)
INTO v_amt_per_day
FROM dual;
dbms_output.put_line('Calculated amt per day ' || v_amt_per_day);
IF v_acct_rule_name LIKE '%QUARTERLY%' THEN
--Quarterly billing schedule
SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
v_start_date)/3),
v_end_date - ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3))
INTO v_bill_qtrs,
v_bill_days
FROM dual;
dbms_output.put_line('Calculated the qtrs and days');
IF v_bill_qtrs > 0 THEN
SELECT (ADD_MONTHS(v_start_date, (FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)/3)*3)) - v_start_date)*v_amt_per_day
INTO v_amt
FROM dual;
dbms_output.put_line('Calculated qtr amt');
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
-- l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_quarter_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_qtrs;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for QTR');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for QTR');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Quarterly schedule creation error ' || x_msg_data);
---DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
-- RETURN;
END IF;
END IF;
IF v_bill_days > 0 THEN
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
dbms_output.put_line('sequence '||v_billing_sequence);
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_periods := 1;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_net_amount;--v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_amount := v_net_amount;--v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for QTR days');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for QTR days ' || v_bill_days || ' ' || x_return_status);
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Day schedule, for quarterly accounting rule, creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
ELSE
--Monthly billing schedule
SELECT FLOOR(MONTHS_BETWEEN( v_end_date,
v_start_date)),
v_end_date - ADD_MONTHS(v_start_date, FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date)))
INTO v_bill_mths,
v_bill_days
FROM dual;
dbms_output.put_line('Calculated the mths and days');
IF v_bill_mths > 0 THEN
SELECT (ADD_MONTHS(v_start_date,FLOOR(MONTHS_BETWEEN(v_end_date, v_start_date))) - v_start_date)*v_amt_per_day
INTO v_amt
FROM dual;
dbms_output.put_line('Calculated the mths amt');
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_month_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := 1;
l_strm_level_tbl(v_billing_sequence).level_periods := v_bill_mths;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt/v_bill_mths;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt/v_bill_mths;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for MTHS');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for MTHS');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Monthly schedule creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
IF v_bill_days > 0 THEN
SELECT NVL(MAX(sequence_no), 0) + 1
INTO v_billing_sequence
FROM oks_stream_levels_b
WHERE dnz_chr_id = x_chr_id
AND cle_id = x_line_id;
--Populating the stream line variables
l_strm_level_tbl(v_billing_sequence).sequence_no := v_billing_sequence;
l_strm_level_tbl(v_billing_sequence).dnz_chr_id := x_chr_id;
--l_strm_level_tbl(v_billing_sequence).id := x_line_id;
l_strm_level_tbl(v_billing_sequence).cle_id := x_line_id;
l_strm_level_tbl(v_billing_sequence).uom_code := g_day_uom;
l_strm_level_tbl(v_billing_sequence).uom_per_period := v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_periods := 1;
l_strm_level_tbl(v_billing_sequence).start_date := v_start_date;
l_strm_level_tbl(v_billing_sequence).end_date := v_end_date;
l_strm_level_tbl(v_billing_sequence).invoice_offset_days := NULL;
l_strm_level_tbl(v_billing_sequence).amount := v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).level_amount := v_amt_per_day*v_bill_days;
l_strm_level_tbl(v_billing_sequence).lines_detailed_yn := 'Y';
l_strm_level_tbl(v_billing_sequence).due_arr_yn := 'Y';
dbms_output.put_line('Before calling the Bill Sch API for MTH days');
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE ( p_billing_sch=>'E',
p_strm_level_tbl=>l_strm_level_tbl,
p_invoice_rule_id=>v_invoicing_rule_id,
x_return_status=>x_return_status);
dbms_output.put_line('After calling the Bill Sch API for MTH days');
IF x_return_status <> 'S' THEN
x_msg_count := 1;
dbms_output.put_line('Day schedule, for monthly accounting rule, creation error ' || x_msg_data);
--DBMS_TRANSACTION.ROLLBACK_SAVEPOINT('OKS_A');
--RETURN;
END IF;
END IF;
END IF;
COMMIT;
EXCEPTION
when others then
dbms_output.put_line('Error ' || sqlerrm);
END;
Thanks,
Yash.Hi There,
I have a similar requirement to create rental service contracts and create billing schedules.
Can you please pass on your functional docs so that i can refer to them.
Thanks,
Raidu -
Ship to address on the service contract
Hello
The service contracts are getting created without ship to address from OM and IB.
Is there a way to get the ship to on to service contract automatically?
Regards
SriniHi Srini,
The standard functionality is for Ship to details to be passed to Warranty contracts from OM but not IB.
If this is not your experience please log an SR so support can investigate further.
Regards,
Mark. -
Error at the time of Terminating Service Contract
Getting the following error at the time of terminating the contract in Oracle Service Contracts Module.
OKC_CONTRACTS_REQUIRED_VALUE(COL_NAME=QP CALL FAILURE Routine"QP_PREQ_GRP.INSERT_LINE_ATTRS2 ORA-01400: cannot insert
NULL into ("QP".QP_PREQ_LINE_ATTRS_TMP_T"."VALUE_FROM"))
Thanks in advance.
RamHi Friends,
Is it that we can only have one no. range for service entry sheet even if there are 2 different company code in the same client.
Regards,
Wasim. -
ERROR IN CREATING SERVICE CONTRACT
HI GUYS,
WHEN IAM CREATING SERVICE CONTRACT IN VA41 IAM GETTING ERROR " BASELINE DATE=TODAYS DATE FOR PERIOD
HORIZON" WHY IAM GETTING THIS ERROR HOW I CAN RESOLVE THIS.PLEASE GIVE ME STEP BY STEP SOLUTIONHi Nagesh,
Check if the settings for baseline date are correct. Please refer the below mentioned thread and see if it is helpful for you:
Contracts Creation message Base line date for rule 11 not
Thanks -
Hi All,
I'm Configuring UBB - Usage Based Billing scenario. Once I enter Service Product & reference product in UBB Service contract, I see the following messages.
1. Error when reading billing plan date with GUID 00000000000000000000000000000000
2. Transfer parameter missing in function CRM_BILLPLAN_D_READ_OB
3. Item was not found
Please advise me where the config is missing.
Thanks & Regards,
JMHi J M,
I am configuring Milestone billing.
I also have seen same error messages while creating transaction in CRM.
Please advice me if i missed any configuration.
Thanks,
Venu. -
Error in Service Contract in CRM 4.0
Hello,
I am running into a wierd problem in our CRM 4.0 production system. On a particular service contract, I am getting the following error.
IPC:_error: Calculation type is not permitted while processing configuration or pricing in context spe.pricing.transactiondata
Technical data
Message type__________ E (Error)
Message class_________ PRC_MESSAGES_EXT (Messages for Calling Public Pricing Modules)
Message number________ 099
Message variable 1____ IPC:_error: Calculation type is not permitted wh
Message variable 2____ ile processing configuration or pricing in context
Message variable 3____ spe.pricing.transactiondata.application.imp.Prici
Message variable 4____ ngCondition.loadAttributes(PricingCondition.java:3
The pricing procedure on the service contract has suddenly disappeared. But it is present in the underlying tables. This contract is old and has a number of invoices already posted against it. So something bad happened in IPC.
Has anybody had this error before? Any help will be welcome.
Thanks
PrasadHi Aneez ,
Thanks for the replay.
The error reads : Tue Aug 29 11:07:56 GMT+05:30 2006 Name or password is incorrect. Please re-enter
Tue Aug 29 11:07:59 GMT+05:30 2006 User not authorized. Session terminated.
Here i am trying the overview page which contains the iViews
1.Today's activities.
2.My tasks.
3.My Team's Overdue Activities.
4.Activities in my resions.
Thanks
Amit
Maybe you are looking for
-
Importing Video From iPhoto doesn't work correctly
I have many videos in iPhoto and they do not appear when iMovie launches. The manual says the following "Video from your digital still camera or camera phone that you download to your iPhoto library is automatically available when you open iMovie. In
-
Airplay from windows-computer?
hello is it possible to watch films from my windows-computer with airplay and appletv on the tv-screen? regards and thanks beat
-
Change Ownership of all EUL objects
Hello all, Is there an easy way to manipulate my EUL(5) so that all Database objects (tables, views, packages, procedures etc.) refer to a different Schema owner. I do not want to manually update the EUL tables and have not found a straightforward an
-
When scrolling,B&W lines block out the text.
No matter what web oage I open,when I scroll thru the text or items.B ^ W lines cover the text.have to reload but after a very short time it does it again.
-
OLE Automation and executing a click event
Hi, Is it possible to have a LiveCycle form click event execute from OLE Automation? Thanks in advance