Sunday, January 11, 2009

Invoke the Concurrent Request Output as web page

Hi All,
Many a times, I have seen requirement from Client to invoke the concurrent program output by clicking on a button. It isn't that difficult to submit a program and get the output opened in a separate page when a specific button is clicked.
Try out the following code in order to invoke the output of a Concurrent Program as an HTML page.
BEGIN
SELECT file_name, file_node_name
INTO l_outfile_name, l_outfile_node_name
FROM fnd_conc_req_outputs
WHERE concurrent_request_id = your_request_ID;

SELECT mime_type
INTO l_mime_type
FROM fnd_mime_types_vl
WHERE file_format_code = 'PDF';

l_svc := fnd_conc_private_utils.get_fs_svc_name(l_outfile_node_name);
l_id := fnd_webfile.create_id(l_outfile_name, l_svc, 10, l_mime_type, l_request_id, 'BINARY', 'Y');
IF (l_id IS NULL)
THEN
fnd_message.retrieve;
fnd_message.error;
END IF;

fnd_profile.get('APPS_WEB_AGENT', l_base);
l_pos := INSTR( l_base, '/', 1, 3);

IF (l_pos > 0)
THEN
l_base := SUBSTR(l_base, 1, l_pos - 1);
END IF;

url := l_base '/OA_CGI/FNDWRR.exe?' 'temp_id=' l_id;
fnd_utilities.open_url(url);
END;

Enjoy,
Viral Dhruv

Tuesday, November 25, 2008

Lay-offs: the only way of cost-cutting???!!!

Lay-offs, I have been hearing this word since the day I have heard of debacle of the major bank “Lehman brothers”. What is this lay-off all about? Is it all about cost-cutting or to remove people who are (Now) not productive or about removing in-efficient workforce or the only way for industries to survive?
Call it whatever you want to. But it is happening all across industries; let it be Aviation or IT or Textiles. Only the percentage of the same is differs among them. FMCG industry is of course being exception here.
Industries are suffering because of the fundamental demand-supply break. The demand has been reduced because of the lack of liquidity or in some cases is purely driven by sentiments. Experts believe that in India the situation could have been better. They believe that one of the solutions that should have occurred to the authorities when signs showed trouble in future was to take measures to balance demand and supply by improving supply. However, the policies (I am not sure which) brought down demand instead. Again, to reduce demand we must improve savings. But the liquidity was sucked out, killing growth.
So to bring this concept of accommodating the scarcity in demand, one must look at the options of cutting down on cost. Cost cutting in itself requires a harsh method of so-called lay-offs. Probably a traditional thinking, isn’t it? Could lay-offs be the only way of cutting down cost? Personally I appreciate what ICICI came up as a plan for cost-cutting, reduction in working hours. They changed the working hours as 9 am to 6 pm instead of 8 am to 8 pm which resulted in significant cost cutting. Not sure if the credit goes to Mr. Kamath or somebody else. Anyways doesn’t matter.
There are several other measures to do the same. Our CEOs are drawing huge salaries. Inflation is low, crude is low and so would be the expenditure. Yes, certainly it would take some time for the same to get reflected. However, wouldn’t it be a good idea to start chopping the salaries from higher level instead of looking at the lay-offs at the lower level? Yes, I have assumed that the lay-offs are only meant to happen starting from the lowest level. You can of course correct me if I am wrong.
Does lay-off really mean that the people who work for you are not competent enough and so companies have reason to fire, sorry lay-off? If that is the case then the first people who are not competent would be the one who recruited such employees. Second would be the incompetent method which wasn’t able to identify such cases till date. Of course, I am not denying that there should be a cut-off or rather an expectation level in every organization. But, is it necessary to make someone feel that he/she is not good and so has been asked to put down paper or to leave?
I am not sure if I am taking the subject or rather my thought in right direction or not. Probably, just wanted to raise a simple question for my better understanding that “what is lay-off and is it really required”?

Looking forward to your positive responses. Please let me know your thoughts on the same.

Thanks,
Viral Dhruv

Tuesday, January 1, 2008

Can Democracy be good for Pakistan?

I know, I have threats to my life... I am not afraid of such things. I want the my children's generation to be free and growing and to fulfill that I need to return to Pakistan... These were the few last words of the legend, Benazir Bhutto, a PPP Leader.

Isn't that pretty impressive? A person so passionate about the country and willing to do something for it. Dealth of such a personality means end of hope to have democracy into the country? Would democracy return to the country?

Was the death of Benazir could have been avoided by extra security measures and many such question can lead to nowhere now!!!

Currently, people criticize the dictatorship... Needless to describe the current situation in Pakistan! But, what would happen if the democracy returns to Pakistan. Let it be under Nawaz Sharif of Bilwal (Bhutto).... If under ruling of Army, a person (or institute) can plan to assassinate such a huge personality, wouldn't it be easy to plan such things when democracy is in place. Will democracy give a free hand to such people or organizations?

On the positive side, the democracy would lead to a growing country? But, will that growth be subject to terrorism?

Well, currently I believe the worst time is going for the country and hope to recover it soon from the same... Share your views....