Displaying output of sapscript
Hi,,
I had created a code in which i am displaying the output of the data in pdf format which is working fine but the thing is when i use to execut the program it display the print view in the pdf format and then ask to download which is due to the FM called 'PDF Preview'. But i want that it should display the data in sapscript first and then ask to save the file in PDF format .
Please provide me guidlines that is it possible to display the data in the sapscript and then save it in a pdf format.
Edited by: ricx .s on May 25, 2009 7:50 AM
hi,
i am already using this FM and done the amendments mentioned above but still it is giving the same result not the desierd result .
please provide me guidelines to solve this problem.
here's the code which i am using right now:-
form otf.
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = BINFILESIZE
tables
otf = datab[]
lines = pdftab[]
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 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.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 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.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = BINFILESIZE
FILENAME = full_path "file_name
FILETYPE = 'BIN'
TABLES
data_tab = PDFTAB[]
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 .
ENDFORM.
Edited by: ricx .s on May 26, 2009 10:12 AM
Edited by: ricx .s on May 26, 2009 10:12 AM
Edited by: ricx .s on May 26, 2009 12:31 PM
Edited by: ricx .s on May 27, 2009 5:32 AM
Similar Messages
-
Problem in displaying output in sapscript
Hi,
I am working on the sapscript in which i am having 2 problems i.e. there is a footer window in which there is a box in which i want to draw the line so that it can be divided into 2 parts .
here's d code for it:-
SB Remarks: &WLINES(120)&
SB &WLINES+120(120)&
/: BOX XPOS '0' CH YPOS '4' LN WIDTH '114' CH HEIGHT '0' LN FRAME '10' TW
SB THIS IS A COMPUTER GENERATED REPORT AND DOESNOT REQUIRE A SIGNATURE
/* &WLINES(80)&
The 2nd problem is of the long text(description) of a thing in which the text gets divided when the line changed in a purticular column.is dere any way through which the text do not get divided when the line chnages.
Plzz provide me guidlines to solve this problem .
Edited by: ricx .s on May 4, 2009 10:07 AMhi,
but there is a code written and should i use it for the whoel code.does it going to effect the whole codiing?
here;s d code:-
/E FINAL
C1 &i_final-count_c(3Z)& &i_final-text_c(24)& &i_final-result_c(8)&
&i_final-count_m(3)& &i_final-text_m(22)& &i_final-result_m(8)&
&i_final-nonconfirm_m(10)& &i_final-count_mi(3)& &i_final-text_mi(25)&
= &i_final-result_mi(8)& &i_final-nonconfirm_mi&
/* **** CHANGE THE NAME OF VARIABLE C, M AND MI RESPECTIVELY
/* FOR CRITICAL PROPERTIES
/: IF &I_FINAL-TEXT_C+24(16)& NE ' '
C1 &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
&i_final-text_m+22(18)&,, &i_final-result_m+8(8)&,,,,,,,,
&i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
/: ELSEIF &I_FINAL-RESULT_C+8(8)& NE ' '.
&temp(40)& &i_final-result_c+8(8)&,, &i_final-text_m+22(18)&
= ,, &i_final-result_m+8(8)&,,,,,,,, &i_final-text_mi+25(15)&,,
= &i_final-result_mi+8(8)&
/* FOR MAJOR
/: ELSEIF &I_FINAL-TEXT_M+22(18)& NE ' '
C1 &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
&i_final-text_m+22(18)&,, &i_final-result_m+8(8)&,,,,,,,,
&i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
/: ELSEIF &I_FINAL-RESULT_M+8(8)& NE ' '
C1 &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
&i_final-text_m+22(18)&,, &i_final-result_m+8(8)&,,,,,,,,
&i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
/: ELSEIF &I_FINAL-TEXT_MI+25(15)& NE ' '
C1 &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
&i_final-text_m+22(18)&,, &i_final-result_m+8(8)&,,,,,,,,
&i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
/: ELSEIF &I_FINAL-RESULT_MI+8(8)& NE ' '
C1 &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
&i_final-text_m+22(18)&,, &i_final-result_m+8(8)&,,,,,,,,
&i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
/: ENDIF.
/E BREAK
/: NEW-PAGE
plzz provide me guidlines to solve this problem. -
To Display Output in Grid ALV with change of some field display total with
Hi Masters,
I m working on ALV in which i have to display output with the following format.
Header
"Some String" date/time
User:XYZ01 page 1
Line
1st field 2nd 3rd 4th 5th 6th 7th 8th 9th 10th field
x y z A B C D E F G
BLANK..............................................................................
"total 3rd+4TH" P Q R S T
same thing for every change of 4th field .
So the problem is with inserting the line with string "Total of 3rd+4th" in the output .
Can Anyone help me out?
Thanks ,
Varlani AmitHi,
Use control-break statement ON-CHANGE for the 4th field, and do the changes.
regards,
sri -
How to Download displayed output to Excel Using Bsp Application
Hi Experts,
please give me some idea because I am New In BSP.
How to Download displayed output to Excel Using Bsp Application.
If any sample code please do send me.
In my condition I am getting data in 2-3 table view formats on one page and i want download that in Excel.
please help me.
Regards & Thanks,
YogeshHi,
This is more a question for the BSP forum.
Anyway, as such it's realy easy since you can use HTML in order to import to Excel. All you need to do is add
runtime->server->response->set_header_field( name = 'Contnet-Type'
value = 'application/vnd.ms-excel' ).
runtime->server->response->delete_header_field( name = 'Cache-Control' ).
runtime->server->response->delete_header_field( name = 'Expires' ).
runtime->server->response->delete_header_field( name = 'Pragma' ).
Also check threads like
Download BSP data into Excel
export bsp-table to excel
Export BSP Table to Excel
Eddy
PS. Reward useful answers and earn points yourself -
Output of SapScript to E-mail?
Hi,
I have a requirement when the driver program (custom program) for sapscript is executed ,the output of sapscript has to be sent as a email attachment to desired people(s) Email accounts .
How can I do it?.. could you provide any points for thisu2026.
Thanks in advance .
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on May 8, 2009 10:22 AMGet the output data in the OTF format in close_form under table OTFDATA
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
Call below mentioned function module to convert otf format of smart form to pdf format
CALL FUNCTION 'CONVERT_OTF'.
Convert PDF from 132 to 255.
For sending mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'. -
Plz help me, no display output during boot up of 715 workstation
now i have a HP 715 model workstation,today, conneted hp monitor..but can't display output during system boot up so i tried solve this problem,1)changed battery2)removed HDD after reboot system and press ESC key => now can't use Keyboard..not working key board3)Press Tap key.. Just i think, this problem is system configulation problem. not monitor problem..so i found internet website..but now i can not change configulation who know this problem.plz help me
one question in html submit the reslut stored jdbc that value shows barchartAll your base are belong to us!
You know, while I understand that English isn't your first language (neither is it mine) and there's no need to be perfect: if you can't write an understandable post yourself, consider asking someone to do it for you. -
Turn off external display output?
I've bought a nice big LCD TV mainly for consoles. Because I have it next to my iMac i've also connected that to the TV using a mini-dvi adapter and a dvi-hdmi cable.
It works great but I only want to use it for playing downloaded video and the like on the big tv.
When I'm not using it I want my iMac to free up the resources it must be using to achieve screen spanning but I cannot figure out a way to tell the iMac to disable external display output.
I've tried display mirroring figuring that it won't be eating up video RAM, but it causes page tearing on my mac when dragging windows around for example.
Even when the TV is unplugged from the mains the mac seems to be outputting to the dvi out, the only way to stop it is the yank the mini-dvi connecter from the back.
Are there any hacks or utilities that can manually turn dvi support on and off?Hello Mark
I'm using a 27" flat screen TV, mini DVI and 12' S-Video cable.
Mostly I watch DVD movies on that Display while working at the iMac's 17" it's also great for iPhoto Slideshows and PowerPoint.
Not to worry the TV supports it's own display and all you are doing is sending a signal to it's video card. Just turn it off or change the channel.
I tend to stay away from mirroring for the same reasons, but also because the TV's across the room.
Again not to worry the TV supports it's own display and all you are doing is sending a signal to it's video card. Just leave it connected up to prevent damage to DVI port, Adapter and cable. "yank not"
Just be sure to gather up all your windows back to the iMac Display befor shutting off or changing the channel.
Dennis
17" iMac Intel Core Duo 1.5GB Ram Mac OS X (10.4.9) Maxtor 300GB FireWire Creative Inspire 2.1 2G Nano -
Display Output similar to SPRO (IMG)
Hi Experts,
Can we develop a display output similar to the view which we have in SPRO (IMG).
Any Function Module or Sample Program.
Regards,
Abhijit G. BorkarThanx David,
Can u help tell me the difference between the Transaction Code: SHI3 & SE43 & SE43N.
Since they look similar to what you have suggested.
Regards,
Abhijit G. Borkar -
Thunderbolt Display output only 800 x 600!!?!?!?!
Just got the Mac Book Pro Quad Core, 15", 8 gig ram.
I'm using the display output adapter in the Tunderbolt port. It outputs and syncs to my Image Pro switcher, but the options for the display output for the external only go up to 800 x 600.
Anyone know anything about this?
My old MacBook Pro could go up to the full resolution with the same video switcher and the same mini display output adapter.It's possible that the switcher isn't compatible. Safe to presume that without the switcher you can achieve the desired resolution?
-
When I unplug Apple headphones from my MacBook Pro sond from internal speakers not work, and system soud preferences displayed: Output: optical digital out port only
If you see a red light in the audio output port, then the internal switch is stuck. Insert the earphone plug a few times and see if you can trip the switch. If that fails, insert a cocktail stirrer and the like and jiggle it around inside. If that fails, take it to an Apple store and have the technicians at the genius bar do it for you.
Ciao. -
[GTX770]No display output HDMI/Displayport when booting
I've recently upgraded to an Haswell setup with a MSI Z97 pc mate and MSI GTX770. The card seems to work fine when I use DVI output. However, when i try to use either hdmi or displayport I only get display output once i'm in windows. The bios and booting process give no output on either connection.
Is there something wrong with the GFX card, is there some bios setting i can try?Quote
Thanks for the quick reply. Will this GOP UEFI bios make Displayport work on boot?
don't know, maybe
Quote
I've never heard of GOP UEFI bios, so I don't have a clue what advantages I get with that.
its related to Win8 features, ultra fast boot and so on if you decide to use such -
Help! one to many relationship table and display output as exists
I have two tables:
Table1: LOCATION with field locn_id
Table2: TRACKING with field from_locn and to_locn
Example
locn_id from_locn to_locn
26001A 26001A 26002A
26002A 26001A 26001B
26001B 26001A 26001C
26001C
I am linking locn_id to from_locn.
I want to display output as:
If locn_id exists in from_locn (I dont care how many records), display Y. If locn_id does not exist then display N.
So in above case, output should be
26001A Y
26002A N
26001B N
26001C NHere is my try:
create table LOCATION(locn_id VARCHAR2(10));
create table TRACKING(locn_id VARCHAR2(10), from_locn VARCHAR2(10), to_locn VARCHAR2(10));
insert into LOCATION values('26001A');
insert into LOCATION values('26002A');
insert into LOCATION values('26001B');
insert into LOCATION values('26001C');
insert into TRACKING values('26001A', '26001A', '26002A');
insert into TRACKING values('26002A', '26001A', '26001B');
insert into TRACKING values('26001B', '26001A', '26001C');
insert into TRACKING values('26001C', '', '' );
select l.locn_id,
(select decode(count(*), 0, 'N', 'Y') from tracking t where l.locn_id = t.from_locn ) exists_flag
from location l
LOCN_ID E
26001A Y
26002A N
26001B N
26001C N
4 rows selected.Edited by: Thomas Morgan on May 31, 2013 3:43 PM -
Rows to columns/Transpose the records Query and Display output
hi ,
can anyone help me query this and transpose it to this format?
i am still a beginner in sql.
thanks for help!
Rows to columns/Transpose the records Query and Display output
id startdate endate
1111 1/2/2001 11/3/2001
1111 2/5/2002 4/3/2002
1111 2/6/2000 2/5/2001
3333 5/2/2003 11/3/2003
3333 6/2/2003 12/3/2003
3333 2/6/2005 2/5/2005
desired output
id startdate1 endate1 startdate2 endate2 startdate3 endate3
1111 1/2/2001 11/3/2001 2/5/2002 4/3/2002 2/6/2000 2/5/2001
3333 5/2/2003 11/3/2003 6/2/2003 12/3/2003 2/6/2005 2/5/2005Have you only 3 dates for each id ?
So, try :
SQL> l
1 with tbl as
2 (select 1111 as id, to_date('01/02/2001','DD/MM/YYYY') startdate, to_date('11/03/2001','DD/MM/YYYY') enddate from dual union all
3 select 1111 as id, to_date('02/05/2002','DD/MM/YYYY') startdate, to_date('04/03/2002','DD/MM/YYYY') enddate from dual union all
4 select 1111 as id, to_date('02/06/2000','DD/MM/YYYY') startdate, to_date('02/05/2001','DD/MM/YYYY') enddate from dual union all
5 select 3333 as id, to_date('05/02/2003','DD/MM/YYYY') startdate, to_date('11/03/2003','DD/MM/YYYY') enddate from dual union all
6 select 3333 as id, to_date('06/02/2003','DD/MM/YYYY') startdate, to_date('12/03/2003','DD/MM/YYYY') enddate from dual union all
7 select 3333 as id, to_date('02/06/2005','DD/MM/YYYY') startdate, to_date('02/05/2005','DD/MM/YYYY') enddate from dual )
8 select id, max(decode(dr,1,startdate)) start1,
9 max(decode(dr,1,enddate)) end1,
10 max(decode(dr,2,startdate)) start2,
11 max(decode(dr,2,enddate)) end2,
12 max(decode(dr,3,startdate)) start3,
13 max(decode(dr,3,enddate)) end3
14 from (select id, startdate,enddate, dense_rank() over (partition by id order by startdate) dr from tbl)
15* group by id
SQL> /
ID START1 END1 START2 END2 START3 END3
1111 02/06/00 02/05/01 01/02/01 11/03/01 02/05/02 04/03/02
3333 05/02/03 11/03/03 06/02/03 12/03/03 02/06/05 02/05/05
SQL> HTH,
Nicolas. -
Display output page by page in ALV
HI all,
can anyone pls tell me how to display output page by page in ALV
this is urgent..
ThanksHi,
if your case is like there sales orders,items.
you want to prints all sales order+its items in one page
then
you need to build sort table.
L_SPOS = L_SPOS + 1.
IT_SORT_DATA-SPOS = L_SPOS.
IT_SORT_DATA-FIELDNAME = 'VBELN'.
IT_SORT_DATA-TABNAME = 'IT_DISPLAY'.
IT_SORT_DATA-DOWN = 'X'.
IT_SORT_DATA-GROUP = '*'. "this is for page break
APPEND IT_SORT_DATA.
CLEAR IT_SORT_DATA.
pass this sort info to alv fm.
regards
vijay -
WD Compoenent - Non -Interactive form- Not displaying output
Hi,
I am practicing this adobe form session [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/a3e2f018-0b01-0010-c7a8-89deb6e63e97] from SDN.Unfortunately this session was not complete so I am trying to complete it.
In brief : this WD component accepts CARRID and displays output in PDF format.
I was able to capture selection and get respective entries for that selection in my internal table but my display is blank.Here is what I coded in Search Button..
method ONACTIONSEARCH .
data: isflight type table of sflight.
DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
DATA lo_el_adobe_data TYPE REF TO if_wd_context_element.
DATA lo_nd_data_selections TYPE REF TO if_wd_context_node.
DATA lo_el_data_selections TYPE REF TO if_wd_context_element.
DATA ls_data_selections TYPE wd_this->element_data_selections.
* navigate from <CONTEXT> to <DATA_SELECTIONS> via lead selection
lo_nd_data_selections = wd_context->get_child_node( name = wd_this->wdctx_data_selections ).
* get element via lead selection
lo_el_data_selections = lo_nd_data_selections->get_element( ).
* get all declared attributes
lo_el_data_selections->get_static_attributes(
IMPORTING
static_attributes = ls_data_selections ).
* Retrieve that data from the database. Normally it is suggested to
* encapsulate the data retrieval in a separate class.
* For simplicity, the SELECT statement has been implemented here.
clear isflight. refresh isflight.
select * into corresponding fields of table isflight from sflight
where carrid = ls_data_selections.
* navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
lo_nd_adobe_data = wd_context->get_child_node( name = `ADOBE_DATA` ).
lo_nd_adobe_data->bind_elements( isflight ).
endmethod.
endclass.
Anything wrong with my code..I am getting my data in isflight internal table.
FYI..I am throwing output as text field in adobe form.
rgds
vara
Edited by: Vara K on Jan 19, 2009 9:51 PM
Edited by: Vara K on Jan 19, 2009 10:02 PMHi Vara,
Try this:
method ONACTIONSEARCH .
data: isflight type table of sflight.
DATA lo_nd_adobe_data TYPE REF TO if_wd_context_node.
DATA lo_el_adobe_data TYPE REF TO if_wd_context_element.
DATA lo_nd_data_selections TYPE REF TO if_wd_context_node.
DATA lo_el_data_selections TYPE REF TO if_wd_context_element.
DATA ls_data_selections TYPE wd_this->element_data_selections.
* navigate from <CONTEXT> to <DATA_SELECTIONS> via lead selection
lo_nd_data_selections = wd_context->get_child_node( name = wd_this->wdctx_data_selections ).
* get element via lead selection
lo_el_data_selections = lo_nd_data_selections->get_element( ).
* get all declared attributes
lo_el_data_selections->get_static_attributes(
IMPORTING
static_attributes = ls_data_selections ).
* Retrieve that data from the database. Normally it is suggested to
* encapsulate the data retrieval in a separate class.
* For simplicity, the SELECT statement has been implemented here.
* clear isflight. refresh isflight.
select * into corresponding fields of table isflight from sflight
where carrid = ls_data_selections-carrid.
* navigate from <CONTEXT> to <ADOBE_DATA> via lead selection
lo_nd_adobe_data = wd_context->get_child_node( name = `ADOBE_DATA` ).
lo_nd_adobe_data->bind_elements( isflight ).
endmethod.
I hope it helps.
Regards
Arjun
Maybe you are looking for
-
What are the best dimensions to allow for iPad 3 Retina for full-page landscape images?
What are the best dimensions to allow for iPad 3 Retina for full-page landscape images? I read an article and cannot find it that said something about trying to make it 2million pixels and JPG to keep it small, but what exactly should the dimensions
-
Create external window in Web Dynpro Java
Hello experts, I am new in web dypro java as well as enterprise portal. I have a problem concerning external window. I have created a button in my ivew in web dynpro java. By a click on this button, I would like to open an external window with a spec
-
FMF0 - Payment Selection problem
Hi Gurus, I would like to ask you, if anybody can help me. We have run the FMF0 /RFFMS200/ report. Original document in FI module /document from HR/ was cleared with another document /bank statement document/, which was reversed. But now, the FMF0 sh
-
Nokia 2730 classic---it was hung when open the mes...
When I tried to open the message in the inbox. It was hung. I can't open it. Have to tried it several times. Is it becase of software or hardware problems? What should I do?
-
Message error when computer started
I have an old mac book pro (2008) ; when started a message appeared : you need to restart your computer. When I do the same message comes up again and again; I can't find the re initialisation mode, can some ones helps? Thank you!