Group Above Report problem...not able to display absent rows in date range
In my report query, I have numerous select statements that I must union together and group by a date. The ultimate goal is to get a count for all records in coordination with that date. Then in the report, I group all the data with the same date to ultimately put all counts on a page that coordinate with a single date.
Thing is...if there are no records associated with that date, the 'group by' clause makes the return data set not include those lines of output. I need these lines of output! Any suggestions??
Below is an example...
Select 'Program1', 'SubProgram1', 'Label 1', to_char(receipt_date, 'MM/DD/RRRR'), count(*)
from submissions
where receipt_date between '01-JUN-05' and '10-JUN-05'
and substr(submission_index,8,1) = '3'
and substr(submission_index,9,1) = '1'
group by substr(submission_index,8,1), substr(submission_index,9,1), to_char(receipt_date, 'MM/DD/RRRR')
union
Select 'Program2', 'SubProgram2', 'Label 2',
to_char(receipt_date, 'MM/DD/RRRR'), count(*)
from submissions
where receipt_date between '01-JUN-05' and '10-JUN-05'
and substr(submission_index,8,1) = '4' group by substr(submission_index,8,1), to_char(receipt_date, 'MM/DD/RRRR')
OUTPUT:
Program1 SubProgram1 Label 1 06/01/2005 4
Program1 SubProgram1 Label 1 06/02/2005 2
Program1 SubProgram1 Label 1 06/03/2005 6
Program1 SubProgram1 Label 1 06/04/2005 23
Program1 SubProgram1 Label 1 06/06/2005 71
Program1 SubProgram1 Label 1 06/07/2005 245
Program1 SubProgram1 Label 1 06/08/2005 76
Program1 SubProgram1 Label 1 06/10/2005 45
Program2 SubProgram2 Label 2 06/01/2005 66
Program2 SubProgram2 Label 2 06/02/2005 345
Program2 SubProgram2 Label 2 06/03/2005 89
Program2 SubProgram2 Label 2 06/04/2005 12
Program2 SubProgram2 Label 2 06/05/2005 3
Program2 SubProgram2 Label 2 06/06/2005 27
Program2 SubProgram2 Label 2 06/09/2005 98
Program2 SubProgram2 Label 2 06/10/2005 456
I need the missing lines to show up for Program 1 on 6/05 and 6/09
and Program 2 on 6/07 and 6/08
create table your_table (
program varchar2(20),
subprogram varchar2(20),
label varchar2(20),
day date,
num number
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('01-JUN-05'), 4);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('02-JUN-05'), 2);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('03-JUN-05'), 6);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('04-JUN-05'), 23);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('06-JUN-05'), 71);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('07-JUN-05'), 245);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('08-JUN-05'), 76);
insert into your_table values ('Program1', 'SubProgram1', 'Label 1', to_date('10-JUN-05'), 45);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('01-JUN-05'), 66);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('02-JUN-05'), 345);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('03-JUN-05'), 89);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('04-JUN-05'), 12);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('05-JUN-05'), 3);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('06-JUN-05'), 27);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('09-JUN-05'), 98);
insert into your_table values ('Program2', 'SubProgram2', 'Label 2', to_date('10-JUN-05'), 456);
SELECT yt.program
, yt.subprogram
, yt.label
, nvl(yt.num,0) NUM
, days.date_value
FROM ( select (to_date('11-JUN-05','DD-MON-YY') - day) date_value
from ( select rownum day
from dual
connect by rownum < 11
) days
, your_table yt
where yt.day(+) = days.date_value
order by yt.program, days.date_value
PROGRAM SUBPROGRAM LABEL NUM DATE_VALUE
Program1 SubProgram1 Label 1 4 6/1/2005
Program1 SubProgram1 Label 1 2 6/2/2005
Program1 SubProgram1 Label 1 6 6/3/2005
Program1 SubProgram1 Label 1 23 6/4/2005
Program1 SubProgram1 Label 1 71 6/6/2005
Program1 SubProgram1 Label 1 245 6/7/2005
Program1 SubProgram1 Label 1 76 6/8/2005
Program1 SubProgram1 Label 1 45 6/10/2005
Program2 SubProgram2 Label 2 66 6/1/2005
Program2 SubProgram2 Label 2 345 6/2/2005
Program2 SubProgram2 Label 2 89 6/3/2005
Program2 SubProgram2 Label 2 12 6/4/2005
Program2 SubProgram2 Label 2 3 6/5/2005
Program2 SubProgram2 Label 2 27 6/6/2005
Program2 SubProgram2 Label 2 98 6/9/2005
Program2 SubProgram2 Label 2 456 6/10/2005The four null rows will not show up because the date is used at least once between program 1 or program 2. Will there only ever be two programs to chose from? Any one else got any ideas around this?
Similar Messages
-
hi,
To get clear idea i am using emp table as an example.
I am creating a report using style GroupAbove and save it in .jsp file.
I took empno as group .
My report was displayed in this way:
page 1:
empno 7369
ename job sal comm deptno
simth clerk 800 0 20
empno 7499
ename job sal comm deptno
allen sales 1600 30 30
ramu manager 4000 0 20
and so on...
page2 :
empno 7499
ename job sal comm deptno
raju clerk 500 0 10
empno 7599
ename job sal comm deptno
ramu worker 300 0 40
..... so on
But My result should be in this way :
page 1:
empno 7369
ename job sal comm deptno
simth clerk 800 0 20
empno 7499(problem :Here i dont want to display heading of ename.... and so on)
allen sales 1600 30 30
ramu manager 4000 0 20
page 2:(if next page starts then should start with heading of ename... and so on)
ename job sal comm deptno
raju clerk 500 0 10
empno 7599
ramu worker 300 0 40
..... so on
If any one know this probelm help me soon
it's very urgent
with regard's
vijayYou may have been better to use deptno as the group column in your example, since I'm not sure that grouping on empno makes sense (and hence makes the example difficult to picture).
That said, it seems that the problem is that you only want the details headings to be displayed once per page (for a group above report). This isn't going to be too easy, and will require some coding, but bear with me.
The first thing to do is to create a PL/SQL package with a single boolean variable in it. This will be used a flag to determine whether the headers should be displayed.
In the before report trigger, set this variable to TRUE.
In the format trigger for the frame containing all the boilerplate labels, check to see if the variable is TRUE. If it is then set it to FALSE, and return TRUE.
If it's not then return FALSE (to suppress the display).
In the between pages trigger set the variable to TRUE.
Hope this helps (and that I've understood the problem),
Danny -
Display Total in Group Above Report
Hello,
I have a group above report with month, product_id, product_name as group above fields I have product_entry_date, description, total_qty, actual_qty etc as display fields in my report.
I would like to have a total and grand total for total_qty and actual_qty for product_id and product_name. Issue I am having is when I add a summary column for total_ qty and actual_qty, total is getting displayed for each month.
How can I display total and grand for total_qty and actual_qty?
Any help is highly appreciable.
Thanksponic wrote:
Hello,
I have a group above report with month, product_id, product_name as group above fields I have product_entry_date, description, total_qty, actual_qty etc as display fields in my report.
I would like to have a total and grand total for total_qty and actual_qty for product_id and product_name. Issue I am having is when I add a summary column for total_ qty and actual_qty, total is getting displayed for each month.
How can I display total and grand for total_qty and actual_qty?
Any help is highly appreciable.
ThanksIf you want to display total qty for each month and you already done it. as you says..
total is getting displayed for each month.If not ,
Take a summary column at month group >> at properties .. Summary Function : Sum , Reset at month group.
and for grand total
take a summary column outside the query. >> at properties .. Summary Function : Sum , Reset at report.
Hope it works.
hamid
If someone's response is helpful or correct, please mark it accordingly. -
How to display different text for labels in Group Above Report Oracle Repor
Hello,
Is there a way to change the text that is displayed in Labels in a Group Above Report? For example, I have a Group Above report with my columns of data and above the columns I have my column labels, but I would like to be able to display various text, i.e. different labels based on condition. In other words, Column1 label could say Column 1 or This is Column1, based on a condition. This is Oracle Report Builder 10.1.2.0.2.
Thank you.968277 wrote:
I'm thinking it is possible with a Format Trigger, but I've only ever returned (TRUE) or (FALSE). I am very new to Oracle Reports Builder. Thanks.Hi,
Yes it's possible. and your are in the right place. use this true and false. For example
/*true means display, false means don't display */
if your_criteria_or_condition is ok then
return (TRUE);
else
return (FALSE);
end if;create as many label as your need and control with the code..
Hope this works..
Hamid
Mark correct/helpful to help others to get right answer(s).* -
Problem facing for Exporting a Group above report to excel
Hello all any one can tell me How to set columns and rows of a Group above to report to export to excel.
I have a group above report but when i export it to excel the Columns and rows are out of order.Tell me what type of sequence should apply on columns and rows?????????Adeel Aslam wrote:
No Dear I mean I have called the Procedure of Exporting report to Excel On Each Field On Format Trigger.But whan i run it and Export it Then columns and Rows are out of Order on Excel sheet.I only want to know standard sequence that i should apply in smart trigger that the fields are shown in excel same like on report.
RegardsI'm guessing you're not referring to SQL and PL/SQL then.
Oracle doesn't have a built in procedure for exporting to Excel, so how the data is being ordered is going to depend on the code in that procedure and whoever wrote it. If you need more assistance you need to give us more details of what it's doing. -
Break Column in Group Above Report - Causing Error in Data Groupings
Since I'm required to designate at least one Break Column in my Group Above report, I created a dummy column in my SELECT statement. I did this so that I could designate the required minimum of at least one break column, but I designated one that won't have any impact on how the report is ordered, because it will be the same value (NULL) for every record. So, my SELECT statement starts out looking something like this:
SELECT
NULL break_column,
column_1 column1_name,
column_2 column2_name,
column_3 column3_name,
column_4 column4_name,
column_5 column5_name
I needed for the break column to have no impact on the ordering of the report because I need for the ORDER BY clause to completely control how the report is sorted, w/o any interference by a hard-coded break column. I need this because my intention is to make the ORDER BY clause dynamic, and a hard-coded break column with actual data would supercede the ORDER BY clause, thereby making it static.
Everything is working correctly with regard to how the report is sorting the records designated as group columns; however, the detail columns are getting all messed up as far as what main record they're grouped under.
By this I mean that when I designate only one break column, some details may display under the wrong group, where they're not supposed to. For example, each page consists of demographic info. about a specific record on a table, and the details listed under it should be the individual comments that have been made on that record. The issue I'm seeing is that for some records, it's showing comments from not only the record for that group, but it continues to list out comments made for other requests as well, when those comments should be displayed under their own respective records.
Why is this happening when I designate only one break column, and how can I keep it from doing this?Did you get a solution for this?
I have the same problem.
Any help would be appreciated.
Thanks,
Madhu -
Is it possible to create group above report between to different data model
Hi,
I am having one problem.. I am working on Bi publisher 10...
I have to create 2 different data models.. which i have done successfully.... its showing xml data perfectly.. but my problem is i want my 2nd data model to be dependent of 1st model...
when i am designing my template ... i am not able to create a group by report..
i want my report like this ...
------------------------------------------------------------ (fetching data from first data model)
abc xyz pqrs
--------------------------------now their it must show the data from second data model... dependent on first model...
simply i want to know is it possible to create group above report between to different data models..Thanks for your response..
I already tried this.. But its not working ..
i want parent information from data model 1
then all detail information related to parent template ...from data model 2..
but its not working.. its giving me all parent informations first then all details informations.. -
Hi,
I am facing problem in Group Above report this can be said in the schema of Scott as follows.
I have developed group above report on Dept,Emp tables. It is showing all the data but the deptno =40 is not showing. The query used is
select * from emp,dept
where dept.deptno=emp.deptno(+)
There I have also used formula column to calculate total salary for each department in front of each department. I case of dept no =40 it is also showing blankHi Riaz
The 'emp' table does not have employees in dept 40.
Regards
Sripathy -
Generate text file from a group above report
i have problem in generating report in developer 6 report builder my report is master -detail(group above report)
when i generate text file or csv file then my report is not in group above,master records are repeated along with every detail record.
is there any solution that i generate group above report in text or csv file
instead of pdf,rtf,html
please mail me
[email protected]Can you try adding this in your URL delimited_hdr=NO
I am not sure it works.
Just give a try -
Supress repeated labels in group Above reports o matrix group above reports
Hi,
I have a problem, because I´m brand new in reports.
I've defined same reports.
When I defined a Group Above Report or a Matrix with Group Above Report the labels appear repeated in the same page:
Year 2006
Level 1 Range 1-3 months 3-6 months 6-12 months
Age
< 16 1
16-17 1 3
18-24 12 6 2
25 4 5 2Total Level 1: 17 14 5
Level 2 Range 1-3 months 3-6 months 6-12 months
Age
< 16 1
16-17 2 1
18-24 8 12 2
25 5 4 3Total Level 1: 15 17 6
Is it possible not to repeat the labels "Range 1-3 months 3-6 months 6-12 months",? I want them to appear once per page.
How can I do it?
Please may anyone help me?
thanks
BeatrizWhy should that be a bug? You have a custom requirement and have to find a way to fulfill it. But, what is your actual sorting order? Do you have only this three departments? If so, you could add an addtional column in your query like
DECODE(DEPT, 20, 1, 10, 2, 30, 3, 4) SORTINGput that column in the same group as dept and sort after that new column. -
Not able to display flat file's error line in output
The below Source Code is BDC for XD01 (update Customer Master Record) in CALL TRANSACTION method. This program is written in call transaction method cause as per users requirement, user wants error log to be printed as soon as the BDC process finished in the background mode.
When you execute this below program it will show a selection screen from where you can select your flat file from system.
After executing this code show output like below as soon as it finished processing the FLAT file.
1. Customer Update Summary
2. Successful record with customer number and name.
3. Error Records with 'record number' and 'reason for error'
(For testing you just have to copy-paste-save-active the source code)
And I have encountered an issue over here in 3rd section-Record Number of Error Records.
The Record Number is for display the line number of that flat file line which in which error has occurred.
The Record Number Entries showing only 0 instead of showing line number of error entry .
I have used Function Module FORMAT_MESSAGE to capture the errors. But not able to display line number of that flat file which is containing error.
So please suggest me what changes I should make in below source code to get proper output.
Flat file for your R&D
1000 1000 10 10 0001 Company Chobey & Group1N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group2N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
1000 1000 10 10 0001 Company Chobey & Group3N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS . A 10 1
1000 1000 10 10 0001 Company Chobey & Group4N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A .. 1
1000 1000 10 10 0001 Company Chobey & Group5N Choubey Amit Choubey New Alipore Road Habijabi Apartment Rastar Dhra 777777 kolkata 777777 kolikata howrah 777777 IN WB 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 0700 EAST 02 01 1060003 A1 Z1 ZZ13 CALS 1 A 10 1
And Source Code
*& Report Z_TEST_SAI *
REPORT Z_TEST_SAI no standard page heading line-size 255.
TYPES: BEGIN OF t_cust,
bukrs like rf02d-bukrs,
vkorg like rf02d-vkorg,
vtweg like rf02d-vtweg,
spart like rf02d-spart,
ktokd like rf02d-ktokd,
anred like kna1-anred,
name1 like kna1-name1,
sortl like kna1-sortl,
name2 like kna1-name2,
name3 like kna1-name3,
name4 like kna1-name4,
stras like kna1-stras,
pfach like kna1-pfach,
ort01 like kna1-ort01,
pstlz like kna1-pstlz,
ort02 like kna1-ort02,
pfort like kna1-pfort,
pstl2 like kna1-pstl2,
land1 like kna1-land1,
regio like kna1-regio,
telx1 like kna1-telx1,
telf1 like kna1-telf1,
telfx like kna1-telfx,
telf2 like kna1-telf2,
teltx like kna1-teltx,
stceg like kna1-stceg,
cityc like kna1-cityc,
lzone like kna1-lzone,
niels like kna1-niels,
kukla like kna1-kukla,
akont like knb1-akont,
fdgrv like knb1-fdgrv,
vzskz like knb1-vzskz,
zterm like knb1-zterm,
vkbur like knvv-vkbur,
versg like knvv-versg,
vsbed like knvv-vsbed,
ktgrd like knvv-ktgrd,
taxkd like knvi-taxkd,
END OF t_cust.
TYPES: BEGIN OF t_sucrec,
cnum TYPE kna1-kunnr, "Customer Number
cnam TYPE kna1-name1, "Customer Name
END OF t_sucrec.
TYPES: BEGIN OF t_errrec,
* lineno TYPE i, "Line Number
lineno TYPE string,
message TYPE string, "Error Message
END OF t_errrec.
DATA: v_file TYPE string, "Variable for storing flat file
it_cust TYPE STANDARD TABLE OF t_cust, "Internal table of Customer
wa_cust LIKE LINE OF it_cust, "Workarea of Internal table it_cust
it_sucrec TYPE STANDARD TABLE OF t_sucrec, "Internal table of Success records
wa_sucrec LIKE LINE OF it_sucrec, "Workarea of Internal table it_sucrec
it_errrec TYPE STANDARD TABLE OF t_errrec,
wa_errrec LIKE LINE OF it_errrec,
it_bdctab LIKE bdcdata OCCURS 0 WITH HEADER LINE, "Internal table structure of BDCDATA
it_messagetab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE, "Tracing Error Messages
v_date LIKE sy-datum, "Controlling of session date
v_index LIKE sy-index, "Index Number
v_totrec TYPE i, "Total Records
v_errrec TYPE i, "Error Records
v_sucrec TYPE i, "Success Records
v_sesschk TYPE c. "Session maintenance
*& SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001 NO INTERVALS.
PARAMETERS: p_file TYPE rlgrap-filename. "rlgrap-filename is a predefined structure
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002 NO INTERVALS.
PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N',
p_update LIKE ctu_params-updmode DEFAULT 'A'.
SELECTION-SCREEN END OF BLOCK blk2.
*& INITIALIZATION
INITIALIZATION.
v_date = sy-datum - 1.
*& AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
*& START-OF-SELECTION
START-OF-SELECTION.
v_file = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_cust
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc = 0.
*MESSAGE ID sy-msgid
*TYPE sy-msgty
*NUMBER sy-msgno
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*& END-OF-SELECTION
END-OF-SELECTION.
v_index = sy-index.
LOOP AT it_cust INTO wa_cust.
perform bdc_dynpro using 'SAPMF02D' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-BUKRS'
wa_cust-bukrs.
perform bdc_field using 'RF02D-VKORG'
wa_cust-vkorg.
perform bdc_field using 'RF02D-VTWEG'
wa_cust-vtweg.
perform bdc_field using 'RF02D-SPART'
wa_cust-spart.
perform bdc_field using 'RF02D-KTOKD'
wa_cust-ktokd.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-TELTX'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-ANRED'
wa_cust-anred.
perform bdc_field using 'KNA1-NAME1'
wa_cust-name1.
perform bdc_field using 'KNA1-SORTL'
wa_cust-sortl.
perform bdc_field using 'KNA1-NAME2'
wa_cust-name2.
perform bdc_field using 'KNA1-NAME3'
wa_cust-name3.
perform bdc_field using 'KNA1-NAME4'
wa_cust-name4.
perform bdc_field using 'KNA1-STRAS'
wa_cust-stras.
perform bdc_field using 'KNA1-PFACH'
wa_cust-pfach.
perform bdc_field using 'KNA1-ORT01'
wa_cust-ort01.
perform bdc_field using 'KNA1-PSTLZ'
wa_cust-pstlz.
perform bdc_field using 'KNA1-ORT02'
wa_cust-ort02.
perform bdc_field using 'KNA1-PFORT'
wa_cust-pfort.
perform bdc_field using 'KNA1-PSTL2'
wa_cust-pstl2.
perform bdc_field using 'KNA1-LAND1'
wa_cust-land1.
perform bdc_field using 'KNA1-REGIO'
wa_cust-regio.
perform bdc_field using 'KNA1-SPRAS'
'EN'.
perform bdc_field using 'KNA1-TELX1'
wa_cust-telx1.
perform bdc_field using 'KNA1-TELF1'
wa_cust-telf1.
perform bdc_field using 'KNA1-TELFX'
wa_cust-telfx.
perform bdc_field using 'KNA1-TELF2'
wa_cust-telf2.
perform bdc_field using 'KNA1-TELTX'
wa_cust-teltx.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-CITYC'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-STCEG'
wa_cust-stceg.
perform bdc_field using 'KNA1-CITYC'
wa_cust-cityc.
perform bdc_field using 'KNA1-LZONE'
wa_cust-lzone.
perform bdc_dynpro using 'SAPMF02D' '0125'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-KUKLA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNA1-NIELS'
wa_cust-niels.
perform bdc_field using 'KNA1-KUKLA'
wa_cust-kukla.
perform bdc_dynpro using 'SAPMF02D' '0130'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0340'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0360'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VZSKZ'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-AKONT'
wa_cust-akont.
perform bdc_field using 'KNB1-FDGRV'
wa_cust-fdgrv.
perform bdc_field using 'KNB1-VZSKZ'
wa_cust-vzskz.
perform bdc_dynpro using 'SAPMF02D' '0215'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-ZTERM'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNB1-ZTERM'
wa_cust-zterm.
perform bdc_dynpro using 'SAPMF02D' '0220'.
perform bdc_field using 'BDC_CURSOR'
'KNB5-MAHNA'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0230'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-VRSNR'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_dynpro using 'SAPMF02D' '0610'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KUNNR'.
perform bdc_dynpro using 'SAPMF02D' '0310'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VERSG'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-AWAHR'
'100'.
perform bdc_field using 'KNVV-VKBUR'
wa_cust-vkbur.
perform bdc_field using 'KNVV-WAERS'
'INR'.
perform bdc_field using 'KNVV-KALKS'
'1'.
perform bdc_field using 'KNVV-VERSG'
wa_cust-versg.
perform bdc_dynpro using 'SAPMF02D' '0315'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-VSBED'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-LPRIO'
perform bdc_field using 'KNVV-KZAZU'
'X'.
perform bdc_field using 'KNVV-VSBED'
wa_cust-vsbed.
perform bdc_field using 'KNVV-ANTLF'
'9'.
perform bdc_dynpro using 'SAPMF02D' '0320'.
perform bdc_field using 'BDC_CURSOR'
'KNVV-KTGRD'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVV-BOKRE'
'X'.
perform bdc_field using 'KNVV-KTGRD'
wa_cust-ktgrd.
perform bdc_dynpro using 'SAPMF02D' '1350'.
perform bdc_field using 'BDC_CURSOR'
'KNVI-TAXKD(01)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'KNVI-TAXKD(01)'
wa_cust-taxkd.
perform bdc_dynpro using 'SAPMF02D' '0324'.
perform bdc_field using 'BDC_CURSOR'
'KNVP-PARVW(01)'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
CALL TRANSACTION 'XD01' USING it_bdctab
MODE p_mode
UPDATE p_update
MESSAGES INTO it_messagetab.
IF sy-subrc = 0.
*& reading success records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'S'.
IF sy-subrc = 0.
wa_sucrec-cnum = it_messagetab-msgv1.
wa_sucrec-cnam = wa_cust-name1.
APPEND wa_sucrec TO it_sucrec.
CLEAR wa_sucrec.
ENDIF.
ELSE.
*& reading error records to corresponding internal table
READ TABLE it_messagetab WITH KEY msgtyp = 'E'.
IF sy-subrc = 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
no = it_messagetab-msgnr
v1 = it_messagetab-msgv1
v2 = it_messagetab-msgv2
v3 = it_messagetab-msgv3
v4 = it_messagetab-msgv4
IMPORTING
msg = wa_errrec-message.
wa_errrec-lineno = v_index.
*******wa_errrec-lineno = v_index.
*******wa_errrec-message = it_messagetab-msgv1.
APPEND wa_errrec TO it_errrec.
CLEAR wa_errrec.
ENDIF.
ENDIF.
CLEAR : it_bdctab, it_messagetab.
REFRESH: it_bdctab, it_messagetab.
ENDLOOP.
DESCRIBE TABLE it_cust LINES v_totrec.
DESCRIBE TABLE it_errrec LINES v_errrec.
DESCRIBE TABLE it_sucrec LINES v_sucrec.
PERFORM disp_data.
SKIP 2.
IF v_sucrec > 0.
PERFORM disp_success_data.
ENDIF.
SKIP 2.
IF v_errrec > 0.
PERFORM disp_error_data.
ENDIF.
*& Form bdc_dynpro
*# text
*# -->P_0104 text
*# -->P_0105 text
FORM bdc_dynpro USING program
dynpro.
CLEAR it_bdctab.
it_bdctab-program = program.
it_bdctab-dynpro = dynpro.
it_bdctab-dynbegin = 'X'.
APPEND it_bdctab.
ENDFORM. " bdc_dynpro
*& Form bdc_field
*# text
*# -->P_0109 text
*# -->P_IT_cust_LIFNR text
FORM bdc_field USING fnam
fval.
CLEAR it_bdctab.
it_bdctab-fnam = fnam.
it_bdctab-fval = fval.
APPEND it_bdctab.
ENDFORM. " bdc_field
*& Form disp_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_data .
ULINE (45).
WRITE : / sy-vline,
12 'FAMD CUSTOMER UPDATE SUMMARY'(004) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline,
'Total Records Processed'(007),
28 '=',
30 v_totrec,
45 sy-vline,
/ sy-vline,
'Error Records'(005),
28 '=',
30 v_errrec,
45 sy-vline,
/ sy-vline,
'Successful Records'(006),
28 '=',
30 v_sucrec,
45 sy-vline.
ULINE /(45).
ENDFORM. " disp_data
*& Form disp_success_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_success_data .
ULINE (45).
WRITE : / sy-vline,
14 'Successful Records'(012) COLOR 1,
45 sy-vline.
ULINE /(45).
WRITE : / sy-vline ,
'Customer Number'(010) COLOR 2,
17 sy-vline,
25 'Customer Name'(011) COLOR 2,
45 sy-vline.
ULINE /(45).
LOOP AT it_sucrec INTO wa_sucrec.
WRITE: / sy-vline ,
wa_sucrec-cnum,
17 sy-vline,
19 wa_sucrec-cnam,
45 sy-vline.
ENDLOOP.
ULINE /(45).
ENDFORM. " disp_success_data
*& Form disp_error_data
*# text
*# --> p1 text
*# <-- p2 text
FORM disp_error_data .
ULINE (85).
WRITE : / sy-vline,
35 'Error Records'(013) COLOR 1,
85 sy-vline.
ULINE /(85).
WRITE : / sy-vline,
'Record Number'(008) COLOR 2,
sy-vline,
37 'Reason for error'(009) COLOR 2,
85 sy-vline.
ULINE /(85).
LOOP AT it_errrec INTO wa_errrec.
WRITE : / sy-vline,
wa_errrec-lineno,
17 sy-vline,
wa_errrec-message,
85 sy-vline.
ENDLOOP.
ULINE /(85).
ENDFORM. " disp_error_dataWorked out n found the solution
-
How to create a Group Above report using APEX
I want to create a Group above report with more that one group using APEX. Is it possible to generate such a report using APEX. If so kindly let me know how to go about creating a Group above report with more than one group.
Hello Srini,
Thank you very much for the reply but I'm not into OBIEE... I want the required query to be processed and the output to be shown in xml layout to load into RTF document. The rest I can manage.. but please let me know how to get the .xml output with out using the report builder or the apps environment(concurrent prg submission)..
Please let me know if any... urgent
Thanks in advance
Krishna -
Not able to display javascript alert message from within a pl/sql block
Hello,
Can anyone please help me out with this issue. I wanted to display an javascript alert message from within a pl/sql block for an update button. Below is sample code which i am using. P1_ITEM is my hidden item on the report.
begin
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
and I have made this code to be executed conditionally when request = Expression1
Expression1: SUBMIT
The thing is I am not able to display an alert message when the update button is clicked.
Can anyone please help me with this one.
Thanks,
Ortonvarad but I also have an update statement within that block for the update button something like this i want to achieve.
begin
if :P1_ITEM IS NULL THEN
update sample_tbl
set col1 =:APP_USER,
col2 = 'Y'
where pk_col = ---;
commit;
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Successfully assigned an item!'');');
HTP.p ('</script>');
end if;
if :P1_ITEM IS NOT NULL then
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Please complete the item which is already assigned to you!'');');
HTP.p ('</script>');
end if;
end;
thanks,
Orton -
Group above report - help please
Good Morning,
I'm trying to create a group above report that resembles the following:
LETTER TYPE: 00001
BATCH TOTAL NOREPLY
1234 3 1
2345 2 0
TOTAL VOL. FOR LETTER 00001 5
I've tried using:
select ltrtype, batch, count(reply)
from ltr
where reply = 'N'
group by ltrtype, batch
which does give me the correct figures under the NOREPLY Heading, but I can't get the correct figures for the TOTAL heading (NOTE: The figures in the TOTAL column should be a total of both the reply = 'Y' and reply = 'N' for the ltrtype and batch - the figures in the NOREPLY column should be a total of only the reply = 'N' for the ltrtype and batch.) I hope this explanation is clear
I've also tried eliminating the where clause, but then I get the correct figures under the TOTAL heading, but I can't get the correct figures for the NOREPLY heading.
I've also tried using two queries and a data link, but I couldn't get that to work either.
Any help would be greatly appreciated.
Thanks.Go to report wizard and check the groups and fields tabs. Otherwise map the repeating frames accordingly.
-
How to develop a group above report in mailing lable style
i want to know the method to develop a group above report (multi level groups) in mailing lable style like yellow pages on reports 6i e.g.
group 1: country
group 2: province
group 3: Industry
group 4: product or service
mailing lable: Company Name
Address
Contact No
I will highly appreciate if someone can help in this regard
M. Imran Shahzad
[email protected]Post Author: V361
CA Forum: Formula
I am slightly confused, but perhaps you can create a formula
Then group on the formula. If this is not what you want, could you post some sample data, with the desired results.
Maybe you are looking for
-
Is there a way to open up a directory for static files.
Is there a way to open a specific directory or set of directories up for browsing with WLS 8.1.5 (such as having static .txt,.html files,etc..) without having to deploy some sort of java app to do this. Basically we need a quick and dirty way to acce
-
Hi there, So, I realize now that what I did was stupid...but it's done and now I need to find a solution. I have an external drive with over 38,000 music files so I decided I would consolidate all my music into one location. By doing this, I rename
-
latest 6th gen 160 gb ipod not recognized in itunes, have done all the checks, has been confirmed in itunes sync, Also down loaded 470 new songs into itunes,Can play them,but can not down load back into my ipod, any thoughts? Question,
-
Webutil_demo "Bean Not found "
Hello Please Help on this issue Please I downloaded webutil_demo and setup the demo application as per documentation. But Still if I some errors: At design time I can not see the webutil_canvas ( This is a reference object, So no Problem)
-
NOKIA LUMIA 530 - TYPING / BATTERY /
I am facing the following problems , Purchased from amazon and delivered 3 days back 1.WhatsApp typing giving error , after space I cant type , even Cant delete . Same typing problem in Facebook status also ....!! 2.Phone is getting unusually Hot wit