Change width of fields displayed on PDF from ALV

Hello,
I have a requirement in which i have to print an alv report in a pdf , now in the report say there are 11 fields of which 5 are hidden , so when i print the report in pdf , in the pdf output the entire width of the page is not occupied but only the width of the displayed fields
for eg. The 6 fields being displayed will cover only a part of the page..however i want the fields to occupy the entire page depending on the fields that are displayed .. plz advice how i can achieve this..

Hi,
<li>After converting to PDF, try to use SX_TABLE_LINE_WIDTH_CHANGE function module to change the width of the PDF.
     CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
       EXPORTING
         src_spoolid              = g_spool_no
         no_dialog                = ' '
       IMPORTING
         pdf_bytecount            = l_no_of_bytes
         pdf_spoolid              = l_pdf_spoolid
         btc_jobname              = l_jobname
         btc_jobcount             = l_jobcount
       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.
     CASE sy-subrc.
       WHEN 0.
       WHEN 1.
         MESSAGE s000(0k) WITH 'No ABAP Spool Job'.
         EXIT.
       WHEN 2.
         MESSAGE s000(0k) WITH 'Spool Number does not exist'.
         EXIT.
       WHEN 3.
         MESSAGE s000(0k) WITH 'No permission for spool'.
         EXIT.
       WHEN OTHERS.
         MESSAGE s000(0k)
            WITH 'Error in Function CONVERT_ABAPSPOOLJOB_2_PDF'.
         EXIT.
     ENDCASE.
     CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
       EXPORTING
         line_width_src              = 134
         line_width_dst              = 255
       TABLES
         content_in                  = i_pdf
         content_out                 = l_attachment
       EXCEPTIONS
         err_line_width_src_too_long = 1
         err_line_width_dst_too_long = 2
         err_conv_failed             = 3
         OTHERS                      = 4.
     IF sy-subrc NE 0.
       MESSAGE s000(0k) WITH 'Conversion Failed'.
       EXIT.
     ENDIF.
Thanks
Venkat.O

Similar Messages

  • How to open document to PDF from ALV

    Hi ,
      how to open document to PDF from ALV on clicking (hot spot)
    urgent
    thanks,

    something like this:
    line_fieldcat-fieldname = 'vbeln'.
    line_fieldcat-ref_tabname = 'I_vbeln'.
    line_fieldcat-hotspot = 'X'. " Shows the field as ahotspot.
    line_fieldcat-seltext_m = 'Notification '.
    APPEND line_fieldcat TO i_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = ws_repid
    i_callback_user_command = 'MY_USER_COMMAND'
    and rest of parameters,
    FORM MY_USER_COMMAND USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    IF ucomm = '(Function code of action, say click, or enter'
    CASE selfield-fieldname.
    WHEN 'QMNUM'. "Notification
    IF i_tab-qmnum NE space.
       CALL FUNCTION 'WS_EXECUTE'
          EXPORTING
            commandline = '/F /IM "ACRORD32.EXE"'
            program     = 'TASKKILL'.
    ENDIF.

  • How to create an array in one field and have another field display certain elements from that array?

    I am making a form in Acrobat XI pro.
    In one text field, I created an array of several elements. I want other text fields to display certain elements from that array. For instance, one field should display the 3rd element, another field should display the 13th element, etc.
    The Javascript for making the array is very long, and so I don't want to have to re-calculate the array every single time (in order to reduce rendering time when I open the form on an iPad). This is why I'd like to only have to create the array once, and simply refer to it throughout the form.

    What code are you using to update the array currently? Are you completely rebuiding it when an element changes, or just changing specific elements for certain fields? I'm still not sure what exactly you are trying to do, but something like this in a document level script will create your array:
    var myArray;
    // Call 'updateArray' to initialize array
    updateArray();
    function updateArray() {
         // Code here to create/update array
         myArray = new Array();
         myArray[0] = "Value 1";
         myArray[1] = "Value 2";
         myArray[2] = "Value 3";
    Then, for each field that needs to update this array, you can add a call to 'updateArray()' in the appropriate event. This will rebuild the array completely; if you just want to update specific elements, then you can access them directly.

  • Can I change the text fields displayed in iTunes cover view

    I have alot of music in my iTunes library that are from "various artist" cds.  when in cover flow view i want to see "song" & "artist" fields displayed not "album" & "album artist".  is there a way to change the fields that are displayed.  This is especially annoining when in full screen mode, i want to see the artist of the song that is playing, not the artist for the whole album.
    I have my iMac in a fairly promenent location so that anyone can see what is currently playing on the system that is almost always piping music throughout the house via several airport expresses.
    any tips?
    chris

    I'm not sure this will work, but I think the best chance is:
    Settings > General > Accessibility > Large Text

  • Dynamically change width of field

    I have matrix report. One field must dynamically change width...I think create trigger. He'll change width. But I don't  found function (analog set_item_property in oracle forms). This function must get x-coordinate.  And another function  set width field.
    Help me, please. I solve this problem for more than 2 weeks
    I attached a picture. (example).
    Reports Builder 10

    select trunc(tran.DATE)
      ,t.NAME "t_name"
      ,svt.NAME "type_name"
      ,tran.route_num
      ,rts1.Description "point1"
      ,rts2.DESCRIPTION  "point2"
      ,N||'.'||NN CAT
      ,COUNT(N||NN)
      from table1 tran
      ,table2 svt
      ,table3  rts1
      ,table3  rts2
      ,table4 rt
    where tran.t_id=trc.id and
          tran.st_id=svt.st_id and
        tran.zn_in=rts1.stop(+) and
          tran.zn_out=rts2.stop(+) and
         tran.create_date BETWEEN   :pbegin  AND  :pend  and
          (trc.id = :p_id )
    group by trunc(tran.DATE)
             ,t.NAME
             ,svt.NAME
             ,tran.route_num
             ,rts1.DESCRIPTION
             ,rts2.DESCRIPTION
      ,N||'.'||NN

  • 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 Amit

    Hi,
    Use control-break statement ON-CHANGE for the 4th field, and do the changes.
    regards,
    sri

  • How to get all signature fields in a .pdf from C#

    Does anyone have some sample code that shows how to "iterate" all signatures in a .pdf from C#? Using the SDK and the Javascipt object model I know how to sign a document but I can't figure out how to "get all the signatures". Basically I want to open a .pdf file and then (from C#) find out what persons currently have signed the document. I guess I need to iterate all signature fields and then get the SignatureInfo object, or?
    Anyone?
    Cheers,
    Calle

    I am afraid this don't help me. How do I get the "data" back to C#? Looping all fields in in JavaScript is probably "easy" but I simply can't figure out how to get access to the data from C#. Any one have a suggestion on the best approach?
    Thx,
    CJ

  • Can anyone recommend a Fixup to change any Pantone names in a PDF from C to U?

    Hi I have tried running several pre-flights and fix-ups to analyse a file and change the colours within a PDF from either Pantone "C" to "U" or "U" to "C". It seems to flag a warning in the pre-flight but when I try to use a fix-up to change the names and colours it says that no issues were found and in the output preview of the Plates they remain un-changed. Any ideas ?????? 
    Regards
    Tracy

    There are several ways to do this.
    It seems to me that the easiest would be via SQL toolkit. Then you can open your database in LabVIEW and write directly to it.
    You have to use ODBC Source administrator or the equivalent to define a global definition of the data source. Use a system DSN to describe / define the path to the Access database you want to write into.
    I'd like to find out how to programmatically change the db file to which the DSN points to. Right now, I use one System DSN to point to an Access db and copy over the db file the specific db I want to use at the time.
    Another way is to use Access as an ActiveX server, from LabVIEW.
    We have two VBA books here, plus of course the VBA on-line documentation and the LabVIEW on-line help and examples. The Ac
    tiveX chapter in the book "LabVIEW Advanced Programming Techniques", Bitter, et. al. and the ActiveX examples in the LabVIEW help were the most helpful. I was trying to interface a LabVIEW executable app, an ActiveX server, with Excel VBA though. Using Access as the ActiveX server may or may not be easier. Again there are SOME good examples. The specific version of Access you have may expose different properties and methods than those shown in the examples, however, so you have to be careful.

  • Change width search field

    How can I change width in the iTunes "SearchField"?

    How can I change width in the iTunes "SearchField"?

  • Change a text field on the timeline from a class

    Hi,
    I need some help in changing the content of text fields that are on the stage of the main timeline from within an external class. I have created a countdown timer which is called from the Document Class. I think it is a problem with the scope of the variable but I can't work it out.
    Main Document Class:
    package
        import flash.display.*;
        import flash.events.*;
        import count_timer;
        import RectangleButton;
        public class main extends MovieClip
            public function main()
              [create a Start Btn]
                var startBtn_mc:MovieClip = new MovieClip  ;
                addChild(startBtn_mc);
                var startBtn:RectangleButton = new RectangleButton("Start",90,25,18,0xCC0000,0x000000);
                startBtn_mc.x = 105;
                startBtn_mc.y = 200;
                startBtn_mc.addChild(startBtn);
                startBtn_mc.addEventListener(MouseEvent.CLICK,onClickStartBtn);
                function onClickStartBtn(event:MouseEvent):void
                    var inputDay1:String = dayInputtxt.text;[these are input fields on the stage]
                    var inputHr1:String = hrInputtxt.text;
                    var inputMin1:String = minInputtxt.text;
                    var inputSec1:String = secInputtxt.text;
                    var counter:count_timer = new count_timer(inputDay1,inputHr1,inputMin1,inputSec1);
    Countdown Timer:
    package
        import flash.display.*;
        import flash.utils.Timer;
        import flash.events.*;
        import flash.text.*;
        import RectangleButton;
        public class count_timer extends MovieClip
    //not sure this is correct
    public var daytxt:TextField;
    public var hrtxt:TextField;
    public var mintxt:TextField;
    public var sectxt:TextField;
            public function count_timer(inputDay1,inputHr1,inputMin1,inputSec1)
                var inputDay = inputDay1;
                var inputHr = inputHr1;
                var inputMin = inputMin1;
                var inputSec = inputSec1;
                var msinputDay:Number = Number(inputDay);
                var msinputHr:Number = Number(inputHr);
                var msinputMin:Number = Number(inputMin);
                var msinputSec:Number = Number(inputSec);
                var ms:Number = Number(msinputDay);
    //convert input to milliseconds
                ms = ms + msinputDay * 24 * 60 * 60 * 1000;
                ms = ms + msinputHr * 60 * 60 * 1000;
                ms = ms + msinputMin * 60 * 1000;
                ms = ms + msinputSec * 1000;
                addEventListener(Event.ENTER_FRAME, loop);
                function loop(e:Event):void
                    ms = ms - 1000;
                    var sec:Number = Math.floor(ms / 1000);
                    var min:Number = Math.floor(sec / 60);
                    var hr:Number = Math.floor(min / 60);
                    var day:Number = Math.floor(hr / 24);
                    sec = sec % 60;
                    min = min % 60;
                    hr = hr % 24;
                    daytxt.text = day.toString();[everything appears to work to these variables. I think it should be root.]
                    hrtxt.text=(hr<10)?"0"+hr.toString():hr.toString();
                    mintxt.text=(min<10)?"0"+min.toString():min.toString();
                    sectxt.text=(sec<10)?"0"+sec.toString():sec.toString();
               if (ms <= 0)
                        removeEventListener(Event.ENTER_FRAME, loop);
                        gotoAndPlay("TimesUp");
    Many thanks in advance.

    Your code is not going to work as you show it. First, you should not be putting your class methods inside the constructors... And yes - scope. You make your new count_timer as a local variable inside a function that is called on click. Essentially, the timer is gone just as fast as it's created. If you want the timer available to the other methods in the class it should be declared as a private var in the class definition.
    And I agree with kokorito - have your timer extend EventDispatcher and then it can do like: dispatchEvent(new Event("myTimerEvent")); and you can then add an eventListener to it when you create it in your main class. You just listen for "myTimerEvent" or whatever string you use, and call whatever function you want - just like using any other listener.

  • Field displays in PDF but not in Designer

    I have a field that shows up in the PDF version of the form, but I cannot see it to delete it in Designer. Any good ideas how to get to that field? I tried moving stuff to the back and moving adjacent fields around, but the field does not show up in designer.
    Thanks.

    Hey Giggsy - here's some CSS to go with the previous HTML skeleton I gave you - this should get you into a better position where hopefully you can start figuring more of this out. It's not complete and you're going to have to solve some problems like the copyright you have at the bottom of the main content area - but again, hopefully this will get you on the right foot and help you figure things out.
    padding:0;
    margin:0;
    border:none;
    body{
    background:#56515A;
    font-family:Arial, Helvetica, sans-serif;
    #site_layout{
    width:970px;
    margin:0 auto;
    #header{
    height:61px;
    margin-bottom:10px;
    #header h1{
    font-size:0;
    float:left;
    background: url(sig.png) no-repeat;
    width:91px;
    height:65px;
    .nav{
    float:right;
    color:#CC6600;
    .nav a{
    color:#ddd;
    height:10px;
    overflow:hidden;
    text-decoration:none;
    text-transform:uppercase;
    .nav a:hover{
    color:#fff;
    .subnav{
    float:right;
    height:10px;
    margin-top:-20px;
    clear:both;
    .subnav a{
    color:#ddd;
    height:10px;
    overflow:hidden;
    text-decoration:none;
    text-transform:uppercase;
    font-size:14px;
    padding-left:30px;
    .content{
    background:#666;
    width:980px;
    min-height:350px;
    clear:both;
    .flash{
    float:left;
    width:622px;
    height:350px;
    background:#ccc;
    .textContent{
    float:left;
    background:#000;
    width:358px;
    height:350px;
    color:#fff;
    .textContent h3{
    padding:10px 10px 0 10px;
    margin-bottom:250px;
    .textContent p{
    padding:0 5px 0 10px;

  • Display a PDF from a BLOB Column on a page.

    Hi Folks.
    I have PDFs stored in BLOB columns in the database.
    Is there a way to display these to the APEX user on the page at runtime?
    Any pointers appreciated.
    Meantime I'm going to experiment.
    Cheers
    Dogfighter.

    I suppose this depends really on what you want.
    You have at least two choices.
    1) Allow the user to download the pdf and then they get the option to save it or open it in a new window
    2) You can also get them to open it. You can open it in a new window by adding "_blank"
    in the target.
    The sample application has procedures download_my_file and custom_image_display which will show you how to achieve this.
    The only other way you could possibly do it is open it as a plugin. Thats way beyond my knowledge, but I'm sure someone else will chip in.

  • Displaying a PDF from a folio on Android

    Hi,
    Does anyone know if it's possible to link to a PDF (whether online or within the HTMLResources.zip) and display it on an Android tablet? (Galaxy 10).
    I have this working fine on the iPad Adobe Content viewer app.
    On the Android version if I link to an online .pdf I just get a message saying 'starting download'.
    If I have the link connecting to HTMLResources/nameoffile.pdf nothing happens.
    I am currently running the latest versions of the Adobe Content Viewer apps on both platforms.
    Thanks,
    Mark

    I think the problem is related to the web services of the tablet device.
    We had some problems with links to web content and PDFs that worked perfectly on the iPad but produces an error on Android devices.
    As testing those URLs in the iPad version of the Chrome browser produced the same errors, we concluded that these problems were due to the incomparability of the Chrome web services of the Android devices with the web content of these sites and its capability to display PDFs, which is handled much better by the iPad's Safari.

  • Export to local file-pdf from ALV

    Exporting data including to PDF format .  
    Moderator message - Please use a meaning subject line in future.
    Message was edited by: Suhas Saha

    Sorry , for keeping it short .
    But i want to get pdf   when click in alv grid display on
    Exporting data   .I have use the function module to convert it to the pdf but dont know how to add this file (pdf )to standard alv toolbar button.

  • How to change date parameter field in crystal from YYYY-MM-DD to DD/MM/YY

    Hi
    I want to change a Parameter field in Crystal report from YYYY-MM-DD format to DD/MM/YY format

    >
    Sukhi Singh wrote:
    > Hi
    > I want to change a Parameter field in Crystal report from YYYY-MM-DD format to DD/MM/YY format
    What do you mean by Crystal Report?  Are you sure you posted this to the correct forum?

Maybe you are looking for

  • Leopard, Intel-Mac, OS 9

    Is it possible to install OS 9 Classic on an intel mac that has Leopard installed on it as the OS? If so, how do I do it? Thanks.

  • Is it possible change status of a object?

    Hi! I'm currently learning AS3 to develop my own game but my previous  experience in game development is with LUA script. Within Lua script,  you can write/script objects with different statuses with IF statements.  For an example, Code: if(ObjGet(Ob

  • Second side of doc upside down?

    My officejet pro 8600 all in one prints the second side of a double sided doc, upside down.  I use word 7 and vista and windows 7 (2 diff comps).  How do I stop this? 

  • Two dimension array?

    Show me the code for two dimension array in JSP! Thanks in advance!

  • Change Tablet To iPhone

    I've been with at&t forever.  Last month I bought my wife a refurb samsung tab and signed a new contract on Verizon for the dataplan.  Last week I ported my number over and got a Rezound on verizon.  My wife has decided she doesn't like the tab and w