Alignment in sapscript

Hello Gurus,
What is the trick to get the columns align?, I want to fix the size of the column, if the description of the material has a long name (40 characteres) the data goes right, if the name of the material is short goes left.
So How difficult would be to get the columns length fixed?
I am working with tab paragraph, I have test with unit CM, CH, but I dont understand why the data goes right , left according with the data.
Someone knows how to solve the problem?
Thanks so much
Moderator message - Please use proper subject line in the future.
Message was edited by: Suhas Saha

hi Enrique,
Alignment is a big issue to handle in scripts. Please use the TABs provided in the paragraph format. Each tab means the starting point of next variable.
For eg:
Var1,,Var2,,Var3
In above eg. Var2 and Var3 will have fixed starting point as mentioned while creating the TABs. This means that even if Var2 is blank, it will not shift left.
Forgot to add that column lengths should be fixed and hence you would need to truncate the length of your field. As in your example, if desciption should be truncated to 15 fields if your next column starts at 17 place.
This is a pure trial and error method as per requirement.
Please revert in case of doubt.
Regards,
DN.
Message was edited by: Deepak Nagar

Similar Messages

  • Error in alignment in Sapscript

    Hi all,
            I have copied a standard sapscript J_1IEWRT_CERT INTO ZJ_1IEWRT_CERT.
    form  ZJ_1IEWRT_CERT is running succefully on one client, and i have imported this Z form to another client.
    but the problem is now if the address line increases the alingment shifts to left and i am not getting the TDS and BSR field value as well. plz help as the same form is working fine on one client and not on other client.
    plz help. wht could be the problem.
    Thanks N Regards,
    Ashmita Singh

    Go back through your Z version, comparing all settings to original SAP version for form design, attribues, character formats, paragraph formats and main window content...you changed something somewhere, but then you had to since you saw the need for a Z*version of the standard form.

  • Sapscript alignment

    How will I put alignment in sapscript code? thanks!

    Hi
    Create a new PARAGRAPH format (ZA) in the Sap script and define the
    TAB settings in it as per the space required between fields
    10 CHAr left
    20 char  left
    40 char left
    in script write as below
    ZA &ITAB-MATNR&,,&ITAB-POSNR&,,&ITAB-MAKTX&
    THIS WILL ALLIGN THE FIELDS
    check 2 to 3 times and change the tab spaces and adjust accordingly
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • For SAPscript INCLUDE TEXT, how to align as Paragraph format

    Hi experts and ABAP colleagues!
    Need your help on this sapscript problem:
    How to align texts taken from "INCLUDE TEXT" in SAPscript, according to tab defined in Paragraph Format?
    For example, I defined BG to have tabstop at the 2nd column (or equivalent to 1st tab position) where I need to print the text, and then declared it in SE71 like below:
    However the text prints at the leftmost instead of at the 2nd col position - (8th char tab defined in par. format BG).  Hence it is not aligned to its proper heading.  Line Number instead of Description - which is not okay for client view that needs these Thai texts. 
    The technical details I included below.  Kindly examine:
    1.)  Window >Main > Text Element > Include Text command
    /E   ITEM_TEXT
    BG   ,,&TTXIT-TDTEXT&
    /:   INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&
    /:   NEW-PARAGRAPH BG
    Note:  I used command "NEW-PARAGRAPH" and had exactly the above code in se71.  Anything missed here?  Pls. help.  Thanks.
    #2.) Paragraph Format > Tab
    No. -
      Tab Position -
    Alignment
    1            8,00 CH            LEFT
    2            28,00 CH          CENTER
    etc.
    Note:   and then i put in  ",,&TTXIT-TDTEXT&" (see above) with the 2 comma's beforehand to say that its on the 1st tab or at the 8th character where it should be printed, but does not give intended result... pls help.
    #3.) Paragraph Formats > Standard Attributes
    Left Margin - 0 cm
    Alignment - Left
    no blank lines checkbox - ticked
    Note:  Is there any more attribute i can manipulate from here to force display at the right position?
    Thank you so much in advance for all your help.  Our project team will really appreciate it.  May the Lord bless you as we go through our SAP work!
    Sincerely,
    Celeste

    Here's a thought, instead of using tabs, try writing a method that takes a string that is the starting string, a pad character, and a length and returns a string padded to that length with the specified character.
    public String padR(String src, String padChar, int len)
        // ... You get to fill in the rest suggestion try to do it without a loop
    }Have fun,
    PS.

  • Barcode alignment / horizontal / vertical w/ sapscript

    Hello everyone!
    I am developing a sheet of labels wearing a EAN13 Barcode. It has 56 labels (german brand, no 3668) on a sheet. one label is presented by one instance of the main window, the "First" Page consists of 56 page windows.
    i put the structure into a form in sapscript and for any label on its position i do call a new window and write its contents into it. ( A Barcode of EAN and under or above the barcode i would like to see one line of text).
    What happened till now?
    I have copied BC_EAN13 to a ZBarcode in both a system and a printer barcode.
    The barcode is printed via DIMM Module and it works. It is now 5 mm high and 35 mm wide, what should easily fit into a 52,5 * 21,2 mm label.
    Problem: 1st line - barcode is truncated. if i add lines in the form as spacers, it does not move below so that i can ensure ideal positioning on the sheet.
    on the label sheet there´s no border, i even tried the option baseline alignment, but it made it even worse.
    So: problem is how to find exact position of the barcode on a label sheet. how to move it a little bit below, find space for one line of text and print all 56 labels on a sheet without the first line being truncated.
    please also advice if the printer can not print sheets borderless (HP4350 cyrillic ´version).
    thx,
    br
    stefan

    Thanks Andrew!
    Since not everyone posts solution if it is solved by the people themselves, here´s my solution in case anyone is interested:
    The hint was what i basically did before, lots of page windows representing one label on the sheet.
    It seems that printing on the very top of the page (upper space 0 mm) and printing a barcode there could not be done by the printer,
    so after i skipped the first line of labels (deleted first row of page windows) i got a much better result. i can´t use all the labels now, but it hit and therefore it works now - no more unstable positioning,
    double print of same barcode in same window etc.
    I hope everyone understood this rough explanation.

  • Barcode/sapscript alignment horizontal / vertical on hp4350 cyrillic

    Hello everyone!
    I am developing a sheet of labels wearing a EAN13 Barcode. It has 56 labels (german brand, no 3668) on a sheet. one label is presented by one instance of the main window, the "First" Page consists of 56 page windows.
    i put the structure into a form in sapscript and for any label on its position i do call a new window and write its contents into it. ( A Barcode of EAN and under or above the barcode i would like to see one line of text).
    What happened till now?
    I have copied BC_EAN13 to a ZBarcode in both a system and a  printer barcode.
    The barcode is printed via DIMM Module and it works. It is now 5 mm high and 35 mm wide, what should easily fit into a 52,5 * 21,2 mm label.
    Problem: 1st line - barcode is truncated. if i add lines in the form as spacers, it does not move below so that i can ensure ideal positioning on the sheet.
    on the label sheet there´s no border, i even tried the option baseline alignment, but it made it even worse.
    So: problem is how to find exact position of the barcode on a label sheet. how to move it a little bit below, find space for one line of text and print all 56 labels on a sheet without the first line being truncated.
    please also advice if the printer can not print sheets borderless (HP4350 cyrillic ´version).
    thx,
    br
    stefan
    Message was edited by:
            Stefan Loibner
    Message was edited by:
            Alvaro Tejada Galindo

    Thanks Andrew!
    Since not everyone posts solution if it is solved by the people themselves, here´s my solution in case anyone is interested:
    The hint was what i basically did before, lots of page windows representing one label on the sheet.
    It seems that printing on the very top of the page (upper space 0 mm) and printing a barcode there could not be done by the printer,
    so after i skipped the first line of labels (deleted first row of page windows) i got a much better result. i can´t use all the labels now, but it hit and therefore it works now - no more unstable positioning,
    double print of same barcode in same window etc.
    I hope everyone understood this rough explanation.

  • Align image in sapscript

    I am trying to align an image in SAPScript. I use INCLUDE to upload the image into the form. There is a window with a BOX FRAME around it. How can I align the image so that it is left horizontal and center vertical. Currently it appears center horizontal and top vertical.

    Hi,
    Please check the below PDF document.
    http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF#search=%22Background%20image%20in%20Sapscript%20%22
    Re: WATERMARK IN SAPSCRIPTS
    Thanks,
    ramakrishna

  • Having problems in aligning my text in Sapscript...

    Hello Experts,
    I am displaying 4 items in my main window and created a paragraph format with tab
    spacing. Now my problem is this, when one of the variables does not have a value, the items
    on the right of it moves to the left so it misaligns. How can I do it in such a way that
    even though one of the items does not have a value, it will still be in place?
    Thank you guys and take care!

    Hello Experts,
    I have defined my items this way:
    T1    &REGUP-XBLNR&,,&REGUP-BLDAT&,,&LTYC_SGTXT&,,&REGUP-DMBTR&
    And in my TABS, I have the values of 2.20 CM(Left), 2.30 CM(Left) and 14 CM(Decimal).
    The 2.20 CM is for the &REGUP-BLDAT&, the 2.30 CM is for the &LTYC_SGTXT& and 14 CM for the &REGUP-DMBTR&.

  • How to change font size and spaces between fields in SAPscripts?

    Hi everyone!
    I need help using sapscripts, 'cause I don't know what's the meaning of some symbols, for example: ,,<Z>&BSEG-HBKID</>. Now my question is what's for: ",," "<Z>" and "</>", I have no idea what does symbolas are for?
    If anyone can help me I'll really appreciate it!
    Thanks for your help!!!

    Dear Guillermo,
    To give a clear answer to your query.
    I have the following.
    when you are in one window and then go to the contents of the window in change mode.
    There you can see that in the command editor i.e the editor where you are writing your code.
    as illustarated above your editor looks like.
    in the left box you give commands like /: or /* or a paragraph format which you have defined like 'P1'.
    By defining this paragraph format you want to tell that the text which is written on the right box will use the font defined whether it is <b>BOLD</b> / <i>Italic</i> etc. whether it is justified or left-aligned etc. and also in the same paragraph format you will define your tab stops.
    So when you write <b>,,</b> then it is equivalent to one tab stop. i.e how much margin you want to leave for this paragraph line to start from you page starting.
    the symbol <b><Z></b> represents a character format only catering to the characters defined in between <b><Z></b> and <b></></b>This character format is defined through the push button charcter format in you form editor.
    the <b></></b> indicates the end of the character format.
    &BSID-HBKID&.
    & represents that the value will come dyanmically which has been defined before in the Driver program or in the script itself through the <b>DEFINE</b> command.
    The <b>BSID-HBKID</b> represents that the value will be got from the table BSID and field HBKID during runtime.
    I Hope things are far pretty clear in this way.
    If you still have any more clarifications please come back with any further queries, but not forget to reward appropriately.
    Thanks & Regards
    venugopal

  • Printing digital signature in main window of sapscript at some location

    Hi,
    I want to print graphics in main window in sapscript. I want to position the graphic ( signature) at some position (preferably right aligned ). How to do that? Can we do that in .bmp graphics. In case we use .tiff format , how to do it. Tell me the steps involved as I have never used RSTXLDMC to upload .tiff files.
    Regards,
    D.Mallick

    Hi
    Just open rstxldmc in se38 and execute.
    It will gve you a screen. You need to fill the first two blocks only. Remaining are optional.
    File Name :  Give pathe+name of your .tiff file
    Type         : Bcol for colour     and bmon for mono
    Resolution      : say 75 (as you wish)
    Second block
       Text name :   only replace astrick by your name ZHEX-MACRO- has to be there.
    Actually  this program will convert .tiff file into text file.
    you can include this text file in any window. Text name is the name of the text file generated
    no more changes
    Now execute.
    Now you can use this text file  ZHEX-MACRO-name   in any windoow
    If useful, give me points
    cheers
    vamshi

  • SAPScript output

    Hi,
    This is my example.
    In Sapscript the name of the form is Z_TESTSCRIPT.
    Text elements for following windows:
    HEADER
    Element HEADER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2 ,,<B>TEST PURCHASE ORDER</>
    MAIN
    Element MAIN
    P1 <B>Customer/Supplier:</>,,&KNA1-NAME1&
    P1 <B>PO No:</>,,&EKPO-EBELN&
    P1 <B>Part No:</>,,&MAKT-MATNR&
    P1 <B>Description:</>,,&MAKT-MAKTX&
    P1 <B>Quantity:,,</>&EKPO-MENGE&
    P1 <B>Sign:</>&uline(81)&
    P1 <B>Date:</>&EKKO-AEDAT&
    FOOTER
    Element FOOTER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2 ,,<B>PLEASE SIGN THE PO BEFORE DISPATCH</>
    And the ABAP Program name is ZPSAPSCRIPT.
    And the code is like this.
    REPORT ZPSAPSCRIPT.
    TABLES : EKKO,
    EKPO,
    KNA1,
    USR01,
    MARA,
    MAKT.
    DATA : BEGIN OF ZOPTION.
    INCLUDE STRUCTURE ITCPO.
    DATA : END OF ZOPTION.
    PARAMETERS: P_EBELN LIKE EKKO-EBELN,
    P_EBELP LIKE EKPO-EBELP.
    CLEAR EKPO.
    SELECT SINGLE * FROM EKPO
    WHERE EBELN = P_EBELN AND
    EBELP = P_EBELP.
    CLEAR KNA1.
    SELECT SINGLE NAME1 FROM KNA1
    INTO KNA1-NAME1
    WHERE KUNNR = EKPO-KUNNR.
    CLEAR MAKT.
    SELECT SINGLE MAKTX FROM MAKT
    INTO MAKT-MAKTX
    WHERE MATNR = EKPO-MATNR AND
    SPRAS = SY-LANGU.
    CLEAR USR01.
    SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
    ZOPTION-TDDEST = USR01-SPLD. "Output device (printer)
    ZOPTION-TDIMMED = 'X'. "Print immediately
    ZOPTION-TDDELETE = 'X'. "Delete after printing
    ZOPTION-TDPROGRAM = 'ZPQRPRNT'. "Program Name
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX = ' '
    ARCHIVE_PARAMS = ' '
    DEVICE = 'PRINTER'
    DIALOG = ' '
    FORM = 'Z_TESTSCRIPT'
    LANGUAGE = SY-LANGU
    OPTIONS = ZOPTION
    IMPORTING
    LANGUAGE = SY-LANGU
    EXCEPTIONS
    OTHERS = 1.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'HEADER'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'HEADER'
    EXCEPTIONS
    ELEMENT = 1.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'MAIN'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    EXCEPTIONS
    ELEMENT = 1.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT = 'FOOTER'
    FUNCTION = 'SET'
    TYPE = 'BODY'
    WINDOW = 'FOOTER'
    EXCEPTIONS
    ELEMENT = 1.
    CALL FUNCTION 'CLOSE_FORM'
    EXCEPTIONS
    UNOPENED = 1
    OTHERS = 2.
    <b>But the output, if i click on print preview button then the output is like below, but i could not see the purchase order which i have selected in the selection screen.
    Element HEADER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2 ,,<B>TEST PURCHASE ORDER</>
    Element MAIN
    P1 <B>Customer/Supplier:</>,,&KNA1-NAME1&
    P1 <B>PO No:</>,,&EKPO-EBELN&
    P1 <B>Part No:</>,,&MAKT-MATNR&
    P1 <B>Description:</>,,&MAKT-MAKTX&
    P1 <B>Quantity:,,</>&EKPO-MENGE&
    P1 <B>Sign:</>&uline(81)&
    P1 <B>Date:</>&EKKO-AEDAT&
    Element FOOTER
    /: POSITION XORIGIN 2 CM YORIGIN '-0.5 CM'
    /: BOX XPOS 1 CM YPOS 1 CM WIDTH 18 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
    P2 ,,<B>PLEASE SIGN THE PO BEFORE DISPATCH</>
    Same as the coding done for the text element for the main, header and Footer.</b>
    Message was edited by: sriram Ponna
    Message was edited by: sriram Ponna
    Message was edited by: sriram Ponna

    Hi,
    These is how i define the paragraphs.
    Paragraphs    Attributes
      P1          Default Paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Left margin       1.00 CM
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         12.0 Point
      P2          Header Paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Left margin       4.50 CM
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         18.0 Point
                  Bold              Yes
      P3          Undelined paragraph
                  Standard attributes
                  Line spacing      1.00 LN
                  Alignment         Left-aligned
                  Font attributes
                  Font family       TIMES
                  Font size         12.0 Point
                  Underlined        Yes
    Thanks,
    Sriram.

  • Alignment all out after unicode conversion

    The system is now unicode compliant.
    The purchase order, invoice that has Chinese text as line item are all printed out of alignment.
    It had pushed the next field towards the right.
    I understand it is becuase of the unicode character / bytes difference.
    Can someone shared with me how can I modified the sapscript to get it back in alignment?
    Please provide a sample.
    Thanks
    bye

    Hi,
    I have read the thread before. It doesn't help in my case.
    To share it with you,
    I realised that I can place a length field after the  field.
    Previously I could use &EKPO-TZX01(40)&. Now I had to remove it to &EKPO-TZX01&.
    it works for some but not all sapscripts.
    For those that doesn't work, I will have to changed it as well as setting the tab using a separate paragraph.
    So much to change after this unicode conversion.
    Thanks

  • Converting from SAPSCRIPT to PDF

    Sir,
    I am converting form from sapscript to pdf. The form is converting but the ouput font in pdf is seen in bigger size so the alignment is getting distorted. Kindly advise solution. I am in 4.6C
    Thanks & Regards

    Hi
    See the sample code and do accordingly
    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.
    If you r using this function module check it once....
    call function 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = v_len_in
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    others = 4.
    Fehlerhandling
    if sy-subrc <> 0.
    endif.
    or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
    follow this link for sample program.
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to convert sapscript to excel & send it as attachment in mail?

    Hi,
    I have a requirement to send the customer statement  in excel format with all open items to the customer email address.  I am creating the customer statement via sapscript . Then I need to convert that into excel. I tried using CONVERT_OTF. But alignment is not coming properly. I have logo also in the script. That also I want in the excel . When I send the mail, the data is not showing correctly
    Has anyone worked in similar scenario? Please tell me what are the ways for doing this?
    Thanks in advance,
    Jissa.

    HI,
    For sending script output through email
    Please check this code it may help u.
    FORM send_mail USING p_y16m_rcp_par STRUCTURE y16m_rcp_par.
    Have a subject for the mail
    g_s_document_data-obj_name = text-t02.
    g_s_document_data-obj_descr = text-t03.
    Fill receiver information
    g_s_receivers-rec_type = p_y16m_rcp_par-rec_type.
    g_s_receivers-rec_id = p_y16m_rcp_par-rec_id.
    g_s_receivers-express = 'X'.
    APPEND g_s_receivers TO g_t_receivers.
    Call function to send mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = g_s_document_data
    document_type = 'RAW'
    PUT_IN_OUTBOX = ' '
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    OBJECT_HEADER =
    object_content = g_t_object_content
    CONTENTS_HEX =
    OBJECT_PARA =
    OBJECT_PARB =
    receivers = g_t_receivers
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " SEND_MAIL
    Regards,
    Pavan.

  • Script alignment problem

    hi to everyone
    plz help me in this issue
    how to get alignment correct. iam facing problem for amount figures if hte amount value is more it is affecting all the other fields of the out put.
    how to align the amount fields without affecting other fields in out put.
    hi heilman
    but when the amount field when value is in twele or 13 digits i am gettinng a problem of left alignment,can u plz suggest how to get get left aligned of field withhuge value
    Thanks & Regards
    Kiran
    Message was edited by: kiran kumar

    Are you using tabs?   You can also specify a smaller length in the sapscript for the field.
    &ekpo-menge(6.2)&
    Regards,
    Rich Heilman

Maybe you are looking for