Showing null records in tabbular form
Hello there!!!
I have one quite stupid question.
I have one table with 5 columns, in 4 of these I have records in the last I don't have records. And thats my question. How can I display all the information in the table including the empty columns using tabbular form.
Thanks!!!
select * from my_table???
My point is that only the columns that you select are going to show up in your reports or forms. If you select all the columns then you'll see all the columns.
And what do you mean by "...in the last I don't have records..."? Usually a column is referred to as null when it contains no data. If a whole record is null, well, I guess it's not a record.
Am I missing something?
Earl
Similar Messages
-
Freight Carrier Form not showing all records
The Freight Carrier form is not showing all of the data that shows in the table
(ORG_FREIGHT). For the Organization that I am in (#23) the table shows 108 records but the form only shows
35 records. Why? How can I make the form see all of the records in the tables? I am in the middle of converting 11.0.3 to
11i.
Thanks
ShelbyWhat version of Visual Studio and the Crystal for Visual Studio SDK are you using?
-Dell -
Showing Blank Records oracle forms 11g
Deal all..
i am using oracle forms 11g , i created a form by using data block wizard & layout wizard , but when i run the form, the form running successfully in browser, url is ( http://arun-pc:9001/forms/frmservlet), but it is showing empty records.
when i check with sql plus user Scott , i found 10 records in departments table , same user and same table i used in oracle forms.
i don't know what is the problem.. i am new to oracle forms please help me..
i am waiting 4r your valuable reply
thank s in Advance..Hello. Mr.harsh shah...
Thank u for your reply..
I follow the link what u given in above post.. But still i have the same issue.. i am not sure, but i think i have problem with my Environment, bcz in many blogs i read that oracle forms is not recommended to use with 64 bit OS. and second , iam not using developer suite 10g,
currently i am using,
operating system: windows server 2008 r2
weblogic server :- wls1036 (64bit)
JDK :- 7u17 64bit
Oracle forms :- 11g
and database in another host , just i edit tnsnames.ora file in forms directory. the following are my configuration options
Oracle Forms and Reports Installation
Configuration Options
Middleware Home Location: C:\Oracle\Middleware
Oracle Home Location: C:\Oracle\Middleware\Oracle_FRHome1
Oracle Instance Location: C:\Oracle\Middleware\asinst_1
Oracle Instance: asinst_1
Domain Option: Create Domain
Domain Name: ClassicDomain
Domain Home: C:\Oracle\Middleware\user_projects\domains\ClassicDomain
Domain Host Name: WIN-DMJUC51KRHF
Domain Port No: 7001
User Name: weblogic
Automatic Port Detection: true
Administrator Console: http://WIN-DMJUC51KRHF:7001/console
EM Console: http://WIN-DMJUC51KRHF:7001/em
EMAgent URL: http://WIN-DMJUC51KRHF:5155/emd/main
Forms URL: http://WIN-DMJUC51KRHF:8888/forms/frmservlet
Reports URL: http://WIN-DMJUC51KRHF:8888/reports/rwservlet
i check all the links above, all services showing running successfully.. but when i run the form , i dont fine any records , showing empty and blank records..
please give me clarification ...
Thank u very much..
Arun -
Hi Sir,
When I retrieve 10 records, I would have a non-database column on form to show the record number from 1..10.
When I delete one of the record in the middle of the 10 records, say record 5, all the other record number should be reflected correctly.
and when I scroll down to see more record, it should start from record 11 onwards.
Is there any way of doing this without writing to much code?
Please help.
Thanks.Try using a formula field that has for formula :system.trigger_record.
I'm not sure, but if this doesn't do it, then you'd have to write lots of code. And that would also run quite slowly.
null -
How to run report to show all the records in the form view of Siebel 8.1.1
Hi.
My template has "for-each" section and there are more than 1 records in the form view. But when generating report, there is only one record in the report. Can anyone offers help? Thanks a lot.
Edited by: user11948585 on 2009-11-18 下午6:08Hi ,
Could you generate a sample XML from BIP Administrator for the IO on which report is based , and apply it to RTF and see if you are getting the desired values.
Thanks!! -
How to show all records by default on search result page?
Hi
I am trying to make a search page that would execute the search in the database based on one or more field constraints.
(Using MySQL,PHP)
I have 2 columns in the database "vm_ip" (primary key) <IP address>, "Operating_System" <Any, Windows, Solaris, AIX>
need to search vm_ip based on other two fields.
PROBLEM: Need to show all the record when I select "Any" in the Operating_System drop down menu.
<p>Operating System:
<select name="os_select" id="os_select">
<?php
$os_count=1;
foreach($os_type as $value) //(os_type is array with possible values of OS)
echo "<option value=".$os_count.">".$value."</option>";
$os_count++;
?>
<option value=" " selected="selected">Any</option>
</select>
</p>
this code POSts NULL value to the search page.
Below code is of recordset on search page
$varOS_virtual = "Operating_System"; // recordset variable set to same as column name (default value)
if (isset($_POST['os_select'])) //this should not be true
$varOS_virtual = $_POST['os_select'];
mysql_select_db($database_xyz_db, $xyz_db);
$query_virtual = sprintf("SELECT table.VM_IP FROM table
WHERE table.Operating_System=%s", GetSQLValueString($varOS_virtual, "int"));
$virtual = mysql_query($query_virtual, $xyz_db) or die(mysql_error());
$row_virtual = mysql_fetch_assoc($virtual);
$totalRows_virtual = mysql_num_rows($virtual);
I expected the 'os_select' field to be null and default value of Operating_System to be "Operating_System" so that the Query shows all records.
But instead the value being passed in the Query is "0". and no records are shown.
What can I do to show all records?
As probably obvious I am new to php/MySQL so all the help is most welcomed .
ThanksHi
Thanks for the prompt reply but this does not solve my problem.
First thing I appologise for giving you incorrect info. Actually I have many more constraints on the search apart from OS.
Didn't think I would get single constraint specific ans.
Here is what all i tried and problems I faced:
1. I cannot use seperate queries cause I have around 7-8 other constraints on the search.
2. I cannot play around with the Record set code. For some reason even if I mess with it a little bit Dreamweaver stops recognising the recordset. for eg i tried the below code:
$query_virtual = sprintf("SELECT table.VM_IP FROM table WHERE
table.Operating_System=%s ,($_POST['os_select']=="")? TRUE:GetSQLValueString($varOS_virtual, "int"));
this ran well for the first time, and then the record set was screwed up. kept on asking me to "Discover" the links, which it couldn't do.
3. take a look at this code:
$varOS_virtual = "Operating_System";
if (isset($_POST['os_select'])) {
$varOS_virtual = $_POST['os_select'];
$varState_virtual = "State"; //second constraint
if (isset($_POST['state_select'])) {
$varState_virtual = $_POST['state_select'];
mysql_select_db($database_xyz, $xyz);
$query_virtual = sprintf("SELECT table.VM_IP FROM table AND table.Operating_System=%s AND State=%s",
GetSQLValueString($varOS_virtual, "int"),GetSQLValueString($varState_virtual, "int"));
$virtual = mysql_query($query_virtual, $xyz) or die(mysql_error());
$row_virtual = mysql_fetch_assoc($virtual);
$totalRows_virtual = mysql_num_rows($virtual);
here on passing NULL value for "Any" GetSQLValueString($varOS_virtual, "int") functions returns NULL and though the Default value of
varOS is set to 'Operating_System" query takes NULL value only which when executed shows no records.
My problem majorly revolves around how to put something like "WHERE Operating_System= Operating_System" OR "WHERE Operating_System= TRUE" in the query, when passed through variable they are sent as Strings or NULL.
Thats why WHERE 1=1 also doesnt work, because it has "WHERE Operating_System= NULL" in AND.
Logically when NULL is passed default value of variable should comeinto picture, but tha isnt happening.
Thanks again for answering. hope I was able to explain my problem. -
How to show 'No Records Found' and 'Employee Name Unknown' in oracle report
Hello,
I'm using 6i and building a report to show employees who have incorrectly input their time. I have an input parameter so a user can select a specific employee by emp_id or can leave it empty to show all. That part works. I also have date parameters that are required. That works too. However I am having trouble displaying 'NO Records Found' if the date parameters have no late or rejected employee time records. I currently have it as a text field arranged behind the emp_name field which i filled white. It works...however i have a pretty good feeling there is a better way to do this. Also, I have some data that is null since i am using two tables. There are time stamps with no emp_name or emp_number. I still need to show these records but want them to show up as "Employee Name Unknown" that way the user doesnt get confused and thinks the emp_name in the row above also includes this row.
select e.location "Clock Location",
e.emp_no "Emp No",
l.first_name ||' ' || last_name "Name",
e.time_stamp "Time",
from emp_time e, master_all l
where e.emp_no (+) = l.emp_no
and e.status = 'rejected'
--and e.emp_no = nvl (:p_emp_no, emp_no)
--and e.time_stamp between :p_start_date and :p_end_dateHi,
So, when the join between emp_time and master_all produces no rows, you still want one row of output, saying 'No Records Found'; is that right?
If so, you can outer-join the result set to dual, with some join condition that accepts anything.
Use CASE (or equivalents) to get special values (like 'No Record Found' or 'Employee name unknown') when certain columns are NULL.
For example:
SELECT j.location AS "Clock Location"
, j.emp_no AS "Emp No"
, CASE
WHEN j.name IS NULL
THEN 'No Records Found'
ELSE j.name
END AS "Name"
, time_stamp AS "Time"
FROM dual d
, ( -- Begin in-line view j, join of emp_time and master_all
SELECT e.location
, e.emp_no
, CASE
WHEN l.first_name IS NULL
AND last_name IS NULL
THEN 'Employee name unknown'
ELSE l.first_name || ' ' || last_name
END AS name
FROM emp_time e
, master_all l
WHERE e.emp_no (+) = l.emp_no
AND e.status (+) = 'rejected'
-- AND e.emp_no (+) = NVL (:p_emp_no, emp_no)
-- AND e.time_stamp (+) BETWEEN :p_start_date
AND :p_end_date
) j -- End in-line view j, join of emp_time and master_all
WHERE d.dummy != j.name (+)
;In an outer join, all conditions involiving the optional table need a + sign; otherwise, the effect is the same as an inner join.
The message 'No Records Found' is a string, so it has to go in a string column.
I put it in the "Name" column, just because I knew that "Name" was a string.
You can put in in any other column if you wish. If that column is not already a string, then use TO_CHAR to make it a string.
You could also have a column just for this message.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
DOUBLE U wrote:
I've tried nvl in the select statement but since emp_name is a concatination of first and last name it doesnt work. This is what i have tried
nvl(l.first_name|' '||l.last_name,'NO EMPLOYEE RECORD FOUND') "Employee",I assume you meant to have two | characters, not just one, after first_name.
The first argument to NVL will never be NULL in that case; it will always contain at least a space, whether or not the other columns are NULL. You could say:
NVL ( NULLIF ( l.first_name || ' ' || l.last_name
, 'NO EMPLOYEE RECORD FOUND'
) "Employee",bujt I find it less confusing to use CASE, as shown above. -
ALV GRID Report is not showing all records which is in internal table
hi all,
have one doubt. please clarify me. ALV Report is working fine since long tiem. But suddenly this report is showing few records only for the given input. Example: it_main table have 50 records, but output is showing only 10 records only. (we have not made any modifications in this report).
temporarily i have given excel output file from it_main table. excel file is showing all records.
here it_main have all the records. but output is showing few records only. it is not showing any error. i have tested with REUSE_ALV_LIST_DISPLAY function also. but it also showing same results(few records only.)
please give me some idea.
FORM display_alv_report.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = sy-repid
is_layout = wa_layout
it_fieldcat = it_fcat
it_events = it_events
i_save = 'A'
is_variant = wa_variant
TABLES
t_outtab = it_main
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE text-204 " 'Error in Display the list'
TYPE 'I'.
LEAVE TO LIST-PROCESSING.
ENDIF.
ENDFORM. . "DISPLAY_ALV_REPORT
Best Regards,
Srinivashi
Please study this program and give me suggestions.
ALV Declaration
DATA : it_events TYPE slis_t_event, "ALV event
it_fcat TYPE slis_t_fieldcat_alv, "Field catalog
it_list_top_of_page TYPE slis_t_listheader,
c_tabname TYPE slis_tabname VALUE 'IT_MAIN'.
DATA : wa_layout TYPE slis_layout_alv,
wa_event TYPE slis_alv_event,
wa_fcat TYPE slis_fieldcat_alv,
wa_variant TYPE disvariant.
START-OF-SELECTION.
PERFORM material_pass.
PERFORM data_retrieval.
END-OF-SELECTION.
PERFORM sub_display_report.
FORM sub_display_report .
DATA status(1).
IF r1 = 'X'.
PERFORM build_fieldcatalog USING :
'1' 'ERDAT' 'S.O DATE' '' '10' 'X',
'2' 'VBELN' 'SALE ORDER' '' '10' 'X',
'3' 'POSNR' 'SALE ITEM' '' '6' '',
'4' 'BSTKD' 'CUSTOMER PO' '' '35' '',
'5' 'BEZEI' 'REASON FOR REJECTION' '' '40' '',
'6' 'PLNUM' 'PLANNED ORDER' '' '10' '',
'7' 'AUFNR' 'PROD.ORDER.' '' '12' '',
'8' 'MATNR' 'MATERIAL NUMBER' '' '18' '',
'9' 'MAKTX' 'MATERIAL DESCRIPTION' '' '40' '',
'10' 'WERKS' 'PLANT' '' '4' '',
'11' 'KWMENG' 'SALE ORDER QTY' '' '15' '',
'12' 'VRKME' 'UNIT' '' '4' '',
'13' 'GAMNG' 'PROD.ORDER QTY' '' '13' '',
'14' 'IGMNG' 'CONFIRMED ORDER QTY' '' '13' '',
'15' 'GMEIN' 'UNIT' '' '4' '',
'16' 'MENGE' 'G.R QUANTITY' '' '13' '',
'17' 'SOBAL' 'S.O BALANCE' '' '13' '',
'18' 'PRDBAL' 'PROD.BALANCE' '' '13' '',
'19' 'GSM' 'GSM' '' '4' '',
'20' 'SIZE1' 'SIZE1' '' '10' '',
'21' 'SIZE2' 'SIZE2' '' '10' ''.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = pathname
filetype = ftype
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = it_mains
EXCEPTIONS
file_write_error = 1.
IF sy-subrc = 0.
status = 'S'.
ELSE.
status = 'E'.
ENDIF.
ELSEIF r2 = 'X' OR r3 = 'X'.
PERFORM build_fieldcatalog USING :
'1' 'ERDAT' 'S.O DATE' '' '10' 'X',
'2' 'VBELN' 'SALE ORDER' '' '10' 'X',
'3' 'POSNR' 'SALE ITEM' '' '6' '',
'4' 'BSTKD' 'CUSTOMER PO' '' '35' '',
'5' 'BEZEI' 'REASON FOR REJECTION' '' '40' '',
'6' 'PLNUM' 'PLANNED ORDER' '' '10' '',
'7' 'AUFNR' 'PROD.ORDER.' '' '12' '',
'8' 'MATNR' 'MATERIAL NUMBER' '' '18' '',
'9' 'MAKTX' 'MATERIAL DESCRIPTION' '' '40' '',
'10' 'WERKS' 'PLANT' '' '4' '',
'11' 'KWMENG' 'SALE ORDER QTY' '' '15' '',
'12' 'VRKME' 'UNIT' '' '4' '',
'13' 'GAMNG' 'PROD.ORDER QTY' '' '13' '',
'14' 'IGMNG' 'CONFIRMED ORDER QTY' '' '13' '',
'15' 'GMEIN' 'UNIT' '' '4' '',
'16' 'MENGE' 'G.R QUANTITY' '' '13' '',
'17' 'SOBAL' 'S.O BALANCE' '' '13' '',
'18' 'PRDBAL' 'PROD.BALANCE' '' '13' '',
'19' 'GSM' 'GSM' '' '4' '',
'20' 'SIZE1' 'SIZE1' '' '10' '',
'21' 'CUT1' 'CUT1' '' '11' '',
'22' 'SIZE2' 'SIZE2' '' '10' '',
'23' 'CUT2' 'CUT2' '' '11' '',
'24' 'SIZE3' 'SIZE3' '' '10' '',
'25' 'CUT3' 'CUT3' '' '11' '',
'26' 'SIZE4' 'SIZE4' '' '10' '',
'27' 'CUT4' 'CUT4' '' '11' '',
'28' 'SIZE5' 'SIZE5' '' '10' '',
'29' 'CUT5' 'CUT5' '' '11' '',
'30' 'SIZE6' 'SIZE6' '' '10' '',
'31' 'CUT6' 'CUT6' '' '11' ''.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = pathname
filetype = ftype
append = 'X'
write_field_separator = 'X'
TABLES
data_tab = it_mainall
EXCEPTIONS
file_write_error = 1.
IF sy-subrc = 0.
status = 'S'.
ELSE.
status = 'E'.
ENDIF.
ENDIF.
PERFORM build_layout.
PERFORM build_events.
PERFORM sub_comment_build USING it_list_top_of_page.
PERFORM sub_set_variant.
PERFORM display_alv_report.
IF status = 'S'.
MESSAGE 'Excel Output file Downloaded to Given Path' TYPE 'I'.
ELSE.
MESSAGE 'Download Not Possible' TYPE 'I'.
ENDIF.
ENDFORM. " SUB_DISPLAY_REPORT
FORM BUILD_FIELDCATALOG
FORM build_fieldcatalog USING p_col_pos
p_fieldname
p_text
p_datatype
p_outputlen
p_col_freez.
wa_fcat-row_pos = '1'.
wa_fcat-col_pos = p_col_pos.
wa_fcat-fieldname = p_fieldname.
wa_fcat-tabname = c_tabname.
wa_fcat-reptext_ddic = p_text.
wa_fcat-datatype = p_datatype.
wa_fcat-ddic_outputlen = p_outputlen.
wa_fcat-key = p_col_freez.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
FORM build_layout.
CLEAR: wa_layout.
wa_layout-window_titlebar = 'LIST OF GSM WISE OPEN SALE ORDERS'.
wa_layout-colwidth_optimize = 'X'.
wa_layout-totals_text = 'CUMULATIVE'.
ENDFORM. "BUILD_LAYOUT
*& Form BUILD_EVENTS
FORM build_events.
CLEAR wa_event.
REFRESH it_events.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_events
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
IF sy-subrc = 0.
READ TABLE it_events INTO wa_event
WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'TOP_OF_PAGE'.
APPEND wa_event TO it_events.
CLEAR wa_event.
ENDIF.
ENDIF.
ENDFORM. "BUILD_EVENTS
-->P_IT_LIST_TOP_OF_PAGE text
FORM sub_comment_build USING it_top_of_page TYPE slis_t_listheader.
DATA ls_line TYPE slis_listheader.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = str1.
APPEND ls_line TO it_top_of_page.
CLEAR ls_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header[].
ENDFORM. " SUB_COMMENT_BUILD
*& Form SUB_SET_VARIANT
text
--> p1 text
<-- p2 text
FORM sub_set_variant .
CLEAR wa_variant.
wa_variant-report = sy-repid.
wa_variant-username = sy-uname.
wa_variant-variant = c_variant.
wa_variant-variant = p_layout.
ENDFORM. " SUB_SET_VARIANT
*& Form DISPLAY_ALV_REPORT
*Display Report Using ALV GRID
FORM display_alv_report.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = 'X'
i_callback_program = sy-repid
i_callback_pf_status_set = c_pf_status
i_callback_user_command = c_user_command
is_layout = wa_layout
it_fieldcat = it_fcat
it_sort = it_sort[]
it_events = it_events
i_save = 'A'
is_variant = wa_variant
TABLES
t_outtab = it_main
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE text-204 " 'Error in Display the list'
TYPE 'I'.
LEAVE TO LIST-PROCESSING.
ENDIF.
ENDFORM. . "DISPLAY_ALV_REPORT
*ALV Report Header
FORM top_of_page.
DATA : t_header TYPE slis_t_listheader WITH HEADER LINE,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc(10) TYPE c.
wa_header-typ = 'H'.
T_HEADER-INFO = 'LIST OF GSM WISE OPEN SALE ORDERS'.
wa_header-info = str1.
APPEND wa_header TO t_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header[].
ENDFORM. "TOP_OF_PAGE
here it_main internal table having all data. but output is showing few records only.
pl. give some idea.
Thanks & Regards
Srinivas. -
Lexical parameter in select statement showing null or column name in xml tag instead of value
Hi,
i am using lexical parameter in report select statement as
Select &order value from oe_order_headers_all a where order_number ='7889'
and setting : order:='a.order_number'; in after parameter form trigger.
lexical parameter intial value set to null
when i run this report , its not showing order number in output ,its showing null or a.order_number as text.
Please help.try this
Select &order data_show
from oe_order_headers_all
where order_number ='7889'
and setting :order:='order_number'; in after parameter form trigger.
Hope this helps
Hamid -
How can I display records dynamically in forms?
Hi Friends,
I want to display the number of records in the form dynamically. Suppose the back-end table is having only 5 records means it should display 5 records. If any new records is inserted later then it should show 6 records. It should display 10 records at a time with a scroll bar in case if a table is having more records.
The best example is Data Grid in VB. The same kind of mechanism I want to provide in my form. How can I do that?
Any suggestion would be greatly appreciated.
Thank You.
Gopinath Kona
nullWhy not have number or records displayed as the number that best fits the space and then if less come back the scrollbar is disabled, and if more come back the scrollbar is enabled?
-
How to show multipe records on a single record
Hi all,
I have a query which can contain 1 or Many records for each S.WAS_NO or APPL_NO even. A new record is created when the APPL_STATUS changes and a timestamp is created in APPL_STATUS_CHANGE_DATE.
select distinct
S.APPL_ID,
S.WAS_NO,
S.AS_STATUS,
S.STATUS_CHANGE_DATE,
dense_rank() over (partition by S.WAS_NO order by S.STATUS_CHANGE_DATE) rank
from table_a S, table b S2
where S.APPL_ID = S2.APPL_ID
order by S.WAS_NO, rank asc;
Current Results:
APPL_ID---WAS_NO---------------AS_STATUS----STATUS_CHANGE_DATE-----RANK
6628-------E4G0YL9B08V0V6---ASSIGNED-------25/10/2011----------------------1
6628-------E4G0YL9B08V0V6---USED--------------30/12/2011----------------------2
Desired Results:
APPL_ID--WAS_NO------------------AS_STATUS1----STATUS_CHANGE_DATE1----AS_STATUS2----STATUS_CHANGE_DATE2
6628-------E4G0YL9B08V0V6----ASSIGNED---------25/10/2011------------------------USED--------------30/12/2011The rank is based on the WAS_Number and ordered by the STATUS_CHANGE_DATE so i know which order they should go in.
I want to show 1 record per WAS_NO and show each status change with its date. There can only be a maximum of three status changes.
I have not been able to workout how to get Multiple records onto a singe record and in different columns.
Many thanksThis should do what you want:
WITH t AS
(SELECT 6628 appl_id, 'E4G0YL9B08V0V6' was_no, 'ASSIGNED' as_status, TO_DATE('25/10/2011', 'DD/MM/YYYY') status_change_date FROM dual UNION ALL
SELECT 6628 appl_id, 'E4G0YL9B08V0V6' was_no, 'USED' as_status, TO_DATE('30/12/2011', 'DD/MM/YYYY') status_change_date FROM dual UNION ALL
SELECT 6628 appl_id, 'E4G0YL9B08V0V6' was_no, 'COMPLETE' as_status, TO_DATE('15/01/2012', 'DD/MM/YYYY') status_change_date FROM dual UNION ALL
SELECT 6629 appl_id, 'A5AAFG1C07L0P2' was_no, 'ASSIGNED' as_status, TO_DATE('19/01/2012', 'DD/MM/YYYY') status_change_date FROM dual)
SELECT appl_id,
was_no,
MAX(CASE rank
WHEN 1 THEN as_status
ELSE NULL
END) as_status1,
MAX(CASE rank
WHEN 1 THEN status_change_date
ELSE NULL
END) status_change_date1,
MAX(CASE rank
WHEN 2 THEN as_status
ELSE NULL
END) as_status2,
MAX(CASE rank
WHEN 2 THEN status_change_date
ELSE NULL
END) status_change_date2,
MAX(CASE rank
WHEN 3 THEN as_status
ELSE NULL
END) as_status3,
MAX(CASE rank
WHEN 3 THEN status_change_date
ELSE NULL
END) status_change_date3
FROM (SELECT appl_id,
was_no,
as_status,
status_change_date,
DENSE_RANK() OVER (PARTITION BY was_no ORDER BY status_change_date) rank
FROM t)
GROUP BY appl_id,
was_no -
Could not show multiple records while could show only one record
Hi, all
I have an oracle 10g db running on a Linux E3 server.
I have two tables:
CREATE TABLE "IMMUNODATA"."DEMOGRAPHICS" (
"SUBJECTID" INTEGER NOT NULL,
"WORKID" INTEGER,
"OMRFHISTORYNUMBER" INTEGER,
"OTHERID" INTEGER,
"BARCODE" INTEGER,
"GENDER" VARCHAR2(1),
"DOB" DATE,
"RACEAI" INTEGER,
"RACECAUCASIAN" INTEGER,
"RACEAA" INTEGER,
"RACEASIAN" INTEGER,
"RACEPAC" INTEGER,
"RACEHIS" INTEGER,
"RACEOTHER" VARCHAR2(50),
"SSN" VARCHAR2(11),
PRIMARY KEY("SUBJECTID") VALIDATE
CREATE TABLE "IMMUNODATA"."MEDICATION" (
"ID" INTEGER NOT NULL ,
"THEDATE" DATE ,
"SUBJECTID" INTEGER NOT NULL,
"MED_PAGENOTCOMPLETED" VARCHAR2(500) ,
"MEDICATION_NAME" VARCHAR2(100),
"MEDICATION_CLASSIFICATION" VARCHAR2(100),
"MEDICATION_DOSENUM" VARCHAR2(50),
"MEDICATION_DOSEMEASURE" VARCHAR2(100),
"MEDICATION_ROUTE" VARCHAR2(100),
"MEDICATION_FREQ" VARCHAR2(100),
"MEDICATION_BEGIN" DATE,
"MEDICATION_END" DATE,
"BARCODE" INTEGER,
"DATASOURCE" VARCHAR2(50),
"NOCHANGE" INTEGER,
PRIMARY KEY("ID") VALIDATE,
FOREIGN KEY("SUBJECTID") REFERENCES "IMMUNODATA"."DEMOGRAPHICS" ("SUBJECTID") VALIDATE
I want to show an output to combine all medication records of one person into one, and I created a function.
CREATE OR REPLACE FUNCTION COMMEDICATION(p_subjectid IN immunodata.medication.subjectid%TYPE ) RETURN VARCHAR2 IS
v_medication VARCHAR2(1000);
BEGIN
FOR c IN (SELECT THEDATE, MED_PAGENOTCOMPLETED, MEDICATION_NAME, MEDICATION_CLASSIFICATION, MEDICATION_DOSENUM, MEDICATION_DOSEMEASURE,MEDICATION_ROUTE,MEDICATION_FREQ,MEDICATION_BEGIN,MEDICATION_END,DATASOURCE,NOCHANGE FROM immunodata.medication WHERE subjectid = p_subjectid)
LOOP
IF v_medication IS NULL THEN
v_medication := c.THEDATE||' '||c.MED_PAGENOTCOMPLETED||' '||c.MEDICATION_NAME||' '||c.MEDICATION_CLASSIFICATION||' '||c.MEDICATION_DOSENUM||' '||c.MEDICATION_DOSEMEASURE||' '||c.MEDICATION_ROUTE||' '||c.MEDICATION_FREQ||' '||c.MEDICATION_BEGIN||' '||c.MEDICATION_END||' '||c.DATASOURCE||' '||c.NOCHANGE;
ELSE
v_medication := v_medication||','||c.THEDATE||' '||c.MED_PAGENOTCOMPLETED||' '||c.MEDICATION_NAME||' '||c.MEDICATION_CLASSIFICATION||' '||c.MEDICATION_DOSENUM||' '||c.MEDICATION_DOSEMEASURE||' '||c.MEDICATION_ROUTE||' '||c.MEDICATION_FREQ||' '||c.MEDICATION_BEGIN||' '||c.MEDICATION_END||' '||c.DATASOURCE||' '||c.NOCHANGE;
END IF;
END LOOP;
RETURN v_medication;
END;
and I performed this selection statement:
SQL> select subjectid, barcode, COMmedication(subjectid) from immunodata.demographics where barcode=500135;
SUBJECTID BARCODE
COMMEDICATION(SUBJECTID)
33 500135
15-SEP-00 Cyclophosphamide Immunosuppresant .7 MG IV MONTLY FORM1 ,15-SEP-00 Hydroxychloroquine (Plaquenil) Immunosuppresant 400 MG DAILY FORM1
It is exactly what I need, so I want to show all records in the tables.
SQL> select subjectid, barcode, COMmedication(subjectid) from immunodata.demographics;
ERROR:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.COMMEDICATION", line 9
no rows selected
It seems that one record could be shown, but multiple could not.
Is there anything wrong with my code or other things?
Thanks!
QianIt seems that one record could be shown, but multiple could not.
Is there anything wrong with my code or other things?
It means that there is at least one subjectid in your table for which the value of v_medication in the function exceeds 1000 characters.
You may want to increase the size of v_medication to 4000, which would be the upper limit for the function's return value.
pratz -
How to upload a collection of records from adobe form into a table in BAPI
We are creating an appliction using web dynpro and adobe that will allow users to update PO status information offline. The information is downloaded into a form and then updated offline by the vendor. After this change the form is uploaded into the application and sent to SAP R/3 via a BAPI call. The BAPI provides the information for different PO's as a table structure (many items - collection) which is downloaded into the form and displayed as a table. The download part works and we can upload the modified file also. We can even see the data getting loaded into the controller context after we upload the form.
<b>The problem</b> is when we try to execute the BAPI to upload the data. The data in the table structure does not seem to upload, only the non-table structure field values get posted back. Logs at the BAPI show "0" records uploaded. Couple of other fields which are not part of the table structure get uploaded properly.
Can someone <b>please provide some insights - help</b> on what could be going wrong. Any debugging ideas or checking logs to see if the data is really getting pushed from the webdynpro/adobe app to the R/3 system would be helpfull.
Our R/3 setup is ECC5 on a AIX server and the adobe webdynpro setup is NW04s on a different different AIX server.
ThanksHi satishsuri ,
You will have to use 3 methods together :
CALL METHOD cl_gui_frontend_services=>directory_browse "Browse the Directory
CALL METHOD cl_gui_frontend_services=>directory_list_files "Get all the files from the directory
CALL METHOD cl_gui_frontend_services=>gui_upload "Upload each file in a loop
Example:
TYPES: BEGIN OF ty_data,
line TYPE string,
END OF ty_data.
DATA: str_file TYPE string,
str_dir TYPE string,
it_file_table TYPE STANDARD TABLE OF file_info,
wa_file_table TYPE file_info,
v_count TYPE i,
it_data TYPE STANDARD TABLE OF ty_data,
wa_data TYPE ty_data.
CALL METHOD cl_gui_frontend_services=>directory_browse
CHANGING
selected_folder = str_dir.
CALL METHOD cl_gui_frontend_services=>directory_list_files
EXPORTING
directory = str_dir
CHANGING
file_table = it_file_table
count = v_count.
LOOP AT it_file_table INTO wa_file_table.
CONCATENATE str_dir wa_file_table-filename INTO str_file SEPARATED BY '\'.
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = str_file
filetype = 'ASC'
CHANGING
data_tab = it_data.
LOOP AT it_data INTO wa_data.
WRITE : / wa_data-line.
ENDLOOP.
ULINE.
ENDLOOP.
Regards,
Jovito -
Triger for display next record in oracle forms
hai all,
i want to do
when new form opened i have to add new reord that is empty new form also my new rownum will be displayed.
now i getting first record.
like:
GROUP_ROWNUM: 1
GROUP_ID: 120130
GROUP_NAME aaaaaaaaa
need like:
GROUP_ROWNUM: 7
GROUP_ID:
GROUP_NAME
that can be done by
trigger for display next record in oracle forms?
or through property seting?
thanks in adv,
rcs
--------YES, this block is base on the DB table
through defualt navigational button i can go to next,last,new record
but i want create seperate form for new entry, in that i want to display
old rownum
formula to get rownum automatically (i am not at all typing it is system generated)
even though i created column group_rownum for rownum
(i can't be typing)
LAST_RECORD;
NEXT_RECORD; also not getting the next rownum
i hope now understand me
any posible way?
thank you for your good input
i.e.
SQL> DESC GROUP_MSTR1;
Name Null? Type
GROUP_ID NOT NULL NUMBER(10)
GROUP_NAME NOT NULL VARCHAR2(30)
SQL> select * from GROUP_MSTR1;
GROUP_ID GROUP_NAME
123 AAAAAA
124 BBBBBBBB
125 CCCCCCCCC
126 DDDDDDDD
1 eeeeeeee
2 FFFFFFFFF
3 ggggggg
7 rows selected.
SQL> select rownum, GROUP_ID, GROUP_NAME from GROUP_MSTR1;
ROWNUM GROUP_ID GROUP_NAME
1 123 AAAAAA
2 124 BBBBBBBB
3 125 CCCCCCCCC
4 126 DDDDDDDD
5 1 eeeeeeee
6 2 FFFFFFFFF
7 3 ggggggg
7 rows selected.
------------- -
Horizontal scroll bar is hiding last record in the form. Attached the screenshot which shows the issue.
Regards,
Venkat KIf this is a custom form, you will have to alter the design. If this is a seeded form, pl open an SR with Support
Maybe you are looking for
-
PLEASE HELP MEEEE!!!!!!!!!!!!!!!! I just reset my iphone 5 ios7 and i came up onto my activation screen i put in my things but then it said this account has been disabled so i go online to enable my account again (i made a new icloud thats why it
-
I have a ton of iTunes U content that shows up under the "Music or Podcasts" section of my iTunes library but I can not get it to now show up under the "iTunes U" section. They are not sorting automatically and when I attempt to drag and drop them to
-
PSE9 Can't create a slideshow with .jpg photo and .mov video
Hi I don't find some informations how to make a slideshow where I can use my .jpg photos AND my .mov vidoes - both are coming from my Panasonic Digitalcamera. I bought PSE9 because everywhere is written that this is the right product to create a slid
-
Some metadata not or differently exported
Just discovered to my disappointment that when an image is exported LR takes away a lot of meta date. I use Nikon D80 and lots of specific Nikon meta data disappear. Gone from the EXIF fields are also white point setting, compression type and Pixel X
-
Can I install Adobe Acrobat XI Standard on a Surface Pro 3? (Not the subscription version)