Urgent : How to print (on printer) the output of procedure
Hi All,
How can I divert the output or the results to printer.
Regds
Rajesh
By adjusting the location of your fields you can accomplish this.
If you move your subtotal to the tax calculation header.
you will end up with your tax amount after the subtotal.
You can then move the final total with tax to the top of the section.
Then it will look like you want it to.
Sub Total <----- Tax Area Header
Tax Amount <----- Tax Area Footer
Document Total <---- End of Report
Similar Messages
-
How to write code to print and save the output in my GUI?
I had been searching on code to program print and save commands to print and save the output from the GUI but to no avail. Can someone help me?
The output will be link from the previous GUI page. Hence the output is a page with Jtable and a button for print to print the information in the JTable.
-
How to suppress the Print Popup in the output ..Please Help Me.
Hi All,
<b>My customization is going in Adobe forms.</b>
when i execute the print program,i am getting the print popup and asking to enter Output Device.But i don't want to display this <b>Print Popup</B> .How to supress this .i want to get direct print preview without asking Output Device.
Please help me.
I APPRICIATE(REWARD) IF ANY ONE HELPS ME...
regards,
Suresh.Hi
See this sample code
SAMPLE CODE FOR PRINTING
data: carr_id type sbook-carrid,
cparam type ssfctrlop,
outop type ssfcompop,
fm_name type rs38l_fnam.
DATA: tab_otf_data TYPE ssfcrescl,
pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
FILE_NAME type string,
File_path type string,
FULL_PATH type string.
parameter: p_custid type scustom-id default 1.
select-options: s_carrid for carr_id default 'LH' to 'LH'.
parameter: p_form type tdsfname default 'ZAMIT_SMART_FORM'.
data: customer type scustom,
bookings type ty_bookings,
connections type ty_connections.
start-of-selection.
<b>************ suppressing the dialog box for print preview*****
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = SPACE.
cparam-getotf = 'X'.</b>
select single * from scustom into customer where id = p_custid.
check sy-subrc = 0.
select * from sbook into table bookings
where customid = p_custid
and carrid in s_carrid
order by primary key.
select * from spfli into table connections
for all entries in bookings
where carrid = bookings-carrid
and connid = bookings-connid
order by primary key.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting formname = p_form
variant = ' '
direct_call = ' '
importing fm_name = fm_name
exceptions no_form = 1
no_function_module = 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.
exit.
endif.
calling the generated function module
call function fm_name
exporting
archive_index =
archive_parameters =
control_parameters = cparam
mail_appl_obj =
mail_recipient =
mail_sender =
output_options = outop
user_settings = SPACE
bookings = bookings
customer = customer
connections = connections
importing
document_output_info =
job_output_info = tab_otf_data
job_output_options =
exceptions formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
if sy-subrc <> 0.
error handling
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
tab_otf_final[] = tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
IMPORTING
bin_filesize = bin_filesize
BIN_FILE =
TABLES
otf = tab_otf_final
lines = pdf_tab
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5
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 METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
WINDOW_TITLE =
DEFAULT_EXTENSION =
DEFAULT_FILE_NAME =
FILE_FILTER =
INITIAL_DIRECTORY =
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
filename = FILE_NAME
path = FILE_PATH
fullpath = FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
************downloading the converted PDF data to your local PC*******
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = FULL_PATH
filetype = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
IMPORTING
filelength = file_size
TABLES
data_tab = pdf_tab
FIELDNAMES =
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
IF sy-subrc <> 0.
ENDIF.
Regards
Anji -
How to avoid to print decimals in the output
Hi,
Please suggest me how to avoid getting decimals in the output.
The variable that i am using is RKMNG. While declaring it i have used it in this manner, rkmng type p decimals 0.
but this only avoids fetching the data with decimals, when i am trying to print this value to the output using ALV FM, the decimals are appearing.
Please can u provide me how to remove these three decimals that are appearing in the output.
Thanks,do this :
data : lv_var like i.
move rkmng to lv_var.
print lv_var. -
Schedule webi document to printer and save the output in shared drive
Hi all,
Is it possible to schedule a webi document via java BOE SDK, run at once, save the output in pdf format in a shared drive and at the same time, send the output to printer? Or I need to run the webi document to run 2 times? Thanks.
Best regards,
GraceHi Adam,
How about can I schedule a webi document to printer only? In Crystal report, I can do this but seems for webi, no such function?
Best regards,
Grace -
Changing print sequence of the output types
Hi Friends,
We are using Z program for issuing output .
In this we are giving input values as Application (ex. V3) and output type (Ex Zx50) to take invoice printouts
At present we are having three output types ZX43 , ZX44 AND ZX45.
For this three output types program name and form name is different .
To take invoice print we are executing this Z program with output types separtely.
Our requirement is
Creating new application ( ex V4 ) AND new outype type (ex ZX46) under this we have to bring this three output types ZX43 , ZX44 AND ZX45.
By giving input as V4 and ZX46 it has to do the same work as it is done separtely
while doing code please give me the suggestion or logic how to combine all these three output types in one
Regards
R.vijayakumarHi,
You can do this in the NACE configuration itself. we can call 5 program and forms for a particular output type.
In the output type processing routine of nace transaction mention the program and form name
Thanks
Arul -
Changing the print sequence of the output types
Hi Friends,
We are using Z program for issuing output .
In this we are giving input values as Application (ex. V3) and output type (Ex Zx50) to take invoice printouts
At present we are having three output types ZX43 , ZX44 AND ZX45.
For this three output types program name and form name is different .
To take invoice print we are executing this Z program with output types separtely.
Our requirement is
Creating new application ( ex V4 ) AND new outype type (ex ZX46) under this we have to bring this three output types ZX43 , ZX44 AND ZX45.
By giving input as V4 and ZX46 it has to do the same work as it is done separtely
while doing code please give me the suggestion or logic how to combine all these three output types in one
Regards
R.vijayakumarHi,
You can do this in the NACE configuration itself. we can call 5 program and forms for a particular output type.
In the output type processing routine of nace transaction mention the program and form name
Thanks
Arul -
How to remove spaces in the output of an PL/SQL report
Hi,
The requirement is to develop a SQL report.
The sample code is like this
Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
Select order_number , header_id from oe_order_headers_all;
The output is displaying as follows
=======================
'Order Number Header Id'
1234 101
2222 102
3333 103
=======================
Now I am opening the report in excel, and there is a space appearing after the headings.
So, how can I remove the additional blank line between the headings and the data.
Thanks in advance
ManiMani B wrote:
Hi,
The requirement is to develop a SQL report.From which tool ur getting this report...? From oracle forms report..?
>
The sample code is like this
Select 'Order Number Header Id' from dual; ( This is the heading in the output of the report.)
Select order_number , header_id from oe_order_headers_all;
The output is displaying as follows
=======================
'Order Number Header Id'
1234 101
2222 102
3333 103
=======================
Now I am opening the report in excel, and there is a space appearing after the headings. if u use any third party tool like pl/sql developer or sql developer then u can export the data into xcel file.
Sen -
How to hide columns in the output table in webdynpro based on input
Hi Experts,
I have 2 inputs and 1 input is optional.If both inputs are given proper table output is displayed,but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs.And i want to hide some empty rows also at runtime based on inputs.
Can anyone help me out to solve this.
Thanks in advance.
Regards,
Anita.Hi Anitha,
What i understood from your question is,you want to control the table from your inputs.I have a one question for you what do you want to show defaultly i.e when you run the application what you want to show,either no table or table with some values.
Any how i am giving solution in this way.
If both inputs are given proper table output is displayed
Write your below logic in the WDDOMODIFYVIEW )
Here i am assuming that you already have a table element in the view.
Get the values entered in the input fields and compare those 2 values ,if the condition is satisfied then bind the values which you want to show in the table to the context node.
but if only 1 input is given a column is empty in the output table so i want to hide this column dynamically at runtime based on my inputs
You are telling that you know the empty column.If so get the view element reference and use the REMOVE_COLUMN to remove the column.
data:lr_table type ref to cl_wd_table,
lr_column type ref to L_WD_TABLE_COLUMN.
lr_table ?= view->get_element( 'TABLE1' ).
CALL METHOD LR_TABLE->REMOVE_COLUMN
EXPORTING
ID = 'TABLE1_color'
INDEX =
RECEIVING
THE_COLUMN = lr_column.
i want to hide some empty rows also at runtime based on inputs.
Removing the rows is very simple.if you know the key fields data of internal table from your input fields then do in this way.
delete itab from wa where key1= "12" and key2="abd".
Now bind the internal table to context node.
LO_ND_hcm->BIND_TABLE(
NEW_ITEMS = it_final
SET_INITIAL_ELEMENTS = ABAP_TRUE ). -
How to remove truncation in the output of ps -ef command in solaris
Hi,
One silly question but i m unable to find solution.
In solaris-10 when i executed the command ps -ef some datas in the output in the command column is truncated as below
UID PID PPID C STIME TTY TIME CMD
root 6811 1 0 19:33:36 pts/3 0:00 sh /export/home/bti/bti/Revathi/BTI/EMS/bin/startemsserver.sh
root 6827 6819 0 19:33:37 pts/3 2:33 /export/home/bti/bti/Revathi/BTI/EMS/jre/bin/java -DJBOSS_HOME=/export/home/bti
Where in the CMD column the path */export/home/bti/bti/Revathi/BTI/EMS/jre/bin/java -DJBOSS_HOME=/export/home/bti* continues. Only half of the path is shown. I need the entire path how to achieve it
Regards
RevathiJust to make things a little more complex...
/usr/ucb/ps (actually /usr/ucb/sparcv9/ps) used to be SUID root so that it could read the full args directly out of the address space of the process (/proc/<pid>/as).
Sun removed this behavior in Solaris 8 with patch 109023-05 and in Solaris 9 with patch 120240-01 (it's been removed from Solaris 10 since FCS) -
How can i retrieve the output of procedure using a select statement ?
Hi every one.
this mite be dumm ?
how can i use the output of the a procedure containing multiple rows of data in a select statement ?This is not a SQL Developer question. You should ask it in the SQL and PL/SQL forum.
The short answer is you can't. Sounds is if you are trying to use MSSQL techniques in oracle. Learn oracle techniques -
How to copy the output of procedure to a view or table
Hi...
I created a procedure using Hana Studio and it returns the multiple rows as output.
My query is , how to copy the output to a table or view when it is called like this "cal _SYS_BIC.procedureName "
Please go through the following image:
How to copy the output content to a table or view....
Thank u...Hi Mohan,
The logic is like, you can attach a view(so called column view) to any procedure which returns a result set. SO, instead of calling the procedure using CALL statement, you can simply query the VIEW to get the result set. Internally the procedure will be executed.
Have a look here :
http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf
Eg :
You create a procedure using a result view ProcView to return its results.
CREATE PROCEDURE ProcWithResultView(IN id INT, OUT o1 CUSTOMER) LANGUAGE SQLSCRIPT
READS SQL DATA WITH RESULT VIEW ProcView
AS
BEGIN
o1 = SELECT * FROM CUSTOMER WHERE CUST_ID = :id;
END;
You call this procedure from an SQL statement as follows.
SELECT * FROM ProcView WITH PARAMETERS ('placeholder' = ('$$id$$', '5'));
Hope this helps you to solve the issue
Sreehari -
How to hide zeroes in the output
I need to suppress zeroes in the output. I have a Data template which selects the data from a view. The original view fields are showing 0's if the underlying value is null.( eg. create view v1 as select nvl(field1,0),nvl(field2,0)... from table1
I tried the following ways to fix the issue. But no success.
1. Changed the view and removed the NVL function on the view
create view v1 as select field1,field2,... from table1
After this the xml output is generated and shows nulls for these fields. But OPP is failing with 'Cannot convert to number' Here is the snapshot of the error.
Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.
at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1526)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:517)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
... 17 more
2. Using the xpath expression
<?format-number(field1[.!=0],"####", "")?>
This way I am seeing a square symbol for the fields having zeroes
I am sure there will be simpler way of hiding zeroes in the output. But I am not getting any clues. Any ideas.
ThanksHi,
I may have misunderstood something. In the option 1 you mention that by removing the nvl you were getting nulls?
If you are getting zeros then you should be able to use <?if:field1!=0?>...<?end if?>. It's possible you might need to put '0' around the value if it thinks it is text.
Also I'm not sure your format-number syntax is correct. It looks like you are mixing the Oracle formatting and the Microsoft formatting (ie when you set the form field type to number) together. I've used the following successfully:
<?format-number:FIELD1;'PT9G990D00'?>
Hope this helps.
Paul -
How to fill matrix with the output of recordset query?
Hi all,
I want a user matrix to load data when I hit a button and the data to be filled is the output of an sql query. binding the matrix columns with table columns and then load the matrix with DBDatasource attached to that table will not do in this case as the columns in the sql query are from several different tables or views.
writing following line to do this takes several minutes to load the data:
For j = 0 To Reordset.RecordCount - 1
Matrix.AddRow()
Matrix.Columns.Item("col1").Cells.Item(i).Specific.value = Recordset.Fields.Item("cardcode").Value
Recordset.movenext()
next
Is there any other way to fill the matrix in this case, which loads the data faster?
Regards,Hello Binita,
I've tested the CFL for DataTable-Matrixes in my test-AddOn. But there's still one problem left. Maybe you find it out (I will need this in the future too...).
The ChooseFromList must be added behind the DataTable-Bind, which is done on every MTX-Load (it's not from the sample above, so the UIDs are new ones):
oDt = oDts.Item("dt_test")
query = "SELECT * FROM [@T_CONVTOOLS01]"
oDt.ExecuteQuery(query)
oMtx.Columns.Item("0").DataBind.Bind("dt_test", "Code")
oMtx.Columns.Item("1").DataBind.Bind("dt_test", "U_Alpha01")
oMtx.Columns.Item("2").DataBind.Bind("dt_test", "U_Price01")
oMtx.Columns.Item("3").DataBind.Bind("dt_test", "U_Quant01")
oMtx.Columns.Item("4").DataBind.Bind("dt_test", "U_Date01")
AddChooseFromLists()
oMtx.LoadFromDataSource()
...where AddChooseFromLists() is...
Private Shared Sub AddChooseFromLists()
Try
Dim oCfls As SAPbouiCOM.ChooseFromListCollection
Dim oCons As SAPbouiCOM.Conditions
Dim oCon As SAPbouiCOM.Condition
Dim oCfl As SAPbouiCOM.ChooseFromList
Dim oCflCreationParams As SAPbouiCOM.ChooseFromListCreationParams
Dim oBtn As SAPbouiCOM.Button
Dim oMtx As SAPbouiCOM.Matrix
Dim oCol As SAPbouiCOM.Column
Dim oEtx As SAPbouiCOM.EditText
oMtx = oForm.Items.Item("MTX_TEST02").Specific
oCfls = oForm.ChooseFromLists
oCflCreationParams = SboCon.SboUI.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
oCflCreationParams.MultiSelection = False
oCflCreationParams.ObjectType = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
oCflCreationParams.UniqueID = "CFL_C1"
oCfl = oCfls.Add(oCflCreationParams)
'### OPTION:
'# Shown ChooseFromList restricted by Conditions
oCons = oCfl.GetConditions()
oCon = oCons.Add()
oCon.Alias = "CardType"
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
oCon.CondVal = "C"
oCfl.SetConditions(oCons)
oCol = oMtx.Columns.Item("1")
oCol.ChooseFromListUID = "CFL_C1"
oCol.ChooseFromListAlias = "CardCode"
Catch e As Exception
Microsoft.VisualBasic.MsgBox(className & ".AddChooseFromLists()" & vbCrLf & "Exception:" & vbCrLf & e.Message.ToString)
End Try
End Sub
But I'm running into problems when trying to set the MTX-Cell via DataTable at the CFL-Event (see comment):
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST Then
Dim oMtx As SAPbouiCOM.Matrix
Dim oCFLEvent As SAPbouiCOM.IChooseFromListEvent
Dim oCFL As SAPbouiCOM.ChooseFromList
Dim oDataTable As SAPbouiCOM.DataTable
Dim cflID As String
Dim oDt As SAPbouiCOM.DataTable = oForm.DataSources.DataTables.Item("dt_test")
oCFLEvent = pVal
cflID = oCFLEvent.ChooseFromListUID
'Dim oForm As SAPbouiCOM.Form
'oForm = SboConnection.SboUI.Forms.Item(FormUID)
oCFL = oForm.ChooseFromLists.Item(cflID)
If Not oCFLEvent.BeforeAction Then
oDataTable = oCFLEvent.SelectedObjects
If oDataTable Is Nothing Then Exit Sub
'############## Matrix Test #######################################################################
If (oCFLEvent.ItemUID = "MTX_TEST02") Then
oMtx = oForm.Items.Item("MTX_TEST02").Specific
'### CFL Results to UserForm
oDt.Rows.Offset = oCFLEvent.Row - 1
MsgBox(oDt.GetValue("U_Alpha01", oCFLEvent.Row - 1))
MsgBox(oDataTable.GetValue("CardCode", 0))
' PROBLEM - can't get this working - don't know at the moment:
' on other forms SetValue works....
oDt.SetValue("U_Alpha01", oCFLEvent.Row - 1, oDataTable.GetValue("CardCode", 0))
' this also gives me problems...:
'oMtx.Columns.Item("1").Cells.Item(oCFLEvent.Row).Specific.value = oDataTable.GetValue("CardCode", 0)
oForm.Update()
End If
End If
End If
The CFL-Form opens and returns the choosen value(s) at the CFL-event. But writing to MTX still not works with this code...
Maybe you find the last piece. If so: please write here.
Cheers,
Roland
p.s.:
David Nussböck wrote
LOL - ROLAND WAS FASTER ))
...just one minute... -
How to include taxes in the standard pricing procedure
Dear All,
I have configured the Ecc 6.0 version.i have used standard pricing procedure
Rvaa001 as my pricing procedure. i am able to invoice and post the same to the accounts document when i use PR00 condition type.Now i want to include taxes
to sales order.How should i include the taxes.Country is india and the standard
conditions that are given JTX1,JTX2,JTX3,JTX4 are for taxes for india.how i should
include these for my pricing procedure.I also need to include Vat, service tax apart from 50%of gross value tax etc.kindly guide me to include these in my pricing procedures.
Plaese guide me to accopmplish these tasks.
Award points are assured for timely support.
Thanking you
Best Regards,
R.SrinivasanInstead of RVAA01, try the pricing procedures as under, which will have most tax conditions, as per Indian Environmemt.
JDEPOT IN:Depot sale with formula
JEXPOR IN:Export sales with formula
JFACT IN:Factory sale with formula
JINDEP IN:Depot sale
JINEXP IN:Exports
JINFAC IN:Factory sale
JINSTO IN:stock transfer
JSTKTR IN:Stock transfer with formula
Hope this helps you.
Regards,
Rajesh Banka
Reward suitable points.
Maybe you are looking for
-
Why does my Macbook Pro run slow if it's not on the Charger?
My macbooks running terribly slow and I've tried everything. The only thing I've noticed is that it runs faster on the charger. The mouse is super laggy and it's been like this for a couple weeks now. I restored my whole computer, clear cookies, ran
-
OK. Im really stuck here. I have made a slide show in Flash 8 using actionscript 2. Ive managed to succeed to a point. But I will tell you prblems and hopefully they can be solved here as Ive found no where on web that can. Problem1: I have a slide s
-
Hi Frzz, Am trying to create a calulation view with two tables. After joining two tables i want the data in below format could you please guide me how to achieve this. I tried doing it by creating calulated columns of different Status and performed j
-
Illustrator CC quits, won't save my prefs.
I think I'm just going back to the old version!
-
Net view doesn't show all network computers in Windows 2012 R2
We have Symantec Endpoint v12 running on Windows 2012 R2. It used to be working fine and we could see all network computers in Endpoint Protection Manager. Since last Friday, the Endpoint Protection Manger can see only two computers. If I run new vie