Displaying the date
I'm trying to display the date in my own format.
I know I can use:
the date
the abbr date
_system.date()
Is there a way I can decide the forrmat I can display the
date?
For example:
Mon, Jan 1, 2007
or
Jan 1, Mon, 2007
or
Monday, January 1, 2007
or
whatever?
Thanks.
Hi Luke,
Nice script you have there. Mind if I use it too?:) Well,
have already tested it
out. I see you leftt out an abreviated month. You have the
numereical value of
the month with and without a 0, but no 3 character month. Not
too hard to add. I
added it but had to use a different letter to that specified
in:
http://au.php.net/manual/en/function.date.php
as you had used that letter already.
regards
Dean
Director Lecturer / Consultant
http://www.fbe.unsw.edu.au/learning/director
http://www.multimediacreative.com.au
Similar Messages
-
View the .rtf file not display the data in BI Publisher Enterprise.
Hi,
Platform: OBIEE 10g in NT XPsp2
View the .rtf file not display the data in BI Publisher Enterprise.
Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
It is showing only the .rtf file without data. Why there is no data?
Please guide me to solve this issue.
Thanks,
JoThanks for you reply,
Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
We dint face this kind of issue while developing other reports.
So please let us know if you have any idea on why we are facing this issue.
Regards,
Maneesh -
Strange scenario,Oracle can not display the data in mysql correctly
I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
-------mysql------------
mysql> create table tst(id int,name varchar(10));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into tst values(1,'a');
Query OK, 1 row affected (0.00 sec)
mysql> select * from tst;
------------+
| id | name |
------------+
| 1 | a |
------------+
1 row in set (0.00 sec)
mysql> show create table tst\G
*************************** 1. row ***************************
Table: tst
Create Table: CREATE TABLE `tst` (
`id` int(11) DEFAULT NULL,
`name` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
-------------oracle ------------------
SQL> select count(*) from "tst"@mysql;
COUNT(*)
49
SQL> select * from "tst"@mysql;
id
1
SQL> desc "tst"@mysql;
Name Null? Type
id NUMBER(10)You can make the following query on the result page:
"select * from the_table where movietitle = ? and cinema = ?"
then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
Below is the sample code, it assumes you have a connection to the database:
PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
stat.setString(1, usersMovieTitleSelection);
stat.setString(2, usersCinemaSelection);
ResultSet res = stat.executeQuery();
if (res.next()) {
out.print("The movie is available");
} else {
out.print("The movie is not available");
}Now just add that to your JSP page. Enjoy ! =) -
Hi All,
I can able to display the data through the FM REUSE_ALV_GRID_DISPLAY in the out put screen.When I click on the Microsoft Excel (CtrlShiftF7) at the ALV toolbar to view the same data in excel sheet it does open the excel sheet WITHOUT ANY DATA. Please help me how to make the data visible in the excel sheet.
Can anyone help in this regard.
Thanks & Regards,
Seshadri GHi,
Check whether the tool bar export is disabled in the alv.
check in the alv->set_table_for_first_display FM the toolbar exclude export list.
If that is ok, then try download manually by providing abutton and clicking it. You can download data manually in this way.
refer the code below.
DATA: lv_path TYPE string,
lv_fullpath TYPE string,
lc_c TYPE string,
v_fnam TYPE string,
lc_date(15) TYPE c.
TYPES: BEGIN OF ts_fieldnames,
field_name(1000),
END OF ts_fieldnames.
lc_c = 'C:\'.
WRITE sy-datum TO lc_date.
DATA:lt_fieldnames TYPE STANDARD TABLE OF ts_fieldnames,
ls_fieldnames TYPE ts_fieldnames,
lt_fieldnames1 TYPE STANDARD TABLE OF ts_fieldnames,
ls_fieldnames1 TYPE ts_fieldnames,
lt_fieldnames2 TYPE STANDARD TABLE OF ts_fieldnames,
ls_fieldnames2 TYPE ts_fieldnames,
lt_fieldnames3 TYPE STANDARD TABLE OF ts_fieldnames,
ls_fieldnames3 TYPE ts_fieldnames,
lt_fieldnames5 TYPE STANDARD TABLE OF ts_fieldnames,
ls_fieldnames5 TYPE ts_fieldnames.
CONCATENATE 'ContractAccount'
'DocumentNumber'
'Reference/InvoiceDocumentNumber'
'ClearingDocumentNumber'
INTO ls_fieldnames-field_name SEPARATED BY
cl_abap_char_utilities=>horizontal_tab.
APPEND ls_fieldnames TO lt_fieldnames.
CONCATENATE '' ''
INTO ls_fieldnames5-field_name SEPARATED BY
cl_abap_char_utilities=>newline.
APPEND ls_fieldnames5 TO lt_fieldnames5.
DATA : ls_str1 TYPE string,
ls_str2 TYPE string.
ls_str1 = 'Invoice Clearing Posting'.
ls_str2 = 'Payment On Account Posting'.
CONCATENATE ls_str1 ' :: ' lc_date INTO ls_fieldnames2-field_name.
APPEND ls_fieldnames2 TO lt_fieldnames2.
CONCATENATE ls_str2 ' :: ' lc_date INTO ls_fieldnames3-field_name.
APPEND ls_fieldnames3 TO lt_fieldnames3.
CONCATENATE 'ContractAccount'
'Reference/InvoiceDocumentNumber'
'PostOnAccountDocumentNumber'
INTO ls_fieldnames1-field_name SEPARATED BY
cl_abap_char_utilities=>horizontal_tab.
APPEND ls_fieldnames1 TO lt_fieldnames1.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
window_title = 'Select file for download'
default_extension = '.xls'
default_file_name = lv_path
initial_directory = lc_c
CHANGING
filename = lv_path
path = lc_c
fullpath = lv_fullpath
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
v_fnam = lv_fullpath.
ENDIF.
IF v_fnam IS INITIAL.
RETURN.
ENDIF.
IF i_finalclear[] IS NOT INITIAL.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = v_fnam
filetype = 'DAT'
HEADER = header
append = 'X'
write_field_separator = 'X'
CHANGING
data_tab = lt_fieldnames2
EXCEPTIONS
OTHERS = 8.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = v_fnam
filetype = 'DAT'
HEADER = header
append = 'X'
write_field_separator = 'X'
CHANGING
data_tab = lt_fieldnames
EXCEPTIONS
OTHERS = 8.
REgards
sheron -
Cannot display the data from a varaible in front end
hi,
i not able to display the data in the table from the variable.
steps how the module should work.
In OEO:
1. data to be accepted from user, values to be passed to the program in database according to the data accepted.
In Oracle Express:
2. values is accepted in database program as arguments. according to arguments the limits are applied and calculation is made for leaf level and then assigned to variable
3. rollup is called in database program.
In OEO:
4. the data is shown in tables here the user can limit his view of the data according to his needs.
my problem:
the data acceptence from oeo is working fine and the backend or the database part(program, rolllups etc) are working fine. when values are passed thru express command box the program is working fine.
i am not able to get the calculated data form the variable which stores it and display in the table. the database connectivity is fine.
note: the display of data in table is in other page not in the data acceptence page.
pls also let me know how to check in oracle administrator whether the values sent from oeo and accepted in backend properly.
i will be thankfull if any helps me out to solve this problem.
naveenhi,
i not able to display the data in the table from the variable.
steps how the module should work.
In OEO:
1. data to be accepted from user, values to be passed to the program in database according to the data accepted.
In Oracle Express:
2. values is accepted in database program as arguments. according to arguments the limits are applied and calculation is made for leaf level and then assigned to variable
3. rollup is called in database program.
In OEO:
4. the data is shown in tables here the user can limit his view of the data according to his needs.
my problem:
the data acceptence from oeo is working fine and the backend or the database part(program, rolllups etc) are working fine. when values are passed thru express command box the program is working fine.
i am not able to get the calculated data form the variable which stores it and display in the table. the database connectivity is fine.
note: the display of data in table is in other page not in the data acceptence page.
pls also let me know how to check in oracle administrator whether the values sent from oeo and accepted in backend properly.
i will be thankfull if any helps me out to solve this problem.
naveen -
Calculating the total in alv and displaying the date
Hi,
I am trying to calculate the totals of netwr and fkimg in a report but the following coding cannot giv me the right answer so if there is anyone with the solution for this problem may you please help me out and how can i display the date on my report......here is my coding:
REPORT Z_DAILY_STOCK_NEW.
TYPE-POOLS: SLIS.
TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
ALV FIELDS
DATA: it_fieldcat TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
total ref to data.
t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
DEFINITION OF AN INTERNAL TABLE
DATA: begin of i_stocktab occurs 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
end of i_stocktab.
START OF SELECTION
SELECT vbrkkunag kna1name1 kna1ort01 vbrkinco1 vbrp~vkgrp
vbrpfkimg vbrknetwr
FROM kna1 inner join vbrk on kna1kunnr EQ vbrkkunrg
inner join vbak on kna1kunnr EQ vbakkunnr
inner join vbrp on vbrkvbeln EQ vbrpvbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'INC01'.
it_fieldcat-seltext_m = 'Incoterms'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
*it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
if sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
endif.
ENDFORM.
*FORM calc_total.
LOOP AT it_fieldcat into wa_fieldcat
WHERE fieldname EQ 'FKIMG' OR
fieldname EQ 'NETWR'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-datatype = 'QUAT'.
modify it_fieldcat from wa_fieldcat.
ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
FORM calc_total.
DATA: total type ref to data,
subtotal1 type ref to data.
field-symbols <fkimg> like sflight.
field-symbols <netwr> like sflight.
call method grid1-> get_subtotals
importing
ep_collect00 = subtotal
ep_collect01 = total.
assign total to <fkimg>.
assign total to <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = gr_repid
I_CALLBACK_USER_COMMAND = slis_ev_user_command
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE' " see FORM
IS_LAYOUT = gr_layout
IT_FIELDCAT = it_fieldcat[]
IT_SPECIAL_GROUPS = gr_tab_group
I_SAVE = 'X'
IT_EVENTS = gr_events
IS_PRINT = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM.Try This
REPORT z_daily_stock_new.
TYPE-POOLS: slis.
* TABLES
TABLES: vbrk, kna1,vbrp,vbap,vbak, sflight.
* ALV FIELDS
DATA: it_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: w_cnt LIKE sy-tabix.
* total ref to data.
* t_alv LIKE TABLE OF s_error WITH HEADER LINE.
DATA: gr_layout TYPE slis_layout_alv,
gr_tab_group TYPE slis_t_sp_group_alv,
gr_repid LIKE sy-repid,
gr_events TYPE slis_t_event,
gr_print TYPE slis_print_alv,
gr_user TYPE slis_formname VALUE 'USER_COMMAND'.
* SELECTION SCREEN
SELECT-OPTIONS:
s_werks FOR vbrp-werks,
s_auart FOR vbak-auart.
* DEFINITION OF AN INTERNAL TABLE
DATA: BEGIN OF i_stocktab OCCURS 0,
kunag LIKE vbrk-kunag,
name1 LIKE kna1-name1,
ort01 LIKE kna1-ort01,
inco1 LIKE vbrk-inco1,
vkgrp LIKE vbrp-vkgrp,
fkimg LIKE vbrp-fkimg,
netwr LIKE vbrk-netwr,
END OF i_stocktab.
* START OF SELECTION
SELECT vbrk~kunag kna1~name1 kna1~ort01 vbrk~inco1 vbrp~vkgrp
vbrp~fkimg vbrk~netwr
FROM kna1 INNER JOIN vbrk ON kna1~kunnr EQ vbrk~kunrg
INNER JOIN vbak ON kna1~kunnr EQ vbak~kunnr
INNER JOIN vbrp ON vbrk~vbeln EQ vbrp~vbeln
INTO i_stocktab
WHERE vbrp~werks IN s_werks
AND vbak~auart IN s_auart.
APPEND i_stocktab.
ENDSELECT.
*DATA tb_alv TYPE i_stocktab WITH HEADER LINE.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_event.
PERFORM build_print.
PERFORM calc_total.
PERFORM display_alv_report.
* FORM build_fieldcatalog *
FORM build_fieldcatalog.
w_cnt = 1.
it_fieldcat-fieldname = 'KUNAG'.
it_fieldcat-seltext_m = 'Soldtp'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-key = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'NAME1'.
it_fieldcat-seltext_m = 'Name'.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'ORT01'.
it_fieldcat-seltext_m = 'City'.
it_fieldcat-col_pos = w_cnt.
it_fieldcat-emphasize = 'X'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
* w_cnt = w_cnt + 1.
* it_fieldcat-fieldname = 'INC01'.
* it_fieldcat-seltext_m = 'Incoterms'.
* it_fieldcat-emphasize = 'X'.
* APPEND it_fieldcat TO it_fieldcat.
* CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'VKGRP'.
it_fieldcat-seltext_m = 'Sales Group'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
it_fieldcat-fieldname = 'FKIMG'.
it_fieldcat-seltext_m = 'Invoiced Qty'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'FKIMG' .
it_fieldcat-do_sum = 'X' .
* *it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
w_cnt = w_cnt + 1.
clear it_fieldcat .
it_fieldcat-fieldname = 'NETWR'.
it_fieldcat-seltext_m = 'Invoiced Value'.
it_fieldcat-emphasize = 'X'.
it_fieldcat-ref_tabname = 'VBRP' .
it_fieldcat-ref_fieldname = 'NETWR' .
it_fieldcat-do_sum = 'X' .
* it_fieldcat-do_sum = 'x'.
APPEND it_fieldcat TO it_fieldcat.
CLEAR it_fieldcat.
ENDFORM.
* FORM build_layout *
FORM build_layout.
gr_layout-no_input = 'X'.
gr_layout-colwidth_optimize = 'X'.
gr_layout-totals_text = 'Totals: '(201).
gr_layout-detail_popup = 'X'.
ENDFORM.
* FORM build_event *
FORM build_event.
DATA i_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gr_events[].
READ TABLE gr_events WITH KEY name = slis_ev_user_command
INTO i_event.
IF sy-subrc = 0.
MOVE gr_user TO i_event-form.
APPEND i_event TO gr_events.
ENDIF.
ENDFORM.
*FORM calc_total.
* LOOP AT it_fieldcat into wa_fieldcat
* WHERE fieldname EQ 'FKIMG' OR
* fieldname EQ 'NETWR'.
* wa_fieldcat-do_sum = 'X'.
* wa_fieldcat-datatype = 'QUAT'.
* modify it_fieldcat from wa_fieldcat.
* ENDLOOP.
*ENDFORM.
FORM build_print.
gr_print-reserve_lines = '2'.
gr_print-no_coverpage = 'X'.
ENDFORM.
* FORM calc_total *
FORM calc_total.
DATA: total TYPE REF TO data,
subtotal1 TYPE REF TO data.
* FIELD-SYMBOLS <fkimg> LIKE sflight.
* FIELD-SYMBOLS <netwr> LIKE sflight.
* CALL METHOD grid1-> get_subtotals
* IMPORTING
* ep_collect00 = subtotal
* ep_collect01 = total.
* ASSIGN total TO <fkimg>.
* ASSIGN total TO <netwr>.
ENDFORM.
*& FUNCTION ALV DISPLAY
FORM display_alv_report.
gr_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gr_repid
i_callback_user_command = slis_ev_user_command
i_callback_top_of_page = 'TOP-OF-PAGE' " see FORM
is_layout = gr_layout
it_fieldcat = it_fieldcat[]
it_special_groups = gr_tab_group
i_save = 'X'
it_events = gr_events
is_print = gr_print
TABLES
t_outtab = i_stocktab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
* FORM top-of-page *
FORM top-of-page.
*ALV Header deaclarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc TYPE c.
*Title
wa_header-typ = 'H'.
wa_header-info = 'Report for daily Stock Returns'.
APPEND wa_header TO t_header.
CLEAR wa_header.
*Total No. Records Selected
DESCRIBE TABLE i_stocktab LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected:' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
ENDFORM. -
How can I display the data in table in separate column?
I have a vi reading data one by one in the same column.
How can I display the data with separate column?
like this:
data 1 | read | read
data 2 | read | read
data 3 | read | read
(would you mind if I will ask for an example
because it is much easier for me to work
with an example)
THANK YOU.If you're reading your data in as a 1D array, this is as simple as using the Reshape Array to make a 2D array. I've attached an example in LabVIEW 6.1 format. The example rearranges a single column of data fill several columns horizontally, but you can easily modify this code to fill the columns downward instead.
Attachments:
Data_Column_Example.vi 18 KB -
Is there a way to display the date and time on my officejet 6500
HP Officejet 6500a Plus Windows XP_ Is there a way to display the date and time on the display of my printer
Are you referring to the Date and Time some cameras put right on the image? If so there is nothing really good in iPhoto to do this. You could try the Retouch tool and see how that looks but I think you will need something more precise and powerful, like the clone tool in Aperture.
Also something like PhotoShop or GIMP - The GNU Image Manipulation Program (free) should do what you want also.
If your asking about some other date post back.
regards -
How to display the data in row wise in smartform
Hi,
I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the
column wise. Actually there is a text which i want to display the data row wise.
It is possible to display the data in row wise of the text .
Edited by: nav009 on Oct 8, 2009 10:39 AMHello ,
I assume that your requiremen is related to smartform.the below is the solution i suggest.
As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
I assume you are aware of creating of line types for table.
Thanks
M.Naveen. -
How to display the data monthwise in the following report
see the following report. i will give u the code
if we go to fd10n then we see the monthwise debit,credit and the outstanding amount . i want to display the data monthwise in my report. means if i select the first month then it will dislpay only month of april debit, credit, and the outstanding amount.
if anyone know the answer then please help me.
Thanks.
Dinesh
*& Report ZCUSTOMER_GROUP
REPORT ZCUSTOMER_GROUP NO STANDARD PAGE HEADING.
TABLES: KNA1,KNVV,KNB1,T151T,T685T,KNVI,TSKDT,BSID,T001,KNC1,KNC3.
TYPE-POOLS: SLIS.
TYPES: BEGIN OF IT_FINAL,
BZIRK LIKE KNVV-BZIRK,
VKBUR LIKE KNVV-VKBUR,
KDGRP LIKE KNVV-KDGRP,
KUNNR LIKE KNVV-KUNNR,
VKORG LIKE KNVV-VKORG,
VTWEG LIKE KNVV-VTWEG,
SPART LIKE KNVV-SPART,
KTGRD LIKE KNVV-KTGRD,
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
STCEG LIKE KNA1-STCEG,
REGIO LIKE KNA1-REGIO,
STRAS LIKE KNA1-STRAS,
TELF1 LIKE KNA1-TELF1,
WERKS LIKE KNA1-WERKS,
SPRAS TYPE SPRAS,
GFORM LIKE KNA1-GFORM,
LAND1 LIKE KNA1-LAND1,
ALTKN LIKE KNB1-ALTKN,
AKONT LIKE KNB1-AKONT,
VZSKZ TYPE KNB1-VZSKZ,
VTEXT LIKE T685T-VTEXT,
KTEXT LIKE T151T-KTEXT,
TATYP TYPE KNVI-TATYP,
TAXKD TYPE KNVI-TAXKD,
taxkd type tskdt-taxkd,
tatyp type tskdt-tatyp,
VTEXT TYPE TSKDT-VTEXT,
UMSKZ LIKE BSID-UMSKZ,
DMBTR TYPE BSID-DMBTR,
coll LIKE bsid-dmbtr,
coll1 LIKE bsid-dmbtr,
coll2 LIKE bsid-dmbtr,
coll3 LIKE bsid-dmbtr,
advance LIKE bsid-dmbtr,
deposit LIKE bsid-dmbtr,
amount type bsid-dmbtr,
shkzg type bsid-shkzg,
blart type bsid-blart,
BUDAT TYPE BSID-BUDAT,
BLDAT TYPE BSID-BLDAT,
GJAHR LIKE BSID-GJAHR,
outstand LIKE bsid-dmbtr,
debit like bsid-dmbtr,
UM01S LIKE KNC1-UM01S,
UM02S LIKE KNC1-UM02S,
UM03S LIKE KNC1-UM03S,
UM04S LIKE KNC1-UM04S,
UM05S LIKE KNC1-UM05S,
UM06S LIKE KNC1-UM06S,
UM07S LIKE KNC1-UM07S,
UM08S LIKE KNC1-UM08S,
UM09S LIKE KNC1-UM09S,
UM10S LIKE KNC1-UM10S,
UM11S LIKE KNC1-UM11S,
UM12S LIKE KNC1-UM12S,
UM13S LIKE KNC1-UM13S,
UM14S LIKE KNC1-UM14S,
UM15S LIKE KNC1-UM15S,
UM16S LIKE KNC1-UM16S,
DEBIT LIKE KNC1-UM01S,
GJAHR LIKE KNC1-GJAHR,
DEBIT TYPE STRING,
UM01H LIKE KNC1-UM01H,
UM02H LIKE KNC1-UM02H,
UM03H LIKE KNC1-UM03H,
UM04H LIKE KNC1-UM04H,
UM05H LIKE KNC1-UM05H,
UM06H LIKE KNC1-UM06H,
UM07H LIKE KNC1-UM07H,
UM08H LIKE KNC1-UM08H,
UM09H LIKE KNC1-UM09H,
UM10H LIKE KNC1-UM10H,
UM11H LIKE KNC1-UM11H,
UM12H LIKE KNC1-UM12H,
UM13H LIKE KNC1-UM13H,
UM14H LIKE KNC1-UM14H,
UM15H LIKE KNC1-UM15H,
UM16H LIKE KNC1-UM16H,
CREDIT TYPE STRING,
UMSAV LIKE KNC1-UMSAV,
GJAHR LIKE KNC1-GJAHR,
SHBKZ LIKE KNC3-SHBKZ,
SALDV LIKE KNC3-SALDV,
SOLLL LIKE KNC3-SOLLL,
HABNL LIKE KNC3-HABNL,
DOWN TYPE STRING,
DEPOSIT TYPE STRING,
COLL TYPE STRING,
END OF IT_FINAL.
TYPES : BEGIN OF IT_KNVV ,
BZIRK LIKE KNVV-BZIRK,
VKBUR LIKE KNVV-VKBUR,
KDGRP LIKE KNVV-KDGRP,
KUNNR LIKE KNVV-KUNNR,
VKORG LIKE KNVV-VKORG,
VTWEG LIKE KNVV-VTWEG,
SPART LIKE KNVV-SPART,
KTGRD LIKE KNVV-KTGRD,
END OF IT_KNVV.
TYPES: BEGIN OF IT_KNA1 ,
NAME1 LIKE KNA1-NAME1,
ORT01 LIKE KNA1-ORT01,
STCEG LIKE KNA1-STCEG,
REGIO LIKE KNA1-REGIO,
STRAS LIKE KNA1-STRAS,
TELF1 LIKE KNA1-TELF1,
WERKS LIKE KNA1-WERKS,
KUNNR LIKE KNA1-KUNNR,
GFORM LIKE KNA1-GFORM,
SPRAS TYPE SPRAS,
LAND1 LIKE KNA1-LAND1,
END OF IT_KNA1.
TYPES: BEGIN OF IT_KNB1 ,
ALTKN LIKE KNB1-ALTKN,
AKONT LIKE KNB1-AKONT,
VZSKZ TYPE KNB1-VZSKZ,
KUNNR LIKE KNB1-KUNNR,
END OF IT_KNB1.
TYPES: BEGIN OF IT_T151T ,
KTEXT LIKE T151T-KTEXT,
KDGRP LIKE T151T-KDGRP,
SPRAS TYPE SPRAS,
END OF IT_T151T.
DATA: BEGIN OF IT_T685T OCCURS 0,
VTEXT LIKE T685T-VTEXT,
spras type spras,
END OF IT_T685T.
TYPES: BEGIN OF IT_KNVI ,
TAXKD TYPE KNVI-TAXKD,
TATYP TYPE KNVI-TATYP,
KUNNR TYPE KNVI-KUNNR,
END OF IT_KNVI.
TYPES: BEGIN OF IT_TSKDT ,
TAXKD TYPE TSKDT-TAXKD,
TATYP TYPE tskdt-TATYP,
VTEXT TYPE TSKDT-TATYP,
SPRAS TYPE SPRAS,
END OF IT_TSKDT.
TYPES: BEGIN OF IT_BSID ,
UMSKZ TYPE BSID-UMSKZ,
DMBTR TYPE BSID-DMBTR,
COLL LIKE BSID-DMBTR,
COLL1 LIKE BSID-DMBTR,
COLL2 LIKE BSID-DMBTR,
COLL3 LIKE BSID-DMBTR,
ADVANCE LIKE BSID-DMBTR,
DEPOSIT LIKE BSID-DMBTR,
SHKZG TYPE BSID-SHKZG,
KUNNR TYPE BSID-KUNNR,
BUDAT TYPE BSID-BUDAT,
BLART TYPE BSID-BLART,
OUTSTAND LIKE BSID-DMBTR,
GJAHR LIKE BSID-GJAHR,
END OF IT_BSID.
TYPES : BEGIN OF IT_KNC1,
UM01S LIKE KNC1-UM01S,
UM02S LIKE KNC1-UM02S,
UM03S LIKE KNC1-UM03S,
UM04S LIKE KNC1-UM04S,
UM05S LIKE KNC1-UM05S,
UM06S LIKE KNC1-UM06S,
UM07S LIKE KNC1-UM07S,
UM08S LIKE KNC1-UM08S,
UM09S LIKE KNC1-UM09S,
UM10S LIKE KNC1-UM10S,
UM11S LIKE KNC1-UM11S,
UM12S LIKE KNC1-UM12S,
UM13S LIKE KNC1-UM13S,
UM14S LIKE KNC1-UM14S,
UM15S LIKE KNC1-UM15S,
UM16S LIKE KNC1-UM16S,
DEBIT LIKE KNC1-UM01S,
DEBIT TYPE STRING,
UM01H LIKE KNC1-UM01H,
UM02H LIKE KNC1-UM02H,
UM03H LIKE KNC1-UM03H,
UM04H LIKE KNC1-UM04H,
UM05H LIKE KNC1-UM05H,
UM06H LIKE KNC1-UM06H,
UM07H LIKE KNC1-UM07H,
UM08H LIKE KNC1-UM08H,
UM09H LIKE KNC1-UM09H,
UM10H LIKE KNC1-UM10H,
UM11H LIKE KNC1-UM11H,
UM12H LIKE KNC1-UM12H,
UM13H LIKE KNC1-UM13H,
UM14H LIKE KNC1-UM14H,
UM15H LIKE KNC1-UM15H,
UM16H LIKE KNC1-UM16H,
CREDIT TYPE STRING,
UMSAV LIKE KNC1-UMSAV,
KUNNR LIKE KNC1-KUNNR,
GJAHR LIKE KNC1-GJAHR,
END OF IT_KNC1.
TYPES : BEGIN OF IT_KNC3,
SHBKZ LIKE KNC3-SHBKZ,
SALDV LIKE KNC3-SALDV,
SOLLL LIKE KNC3-SOLLL,
HABNL LIKE KNC3-HABNL,
KUNNR LIKE KNC3-KUNNR,
GJAHR LIKE KNC3-GJAHR,
DOWN TYPE STRING,
DEPOSIT TYPE STRING,
END OF IT_KNC3.
*INTERNAL TABLE DECLARATION
DATA: I_FINAL TYPE STANDARD TABLE OF IT_FINAL,
I_KNVV TYPE STANDARD TABLE OF IT_KNVV,
I_KNA1 TYPE STANDARD TABLE OF IT_KNA1,
I_KNB1 TYPE STANDARD TABLE OF IT_KNB1,
I_T151T TYPE STANDARD TABLE OF IT_T151T,
I_KNVI TYPE STANDARD TABLE OF IT_KNVI,
I_TSKDT TYPE STANDARD TABLE OF IT_TSKDT,
I_BSID TYPE STANDARD TABLE OF IT_BSID,
I_KNC1 TYPE STANDARD TABLE OF IT_KNC1,
I_KNC3 TYPE STANDARD TABLE OF IT_KNC3.
*DECLARATION FOR THE WORK AREA
DATA: WA_FINAL TYPE IT_FINAL,
WA_KNVV TYPE IT_KNVV,
WA_KNA1 TYPE IT_KNA1,
WA_KNB1 TYPE IT_KNB1,
WA_T151T TYPE IT_T151T,
WA_KNVI TYPE IT_KNVI,
WA_TSKDT TYPE IT_TSKDT,
WA_BSID TYPE IT_BSID,
WA_KNC1 TYPE IT_KNC1,
WA_KNC3 TYPE IT_KNC3.
DECLARATION FOR THE FIELD CATALOG.
DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
WA_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GD_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA GD_REPID LIKE SY-REPID.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
BREAK-POINT.
SELECT-OPTIONS: CUST_GRP FOR KNVV-KDGRP.
SELECT-OPTIONS: SALES_OF FOR KNVV-VKBUR.
SELECT-OPTIONS: REGION FOR KNA1-REGIO.
SELECT-OPTIONS: DATE FOR BSID-BLDAT.
SELECT-OPTIONS: YEAR FOR KNC1-GJAHR.
SELECT-OPTIONS: CUST_NO FOR KNVV-KUNNR.
SELECTION-SCREEN :END OF BLOCK B1.
* DECLARATION FOR THE SUBROUTIN FOR BASIC LIST.
PERFORM data_retrival.
PERFORM F_GET_I_KNVV_DATA.
PERFORM F_GET_I_KNA1_DATA.
PERFORM F_GET_I_KNB1_DATA.
PERFORM F_GET_I_T151T_DATA.
*PERFORM F_GET_IT_T685T_DATA.
PERFORM F_GET_I_KNVI_DATA.
PERFORM F_GET_I_TSKDT_DATA.
PERFORM F_GET_I_BSID_DATA.
PERFORM F_GET_I_KNC1_DATA.
PERFORM F_GET_I_KNC3_DATA.
PERFORM F_GET_I_FINAL_DATA.
PERFORM DATA_BUILD.
PERFORM DATA_CALL.
FORM F_GET_I_KNVV_DATA.
SELECT BZIRK KDGRP KTGRD KUNNR SPART VKBUR VKORG VTWEG
FROM KNVV
INTO CORRESPONDING FIELDS OF TABLE I_KNVV
WHERE KDGRP IN CUST_GRP AND VKBUR IN SALES_OF AND KUNNR IN CUST_NO.
ENDFORM.
FORM F_GET_I_KNA1_DATA.
SELECT KUNNR NAME1 ORT01 REGIO STCEG STRAS TELF1 WERKS GFORM SPRAS LAND1
FROM KNA1
INTO CORRESPONDING FIELDS OF TABLE I_KNA1 FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND REGIO IN REGION AND LAND1 = 'IN' .
ENDFORM.
FORM F_GET_I_KNB1_DATA.
SELECT ALTKN AKONT VZSKZ KUNNR
FROM KNB1
INTO CORRESPONDING FIELDS OF TABLE I_KNB1 FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR.
ENDFORM.
FORM F_GET_I_T151T_DATA.
SELECT KTEXT KDGRP SPRAS
FROM T151T
INTO CORRESPONDING FIELDS OF TABLE I_T151T FOR ALL ENTRIES IN I_KNVV
WHERE KDGRP = I_KNVV-KDGRP AND SPRAS = 'E' .
ENDFORM.
*FORM F_GET_IT_T685T_DATA.
*select vtext spras
*from t685t
*into CORRESPONDING FIELDS OF TABLE it_t685t for all entries in it_kna1
where spras = it_kna1-spras and spras = 'E'.
*endform.
FORM F_GET_I_KNVI_DATA.
SELECT TAXKD TATYP KUNNR
FROM KNVI
INTO CORRESPONDING FIELDS OF TABLE I_KNVI FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR
AND TAXKD = '8' OR TAXKD = '3' OR TAXKD = '0'
AND TATYP = 'Z1AU' OR TATYP = 'ZCST'.
*and ( taxkd = '8' or taxkd = '0' or taxkd = '3')
and ( tatyp = 'Z1AU' OR TATYP = 'ZCST' ).
ENDFORM.
FORM F_GET_I_TSKDT_DATA.
SELECT VTEXT TAXKD SPRAS FROM
TSKDT
INTO CORRESPONDING FIELDS OF TABLE I_TSKDT FOR ALL ENTRIES IN I_KNVI
WHERE TAXKD = I_KNVI-TAXKD AND SPRAS = 'E'.
ENDFORM.
FORM F_GET_I_BSID_DATA.
*DATA: DMBTR TYPE BSID-DMBTR,
OUTSTAND LIKE BSID-DMBTR.
SELECT UMSKZ DMBTR SHKZG KUNNR BLART GJAHR BUDAT BLDAT
FROM BSID
INTO CORRESPONDING FIELDS OF TABLE I_BSID
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND BLDAT IN DATE.
*AND ( BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1' )
*and umskz = 'A' or umskz = 'L' OR UMSKZ = ''
*AND SHKZG = 'S' OR SHKZG = 'H'.
ENDFORM.
FORM F_GET_I_KNC1_DATA.
SELECT UM01S UM02S UM03S UM04S UM05S UM06S UM07S UM08S UM09S UM10S UM11S UM12S UM13S UM14S UM15S UM16S
UM01H UM02H UM03H UM04H UM05H UM06H UM07H UM08H UM09H UM10H UM11H UM12H UM13H UM14H UM15H UM16H
UMSAV KUNNR GJAHR
FROM KNC1
INTO CORRESPONDING FIELDS OF TABLE I_KNC1
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR AND GJAHR IN YEAR .
ENDFORM.
FORM F_GET_I_KNC3_DATA.
SELECT KUNNR GJAHR SHBKZ SALDV SOLLL HABNL
FROM KNC3
INTO CORRESPONDING FIELDS OF TABLE I_KNC3
FOR ALL ENTRIES IN I_KNVV
WHERE KUNNR = I_KNVV-KUNNR
AND SHBKZ = 'A' OR SHBKZ = 'L'.
ENDFORM.
FORM F_GET_I_FINAL_DATA.
*BREAK-POINT.
LOOP AT I_KNVV INTO WA_KNVV.
CLEAR WA_FINAL.
WA_FINAL-BZIRK = WA_KNVV-BZIRK.
WA_FINAL-VKBUR = WA_KNVV-VKBUR.
WA_FINAL-KDGRP = WA_KNVV-KDGRP.
WA_FINAL-KUNNR = WA_KNVV-KUNNR.
WA_FINAL-VKORG = WA_KNVV-VKORG.
WA_FINAL-VTWEG = WA_KNVV-VTWEG.
WA_FINAL-SPART = WA_KNVV-SPART.
WA_FINAL-KTGRD = WA_KNVV-KTGRD.
READ TABLE I_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNVV-KUNNR.
WA_FINAL-NAME1 = WA_KNA1-NAME1.
WA_FINAL-ORT01 = WA_KNA1-ORT01.
WA_FINAL-STCEG = WA_KNA1-STCEG.
WA_FINAL-REGIO = WA_KNA1-REGIO.
WA_FINAL-STRAS = WA_KNA1-STRAS.
WA_FINAL-TELF1 = WA_KNA1-TELF1.
WA_FINAL-WERKS = WA_KNA1-WERKS.
WA_FINAL-GFORM = WA_KNA1-GFORM.
WA_FINAL-LAND1 = WA_KNA1-LAND1.
IF SY-SUBRC = 0.
ENDIF.
READ TABLE I_KNB1 INTO WA_KNB1 WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-ALTKN = WA_KNB1-ALTKN.
WA_FINAL-AKONT = WA_KNB1-AKONT.
WA_FINAL-VZSKZ = WA_KNB1-VZSKZ.
ENDIF.
READ TABLE I_T151T INTO WA_T151T WITH KEY KDGRP = WA_KNVV-KDGRP .
IF SY-SUBRC = 0.
WA_FINAL-KTEXT = WA_T151T-KTEXT.
ENDIF.
READ TABLE I_KNVI INTO WA_KNVI WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-TAXKD = WA_KNVI-TAXKD.
WA_FINAL-TATYP = WA_KNVI-TATYP.
ENDIF.
READ TABLE I_TSKDT INTO WA_TSKDT WITH KEY TAXKD = WA_KNVI-TAXKD
WA_FINAL-VTEXT = WA_TSKDT-VTEXT.
*UP TO THIS POINT REPORT IS OK
*read table I_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'A' .
*if sy-subrc = 0.
*WA_final-DOWN = WA_bsid-dmbtr * -1.
**modify i_final.
**clear it_bsid.
*endif.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'L' .
*if sy-subrc = 0.
*WA_final-deposit = WA_bsid-dmbtr * -1.
*endif.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'DZ' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll1 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'HR' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll2 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
blart = 'P1' .
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll3 = WA_bsid-dmbtr * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr.
**IF BLART = 'HR' OR BLART = 'DZ' OR BLART = 'P1'.
*if sy-subrc = 0.
*WA_final-coll = ( WA_final-coll1 + WA_final-coll2 + WA_final-coll3 ) - ( wa_final-deposit ) * -1.
*ENDIF.
*read table i_bsid INTO WA_BSID with key kunnr = WA_kna1-kunnr
UMSKZ = 'L' .
*if sy-subrc = 0.
*WA_final-deposit = WA_bsid-dmbtr * -1.
*endif.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM01S = WA_KNC1-UM01S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM02S = WA_KNC1-UM02S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM03S = WA_KNC1-UM03S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM04S = WA_KNC1-UM04S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM05S = WA_KNC1-UM05S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM06S = WA_KNC1-UM06S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM07S = WA_KNC1-UM07S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM08S = WA_KNC1-UM08S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM09S = WA_KNC1-UM09S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM10S = WA_KNC1-UM10S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM11S = WA_KNC1-UM11S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM12S = WA_KNC1-UM12S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM13S = WA_KNC1-UM13S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM14S = WA_KNC1-UM14S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM15S = WA_KNC1-UM15S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM16S = WA_KNC1-UM16S.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR .
IF SY-SUBRC = 0.
WA_FINAL-DEBIT = WA_KNC1-UM01S + WA_KNC1-UM02S + WA_KNC1-UM03S + WA_KNC1-UM04S + WA_KNC1-UM05S + WA_KNC1-UM06S + WA_KNC1-UM07S +
WA_KNC1-UM08S + WA_KNC1-UM09S + WA_KNC1-UM10S + WA_KNC1-UM11S + WA_KNC1-UM12S + WA_KNC1-UM13S + WA_KNC1-UM14S +
WA_KNC1-UM15S + WA_KNC1-UM16S .
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR.
IF SY-SUBRC = 0.
WA_FINAL-UM01H = WA_KNC1-UM01H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM02H = WA_KNC1-UM02H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM03H = WA_KNC1-UM03H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM04H = WA_KNC1-UM04H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM05H = WA_KNC1-UM05H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM06H = WA_KNC1-UM06H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM07H = WA_KNC1-UM07H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM08H = WA_KNC1-UM08H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM09H = WA_KNC1-UM09H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM10H = WA_KNC1-UM10H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM11H = WA_KNC1-UM11H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM12H = WA_KNC1-UM12H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM13H = WA_KNC1-UM13H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM14H = WA_KNC1-UM14H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM15H = WA_KNC1-UM15H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-UM16H = WA_KNC1-UM16H.
ENDIF.
READ TABLE I_KNC1 INTO WA_KNC1 WITH KEY KUNNR = WA_KNVV-KUNNR
IF SY-SUBRC = 0.
WA_FINAL-CREDIT = WA_KNC1-UM01H + WA_KNC1-UM02H + WA_KNC1-UM03H + WA_KNC1-UM04H + WA_KNC1-UM05H + WA_KNC1-UM06H + WA_KNC1-UM07H +
WA_KNC1-UM08H + WA_KNC1-UM09H + WA_KNC1-UM10H + WA_KNC1-UM11H + WA_KNC1-UM12H + WA_KNC1-UM13H + WA_KNC1-UM14H +
WA_KNC1-UM15H + WA_KNC1-UM16H .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-SALDV = WA_KNC3-SALDV .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-SOLLL = WA_KNC3-SOLLL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-HABNL = WA_KNC3-HABNL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'A' .
IF SY-SUBRC = 0.
WA_FINAL-DOWN = WA_KNC3-SALDV + WA_KNC3-SOLLL + WA_KNC3-HABNL * -1.
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-SALDV = WA_KNC3-SALDV .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-SOLLL = WA_KNC3-SOLLL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-HABNL = WA_KNC3-HABNL .
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR
SHBKZ = 'L' .
IF SY-SUBRC = 0.
WA_FINAL-DEPOSIT = WA_KNC3-SALDV + WA_KNC3-SOLLL + WA_KNC3-HABNL * -1.
ENDIF.
READ TABLE I_KNC3 INTO WA_KNC3 WITH KEY KUNNR = WA_KNVV-KUNNR GJAHR = WA_KNC1-GJAHR.
IF SY-SUBRC = 0.
WA_FINAL-COLL = WA_FINAL-DOWN - WA_FINAL-DEPOSIT.
ENDIF.
APPEND WA_FINAL TO I_FINAL.
ENDLOOP.
ENDFORM.
FORM DATA_BUILD.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'NAME1'.
WA_FIELDCATALOG-SELTEXT_M = 'NAME'.
fieldcatalog-col_pos = 1.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'ORT01'.
WA_FIELDCATALOG-SELTEXT_M = 'CITY'.
fieldcatalog-col_pos = 2.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'STCEG'.
WA_FIELDCATALOG-SELTEXT_M = 'VAT. REG. NO.'.
fieldcatalog-col_pos = 3.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'REGIO'.
WA_FIELDCATALOG-SELTEXT_M = 'REGION'.
fieldcatalog-col_pos = 4.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'STRAS'.
WA_FIELDCATALOG-SELTEXT_M = 'STREET'.
fieldcatalog-col_pos = 5.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'TELF1'.
WA_FIELDCATALOG-SELTEXT_M = 'TELEPHONE'.
fieldcatalog-col_pos = 6.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'WERKS'.
WA_FIELDCATALOG-SELTEXT_M = 'PLANT'.
fieldcatalog-col_pos = 7.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'BZIRK'.
WA_FIELDCATALOG-SELTEXT_M = 'SALES DISTRICT'.
fieldcatalog-col_pos = 8.
WA_FIELDCATALOG-OUTPUTLEN = 15 .
fieldcatalog-emphasize = 'X'. " COLOR OF THIS COLUMN.
APPEND WA_FIELDCATALOG TO FIELDCATALOG.
CLEAR WA_FIELDCATALOG.
WA_FIELDCATALOG-FIELDNAME = 'VKBUR'.
WA_FIELDCATALOG-SELTEXT_M = 'SALES OFFICE'.hi dinesh......
please use 'INTO TABLE' instead of ' INTO CORRESPONDING FIELDS OF TABLE '. and use ' FOR ALL ENTRIES '............based on relavence ....coz when I set break point over the select queries it took me long time to execute .......
becoz u didnt used the for all entries in select query ............ u r read statement
READ TABLE I_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_KNVV-KUNNR. .....
it is reading wrong kunnr value .............even it took long time to execute ......
use sort where ever required...
use for all entries .......and check weather the table initial or not......
use sy-subrc check where ever reqired .............. -
Problem in displaying the data of columns into rows in sap script
hi,
i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
eg, C
12.1
Si
5.5
it is displaying the data right now like this but i want to display the data like this:-
eg, C Si
12.1 5.5
plzzprovide me guidelines how to solve this problem.hi,
i am using this code to display the data:-
plzz provide me guidelines where i am getting wrong?
TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
PROTECT
IF &I_FINAL-PRUEFLOS& NE '000000000000'
&I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
&I_FINAL-kurztext(25)&
&I_FINAL-original_input(8)&
ELSE
&I_FINAL-MAKTX(23)&
&I_FINAL-kurztext(25)&
&I_FINAL-original_input(8)&
ENDIF
ENDPROTECT
ITEMHEAD
POSITION WINDOW
SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
BOX FRAME 10 TW
BOX HEIGHT '1.35' LN INTENSITY 20
IF &PAGE& = '1'
BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
For horizontal line at top
BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
COLUMN LINES...
END OF COLUMN LINES...
BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
ELSE
COLUMN LINES...
END OF COLUMN LINES...
BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
ENDIF
LINEFEED
NEWPAGE
NEW-PAGE
provide me guidelines to solve this problem.
Edited by: ricx .s on Mar 13, 2009 5:58 AM -
How to display the data of a structure in a report
i want to display the data of a structure resbd.
i know it does not have data.
but it contains data at runtime
plz help
thanxHi,
For displaying the data of a structure you can use the write statement.
WRITE : structurename - fieldname.
eg : write : resbd-rsnum.
Before that you need to declare the structure name inside the report.
Please refer the following code for your querry
REPORT ZSTRUCTDATA .
Table Declaration
tables : resbd.
Assigning Values to Structure Fields
resbd-rsnum = 1234.
resbd-rspos = 12.
Displaying Values
write : / resbd-rsnum.
write : / resbd-rspos.
This report will give the output like this.
0000001234
0012
Regards,
LIJO JOHN. -
How to fetch the data & display the data if fields got the same name in alv
hi frnds, i need ur help.
how to fetch the data & display the data if fields got the same name in alv grid format.
thanks in advance,
Regards,
mahesh
9321043028Refer the url :
http://abapexpert.blogspot.com/2007/07/sap-list-viewer-alv.html
Go thru the guide for OOPs based ALV.
Use SET_TABLE_FOR_FIRST_DISPLAY to display the table:
CALL METHOD grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT' Structure data
CHANGING
IT_OUTTAB = gt_sflight. Output table
You can also implement
Full Screen ALV, its quite easy. Just pass the output table to FM REUSE_ALV_GRID_DISPLAY.
For controlling and implementing the FS-ALV we have to concentrate on few of the components as follows :
1. Selection of data.
2. Prepare Layout of display list.
3. Event handling.
4. Export all the prepared data to REUSE_ALV_GRID_DISPLAY.
Regd,
Vishal -
How to display the data in XML files into JSP using Jdeveloper.
Hi All,
I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
Are there any reference documents, regarding the above process please can anyone guide through how to do it.Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.
-
How to display the data in PDF format
hi all,
i will give input in my selection screen and i will execute my report then it has to display data in PDF file in some directory (like c or d directory). i refered existingthreads . most of then saying using spool req we can download pdf file i.e. not my requirement. my requirement is when i click on execute button it has to display the data in pdf file with headings.
Anybody can send me the sample code please.
thanks,
maheedharHi Easwar,
i am sending my code. in this one records is splitting into 2 records.
report zmaheedhar.
maheedhar-start
TABLES : vbak.
parameters : p_vbeln type vbak-vbeln.
data : begin of itab occurs 0,
vbeln type vbak-vbeln,
ERDAT type vbak-erdat,
ERZET type vbak-erzet,
ERNAM type vbak-ernam,
ANGDT type vbak-angdt,
BNDDT type vbak-bnddt,
AUDAT type vbak-audat,
VBTYP type vbak-vbtyp,
TRVOG type vbak-trvog,
AUART type vbak-auart,
AUGRU type vbak-augru,
GWLDT type vbak-gwldt,
SUBMI type vbak-submi,
LIFSK type vbak-lifsk,
FAKSK type vbak-faksk,
NETWR type vbak-netwr,
WAERK type vbak-waerk,
VKORG type vbak-vkorg,
end of itab.
maheedhar-end
DATA: pripar TYPE pri_params,
arcpar TYPE arc_params,
lay TYPE pri_params-paart,
lines TYPE pri_params-linct,
rows TYPE pri_params-linsz.
DATA: val(1), val1(1).
*---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
DATA: name TYPE pri_params-plist VALUE 'Testing'.
DATA: i_pdf TYPE STANDARD TABLE OF tline.
DATA: spono TYPE tsp01-rqident.
maheedhar-start
top-of-page.
write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
'Date','Document Date','SD document category','Transaction group','Sales Document Type',
'Order reason'.
start-OF-SELECTION.
select vbeln ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
VBTYP TRVOG AUART AUGRU GWLDT SUBMI LIFSK
FAKSK NETWR WAERK VKORG from vbak
into table itab
where vbeln = p_vbeln.
maheedhar-end
--- Retreive local printer details
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = dest
no_dialog = 'X'
immediately = ' '
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*-- Set Spool printer details w.r.t local printer
pripar-prdsn = 'DSN'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
in_archive_parameters = arcpar
in_parameters = pripar
no_dialog = 'X'
list_name = name
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
valid = val
valid_for_spool_creation = val1
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc EQ 0.
---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
NEW-PAGE PRINT ON
NEW-SECTION
PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
NO DIALOG.
ELSE.
WRITE:/ 'Unable to create spool'.
ENDIF.
*--- Output statements
*WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
*WRITE:/ 'Second Line'.
LOOP at itab.
write: itab-vbeln,
itab-ERDAT,
itab-ERZET,
itab-ERNAM,
itab-ANGDT,
itab-BNDDT,
itab-AUDAT,
itab-VBTYP.
ENDLOOP.
"---> Close spool
NEW-PAGE PRINT OFF.
spono = sy-spono.
Convert ABAP Spool to PDF
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spono
no_dialog = 'X'
TABLES
pdf = i_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Download PDF contents to presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'c:\test.pdf'
filetype = 'BIN'
TABLES
data_tab = i_pdf
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
thanks,
maheedhar -
Way of displaying the date on the main screen in addition to the time?
I see the time displayed at the top of the main screen. Is there a way of displaying the date as well?
Thanks,
dougBut if you leave your calendar application on the main screen, the icon itself will show the day and date.
Maybe you are looking for
-
WDA - Interface object inactive
I have a very simple PDF, with three fields from a structure dragged-n-dropped in. All three fields are bound to the main structure I think OK. When I do a Check, everything is fine. The problem is that the form status is Inactive, as shown at the to
-
Open WDA instead of subarea causes page cannot be displayed error?
Hi All, We're using ECC6 and Portal 7.01 (EHP1). We have a situation whereby when the user selects an subarea from the overview page, we want to open a web dynpro for abap application rather than a subarea menu. We have done this many times before w
-
Any way of modify base directory at runtime (in loaded jars )?
Hello all, Well, I'm using tomcat to run my web application, which loads dinamically many jars and execute them. My problem is that these jars sometimes have a method that uses relative paths to do something (read files, create files, etc). Currently
-
Hi , I want to learn SOA please guide me. Do let me know the bellow things 1. Where to start from. 2. Weather there are any training available online or in oracle sites. Please don't discourage i have to start do let me know where to start from.
-
Browse Sequence Stopped Working
I generated WebHelp output files on 11/19/14 (less than 2 weeks ago) in which the browse sequence works as expected. When I generated output today, I noticed that the browse sequence buttons were not displaying. I'm using RH 10 with IE 11. I am th