on 07-14-2010 4:47 AM
Hi ALL,
I want to create a print button on my view and it should print the contents of the view(table). Can anyone please help me on the same
Thanks,
Shilpa DHawan
Hello,
please refer to the very recent thread
Depending on what you mean by "print" you may even want to have a look at ACFExecute as until the 7.02 browser print functionality, all "print" functionality is just opening the current view in another application in such a way that it can then be easily printed - export to PDF, Excel etc.
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using the code in my blog - which was linked in the other post will export to Excel.
As the other post mentions - it is very difficult to cause printing directly from WDA - as there is no browser functionality to do this - and WDA runs in browsers.
Thomas's link definitely works - you will need to use SAPLink to load the file into your system.
As was pointed out by Chris, the format of the file I linked to was a SAPLink Nugget. SAPLink is an open source community project that assists developers with moving code into and out of their ABAP systems. If you install SAPLink you can then import the file I linked to and it will create the corresponding development objects in your system. In the case of this example it is a class and some ddic objects. The class has a method that you can pass an ABAP internal table into (TYPE REF TO DATA) and it will print the data in that internal table.
Hi Thomas, Chris,
Many thanks for your replies.
I have installed the SAP_link report. Thats is, I have created a SE38 report and pasted the code written in that. Then I uploaded the NUGG_WEB_PRINT_TABLE.nugg but it gave an exception:
Short text
CREATE OBJECT: The class " " was not found.
What happened?
Error in the ABAP Application Program
The current ABAP program "ZTEST_SHI" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CREATE_OBJECT_ERROR', was not
caught in
procedure "INSTALLNUGGET" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The dynamically specified class " " at CREATE OBJECT neither exists as
local, nor as global class in the system, or is overshadowed by a local
data type of the same name.
-
Am I missing something??? ..Kindly Guide again please.
Thanks and Regards,
Shilpa Dhawan
Hi Thomas,
Kindly ignore the last message.
Just one more question:
What do I need to fill in the following parameters:
PRINT_OPTIONS??
MESSAGES??
It would be great if you can elaborate on these two parameter.
Just for your information I am not passing anything in the ITERATOR or COL_DEF since they are optional.
Thanks for your help.
Regards,
Shilpa
Hi Thomas,
I need your help to use this functionality. I am using the importing parmeter col_def to set the title of the coulmns but I am not able to see the title completely , so i guess I have to use the width field to set the column width but still it is not working fine. Can you suggest any thing to set the width automatically as per the title of the columns.
Thanks a ton in advance ,
Shilpa
Keep in mind that the print output is old style list processing. I suppose you could try and set the column widths of the SALV object, but I'm not sure how much control there is with the column widths in this format. How exactly have you tried to set the column widths?
In list processing the different DDic headers (small, medium, large) were often used for the appropriate column length. Perhaps you will simply have to consider shorter column headers.
HI Thomas,
Thanks for your reply.
I am setting the column title and name using the below code.
But I am not getting the title completely it is displaying for example 'Organizat' in the spool.
DATA: LT_TABLEVIEWCONTROLTAB TYPE TABLEVIEWCONTROLTAB.
DATA: LS_TABLEVIEWCONTROL TYPE TABLEVIEWCONTROL.
LS_TABLEVIEWCONTROL-COLUMNNAME = 'VA_ORG_ID'.
LS_TABLEVIEWCONTROL-TITLE = 'Organization Unit ID'.
LS_TABLEVIEWCONTROL-width = '800'.
LS_TABLEVIEWCONTROL-WRAPPING = 'X'.
APPEND LS_TABLEVIEWCONTROL TO LT_TABLEVIEWCONTROLTAB.
So please guide me on how to set the column width
Thanks n Regards,
Shilpa Dhawan
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.