How to display data in different xl sheets-urgent
hi all,
i have an urgent requirement. any body can send me the sample code to display the data in different xlsheets.
thanks,
maheedhar.t
Hey do like this.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'C:SAMitab1.xls'
DATA_SHEET_NAME = 'First internal table'
TABLES
DATA_TAB = itab1
FIELDNAMES = fldnm1
* EXCEPTIONS
* FILE_NOT_EXIST = 1
* FILENAME_EXPECTED = 2
* COMMUNICATION_ERROR = 3
* OLE_OBJECT_METHOD_ERROR = 4
* OLE_OBJECT_PROPERTY_ERROR = 5
* INVALID_PIVOT_FIELDS = 6
* DOWNLOAD_PROBLEM = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'C:SAMitab2.xls'
DATA_SHEET_NAME = '2nd internal table'
TABLES
DATA_TAB = itab2
FIELDNAMES = fldnm2
* EXCEPTIONS
* FILE_NOT_EXIST = 1
* FILENAME_EXPECTED = 2
* COMMUNICATION_ERROR = 3
* OLE_OBJECT_METHOD_ERROR = 4
* OLE_OBJECT_PROPERTY_ERROR = 5
* INVALID_PIVOT_FIELDS = 6
* DOWNLOAD_PROBLEM = 7
* OTHERS = 8
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Reward points if useful...
Cheers,
Sam
Similar Messages
-
Not able to display data in different columns using Unicode encoding
Hi,
Iam using Unicode encoding in my Java appln to support Japanese characters while downloading CSV report. But using the Unicode encoding displays all data in the first column of Excel sheet.
Please let me know how to display data in different columns using Unicode encoding in Excel sheet.Hi Venkat,
After extracting data into DSO check the request whether active or not.
Check data in DSO in contents.
If is there any restrictions on info providers in Queries.
Let us know status clearly.......
Reg
Pra -
Hi all,
can any one tell me how to display data in a table when user click on a button. i have created a node with a set of fields from different tables now how to write the logic to display data in that table.
Thanks & Regards,
NaveenDATA lo_nd_professionaltable TYPE REF TO if_wd_context_node.
DATA lo_el_professionaltable TYPE REF TO if_wd_context_element.
DATA ls_professionaltable TYPE wd_this->ElementS_professionaltable. "internaltable
TYPES: BEGIN OF TY_PFTAB,
RATEGROUP TYPE /BIC/OIWRATEGRP,
LEVEL TYPE /BIC/OIWPCSLEVEL,
FROMDATE TYPE /BI0/OIDATEFROM,
FROMTO TYPE /BI0/OIDATETO,
STANDARD TYPE /BIC/OIWSTRATE,
OVERHEAD1 TYPE /BIC/OIWOHRTE1,
OVERHEAD2 TYPE /BIC/OIWOHRTE2,
OVERHEAD3 TYPE /BIC/OIWOHRTE3,
EXCEPTIONFLAG TYPE /BIC/OIMSECFILER,
END OF TY_PFTAB.
DATA : IT_PFTABLE TYPE STANDARD TABLE OF TY_PFTAB,
WA_PFTAB TYPE TY_PFTAB.
SELECT /BIC/WRATEGRP /BIC/WPCSLEVEL DATEFROM DATETO /BIC/WSTRATE /BIC/WOHRTE1 /BIC/WOHRTE2 /BIC/WOHRTE3
FROM /BIC/AGLDCPRTS00 INTO TABLE IT_PFTABLE.
*TYPES : BEGIN OF TY_EXCEPTION,
EXCEPTIONFLAG TYPE /BIC/OIMSECFILER,
END OF TY_EXCEPTION.
*DATA : IT_EXTABLE TYPE STANDARD TABLE OF TY_EXCEPTION,
WA_EXTABLE TYPE IT_EXTABLE.
*SELECT /BIC/MSECFILER FROM /BIC/AGLDCLMLT00 INTO TABLE IT_EXTABLE.
navigate from <CONTEXT> to <PROFESSIONALTABLE> via lead selection
lo_nd_professionaltable = wd_context->get_child_node( name = wd_this->wdctx_professionaltable ).
get element via lead selection
lo_el_professionaltable = lo_nd_professionaltable->get_element( ).
@TODO handle not set lead selection
IF lo_el_professionaltable IS INITIAL.
ENDIF.
get all declared attributes
lo_el_professionaltable->get_static_attributes(
IMPORTING
static_attributes = ls_professionaltable ).
lo_nd_professionaltable->bind_table( new_items = IT_PFTABLE set_initial_elements = abap_false ). -
How to display data from a recordset based on data from another recordset
How to display data from a recordset based on data from
another recordset.
What I would like to do is as follows:
I have a fantasy hockey league website. For each team I have
a team page (clubhouse) which is generated using PHP/MySQL. The one
area I would like to clean up is the displaying of the divisional
standings on the right side. As of right now, I use a URL variable
(division = id2) to grab the needed data, which works ok. What I
want to do is clean up the url abit.
So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
I want is clubhouse.php?team=Wings.
I have a separate table, that has the teams entire
information (full team name, short team, abbreviation, conference,
division, etc. so I was thinking if I could somehow do this:
Recordset Team Info is filtered using URL variable team
(short team). Based on what team equals, it would then insert this
variable into the Divisional Standings recordset.
So example: If I type in clubhouse.php?team=Wings, the Team
Info recordset would bring up the Pacific division. Then 'Pacific'
would be inserted into the Divisional Standings recordset to
display the Pacific Division Standings.
Basically I want this
SELECT *
FROM standings
WHERE division = <teaminfo.division>
ORDER BY pts DESC
Could someone help me, thank you.Assuming two tables- teamtable and standings:
teamtable - which has entire info about the team and has a
field called
"div" which has the division name say "pacific" and you want
to use this
name to get corresponding details from the other table.
standings - which has a field called "division" which you
want to use to
give the standings
SELECT * FROM standings AS st, teamtable AS t
WHERE st.division = t.div
ORDER BY pts DESC
Instead of * you could be specific on what fields you want to
select ..
something like
SELECT st.id AS id, st.position AS position, st.teamname AS
team
You cannot lose until you give up !!!
"Leburn98" <[email protected]> wrote in
message
news:[email protected]...
> How to display data from a recordset based on data from
another recordset.
>
> What I would like to do is as follows:
>
> I have a fantasy hockey league website. For each team I
have a team page
> (clubhouse) which is generated using PHP/MySQL. The one
area I would like
> to
> clean up is the displaying of the divisional standings
on the right side.
> As of
> right now, I use a URL variable (division = id2) to grab
the needed data,
> which
> works ok. What I want to do is clean up the url abit.
>
> So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
> all
> I want is clubhouse.php?team=Wings.
>
> I have a separate table, that has the teams entire
information (full team
> name, short team, abbreviation, conference, division,
etc. so I was
> thinking if
> I could somehow do this:
>
> Recordset Team Info is filtered using URL variable team
(short team).
> Based on
> what team equals, it would then insert this variable
into the Divisional
> Standings recordset.
>
> So example: If I type in clubhouse.php?team=Wings, the
Team Info recordset
> would bring up the Pacific division. Then 'Pacific'
would be inserted into
> the
> Divisional Standings recordset to display the Pacific
Division Standings.
>
> Basically I want this
>
> SELECT *
> FROM standings
> WHERE division = <teaminfo.division>
> ORDER BY pts DESC
>
> Could someone help me, thank you.
> -
How to export data from a spread sheet which has multiple work sheets?
How to export data from a spread sheet which has multiple work sheets to a single text file with fixed length fields?
Hello s1,
saving them as CSV will not give a fixed legth output but, as the naming says, a Character Separated Value file.
Regards
Marcus -
How to display data elements in the tempalte header
Hello friends
i've this date_from and date_to parameters which are date parameters that user enters..
based on these date parameters I want to display them in the header as
day of date_from(for example if the date_from is 13-nov-2010.then I should display 13)and for date_to it should dispaly as 15 if for example the user enters
16-nov-2010.(date-1's day)
so it should break down to
date_from-13-nov-2010, 13
date_to- 16-nov-2010, 15
I want these two values to be displayed in the header of the template how to do this
pls help
also let me know how to display data elements in the template header
Edited by: erp on Dec 22, 2010 12:44 AMHi Ananth..Thanks for ur timely reply
Can I use it with <? substring(':date_from',1,2)?>
where date_from is an input parameter which user enters at the run time of the report.
I've to capture the date entered by the user and print it in the header..
Pls reply -
Performace tuning: how to pass data between different batch job programs?
Hi everyone,
now i have one problem about performance tuning using threading in SAP programs: split one big program into two programs - one is main program and the other is sub program. using batch jobs, we can submit multi jobs of sub program at the same time.
does anybody know how to pass data between different batch jobs? I don't want to use temp files. can ABAP memory can implement this?
thanks!Wei,
Yes we can transfer the data by using
SAP Memory OR ABAP Memory.
Ex: V_count TYPE i.
V_count = 100.
LOOP AT itab.
IF v_count EQ 25.
Here For every batch job
EXPORT data TO MEMORY ID 'ABC'
Function module
JOB_OPEN
JOB_SUBMIT
JOB_CLOSE.
ENDIF.
ENDLOOP .
IN your 2nd program.
INITIALIZATION.
IMPORT data FROM MEMORY IF 'ABC'.
FREE memory if .---When you free the memory you will get recent data.
Don't forget to reward if useful. -
SAP threading-how to pass data between different batch job programs?
Hi everyone,
now i have one problem about performance tuning using threading in SAP programs: split one big program into two programs - one is main program and the other is sub program. using batch jobs, we can submit multi jobs of sub program at the same time.
does anybody know how to pass data between different batch jobs? I don't want to use temp files. can ABAP memory can implement this?
thanks!Passing Data Between Programs
[http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/frameset.htm|http://help.sap.com/saphelp_47x200/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/frameset.htm] -
How to display Date Calendar in Oracle BI Answers Prompts (parameter)
I'm still new to OBIEE.
How to display Date Calendar in Oracle BI Answers Prompts (parameter)?
Thanks.Hi,
While creating Dash Board prompt choose the control to 'Calendar'.
I think it is not possible to provide 'Calendar' control using Prompts tab while creating request.
It is possible to write Java Script for a Column of data type 'char'. So, cast the date data type to char.
Go to: Column Properties --> Data Format
Choose override default data format to view the available options in the drop down list.
I would be very happy if anybody acknowledge me that I am wrong.
-Vency -
How to display data depend upon ListBox value?
Hi Experts and Particularly Hema,
As I asked before how to display data in the ListBox, I got an very good response from you all(particularly Hema) .
Now what my doubt is asked with sample scenario below:
In Screen Painter -
Two fields namely : One List Box and other is I/O used only for displaying purpose i.e., only for output, not for input purpose.
List Box is filled by primary key field(C1) value from one table(T1) when the screen load.(i.e., such code is written in PBO).
Now what I need is :
If the user select any one value in the List Box then it automatically display the corresponding C2 value from T1 in the I/O field.
I think you may all understand what I am trying to ask.Please let me know the solution.
Thanks in advance,
Regards,
RaghuSimply attached a function code for the listbox... when the user changes the value, you will be able to pick this up in the PAI and loop back to the PBO and redisplay the corresponding output field.
Jonathan -
Displaying data in different tabs
Hi all
In a webI report I want to display data in different tabs for different prompt values.
For ex: In the prompt window if enter one value for plant say ABC... data should display in a single tab
If I enter two values say ABC, DEF... data should display for two plants in two different tabs. one tab for ABC and another tab DEF.
Any inputs please and is this possible in webI?Hi there. No, it isn't.
The underlying query is shared among all tabs (which are, annoyingly, technically called 'reports').
Since any prompts are defined in the query, they too are shared among all tabs.
Input controls, 'standard report filters', and 'simple report filters' are specific to individual tabs, and cannot affect other tabs, but won't 'pop up'.
You may want to look into hyperlinking between reports (read up on OpenDocument if you're not familiar with it) to allow users to move from one Webi report (technically called a 'document') to another.
This will allow you to have different prompts for different reports. -
How to display date and time on jsf page
Hi,
how to display date and time on jsf page
we are using 11.2.0.0 jdeveloper on windows.
thanks
Edited by: user12187801 on 26-Jul-2012 01:42Your question is certainly lacking some information.
If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
If you meant something else, then it's back to you to explain. -
How to display data with the same text and key in the drop down list?
Hi All,
Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
REPORT ZTESTING.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST,
c(20) type c.
* c = 'select any'.
data:begin of itab occurs 0,
kunnr like kna1-kunnr,
name1 like kna1-name1,
end of itab.
data:begin of jtab occurs 0,
kunnr like kna1-kunnr,
land1 like kna1-land1,
end of jtab.
PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
default 'SELECT'.
AT SELECTION-SCREEN OUTPUT.
NAME = 'p_list'.
VALUE-KEY = 'Name'. "---> Data for key is the same with text
VALUE-TEXT = 'Name'. "--> Data for text is the same with key
APPEND VALUE TO LIST.
VALUE-KEY = '2'.
VALUE-TEXT = 'Country'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
start-of-selection.
select kunnr name1 up to 20 rows from kna1 into table itab.
select kunnr land1 up to 20 rows from kna1 into table jtab.
case p_list.
when '1'.
loop at itab.
write:/ itab-kunnr,itab-name1.
endloop.
when '2'.
loop at jtab.
write:/ jtab-kunnr,jtab-land1.
endloop.
endcase.
<Added code tags>
Moderator Message: Please use the "code" tags to format your code snippet.
Edited by: Suhas Saha on Nov 17, 2011 11:19 AMshawnTan wrote:
Hi All,
>
> Would like so to seek for you advice on the above mention topic. How to display the data with the same text and key using function module 'VRM_SET_VALUES'. From my testing by writing a program, this function module will only show the text and key if both have different data. Please find the coding as below. Is the normal behaviour of this function module? How to overcome this problem? Thanks in advance.
>
>
REPORT ZTESTING.
>
> TYPE-POOLS: VRM.
>
> DATA: NAME TYPE VRM_ID,
> LIST TYPE VRM_VALUES,
> VALUE LIKE LINE OF LIST,
> c(20) type c.
>
> * c = 'select any'.
>
> data:begin of itab occurs 0,
> kunnr like kna1-kunnr,
> name1 like kna1-name1,
> end of itab.
>
> data:begin of jtab occurs 0,
> kunnr like kna1-kunnr,
> land1 like kna1-land1,
> end of jtab.
>
> PARAMETERS: p_list(20) AS LISTBOX VISIBLE LENGTH 20
> default 'SELECT'.
>
> AT SELECTION-SCREEN OUTPUT.
>
> NAME = 'p_list'.
>
> VALUE-KEY = 'Name'. "---> Data for key is the same with text
> VALUE-TEXT = 'Name'. "--> Data for text is the same with key
> APPEND VALUE TO LIST.
>
> VALUE-KEY = '2'.
> VALUE-TEXT = 'Country'.
> APPEND VALUE TO LIST.
>
> CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
>
> start-of-selection.
> select kunnr name1 up to 20 rows from kna1 into table itab.
> select kunnr land1 up to 20 rows from kna1 into table jtab.
>
> case p_list.
> when '1'.
> loop at itab.
> write:/ itab-kunnr,itab-name1.
> endloop.
>
> when '2'.
> loop at jtab.
> write:/ jtab-kunnr,jtab-land1.
> endloop.
> endcase.
>
> <Added code tags>
>
> Moderator Message: Please use the "code" tags to format your code snippet.
>
> Edited by: Suhas Saha on Nov 17, 2011 11:19 AM
This surely seems to be a bug to me(if not by design), did you check for any SAP notes? Perhaps a front end trace can help(Note 407743) !
-Rajesh. -
How to display data in Table control?
Hi Experts,
Can anyone please explain me how to display the data from two different tables(those two table is related with 1 field) into a single table control?
For Example: T1 has fields (F1,F2) and
T2 has fields (F3,F4) --> here F3 is foreign key for F1
I need to display the data F1,F2,F3,F4 into the table control.
Can anyone explain me?
Thanks in Advance,
Regards,
RaghuHi,
If F3 is foreign key for F1, then both fields will have same values. Then why do you need to display both F1 and F3? Either one of them is enough. Try the following code.
types: begin of t_table,
F1 type T1-F1,
F2 type T1-F2,
F4 type T2-F4,
end of t_table.
data: i_table type standard table of t_table with header line.
select F1 F2 F4 into table i_table from T1 inner join T2 on T1F1 = T2F3.
You should create three columns in the table control with names i_table-F1, i_table-F2, i_table-F3.
After populating the internal table, refresh the control with the following statement.
REFRESH CONTROL <NAME> FROM SCREEN <SCREEN_NO>.
All the above statements should be in your PBO Module.
Regards,
Hema
Message was edited by:
Sorry, Declarations can be in the common include. Select statement and refresh statement should be in PBO.
Hema Nagarajan -
How to display dates on which the field of an infotype is changed
there are two fields in an infotype and both the fields are changed on different dates then how to display those dates on which the two fields are changed
Hi ankit,
If you want the change log for one infotype with one two fields, then write one custom program with following logic. If you want the log for multiple infotypes for multiple fileds then you have to use that program 'RPUAUD00'. Read the documentation of the program to check how to use it.
select * from pa0000 into table it_pa0000
where pernr = v_pernr.
sort it_pa0000 by begda descending.
loop at it_pa0000 into wa_pa0000.
write your own logic to compare the previous record PERSG with current record PERSG.
if this doesnt match then get the Changed DATE from AEDTM field.
wa_pa0000-AEDTM = changed date.
Else.
continue with loop.
exit.
endloop.
regards,
Shrinivas
Maybe you are looking for
-
Push notification not working anymore on replaced phone
Hi! I'm encountering a problem with Push Notification. My iPhone 4 (iOS 4.3.3) was replaced last friday by an Apple Store. I restored everything on it using the iTunes backup but Push Notificasion seem to be broken now: I don't receive anymore Facebo
-
I can't drag and drop files into a playlist. Any ideas?
As I often do, I went to drag four new files into a playlist in iTunes and suddenly they will not go in. I just get that circle with a diagonal line across indicating that this is not possible. Lately iTunes has been giving me all sorts of problems
-
I have imported all my pics the proper way into iphoto. the thing i didnt do is rename the roll the pics were going in, so the film rolls are recognized by numbers. is there anyway to rename the roll to a title once the roll is created in iphoto. tha
-
Добрый день. Возникла проблема с телефоном iPhone 4s. При наборе номера кнопка звонка не активна. Помогает полная перепрошивка телефона. Установлена iOS 5.0.1. Как решить эту проблему. Это происходит раз в неделю.
-
Upload HR master data Parmanent Address & home address by a BDC Program.
Hi exparts, I writte a BDC program to upload HR master data for tcode PA30. But I can upload parmanet address with this program. I want to upload parmanent address then home address . Can anybody help , how can I upload Parmanent Address & home addr