How to get sum for each currency's in ALV Report
Hi,
A column has amounts with various currency's.
May I know how to get sum quantity for each currency in ALV Report?
Thanks in advance.
Hi,
Currency value column should have reference to currency code column.
Regards,
Wojciech
Similar Messages
-
How to get LASTDAY for each and every month between given dates..
Hi Friend,
I have a doubt,How to get LASTDAY for each and every month between given dates..
for ex:
My Input will be look like this
from date = 12-01-2011
To date = 14-04-2011
And i need an output like
31-01-2011
28-02-2011
31-03-2011
is there any way to achieve through sql query in oracle
Advance thanks for all helping friendsHere's a 8i solution :
select add_months(
trunc(
to_date('12-01-2011','DD-MM-YYYY')
,'MM'
, rownum ) - 1 as results
from all_objects
where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
The above two query is worked in oracle 11GActually the first query I posted is not correct.
It should work better with
months_between(
trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
)Edited by: odie_63 on 12 janv. 2011 13:53
Edited by: odie_63 on 12 janv. 2011 14:11 -
How to get IAttributeStrand for each Cell in Table
Hello All,
I am trying to set the font and size depending upon the user inputs under each cell in the table.
For Text frame I am able to achieve this by using ITextModel->QueryStrand(). But for Table I am not able to find any function which can allow me to query the Cell Strand and allow to apply the attributes.
Has anyone been able to achieve the same. If so please do let me know its urgent.
Thank you all in advance.
regards
Farzana.Hi,<br /> <br />Thanks for the prompt reply. By the way I forgot to mention that we are using the same in CS3.<br />We tried as you have mentioned in your mail. But we did not find any way to achieve the ITextStoryThread from ICellConent. We tried all possible ways but we always get the Text Frame TextModel.<br />We have used following code to get TextModel for each cell. We get correct startindex and endindex for each cell and also get the valid TextModel Interface. But when we try to find out its length then it returns the whole TextModel length. <br />Thus when we try to apply different attributes for each cell then it applies to whole table. <br />E.g. When we try to apply 12 font size for 1st cell then it also applies to remaining cells. So we think we are not able to find out correct TextModel for each cell. <br /> <br />Below is our snippet of code on what we tried.<br /> <br />ITableModel::const_iterator iterTable(tableModel->begin());<br />ITableModel::const_iterator end(tableModel->end());<br /> <br />while(iterTable != end) <br />{<br />GridAddress gridAddress = *iterTable; <br />GridID gridid= tableModel->GetGridID(gridAddress);<br /> <br /> InterfacePtr<ITableTextContainer> tableTextContainer(tableModel, UseDefaultIID());<br /> if(tableTextContainer != nil) <br /> {<br /> InterfacePtr<ITextModel> textModel(tableTextContainer->QueryTextModel());<br /> if(textModel != nil) <br /> {<br /> InterfacePtr<ITextStoryThreadDict> textStoryThreadDict(tableModel, UseDefaultIID());<br /> if (textStoryThreadDict != nil) <br /> {<br /> InterfacePtr<ITextStoryThread> textStoryThread(textStoryThreadDict->QueryThread(gridid));<br /> if (textStoryThread != nil)<br /> {<br /> InterfacePtr<ITextModel> iTextModel(textStoryThread->QueryTextModel());<br /> if (iTextModel != nil)<br /> {<br /> TextIndex startIndx;<br /> TextIndex endIndx;<br /> startIndx=textStoryThread->GetTextStart(&endIndx);<br /> }<br /> else<br /> CAlert::ErrorAlert("iTextModel == nil");<br /> }<br /> }<br /> } <br /> }<br /> <br /> ++iterTable; <br /> }<br /><br />Regards,<br />Farzana.
-
How to get top10 for each brand..
Hi all,
I have a table which contains brands information. to get top10 sites for a brand, we can use the following query.
select brand,site,sales from (
select brand,site, sales
from all_brands_info
where brand = :p_brand
order by sales desc)
where rownum<10
There are 15 brands. If i want top10 sites for each brand, how can i...
Please help me,
satti.Given your sample data and desired output, I don't see how rownum would help. I think you need something more like:
SQL> WITH t AS (SELECT 'A' brand, 'S1' site, 30 sales FROM dual UNION ALL
2 SELECT 'A', 'S2', 40 FROM dual UNION ALL
3 SELECT 'A', 'S2', 20 FROM dual UNION ALL
4 SELECT 'A', 'S3', 20 FROM dual UNION ALL
5 SELECT 'A', 'S4', 35 FROM dual UNION ALL
6 SELECT 'B', 'S1', 40 FROM dual UNION ALL
7 SELECT 'B', 'S2', 35 FROM dual UNION ALL
8 SELECT 'B', 'S3', 50 FROM dual UNION ALL
9 SELECT 'B', 'S3', 30 FROM dual UNION ALL
10 SELECT 'B', 'S4', 45 FROM dual UNION ALL
11 SELECT 'C', 'S1', 40 FROM dual UNION ALL
12 SELECT 'C', 'S2', 35 FROM dual UNION ALL
13 SELECT 'C', 'S3', 10 FROM dual UNION ALL
14 SELECT 'C', 'S4', 30 FROM dual)
15 SELECT brand, site, sales, rn
16 FROM (SELECT brand, site, sales,
17 ROW_NUMBER() OVER (PARTITION BY brand
18 ORDER BY sales DESC) rn
19 FROM (SELECT brand, site, SUM(sales) sales
20 FROM t
21 GROUP BY brand, site))
22 WHERE rn <= 2;
B SI SALES RN
A S2 60 1
A S4 35 2
B S3 80 1
B S4 45 2
C S1 40 1
C S2 35 2However, as I said before, you may want to look at rank and dense_rank depending on how you feel about ties. For example, for brand A if I add another 5 to site S1 making a tie with S4 for second highest see the differences in the values between row_number, rank abd dense_rank:
SQL> WITH t AS (SELECT 'A' brand, 'S1' site, 30 sales FROM dual UNION ALL
2 SELECT 'A', 'S2', 40 FROM dual UNION ALL
3 SELECT 'A', 'S2', 20 FROM dual UNION ALL
4 SELECT 'A', 'S3', 20 FROM dual UNION ALL
5 SELECT 'A', 'S4', 35 FROM dual UNION ALL
6 SELECT 'A', 'S1', 5 FROM dual)
7 SELECT brand, site, sales,
8 ROW_NUMBER() OVER (PARTITION BY brand
9 ORDER BY sales DESC) rn,
10 RANK() OVER (PARTITION BY brand
11 ORDER BY sales DESC) rnk,
12 DENSE_RANK() OVER (PARTITION BY brand
13 ORDER BY sales DESC) drnk
14 FROM (SELECT brand, site, SUM(sales) sales
15 FROM t
16 GROUP BY brand, site);
B SI SALES RN RNK DRNK
A S2 60 1 1 1
A S1 35 2 2 2
A S4 35 3 2 2
A S3 20 4 4 3John -
How to Calculate sum for the selected rows in ALV gird using custom button
Hi I am trying to implement an ALV Grid display where the user can select few rows in the output and if he click on some custom button he should get the sum for only those rows.
Can anyone give me some idea regarding this.
Thanks in advanceWhile building the fieldcatalog for amount field use gt_fieldcat-do_sum = 'X'. And use the below for doc type sorting and subtotal.
* ALV data declarations
data: it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
perform build_sortcat.
*& Form build_sortcat
* Build Sort catalog
FORM build_sortcat .
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
wa_sort-SUBTOT = 'X'. "subtotals any totals column by this field
* gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
* gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
ENDFORM. " build_sortcat
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
Regards,
Chandru -
How to get list header in ECC6.0 of ALV reports ?
Hello i want to display header in ALV reports this the code what i am using..
*ALV TOP-OF-PAGE DECLATRACTION
DATA : W_LISTHEADER TYPE SLIS_LISTHEADER,
T_LISTHEADER TYPE SLIS_T_LISTHEADER.
**PUPULATING TOP-OF-PAGE.
w_LISTHEADER-TYP = 'H'.
W_LISTHEADER-INFO = 'Report for Sales'.
APPEND W_LISTHEADER TO T_LISTHEADER.
CLEAR W_LISTHEADER.
It is working fine in SAP4.7 version but in ECC6.0 it is not working where i have to do changes..
ThksHi,
Try the top-of-page by using events, like
Data Declaration
TYPE-POOLS: slis.
TABLES: mara.
TYPES: BEGIN OF i_mara,
matnr LIKE mara-matnr,
mtart LIKE mara-mtart,
meins LIKE mara-meins,
groes LIKE mara-groes,
volum LIKE mara-volum,
END OF i_mara.
DATA: it_mara TYPE STANDARD TABLE OF i_mara INITIAL SIZE 0.
ALV Data Declaration
DATA: fldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
i_events TYPE slis_t_event,
w_events LIKE LINE OF i_events,
i_repid TYPE sy-repid.
DATA: i_comment TYPE slis_t_listheader,
wa_comment TYPE slis_listheader.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM bld_fldcat.
PERFORM call_events.
PERFORM display_alv_report.
*& Form CALL_EVENTS
text
FORM call_events.
W_events-name = slis_ev_top_of_page.
W_events-form = 'TOP-OF-PAGE'.
append W_events to i_events.
clear W_events .
ENDFORM. "CALL_EVENTS
Build field catalog for ALV
FORM bld_fldcat.
fldcat-fieldname = 'MATNR'.
fldcat-seltext_m = 'MATERIAL NUMBER'.
fldcat-col_pos = 0.
APPEND fldcat TO fldcat.
CLEAR fldcat.
fldcat-fieldname = 'MTART'.
fldcat-seltext_m = 'MATERIAL TYPE'.
fldcat-emphasize = 'C111'.
APPEND fldcat TO fldcat.
CLEAR fldcat.
fldcat-fieldname = 'MEINS'.
fldcat-seltext_m = 'UNIT OF MEASURE'.
APPEND fldcat TO fldcat.
CLEAR fldcat.
fldcat-fieldname = 'GROES'.
fldcat-seltext_m = 'SIZE'.
APPEND fldcat TO fldcat.
CLEAR fldcat.
fldcat-fieldname = 'VOLUM'.
fldcat-seltext_m = 'VOLUME'.
APPEND fldcat TO fldcat.
CLEAR fldcat.
ENDFORM. "BLD_FLDCAT
Display report using ALV List
FORM display_alv_report.
i_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = I_REPID
it_fieldcat = fldcat[]
i_save = 'A'
it_events = i_events
TABLES
t_outtab = it_mara
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "DISPLAY_ALV_REPORT
Retrieve data from MARA table and populate itab IT_MARA
FORM data_retrieval.
SELECT matnr mtart meins groes volum
INTO TABLE it_mara FROM mara UP TO 50 ROWS.
ENDFORM. "DATA_RETRIEVAL
*& Form TOP_OF_PAGE
text
FORM TOP-OF-PAGE.
CLEAR i_comment[].
wa_comment-typ = 'H'.
wa_comment-info = 'TOP OF PAGE' . "SY-PAGNO.
APPEND wa_comment TO i_comment.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_comment.
ENDFORM. "GENERATE_USERCOMMAND_FOOTER
Regards,
Chandu -
How to get Sum for my Elapse Time string for my group
Hi,
How can I get the sum of an elapse time string in my group footer 2 and group footer 1 from the report screenshot attached.
I have a report that display TimeIn and TimeOut of an employee.
For the total time I have created a formula that will take my time in seconds and displaying it in hrs, minutes and seconds.
How can I get the sum of all the total time per day and display this in my group footer 2.
As well I will need to add the grand total to group footer 1 for the total of days.
The formula I have for the total time is as follow:
WhileReadingRecords;
NumberVar TotalSec := {TimeLogs.TotalTime};
NumberVar Hours := Truncate (Remainder ( TotalSec , 86400) / 3600) ;
NumberVar Minutes := Truncate (Remainder ( TotalSec , 3600) / 60) ;
NumberVar Seconds := Remainder (TotalSec , 60) ;
Totext ( Hours , '00' ) + ':' +
Totext ( Minutes , '00' ) + ':' +
Totext ( Seconds , '00' )
This is a seperate question below but related as well to this report.
Another question I have is how can I round up for example 03:30:58 to 03:31:00
And also how can I round down for example 03:26:10 to 03:26:00
Any help would be appreciated.
Thank you,
JoeHi Jamie,
Well I ran into an issue with this. My Daily Total, there is no issue, it is displaying the proper time. But when I add a summary to my Group Footer 1, it doesn't add up properly.
If I select only 1, 2, or 3 days my Date Range Total is adding fine but when selecting 5 days for example, as you can see from the picture below, for an unknowned reason the total of hrs is wrong.
Do you know why this is happening.
Than you for your help.
Joe
Picture below, this is working fine? -
How to get Runtime for each statement in abap program
Is there any tool which tells the runtime of each statement in our program..apart from sto5 and se30
Thanks in advance
PRASANNADetermining the calculation time for calculating the tangent of 1. Since the runtime of the statement is less than a microsecond, the runtime of several executions in an inner loop is measured. The exection time for the loop itself is also measured in order to deduct it as an offset. These measurements are executed several times in an outer loop and the mean value is created using division by n0. Through division by ni, the runtime of an individual statement is determined.
DATA: t0 TYPE i,
t1 TYPE i,
t2 TYPE i,
t3 TYPE i,
t4 TYPE i,
tm TYPE f,
no TYPE i VALUE 100,
ni TYPE i VALUE 1000,
res TYPE f.
DO no TIMES.
GET RUN TIME FIELD t1.
DO ni TIMES.
res = TAN( 1 ).
ENDDO.
GET RUN TIME FIELD t2.
GET RUN TIME FIELD t3.
DO ni TIMES.
ENDDO.
GET RUN TIME FIELD t4.
t0 = t0 + ( ( t2 - t1 ) - ( t4 - t3 ) ).
ENDDO.
tm = t0 / ni / no.
Source: SAP Help.
Regards,
Santosh -
How to provide hyperlink for a particular field in ALV
Hi,
How to provide hyperlink for a particular field in alv report.
Regards,
Ramu.Yes you can do that. using the fieldcatalog there is an option for that. give HOT_SPOT = 'X'. for the column you want.
wa_field-hotspot = 'X'.
REPORT ztest_alv.
TYPE-POOLS:slis.
DATA:it_fieldcat TYPE slis_t_fieldcat_alv,
wa_field LIKE LINE OF it_fieldcat.
DATA: BEGIN OF it_likp OCCURS 0,
vbeln TYPE likp-vbeln,
END OF it_likp.
DATA: layout TYPE slis_layout_alv.
wa_field-fieldname = 'VBELN'.
wa_field-tabname = 'IT_LIKP'.
wa_field-hotspot = 'X'.
wa_field-outputlen = 10.
wa_field-no_zero = 'X'.
wa_field-seltext_l = 'Sales'.
APPEND wa_field TO it_fieldcat.
SELECT vbeln FROM likp
UP TO 10 ROWS
INTO TABLE it_likp.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = layout
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = it_fieldcat
TABLES
t_outtab = it_likp
EXCEPTIONS
program_error = 1.
*& Form user_Command
* text
* -->UCOMM text
* -->SELFIELD text
FORM user_command USING ucomm TYPE sy-ucomm
selfield TYPE slis_selfield.
CASE ucomm.
WHEN '&IC1'.
SET PARAMETER ID 'VL' FIELD selfield-value.
CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.
ENDCASE.
ENDFORM. "user_Command -
Getting sum of each column in 2D array
hi,
i want to get sum of each column from 2D array. i did public static void main(String[] args) {
double sum=0.0;
int[][] arr={
{1,2,8},
{2,2,3},
{2,2,5},
{1,2,8},
{1,1,9},
{2,2}
int i=0,j=0;
int len=arr.length;
while(j!=len){
sum=0;
for(i=0;i<arr.length;i++){
sum+=arr[i][j];
System.out.println("sum is:" +sum);
j++;
}but it doesnot work for jagged array...somebody please help!
thankxStop assuming the rows in your matrix are all the same length. Arrays know how long they are. Use that information to determine if the current column exists in that row.
-
[JS][CS3]how to get refrence for source file
Hi All
I am new and learning javascript Gradually Could any one help on this as i do have a code for load style but don't know how to get refrence for "source file" and "targetDoc"
targetDoc.importStyles(charImport, sourceFile, clashPolicy);
targetDoc.importStyles(paraImport, sourceFile, clashPolicy);
Can any one figure it out
Many ThanksI'm not sure what you are trying to achieve, could you please elaborate?
Do you want to load all the styles from one document into all 100 documents, or do you want all the styles from the 100 documents into 1 document or what is the goal?
The following will let you choose a folder of files, open each of the files in it and import the styles from source document. It is not a complete script, make sure to test and modify before running on anything else than test files :-)
var MyFolderWithFiles = Folder.selectDialog ("Choose a folder");
var sourceFile = File.openDialog("Choose the styles source");
var myFiles = MyFolderWithFiles.getFiles("*.indd");
for(i = 0; i < myFiles.length; i++) {
theFile = myFiles[i];
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
var targetDoc = app.open(theFile, true);
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
targetDoc.importStyles(ImportFormat.CHARACTER_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
targetDoc.importStyles(ImportFormat.PARAGRAPH_STYLES_FORMAT, sourceFile, GlobalClashResolutionStrategy.LOAD_ALL_WITH_OVERWRITE);
targetDoc.close(SaveOptions.YES);
Thomas B. Nielsen
http://www.lund-co.dk -
How to get control on each row in advance table
hi, i have a advanced table with some data, in each row i have two radio buttons which i need to set depending on some column value in the row, i tried by following code
for(SoftCompVORowImpl row2 = (SoftCompVORowImpl)svo.first();row2!=null;row2=(SoftCompVORowImpl)svo.next())
if(row2.getAttribute("CommitEndDate")==null || row2.getAttribute("CommitEndDate").equals(""))
onetime.setSelected(true);
recurring.setSelected(false);
else
onetime.setSelected(false);
recurring.setSelected(true);
but this code is making set only one radio button (onetime), which ever i am making first true its getting selected, i need to know how to get control of each row....Babu,
Basically you should use the decode function in your sql query itself and attach it with BC4J properties of radio buttons.In that case you don't have to worry about setting them declaratively !
--Mukul -
How to get total at each hierarchy
Hello Gurus,
Does anybody know how to get total at each level.
I mean, if I have the following structure...
Level 1
Level 2
Level 3
Level 4
Level 5
At level 5 we have the following calculation
Volume Price Amount(From Formula Volume * price)
5 2 10,00
6 3 12,00
7 4 28,00
My question is how to get a sum of (10,00 + 12,00 +28,00 = 50,00) at level 4?
Thanks in advance.
With regards,
AnandDoes anybody know how to get total at each level.
I mean, if I have the following structure...
Level 1
Level 2
Level 3
Level 4
Level 5
At level 5 we have the following calculation
Volume Price Amount(From Formula Volume * price)
5 2 10,00
6 3 12,00
7 4 28,00
I am getting following results : It is adding volume and price then multiplying volume * price and giving results.
18 9 18 * 9 = 162,00
But I have to get sum of ( 10,00 + 12,00 +28,00 = 50,00) at level 4.
My question is how to get a sum of (10,00 + 12,00 +28,00 = 50,00) at level 4?
Thanks.
With regards,
Anand -
I am doing a report in ORACLE REPORT WRITER. How can I get counts for each SSN. I want to check the last 7 SSNS
and if the competence codes are different get a count for them. If the fitness codes are different get a count for them. This is for each SSN. Sometimes SSNS may have different competence codes but the fitness codes are the same. I still need counts for the competence codes. Other times the SSNS have different fitness codes but the competence codes are the same and I need counts for the fitness codes. Other times the fitness codes are different and the competence codes are different and I need counts for the fitness codes and counts for the competence codes. Here is a sample of what the report should look like:
SSN TOTAL TOTAL
Competence Fitness
000000111 13 6
000000222 6 0
000000333 0 7
I have everything wrapped up under one count. I don't know to change the query to display 2 separate counts.
I have used Summary Columns but that does not work.
I could use 2 separate querys and get counts for competence and fitness respectively but the SSNS would be out of order. The SSNS must be in order.
Here is the query.
SELECT DISTINCT T2.IND_SSN, COUNT(*)cnt1
FROM (SELECT distinct(t.ind_ssn), t.ind_competence_rtg_old, t.ind_competence_rtg_new, ROW_NUMBER()
OVER (PARTITION BY t.ind_ssn ORDER BY t.IND_SSN ASC, t.ind_er_per_end_dt DESC) rn
FROM NCOER_JRNL T) t2
WHERE t2.rn <= 7
and (t2.ind_competence_rtg_old <> t2.ind_competence_rtg_new)
GROUP BY T2.IND_SSN
UNION
SELECT DISTINCT T2.IND_SSN, COUNT(*)cnt2
FROM (SELECT distinct(t.ind_ssn), t.ind_FIT_rtg_old, t.ind_FIT_rtg_new, ROW_NUMBER()
OVER (PARTITION BY t.ind_ssn ORDER BY t.IND_SSN ASC, t.ind_er_per_end_dt DESC) rn
FROM NCOER_JRNL T) t2
WHERE t2.rn <= 7
and (t2.ind_FIT_rtg_old <> t2.ind_FIT_rtg_new)
GROUP BY T2.IND_SSN
ORDER BY 1Thanks for you reply Ricardo. It does work (but only if select 1 ticket).
My bad I only posted one Ticket Number. Actually there are lots of them ( as below). Your code take all the tickets as one tickets.
TicketNumber
OwningTeam
Status
Date
Team Number
123
TEAM 1
Pick Up
11/12/2014
1
123
TEAM 1
Complete
11/12/2014
1
123
TEAM 2
Pick Up
11/12/2014
2
123
TEAM 2
Complete
11/12/2014
2
123
TEAM 2
Resolve
11/17/2014
2
123
TEAM 2
Complete
11/24/2014
2
123
TEAM 2
Pick Up
12/8/2014
2
123
TEAM 2
Complete
12/9/2014
2
123
TEAM 2
Provide Info
12/17/2014
2
123
TEAM 1
Pick Up
1/8/2015
3
123
TEAM 1
Resoved
1/8/2015
3
456
TEAM 1
Pick Up
11/12/2014
1
456
TEAM 1
Complete
11/12/2014
1
456
TEAM 2
Complete
11/24/2014
2
456
TEAM 2
Pick Up
12/8/2014
2
456
TEAM 2
Complete
12/9/2014
2
456
TEAM 3
Pick Up
12/17/2014
3
456
TEAM 3
Working
12/18/2014
3
456
TEAM 1
Pick Up
1/8/2015
4
456
TEAM 1
Resoved
1/8/2015
4
789
TEAM 1
Pick Up
11/12/2014
1
789
TEAM 1
Complete
11/12/2014
1
789
TEAM 2
Complete
11/24/2014
2
789
TEAM 2
Pick Up
12/8/2014
2
789
TEAM 2
Complete
12/9/2014
2
789
TEAM 1
Complete
12/12/2014
3
Any work around is really appreciated.
Thanks,
Rajneet -
How to get Text for nodes in Tree Structure
Hi Friends,
How to get Text for nodes in Tree Structure
REPORT YFIIN_REP_TREE_STRUCTURE no standard page heading.
I N I T I A L I Z A T I O N
INITIALIZATION.
AUTHORITY-CHECK OBJECT 'ZPRCHK_NEW' :
ID 'YFIINICD' FIELD SY-TCODE.
IF SY-SUBRC NE 0.
MESSAGE I000(yFI02) with SY-TCODE .
LEAVE PROGRAM.
ENDIF.
class screen_init definition create private.
Public section
public section.
class-methods init_screen.
methods constructor.
Private section
private section.
data: container1 type ref to cl_gui_custom_container,
container2 type ref to cl_gui_custom_container,
tree type ref to cl_gui_simple_tree.
methods: fill_tree.
endclass.
Class for Handling Events
class screen_handler definition.
Public section
public section.
methods: constructor importing container
type ref to cl_gui_custom_container,
handle_node_double_click
for event node_double_click
of cl_gui_simple_tree
importing node_key .
Private section
private section.
endclass.
*& Classes implementation
class screen_init implementation.
*& Method INIT_SCREEN
method init_screen.
data screen type ref to screen_init.
create object screen.
endmethod.
*& Method CONSTRUCTOR
method constructor.
data: events type cntl_simple_events,
event like line of events,
event_handler type ref to screen_handler.
create object: container1 exporting container_name = 'CUSTOM_1',
tree exporting parent = container1
node_selection_mode =
cl_gui_simple_tree=>node_sel_mode_multiple.
create object: container2 exporting container_name = 'CUSTOM_2',
event_handler exporting container = container2.
event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
event-appl_event = ' '. "system event, does not trigger PAI
append event to events.
call method tree->set_registered_events
exporting events = events.
set handler event_handler->handle_node_double_click for tree.
call method: me->fill_tree.
endmethod.
*& Method FILL_TREE
method fill_tree.
data: node_table type table of abdemonode,
node type abdemonode.
types: begin of tree_node,
folder(50) type c,
tcode(60) type c,
tcode1(60) type c,
tcode2(60) type c,
text(60) type c,
text1(60) type c,
text2(60) type c,
end of tree_node.
data: wa_tree_node type tree_node,
t_tree_node type table of tree_node.
wa_tree_node-folder = text-001.
wa_tree_node-tcode = text-002.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-003.
wa_tree_node-text1 = 'GR/IR aging'.
wa_tree_node-tcode2 = text-004.
wa_tree_node-text2 = 'Bank Balance'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
wa_tree_node-folder = text-005.
wa_tree_node-tcode = text-006.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-007.
wa_tree_node-text1 = 'Creditors ageing'.
wa_tree_node-tcode2 = text-008.
wa_tree_node-text2 = 'Creditors ageing'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
wa_tree_node-folder = text-009.
wa_tree_node-tcode = text-010.
wa_tree_node-text = 'Creditors ageing'.
wa_tree_node-tcode1 = text-011.
wa_tree_node-text1 = 'Creditors ageing'.
wa_tree_node-tcode2 = text-012.
wa_tree_node-text2 = 'Creditors ageing'.
append wa_tree_node to t_tree_node.
clear wa_tree_node .
node-hidden = ' '. " All nodes are visible,
node-disabled = ' '. " selectable,
node-isfolder = 'X'. " a folder,
node-expander = ' '. " have no '+' sign forexpansion.
loop at t_tree_node into wa_tree_node.
at new folder.
node-isfolder = 'X'. " a folder,
node-node_key = wa_tree_node-folder.
clear node-relatkey.
clear node-relatship.
node-text = wa_tree_node-folder.
node-n_image = ' '.
node-exp_image = ' '.
append node to node_table.
endat.
at new tcode .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode.
node-text = wa_tree_node-text .
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
endat.
append node to node_table.
at new tcode1 .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode1.
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = wa_tree_node-text1.
endat.
append node to node_table.
at new tcode2 .
node-isfolder = ' '. " a folder,
node-n_image = '@CS@'. "AV is the internal code
node-exp_image = '@CS@'. "for an airplane icon
node-node_key = wa_tree_node-tcode2.
node-relatkey = wa_tree_node-folder.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-text = wa_tree_node-text2.
endat.
append node to node_table.
endloop.
call method tree->add_nodes
exporting table_structure_name = 'ABDEMONODE'
node_table = node_table.
endmethod.
endclass.
*& Class implementation
class screen_handler implementation.
*& Method CONSTRUCTOR
method constructor.
create object: HTML_VIEWER exporting PARENT = CONTAINER,
LIST_VIEWER exporting I_PARENT = CONTAINER.
endmethod.
*& Method HANDLE_NODE_DOUBLE_CLICK
method handle_node_double_click.
case node_key(12).
when 'Creditors'.
submit YFIIN_REP_CREADITORS_AGING via selection-screen and return.
when 'Vendor'.
submit YFIIN_REP_VENDOR_OUTSTANDING via selection-screen and return.
when 'Customer'.
submit YFIIN_REP_CUSTOMER_OUTSTANDING via selection-screen and
return.
when 'GR/IR'.
submit YFIIN_REP_GRIR_AGING via selection-screen and return.
when 'Acc_Doc_List'.
submit YFIIN_REP_ACCOUNTINGDOCLIST via selection-screen and return.
when 'Bank Bal'.
submit YFIIN_REP_BANKBALANCE via selection-screen and return.
when 'Ven_Cus_Dtl'.
submit YFIIN_REP_VENDORCUST_DETAIL via selection-screen and return.
when 'G/L_Open_Bal'.
submit YFIIN_REP_OPENINGBALANCE via selection-screen and return.
when 'Usr_Authn'.
submit YFIIN_REP_USERAUTHRIZATION via selection-screen and return.
endcase.
endmethod.
endclass.
Program execution ************************************************
load-of-program.
call screen 9001.
at selection-screen.
Dialog Modules PBO
*& Module STATUS_9001 OUTPUT
text
module status_9001 output.
set pf-status 'SCREEN_9001'.
set titlebar 'TIT_9001'.
call method screen_init=>init_screen.
endmodule. " STATUS_9001 OUTPUT
Dialog Modules PAI
*& Module USER_COMMAND_9001 INPUT
text
module user_command_9001 input.
endmodule. " USER_COMMAND_9001 INPUT
*& Module exit_9001 INPUT
text
module exit_9001 input.
case sy-ucomm.
when 'EXIT'.
set screen 0.
endcase.
endmodule.
exit_9001 INPUTyou can read the table node_table with nody key value which imports when docubble click the the tree node (Double clifk event).
Regards,
Gopi .
Reward points if helpfull.
Maybe you are looking for
-
New Article - RoboHelp projects with Subversion and TortoiseSVN
Some folks have posted questions about Subversion and TortoiseSVN in this forum, so I thought I'd pass along this new article I found in the Adobe Developer Network this week that goes in to detail on how to set up this open-source solution with Robo
-
Deleted user from a group returned error message
I have a group [[email protected]] with serveral users on it. I deleted one user (userA) member of the group from the system. When a user B send an email to the group [email protected] a messages is returned to all of the members of the group notifyi
-
Facing problem in installing oracle 9i on 2003 server
hi all i am getting the following problem while installing oracle 9i on windows 2003 server. my system is haveing 3 more JRE s 1.4 and above installed as part of others softwares. error log i am getting is like this- An unexpected exception has been
-
SC 3.1 08/05 on Solaris 10 06/06 - cacao svc fails to load
After patching up Solaris 10 06/06 to current (as of Sep 7th 2006), I have a number of issues to resolve, but I'm starting with this one. I get the following error on bootup. Sep 7 15:34:27 node1 cacao: No suitable Java runtime found. Java 1.4.2_03 o
-
Need to set the screensaver using Applescript - strange bug
I am trying to write a script that will change the screensaver and then immediately start it up. So far I have this: do shell script "defaults -currentHost write com.apple.screensaver modulePath '~/Library/Screen Savers/Retro.qtz'" try tell applicati