I need to develop a logic ina a report, and need to send the report out put thro an email [message #298602] |
Wed, 06 February 2008 13:29 |
vijay.nimmakuri@gmail.com
Messages: 10 Registered: February 2008 Location: inida
|
Junior Member |
|
|
HI
I need to get the following logic
I have two parameters 1.item number:
2.price list name:
Scenario1:
item number:Blank , Price list name:Blank
RESULT: return all active PL's with active PLL's
scenario2:
item number:I1,I2... ,Pricelist:Blank
Result :::the pgrm should return all the active PLL's with in all active PL's with each of the items specified in the Item number parameter. For example all teh active PLL's with item 1 all the active PLL's with item2..
Scenario3
item number blank , price list:PL1,PL2....
RESULT:all active PLL's from PL1,PL2
Scnario 4
ITem number:I1,I2... Price list:PL1,PL2...
RESULT:all the active PLLS having I1,I2... should be retrived from the specified PL's PL1,PL2..
TO achive this i used two lexical parameters for item number and price those will be used in report query as below
Select batch name,
price list name,
list _header id,
item number,
item desc,
uom code,
list price,
new list price,
start date ,end date
from QP_list_headers_vl,qp_list_lines
qp_pricing attributes,mtl_sstem_items_vl
where qlh.list header id = qll.list header id
......
and msi.organization_id=p_ORG_Id
and qlh list typecode ='PRL'
and qll.list line type='PLL'
and MSi.segment1 IN &P_item
and qlh.name IN &P_price list name
..........
what code should i write in the report and where do I need to write this logic
---------------------------
SECOND issue
After developing this report and regestering this report in format as XML i need to create a request set XXXto GET the price list and email out put to employee
HOW could i email this report out put should i write and shelll script ? and what are the API's i need to use in that script
PLEASE suggest me with some code
i have SQL query for the REPORT..
Please sugges me
Thanks,
wejai
[Updated on: Wed, 06 February 2008 19:45] by Moderator Report message to a moderator
|
|
|
Re: plese help me Urgent issue i need this loginc in my reoport [message #298623 is a reply to message #298602] |
Wed, 06 February 2008 19:30 |
|
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
Quote: | and MSi.segment1 IN &P_item
and qlh.name IN &P_price list name
| This will work only when those parameters are mandatory. I don't know why you have used space in between "&P_price list name". This also doesn't work.
You may use the lexical parameter for entire clause / line.Quote: | &P_item_and
&P_price_list_name_and
| Then you can use a if clause to populate the lexicals.IF :P_item IS NOT NULL THEN
:P_item_and := 'and MSi.segment1 IN (' || :P_item || ')';
END IF; You can use similar code for other lexical too.
For second issue you may look at the Google search results.
result1
result2
By
Vamsi
PS: This question is very specific to Reports Forum.
[Updated on: Wed, 06 February 2008 19:52] Report message to a moderator
|
|
|
|
|
|