Conky - script output and formatting?

Hi, i made a small script that is outputting text to my conky, used like this:
${execi 3600 ~/scripts/horoscope.pl scorpio}
The problem is that the text doesn't seem to be formatted (it goes off the edge of the conky).
How can i get the output text to "fit" within my conky's width and not go off the screen?
Here is the script:
#!/usr/bin/env perl
use strict;
use warnings;
use LWP::Simple;
my $sign = $ARGV[0];
my @signs = qw(
aries taurus gemini cancer leo virgo
libra scorpio sagittarius capricorn
aquarius pisces
sub horoscope($)
our $data = get(
'http://my.horoscope.com/astrology/free-daily-horoscope-' . $sign. '.html'
if ($data =~ m/(.+)\ id=\"textline\">(.+)<\/div>(.+)/)
our $msg = $2 ."\n";
return $msg;
} else
return "Error retrieving horoscope.";
package main;
for my $val (@signs)
if ($sign eq $val)
print horoscope($val)

That won't work, as i change conky often. I _don't want_ a script outputting "hard-formatted" text that will only fit one kind of conky unfortunately.
If that was what i wanted to do i would have done it that way already...
PS; i don't need to be told to read documentation. I wouldn't have bothered posting if i hadn't looked beforehand. It's rather annoying when you spend several hours searching through doc's, misc forums and tutorials trying to find a solution and when you post a thread about it someone asks you to RTFM.....

Similar Messages

  • How can change the font in the script output and the data grid ?

    How can change the font in the script output and the data grid in Sql Developer?

    You can't easily unless you have the latest version (2.1.1).
    If you do have this version then changing the font in the Tools/Preferences menu under the code editor/fonts section will also change the font of the data grid.
    For details of changing the fonts in an earlier version then see Sue's post below.
    http://sueharper.blogspot.com/2010/03/back-to-basics-changing-font-setting-in.html

  • [2.1.1-64] Right-clicking to "Copy" text in Script Output and other windows

    Right-clicking should bring up a menu to "Copy" text in Script Output. The short cut key for copy does work as a workaround.

    The tricky bit is knowing which story you want copied first. But you certainly don't want to involve system Events, or even copy and paste. This should get you started:
    tell application "Adobe InDesign CS4"
    set theSel to selection
    set thePage to parent of item 1 of selection
    set emptyFrame to text frame 1 of thePage whose contents = ""
    duplicate parent story of item 1 of theSel to after insertion point 1 of emptyFrame
    duplicate parent story of item 2 of theSel to after insertion point 1 of emptyFrame
    end tell

  • Script Output and not copying extra trailing spaces

    My keyword foo has failed me (both google and here).
    Is there a way to suppress the extra whitespace that is generated after the script output pane's text, at least during copy-paste?
    When I copy text out of the the script output pane, I end up with 36,000 characters per line when I only need, say 100.
    (Or have I somehow turned on a setting that made it huge and have not noticed it?)
    Thanks,
    Andy Bay

    Hi Gary,
    Thanks for logging this bug:
    Bug 13357403 - FORUM: NEED TRIMOUT AND TRIMSPOOL SUPPORT
    In response to this thread:
    Re: 3.1EA1 - Whitespace in the Script Output window
    Regards.
    Greg.

  • Script output getting suppressed when trying to send email

    Hi,
    I am having an existing report,part of code is given below.
    *data processing.....
          itcpo-tdcovtitle =  z_text.             
          itcpo-tdgetotf   = 'X'.                 
          call function 'OPEN_FORM'               
             exporting                            
                  device             = 'PRINTER'  
                form               = 'LAYOUTSET'
             importing                             
                  result             = x_itcpp_sulph
             exceptions                            
                  canceled           = 1           
                  device             = 2           
                  form               = 3           
                  options            = 4           
                  unclosed           = 5           
                  others             = 6.          
    Data processing ....and writing to script output
      perform entry(zvadin11) using returncode xscreen if found.
         call function 'CLOSE_FORM'         
              importing                     
                    result   = x_itcpp_sulph
              tables                        
                    otfdata  = otf1         
              exceptions                    
                    unopened = 1            
                    others   = 2.    
    So the control will switch from existing report to another program namely zvadin11 and gives script output.
    Now,in my current program i am trying to send script output through Email,for which i am converting script output to OTF data.Then sending the data through mail,using function modules 'SX_OBJECT_CONVERT_OTF_PDF' and 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    I am able to send the data through PDF attachment as required.But i am unable to see Script output.If i comment the OTF related code from open_form and close_form,i am able to see the script output,but i am not getting data into OTF internal table.
    Can i get both the functionalities of seing the script output and also get OTF data for Email.
    Can any one help me?
    Thanks & Regards,
    Seshagiri.M.
    Intelligroup.

    Hi Seshagiri,
    Is yur code that sneds email before 'CLOSE_FORM'?
    Regards,
    Suresh Datti

  • Long lines corupt script output

    When SQL run as Script (F5) produces too long lines any Script Output gets blank. Text is there in tab Script Output and I can copy and past it but I can't see it.
    What setting could affect this?
    --This SQL is working fine
    select rpad('Test1',4000), rpad(' ',996) from dual;
    --and this sql output is white on white:
    select rpad('Test2',4000), rpad(' ',997) from dual;
    Adam Dziurda
    PS. Affected version Oracle SQL Developer Version 4.0.0.12.27 (aka 4.0 EA1)

    Yes, I see that. I've logged bug 17218146 for it.
    Thanks
    Barry

  • To convert Sap Script output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Plese check this sample code from other thread.
    REPORT zzz_jaytest .
    Types Declaration
    TYPES : BEGIN OF ty_pa0001,
    pernr TYPE pa0001-pernr,
    bukrs TYPE pa0001-bukrs,
    werks TYPE pa0001-werks,
    END OF ty_pa0001.
    Internal Table Declaration
    DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
    i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
    i_content_txt TYPE soli_tab, "Content
    i_content_bin TYPE solix_tab, "Content
    i_objhead TYPE soli_tab,
    Work Area Declaration
    w_pa0001 TYPE ty_pa0001, "For pa0001 Details
    w_res TYPE itcpp, "SAPscript output
    "parameters
    w_otf TYPE itcoo, "For OTF
    w_pdf TYPE solisti1, "For PDF
    w_transfer_bin TYPE sx_boolean, "Content
    w_options TYPE itcpo, "SAPscript output
    "interface
    Variable Declaration
    v_len_in TYPE so_obj_len,
    v_size TYPE i.
    Constants Declaration
    CONSTANTS : c_x TYPE c VALUE 'X', "X
    c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
    c_otf TYPE sx_format VALUE 'OTF', "OTF
    c_pdf TYPE sx_format VALUE 'PDF', "PDF
    c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
    c_bin TYPE char10 VALUE 'BIN', "BIN
    c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
    "File Name
    c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
    START-OF-SELECTION.
    Selecting the records from pa0001
    SELECT pernr bukrs werks FROM pa0001
    INTO TABLE i_pa0001 UP TO 10 ROWS.
    Setting the options
    w_options-tdcopies = 1 ."Number of copies
    w_options-tdnoprev = c_x."No print preview
    w_options-tdgetotf = c_x."Return of OTF table
    w_options-tddest = c_locl."Spool: Output device
    Opening the form
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    form = c_form
    device = c_printer
    language = sy-langu
    OPTIONS = w_options
    IMPORTING
    RESULT = w_res.
    LOOP AT i_pa0001 INTO w_pa0001.
    Writting into the form
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    element = 'MAIN'
    window = 'MAIN'.
    ENDLOOP.
    Closing the form
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
    RESULT = w_res
    TABLES
    otfdata = i_otf
    EXCEPTIONS
    unopened = 1
    bad_pageformat_for_print = 2
    send_error = 3
    spool_error = 4
    codepage = 5
    OTHERS = 6.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Converting OTF data to single line
    LOOP AT i_otf INTO w_otf.
    CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
    INTO w_pdf.
    APPEND w_pdf TO i_content_txt.
    ENDLOOP.
    Converting to PDF Format
    CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
    EXPORTING
    format_src = c_otf
    format_dst = c_pdf
    devtype = c_printer
    CHANGING
    transfer_bin = w_transfer_bin
    content_txt = i_content_txt
    content_bin = i_content_bin
    objhead = i_objhead
    len = v_len_in
    EXCEPTIONS
    err_conv_failed = 1
    OTHERS = 2.
    v_size = v_len_in.
    Downloading the PDF File
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    bin_filesize = v_size
    filename = c_name
    filetype = c_bin
    TABLES
    data_tab = i_content_bin.
    The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'.

  • PDF format of script output in irregular format

    Hi All,
    I am getting script output in OTF format in 'CLOSE_FORM'
    of standard sales order script.
    This,I am able to send in PDF format as mail attachment by using function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
    But the alignment and format of data in the attachment doesn't exactly match with original script output.
    Can anyone help me in this regard? Thanks in advance
    - jawahar

    Hi,
        disregard my earlier mail.
       fill itcpo structure and try
      <b> itcpo-tdgetotf = 'X'.    
       xdevice = 'PRINTER'.  </b>   
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                FORM           = TNAPR-FONAM
                LANGUAGE       = NAST-SPRAS
              <b>  OPTIONS        = ITCPO</b>
                ARCHIVE_INDEX  = TOA_DARA
                ARCHIVE_PARAMS = ARC_PARAMS
                DEVICE         = XDEVICE
                DIALOG         = ' '
           IMPORTING
                RESULT         = ITCPP
           EXCEPTIONS
                OTHERS         = 1.
        CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
             EXPORTING
                  FORMAT_SRC      = 'OTF'
                  FORMAT_DST      = 'PDF'
                  DEVTYPE         = 'HPLJ5SI'
             TABLES
                  CONTENT_IN      = CONTENT_IN
                  CONTENT_OUT     = CONTENT_OUT
             EXCEPTIONS
                  ERR_CONV_FAILED = 1
                  OTHERS          = 2.
        OBJBIN[] = CONTENT_OUT[].
    endif.
      DOC_CHNG-OBJ_NAME = TEXT-003.
    doc_chng-obj_descr = text-001.
      CONCATENATE TEXT-002 VBDKR-VBELN "zinvoice14-vessel
                          INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
      IF SY-SYSID NE 'S4P'.
        CONCATENATE DOC_CHNG-OBJ_DESCR TEXT-004 INTO DOC_CHNG-OBJ_DESCR
                                                    SEPARATED BY SPACE.
      ENDIF.
    OBJTXT = 'This is an example of a Sapscript emailed out of SAP'.
    APPEND OBJTXT.
      DESCRIBE TABLE OBJTXT LINES TAB_LINES.
      READ TABLE OBJTXT INDEX TAB_LINES.
      DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
    Fill the fields of the packing_list for the main document:
    It is a text document
      CLEAR OBJPACK-TRANSF_BIN.
    The document needs no header (head_num = 0)
      OBJPACK-HEAD_START = 1.
      OBJPACK-HEAD_NUM = 0.
    but it has a body
      OBJPACK-BODY_START = 1.
      OBJPACK-BODY_NUM = TAB_LINES.
    of type RAW
      OBJPACK-DOC_TYPE = 'RAW'.
      APPEND OBJPACK.
    Create the attachment (the list itself)
      IF NAST-KSCHL NE 'ZSTT'.
        DESCRIBE TABLE OBJBIN LINES TAB_LINES.
    Fill the fields of the packing_list for the attachment:
    It is binary document
        OBJPACK-TRANSF_BIN = 'X'.
    we need no header
        OBJPACK-HEAD_START = 1.
        OBJPACK-HEAD_NUM = 0.
    but a body
        OBJPACK-BODY_START = 1.
        OBJPACK-BODY_NUM = TAB_LINES.
    of type ALI
    IF NAST-KSCHL NE 'ZSTT'.
        OBJPACK-DOC_TYPE = 'PDF'.
        OBJPACK-OBJ_NAME = 'Attachment'.
        OBJPACK-OBJ_DESCR = 'PDF file'.
        READ TABLE OBJBIN INDEX TAB_LINES.
        DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
        OBJPACK-DOC_SIZE = DOC_SIZE.
        APPEND OBJPACK.
      ENDIF.
    get E-mail address
    loop at t_tvbdkr.                                          "S4DK966284
      w_name = t_tvbdkr-tdname.                                "S4DK966284
        W_NAME = VBDKR-TDNAME.                                   "S4DK966284
        IF NAST-KSCHL EQ 'ZLEE'." or nast-kschl eq 'ZPRE'.
          PERFORM READ_TEXT USING W_NAME 'Z555' 'VBBK'.
        ENDIF.
        IF SY-SUBRC EQ 0.
          DELETE TDLINES WHERE TDFORMAT EQ '/*'
                          OR TDLINE EQ SPACE.
          LOOP AT TDLINES.
            RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
            RECLIST-RECEIVER = RECIPIENT_INT.
            RECLIST-REC_TYPE = 'U'.
            APPEND RECLIST.
          ENDLOOP.
        if sy-subrc eq 0.                                      "S4DK966284
          exit.                                                "S4DK966284
        endif.                                                 "S4DK966284
        ENDIF.
    endloop.                                                 
      LOOP AT T_TVBDPR.
        CHECK T_TVBDPR-TDNAME+0(10) = VBDKR-TDNAME.              "S4DK966284
        W_NAME = T_TVBDPR-TDNAME.
        IF NAST-KSCHL EQ 'ZLEE'.
          PERFORM READ_TEXT USING W_NAME 'Z558' 'VBBP'.
        ENDIF.
        IF SY-SUBRC EQ 0.
          DELETE TDLINES WHERE TDFORMAT EQ '/*'
                          OR TDLINE EQ SPACE.
          LOOP AT TDLINES.
            RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
            RECLIST-RECEIVER = RECIPIENT_INT.
            RECLIST-REC_TYPE = 'U'.
            APPEND RECLIST.
          ENDLOOP.
        if sy-subrc eq 0.                                      "S4DK966284
          exit.                                                "S4DK966284
        endif.                                                 "S4DK966284
        ENDIF.
      ENDLOOP.
    SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
    FOR SENDING DOCUMENTS WITH ATTACHMENTS
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = DOC_CHNG
                PUT_IN_OUTBOX              = 'X'
           IMPORTING
                SENT_TO_ALL                = SENT_TO_ALL
           TABLES
                PACKING_LIST               = OBJPACK
                OBJECT_HEADER              = OBJHEAD
                CONTENTS_BIN               = OBJBIN
                CONTENTS_TXT               = OBJTXT
                RECEIVERS                  = RECLIST
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                OPERATION_NO_AUTHORIZATION = 4
                OTHERS                     = 99.
    Regards
    amole

  • Download script Output to XML format

    Dear friends,
    I want to download script output to xml format.
    Can you please help me regarding this issue.
    Its very Urgent.....
    Regards,
    Munna.G

    hi krishna,
    In Smartforms
    goto UTILITIES ---> download form.
    Browse the location and save the form.
    The saved form is in xml format.
    If you want to use that form,
    create a new form and go to utilities--> upload
    OR:
    Use function module FB_DOWNLOAD_FORM .
    Provide your form name as input for i_formname.
    you will get the output in xml format
    i think this will help u
    reward if help ful
    regards,
    sindhu.

  • [solved] Conky 1.81 and execpi regression (messed up output)?

    Hi all,
    I have a script which dynamically outputs the following lines
    ${font dejavusansmono:size=8}$color1${fs_free_perc /}% free on /$alignr${diskio disk/by-uuid/9f90f2fa-49ce-4fb7-886b-bcebbc2fc231}/s
    $color3${fs_bar 14 /}
    $color1${voffset -20}$alignr${fs_used /}/${fs_size /} $font
    ${font dejavusansmono:size=8}$color1${fs_free_perc /home}% free on /home$alignr${diskio sda6}/s
    $color3${fs_bar 14 /home}
    $color1${voffset -20}$alignr${fs_used /home}/${fs_size /home} $font
    ${font dejavusansmono:size=8}$color1${fs_free_perc /home/data}% free on /home/data$alignr${diskio sda5}/s
    $color3${fs_bar 14 /home/data}
    $color1${voffset -20}$alignr${fs_used /home/data}/${fs_size /home/data} $font
    When I copy the output and paste it into my conky, it shows as expected, but when I run the script via ${execpi 6 /path/to/my/script} it comes out messed up.
    Does anyone else see this? I was going to submit it to conky's bug tracker but a quick look at their sourceforge site doesn't reveal any such.
    Last edited by ngoonee (2011-10-27 00:39:47)

    That work around doesn't work for me, I use this script:
    $ cat diskSpace
    #!/bin/bash
    #: Description : Shows the free space of attached devices for Conky
    ## List of places to be displayed if mounted
    placesDisplayed=/home/tom/.ConkyScripts/placesDisplayed
    ## Go through each place
    while read place
    do
    ## If they exist in mtab then print them and their size
    if [[ $( mount | grep -c $place ) -gt 0 ]]
    then
    printf "%s \${alignr}\${fs_used %s} / \${fs_size %s}\n" $place $place $place
    fi
    done < $placesDisplayed
    and it outputs:
    / ${alignr}${fs_used /} / ${fs_size /}
    /home ${alignr}${fs_used /home} / ${fs_size /home}
    /mnt/Windows ${alignr}${fs_used /mnt/Windows} / ${fs_size /mnt/Windows}
    /media/iphone ${alignr}${fs_used /media/iphone} / ${fs_size /media/iphone}
    Which currently looks like this.
    It does the same thing with your workaround...
    The conky bug tracker is useless, no one has done anything about it in months. Any better work arounds or, even better, how would I go about patching this myself?
    Edit: Ok so I downloaded the source and the change log says that the fix was added in 2009:
    2009-07-18
    * Added compilation switch --enable-xoap to be able to use
    www.weather.com as a source of weather data (this avoids adding
    libxml2 as a required dependency for users that wish to use noaa
    and not weather.com)
    * Added support for X alignment across multi-lined objects (i.e., using
    $alignr with $exec)
    * Disabled OpenMP code until GCC's implementation stabilizes
    * www.weather.com can now be used as well as a source of weather data
    How old is the one in the arch repos?
    Unless this is only fixing alignr before and execp instead of in an execp. (Sorry for the wall of text, I've got to put this somewhere otherwise in another month it'll bug me again until it's fixed).
    Last edited by BaconPie (2010-12-22 12:17:39)

  • SQL Developer formatting script output

    Im new to sql developer. I have been unable to format the script output to decrease the width of the column below.
    All numeric columns seem to use 22 underscores. I would like to format this to make it more presentable to users.
    I have tried column, substr, and the various trims. While these work in native unix, they do not seem to work in
    SQL Developer. Up till now I have found SQL Developer to be a very usefull tool. I hope this is just a matter of me not
    having enough knowledge of the product and not a problem with it.
    Any and all assistance greatly appreciated.
    MACCNO
    3021202

    788184 wrote:
    What I need is to produce the following (column is numeric 5)
    HEAD1
    12345
    instead of what comes out currently
    HEAD1
    12345
    Yes, have checked preferences but could not see anything to change.
    Edited by: 788184 on 12/08/2010 19:55I think the problem is related to SQL*PLUS. SQL Developer tries to mimick SQL*PLUS whan you run something as a script. The mimicking s not perfect though.
    The size of this line depends on the typeof the database field. For numbers a larger line is taken. For varchar2 it depends from the size of the values or the header.
    If you are absolutly sure that data inside this column is always smaller, then you could try the following thing.
    select cast(HEAD1 as varchar2(5)) as HEAD1 from yourTableBe careful since this will do a number to string conversion. But since it seems to be for reporting purposes that should be ok.

  • Setting format and format options in Output module settings for render queue item

    Hello,
    I am unable to set the "Format" and "Format options" for video in output module settings programatically using After effects apis.
    I referred the after effects cs3 sdk guide for the apis.
    I find apis for all other options in the "outputmodule settings " like :
    AEGP_SetEmbedOptions
    AEGP_SetOutputChannels
    AEGP_SetStretchInfo
    AEGP_SetSoundFormatInfo
    But there is no api listed for setting the options available in the "Format" tab and "Format options" tab.
    The "Format" tab and "Format options" tab is available in the dialog that opens when user clicks on the Output module settings for the render queue item.
    The format tab when clicked shows a drop down list with aff different formats. By default "Video for Windows" is set.
    The drop down list contains following format options
    Adobe Clip Notes
    Adobe Flash video
    Quicktime movie
    Video for Windows
    I need to be able to set the "Quicktime movie" option in the Format tab programmatically and then set the compression type as "Animation" in the compression settings programatically using the api functions available in AE CS3 SDK
    Please suggest the suitable api to do so.
    I need to write my own plugin to export to Quicktime movie using the after effects apis.
    I follow below steps to do so.
    1. AEGP_InsertMenuCommand and add export option to AE with my own plugin name
    2. In the command hook, select active item using AEGP_GetActiveItem
    3. Add it to render queue
    4. Set the output module settings for 0 th output module using
    suites.OutputModuleSuite1()
    5. Use different functions from suites.OutputModuleSuite1() to set the output module settings like EmbedOptions,StrechInfo etc.
    6. Till this step, I am doing it right. But I am not able to find any api for setting Format options using suites.OutputModuleSuite1()
    I also checked all other suites available for setting FormatOptions but no luck.
    Please help.
    Thanks,
    -Namita

    Hi Namita,
    I am experiencing the same problem.
    I am using AE CC SDK, and I am unable to change the outputmodule format to any of the other movie format types (mov, mpg, flv, etc.).
    It is always set to "avi"
    I even compiled and ran the Queuebert example in the SDK, and there I get the same problem: the path extension is always left on ".avi"
    Does anyone know how to change this?

  • I had a problem with the hard disk on a 2010 macbook pro. Replaced the hard disk with an Hitachi 1TB and when I tried to erase and format It fails with input/output error. Any help much appreciated!

    I had a problem with the hard disk on a 13" 2010 macbook pro. Replaced the hard disk with an Hitachi 1TB disk but when I tried to erase and format, it fails with input/output error and at other times saying unable to allocate memory. Any help much appreciated!

    Zap the PRAM and Reset the SMC, then try again.

  • Dispalying SAP script output in landscape format

    Hello All,
    Could anyone please tell me the step by step process to display a SAP Script output in landscape format?
    Also is it possible to display a column name in 2 lines if it does not fit into 1 line.
    Regards
    Indrajit.

    Hi,
    Here is the way to print the SAPSCRIPT in landscape ..
    Goto SE71, then give you layout name then press change, then press the Header button(CAP ICON), then you will get the Header infomation, then select the Basic Settings pushbutton, then there we have an option to Print the Layout in  Portrait format or Landscapr format, then select the LANDSCAPR format Radio button then activate it
    Regards
    Sudheer

  • Convert  Script output into PDF and save into Unix Directory

    Hi,
      I had Sales Order Acknowledgement Output and wants to converted to PDFs and then these PDFs to be placed in Unix Directory
    on their way to Docs Library.
    I am using the following code
      CALL FUNCTION 'CLOSE_FORM'
        IMPORTING
          RESULT   = itcpp
        TABLES
          otfdata  = lt_otf  " OTF Data
        EXCEPTIONS
          unopened = 1
          OTHERS   = 2.
    After this form ,  table ltf_otf is empty, So i am not converting into PDF .
    So i need the logic to convert to PDF , and most importantly logic to save into UNIX Directory.
    Thanks

    Hi,
    If you are using the Function Module "OPEN_FORM" to open the form for printing then in this function module there is an IMPORTING parameter OPTIONS which is of type ITCPO to this parameter "OPTIONS-TDGETOTF" needs to be passed as 'X' which will give you the OTF output in the FM "CLOSE_FORM".
    After this call the FM "CONVERT_OTF" and pass the FORMAT as "PDF" which will give you the PDF output in LINES table Parameter. Most important please pass some dummy variable to BIN_FILESIZE variable.
    Now by using OPEN DATASET file name FOR OUTPUT IN BINARY MODE and the LOOP the PDF table and use the TRANSFER statement to place the data in the UNIX File and then Finally use the CLOSE DATASET file name.
    Hope will help to address your issue.
    Regards,
    SRinivas

Maybe you are looking for