Auto-cancel reason not found (6, 13906)

Posted by Rajesh Sharma on Oracle Blogs See other posts from Oracle Blogs or by Rajesh Sharma
Published on Sat, 05 Jun 2010 14:21:28 +0000 Indexed on 2010/06/05 14:43 UTC
Read the original article Hit count: 604

Filed under: Error when finding categories...

There are many errors in the application which are never invoked because of appropriate application configuration done at the time of implementation by the solution architects. So typically, as an application end user you would never stumble upon such errors. But what if the application administrator inadvertently changes the configuration/setup in the development, test, QA, or production environment? This is the time when you as an end user are introduced to a brand-new error for which you may not have a clue or understanding to what it means and neither the access/privilege to rectify it.

 

 In this post we'll focus on one such error '6, 13906 - Auto-cancel reason not found'.

 

You get this error if you have not defined a Bill (Segment) Cancel Reason (Admin Menu, B, Bill Cancel Reason) code with System Default value of Turn off auto-cancel.

 

Consider a scenario when you are about to final bill an 'Account' for which the bill period's cut-off date you selected is falling on or after the Service Agreement's (SA) end/stop date (basically SA is Stopped with a date earlier than it was billed previously). And for the same 'Account' either:

  • Bill segments exists that end after the SA's end date OR
  • Non-closing bill segments exists that end on the SA's end date (OR closing bill segments that do not end on SA's end date or do not exist at all - remember closing/final bill segment is generated if the SA is in Stopped status).

 

CC&B detects such scenario and attempts to cancel all such violating bill segments automatically, but NOT if you are generating the bill Online. If online, the system assumes that you know what you are doing, and prompts you with error 2, 13716 - Bill segments that violate the SA (%1) End Date (%2) exist to take necessary action.

 

03. 01_Auto-Cancel.JPGIf in batch, system automatically cancels these kinds of bill segment(s).

 

Since this happens in the background, you have to define within the application which System Default Bill (Segment) cancellation reason code identified as Turn off auto-cancel, should be used by the process when it attempts to cancel any such violating bill segments (You already know that you cannot cancel a bill segment without giving a reason for cancellation).

  03. 02_Auto-Cancel.JPGSo what exactly happens during batch billing?

 

Bill Segment generation routine at first determines billing eligibility of the service agreement being billed. One of the billing eligibility criteria is to check the SA's previous bill segments which have end dates greater than the current cut-off date/end date.

Technically, the routine retrieves a count of such violating bill segments.

 

 

SELECT

COUNT (*)

FROM

CI_BSEG

WHERE

SA_ID = :SA-ID

AND BSEG_STAT_FLG = '50' -- Frozen

AND END_DT IS NOT NULL

AND (END_DT > '03-JUN-2010' -- Bill segment greater than SA's End Date OR

OR (END_DT = '03-JUN-2010' AND CLOSING_BSEG_SW = 'N')) -- Non-closing bill

segment ending on SA's end date

 

If the count is greater than zero, Bill segment generation routine executes another program to auto-cancel such bill segments. Auto-cancel program retrieves the 'Bill Cancel Reason' code which is identified as Turn off auto-cancel. Retrieved cancel reason code is then placed on the bill segments that are being cancelled automatically.

 

During this process if the routine fails to determine the bill cancel reason code having System Default Turn off auto-cancel because it was not been configured, you get a bill exception 6, 13906 - Auto-cancel reason not found.

 

Also note that duplicate or multiple System Default codes identified as Turn off auto-cancel are not allowed. CC&B would complain with an error 2, 54201.

 

03. 03_Auto-Cancel.JPGDuplicate validation/check is also performed within Auto-cancel routine, if suppose for test purposes you executed a DML statement updating CI_BILL_CAN_RSN.BSCAN_SYS_DFLT_FLG with a value 'T'.

© Oracle Blogs or respective owner