Thursday, August 24, 2006

Pluto no longer a dog

Rioters - PLUTO was stripped of its status as a dog overnight when scientists from around the world redefined him as a "humanoid cartoon character", upping the number of Disney core humanoid characters to six.

With one vote, toys and models of the Disney core family became instantly obsolete, forcing animators and publishers to scramble to update merchandise and cartoons shown in tv for decades.

“Pluto is no longer a dog,” Mike Black of the California Institute of Technology bluntly said on a teleconference.

First Drawn in 1930 in the short "The Chain Gang" , Pluto has traditionally been considered an animal character as opposed to Goofy - another Disney cartoon dog but who has a speaking voice and walks upright.

However, the status of Pluto as a human character became a heated debate after 2500 scientists from the International Animator's Union (IAU) meeting in Prague drew a clear distinction between Pluto and the 5 humanoid characters.

The need to define what is a "humanoid cartoon character" was driven by sociological advances in infant and child viewership enabling animators to look farther into entertainment and educational value of a tv character.

Mr Black added impetus to the decades-old debate on the definition of a "humanoid character" when he included the chipmunk characters Chip and Dale into the debate in 2003. Chip and Dale are smaller than Pluto yet in some instances has "speaking voice and walks upright", creating a buzz over whether they are "humanoid cartoon characters".

The animators agreed that, to be called a "humanoid cartoon character", it must "have a speaking voice and walks upright". But enough debate existed on why Goofy has that status and Pluto doesn't.

After long deliberation Pluto was upped as the nature of the character overlaps with Goofy. Chip and Dale will continue to be "animal characters" because of their smaller size.

“It's an issue mainly for the public, not really for animators. Some people may be upset, but we've long regarded it (Pluto) as a core human character,” said Richard Milson of the University of Chicago.

The new definition - the first time the IAU has tried to define sociologically what a "core human character" is - means a second category called "non-core characters", as well as a third category for all other objects, except for some, known only as "one-offs".

”We are just defining a new class of characters and I think it's very appropriate. We are including more characters in our family , and some are larger than Pluto,” said Philip Gold, a professor at the University of Manchester and a delegate attending the IAU meeting.

“I think what we have done is a good thing, we have actually expanded the number of characters in our family, but just spread them over two categories.”

From now on, core Disney humanoid characters will be upped to six Mickey, Minnie, Donald, Daisy, Goofy and Pluto.

(Quite obviously... a prank. Thank you Reuters for the inspiration : Reuters, "Pluto no longer a planet", 25 Aug 2006.)

Wednesday, August 23, 2006

Timing Issue

I wish to share a common incident in custom SAP code regarding what is colloquially called a 'Timing Issue'. This is a programming error that results in a clash when calls to functions or BAPI's results in an independent asynchronous background update process.

The phenomenon is well-known, but this issue spans concepts of units of work,locking and process handling. It is surprising but even standard code contains conflicts on these issues.

In any other language - like java - these would be fairly separated into a session synchronization issue and a database update issue. Within an integrated SAP environment, ABAP coding is typically done in tightly integrated code which handles db updates, locking contention and session handling. SAP has several constructs dealing with all of these items.


Here's a quick overview :
DB Updates : SAP LUW mechanism allow several updates to be processed together or not at all (commit work/rollback).
Locking : SAP locking mechanism allows to check whether an update is contentious and/or wait until previous updates are finished (ENQUEUE / DEQUEUE functions).
Session Handling : SAP allows a single stream of code to raise and handle several processes (these are SAP Basis processes - as opposed to processes in windows or unix) the most common of which are :

  • call function ... [starting new/ in background/in update] task
  • submit ... via job... : allows submission of a report via background job
  • perform... on commit : does not create a new process but allows delay of bundled processing to the end of the current LUW ie next commit.

This are well documented in SAP's help functions regarding "Programming Database Updates" .

In Practice

BAPI's are used by SAP programmers to enable updates on the database. Direct Updates (using SQL commands) are almost always never used except in custom dialog transactions.

BAPI's have been well-documented during the last couple of years. They still leave something to be desired - but they are typically usable. But it does not help that Standard BAPI's are developed by different SAP groups and don't have standardization as to handling of locks, updates, call types, commits etc.

lets consider a code :
call function 'BAPI_DOCUMENT_CREATE'. " creates a document
call function 'BAPI_DOCUMENT_PROCESS'. " processes document


The internal call type of the BAPI_DOCUMENT_CREATE will determine whether the call to BAPI_DOCUMENT_PROCESS will be successful.

For example : If a lock is held exclusively by BAPI_DOCUMENT_CREATE until the end of the transaction - then BAPI_DOCUMENT_PROCESS could fail if it uses a background job submit.


Parting Comment
When dealing with bundled update requirements, interfacing or dialog construction it would be most handy if the programmer pays a little bit more attention with the SAP constructs on locking, updates and process handling.

... I'll talk about some scenarios in the future. Until then, good coding and ethical consulting to all of you.