Standard text

hi to all abap Gurus
what is standard text in script ?how to use it > where  do we use it ? we know that the use is reusability . how it is reusable . and it is used to support for multiple languages . pls tell in detail . pls dont give any link . points will bre rewarded defintilely for good answers . pls urgent.  pls give som esample coding on this .

Standard Text is nothing but Global Text.
Suppose you have to display footer/header info. whenever you create a s cript for ur org.your caompany details,logo etx. instead of writing them everytime, if you careta a global text u can include them wherevr u want.
Mainly we are using standard texts to avoid hardcoding in scripts or smartforms.
If you need to include the name of your company and address in the form you
just include a standard text in your form by include statement(script) and by
include text dropdown in forms. If in later part of time your company address
change you need to change the standard text not to touch the form. This is the
way standard text helps us.
in Tcode SO10, u create a text and give a name activate it.
Here is the sample code to send script through E mail..
*& Report  ZRICHA_OTF_PDF
report  zricha_otf_pdf
    message-id zz.
CONSTANTS                                                           *
constants : c_x(1)      type c value 'X',      " For constant value
            c_otf(3)    type c value 'OTF',    " For format
            c_u(1)      type c value 'U'.      " Mail Option
VARIABLES                                                           *
data : v_rqident  type tsp01-rqident,  " For Spool Number
       v_rqclient type tsp01-rqclient, " For Client
       v_rqo1name type tsp01-rqo1name, " For Object name
       v_spool    type tsp01-rqident,  " For Spool Number
       v_spool1   type tsp01-rqident.  " For Spool Number
FLAGS                                                               *
data : f_spool type c.
  INTERNAL TABLES                                                    *
Internal table for sending mails
data: it_pdf          like tline      occurs 10 with header line,
      it_xi_pdf       like tline      occurs 0  with header line,
      it_html         like solisti1   occurs 0  with header line,
      it_xi_temp      like bapiqcmime occurs 0  with header line,
      it_xi_mime(255) type c          occurs 0  with header line.
For sending mail
data: it_objpack like sopcklsti1 occurs 2 with header line.
Internal table for Single List with Column Length 255
data : it_objbin like solisti1 occurs 10 with header line.
Internal table for Single List with Column Length 255
data : it_objtxt like solisti1 occurs 10 with header line.
Internal table for Structure of the API Recipient List
data : it_reclist like somlreci1 occurs 5 with header line.
Structure of the API Recipient List
data: x_doc_chng like sodocchgi1.
Internal table for storing the variants
data : begin of it_variant1 occurs 0,
        variant like varid-variant,
       end   of it_variant1.
Internal table to store variants for the programs
data: it_variant2 like it_variant1 occurs 0 with header line.
Internal table for storing the selected values
data it_return type ddshretval occurs 0 with header line.
Internal table for storing the mail-ids
data : begin of it_mailid occurs 0,
        kokrs like csks-kokrs,
        kostl like csks-kostl,
        datbi like csks-datbi,
        telx1 like csks-telx1,
       end   of it_mailid.
Internal table for storing the mail-ids
data : it_mailid1 like it_mailid occurs 0 with header line.
  SELECTION SCREEN                                                   *
data : v_char type char50.
selection-screen begin of block b1 with frame title text-001.
select-options: s_email for v_char  no intervals
                lower case
                no-display.
select-options: s_email1 for v_char  no intervals
                lower case
                no-display.
selection-screen end of block b1.
selection-screen begin of block a1 with frame title text-028.
selection-screen begin of line.
parameters : p_c1 as checkbox.
selection-screen comment 3(66) text-026 for field p_c1.
selection-screen end of line.
parameters : p_set like tsp1d-papart matchcode object zh_tsp1d.
selection-screen skip 1.
parameters : p_vara1 type rs38m-selset.
selection-screen end of block a1.
selection-screen begin of block a2 with frame title text-029.
selection-screen begin of line.
parameters : p_c2 as checkbox.
selection-screen comment 3(56) text-027 for field p_c1.
selection-screen end of line.
parameters : p_set1 like tsp1d-papart matchcode object zh_tsp1d.
selection-screen skip 1.
parameters : p_vara2 type rs38m-selset.
selection-screen end of block a2.
AT SELECTION SCREEN ON VALUE REQUEST
at selection-screen on value-request for p_vara1.
For fetching the variants available for the program
  perform fetch_variants.
at selection-screen on value-request for p_vara2.
For fetching the variants available for the program
  perform fetch_variants1.
AT SELECTION SCREEN
at selection-screen.
For Validation
  perform validation.
START OF SELECTION                                                  *
start-of-selection.
To get the output data and mail
  perform fetch_data.
END OF SELECTION                                                    *
end-of-selection.
  if f_spool = c_x.
    message e000 with 'Spool Not Generated'(060).
  endif.
*&      Form  fetch_data
      To get the output data and mail
form fetch_data .
To send the output to spool
  perform generate_spool.
endform.                    " fetch_data
*&      Form  generate_spool
      To send the output to spool
form generate_spool .
  data: l_params like pri_params,
        l_days(1)  type n value 2,
        l_count(3) type n value 1,
        l_valid    type c,
        l_valid1   type c,
        l_params1  like pri_params.
  data: l_device type usr01-spld.
*Get the printer name for the user
  select single spld into l_device from usr01 where bname = sy-uname.
  if l_device is initial.
    l_device = 'LOCL'.
  endif.
For report-1
  if p_c1 = 'X'.
Setting the print parameters
    call function 'GET_PRINT_PARAMETERS'
      exporting
        destination    = l_device
        copies         = l_count
        list_name      = sy-uname
        list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
        release        = c_x
        new_list_id    = c_x
        expiration     = l_days
       LINE_SIZE      = 255
       LINE_COUNT     = 65
        layout         = p_set
        sap_cover_page = space
        cover_page     = space
        receiver       = 'SAP*'(010)
        department     = 'System'(011)
        no_dialog      = c_x
      importing
        out_parameters = l_params
        valid          = l_valid.
    if l_valid <> space.
      clear v_spool.
Fetch the spool number b4 submit
      perform fetch_recent_spool using v_spool.
Submitting the program to spool
      submit rkaep000 to sap-spool
        using selection-set p_vara1
        spool parameters l_params
        without spool dynpro
        and return.
      clear v_spool1.
Fetch the spool number after submit
      perform fetch_recent_spool using v_spool1.
      if v_spool = v_spool1.
        f_spool = c_x.
        if p_c2 is initial.
          stop.
        endif.
      else.
Checking the format ( ABAP/OTF)
        perform format_check tables s_email.
      endif.
    else.
      message e000 with 'Problem in print settings'(003).
      stop.
    endif.
  endif.
For Report-2
  if p_c2 = 'X'.
Setting the print parameters
    call function 'GET_PRINT_PARAMETERS'
      exporting
        destination    = l_device
        copies         = l_count
        list_name      = sy-uname
        list_text      = 'SUBMIT ... TO SAP-SPOOL'(008)
        release        = c_x
        new_list_id    = c_x
        expiration     = l_days
       LINE_SIZE      = 200
       LINE_COUNT     = 65
        layout         = p_set1
        sap_cover_page = space
        cover_page     = space
        receiver       = 'SAP*'(010)
        department     = 'System'(011)
        no_dialog      = c_x
      importing
        out_parameters = l_params1
        valid          = l_valid1.
    if l_valid1 <> space.
      clear v_spool.
Fetch the spool number b4 submit
      perform fetch_recent_spool using v_spool.
Submitting the program to spool
      submit gp3diehxy88snfj0391v7kf9ek7050 to sap-spool
        using selection-set p_vara2
        spool parameters l_params1
        without spool dynpro
        and return.
      clear v_spool1.
Fetch the spool number after submit
      perform fetch_recent_spool using v_spool1.
      if v_spool = v_spool1.
        message e000 with 'Spool Not Generated'(060).
        stop.
      endif.
Checking the format ( ABAP/OTF)
      perform format_check tables s_email1.
    else.
      message e000 with 'Problem in print settings'(003).
      stop.
    endif.
  endif.
endform.                    " generate_spool
*&      Form  fetch_recent_spool
      Fetch the recent spool number generated
form fetch_recent_spool using p_v_spool type tsp01-rqident .
  data:  l_user like tsp01-rq2name.
  clear : v_rqident,
          v_rqclient,
          v_rqo1name.
  l_user = sy-uname.
Get latest Spool No
  select single rqident
                rqclient
                rqo1name
         into (v_rqident , v_rqclient , v_rqo1name)
    from tsp01
   where rqcretime =   ( select max( rqcretime )
                                from tsp01
                               where rq2name eq l_user
                                 and rqfinal eq '.' ).
  if sy-subrc = 0 .
    p_v_spool = v_rqident.
  endif.
endform.                    " fetch_recent_spool
*&      Form  format_check
      Checking the format ( ABAP/OTF)
form format_check tables p_s_email structure s_email.
  data : l_objtype    like rststype-type.
  call function 'RSTS_GET_ATTRIBUTES'
    exporting
      authority     = 'SP01'(019)
      client        = v_rqclient
      name          = v_rqo1name
      part          = 1
    importing
      objtype       = l_objtype
    exceptions
      fb_error      = 1
      fb_rsts_other = 2
      no_object     = 3
      no_permission = 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.
  if l_objtype(3) = c_otf.
Convert OTF Spool to PDF
    perform convert_otf2pdf tables p_s_email.
  else.
Convert ABAP Spool to PDF
    perform convert_abap2pdf tables p_s_email.
  endif.
endform.                    " format_check
*&      Form  convert_otf2pdf
      Convert OTF Spool to PDF
form convert_otf2pdf tables p_p_s_email structure s_email .
  clear   it_pdf.
  refresh it_pdf.
  data : l_bytecount  type i.
Fn. to get the PDF format
  call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    exporting
      src_spoolid              = v_rqident
      no_dialog                = 'X'
    importing
      pdf_bytecount            = l_bytecount
    tables
      pdf                      = it_pdf
    exceptions
      err_no_otf_spooljob      = 1
      err_no_spooljob          = 2
      err_no_permission        = 3
      err_conv_not_possible    = 4
      err_bad_dstdevice        = 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.
  if sy-subrc = 0.
For page format
    perform page_format tables p_p_s_email.
  else.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
endform.                    " convert_otf2pdf
*&      Form  convert_abap2pdf
       Convert ABAP Spool to PDF
form convert_abap2pdf tables p_p_s_email structure s_email.
  clear   it_pdf.
  refresh it_pdf.
  data : l_bytecount  type i.
Fn. to convert to PDF format
  call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
    exporting
      src_spoolid              = v_rqident
      no_dialog                = 'X'
    importing
      pdf_bytecount            = l_bytecount
    tables
      pdf                      = it_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.
  if sy-subrc = 0.
For page formatting
    perform page_format tables p_p_s_email.
  else.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
endform.                    " convert_abap2pdf
*&      Form  send_mail
      For sending mail
form send_mail tables mail structure s_email .
Structures and internal tables for the send data
  data: objpack like sopcklsti1 occurs 2  with header line,
        objhead like solisti1   occurs 1  with header line,
        objbin  like solisti1   occurs 0  with header line,
        objtxt  like solisti1   occurs 10 with header line,
        reclist like somlreci1  occurs 5  with header line.
  data: doc_chng like sodocchgi1,
        tab_lines like sy-tabix.
Data for the status output after sending
  data: sent_to_all like sonv-flag.
  clear: it_reclist, it_reclist[],
         it_objtxt , it_objtxt[],
         it_objpack, it_objpack[],
         it_objbin , it_objbin[],x_doc_chng.
  loop at it_html.
    objbin-line = it_html-line.
    append objbin.
    clear objbin.
  endloop.
Create the document which is to be sent
  doc_chng-obj_name  = 'List'(012).
  doc_chng-obj_descr = 'Mail'(013).
Heading
  objtxt-line = 'Mail with pdf attachment'(014).
  append objtxt.
  clear objtxt.
Size
  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:
  clear objpack-transf_bin.
The document needs no header (head_num = 0)
  objpack-head_start = 1.
  objpack-head_num = 0.
Body
  objpack-body_start = 1.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'RAW'(015).
  append objpack.
Create the attachment (the list itself)
  describe table objbin lines tab_lines.
Fill the fields of the packing_list for the attachment:
  objpack-transf_bin = 'X'.
Header
  objpack-head_start = 1.
  objpack-head_num = 0.
Body
  objpack-body_start = 1.
  objpack-body_num = tab_lines.
  objpack-doc_type = 'PDF'(016).
  objpack-obj_name = 'Attachment'(017).
  objpack-obj_descr = 'Mail with pdf Attachment'(018).
  objpack-doc_size = tab_lines * 255.
  append objpack.
*-Fill the mail recipient list
  loop at mail.
    reclist-receiver = mail-low.
    reclist-rec_type = c_u.
    append reclist.
    clear: reclist,
           mail.
  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              = c_x
      commit_work                = c_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.
  case sy-subrc .
    when 0.
      message i000 with 'Mail has been sent successfully'(006).
    when others.
      message e000 with 'Problem in sending the mail'(023).
  endcase.
endform.                    " send_mail
*&      Form  page_format
       For page foramtting
form page_format tables email structure s_email .
  data : l_lines       type i,
         l_temp(500)   type c,
         l_offset      type p,
         l_lineslen(2) type p,
         l_mimelen(2)  type p,
         l_tabix       like sy-tabix.
  clear : it_xi_pdf,
          it_xi_temp.
  refresh : it_xi_pdf,
            it_xi_temp.
  it_xi_pdf[] = it_pdf[].
Reformat the line to 255 characters wide (code from SAP)
  clear: l_temp, l_offset, it_xi_temp.
  describe table it_xi_pdf   lines  l_lines.
  describe field it_xi_pdf   length l_lineslen in character mode.
  describe field it_xi_temp  length l_mimelen in character mode.
  loop at it_xi_pdf.
    l_tabix = sy-tabix.
    move it_xi_pdf to l_temp+l_offset.
    if l_tabix = l_lines.
      l_lineslen = strlen( it_xi_pdf ).
    endif.
    l_offset = l_offset + l_lineslen.
    if l_offset ge l_mimelen.
      clear it_xi_temp.
      it_xi_temp = l_temp(l_mimelen).
      append it_xi_temp.
      shift l_temp by l_mimelen places.
      l_offset = l_offset - l_mimelen.
    endif.
    if l_tabix = l_lines.
      if l_offset gt 0.
        clear it_xi_temp.
        it_xi_temp = l_temp(l_offset).
        append it_xi_temp.
      endif.
    endif.
  endloop.
  clear : it_xi_mime,
          it_xi_mime[].
  loop at it_xi_temp.
    it_xi_mime(255) = it_xi_temp-line.
    append it_xi_mime.
    clear  it_xi_mime.
  endloop.
Final Data
  clear : it_html,
          it_html[].
  it_html[] = it_xi_mime[].
For sending mail
  perform send_mail tables email.
endform.                    " page_format
*&      Form  fetch_variants
      For fetching the variants available for the program
form fetch_variants .
  data : l_program like rs38m-programm value 'RKAEP000',
         l_vara1 type dfies-fieldname value 'P_VARA1'.
  clear : it_variant1,
          it_variant1[].
Get variants
  perform get_variants tables it_variant1
                       using l_program.
F4 Help
  if not it_variant1[] is initial.
    perform get_f4_help tables it_variant1
                         using l_vara1
                        changing p_vara1.
  else.
    message e000 with 'No variants available for report1'(054).
  endif.
endform.                    " fetch_variants
*&      Form  validation
      For Validation
form validation .
  data : l_pro1 like rs38m-programm value 'RKAEP000',
         l_pro2 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
         l_c1,
         l_c2.
If both check-box are unchecked
  if p_c1 is initial
and p_c2 is initial.
    message e000 with 'Check any one check-box'(049).
  endif.
If checked without varaint
  if not p_c1 is initial and p_vara1 is initial.
    message e000 with 'Please give any one of the variant for report1'(055).
  endif.
If checked without varaint
  if not p_c2 is initial and p_vara2 is initial.
    message e000 with 'Please give any one of the variant for report2'(061).
  endif.
Reading the variant and fetching the mail-ids
  if p_c1 = c_x.
    l_c1 = '1'.
    clear : s_email,
            s_email[].
    perform read_variants tables it_mailid
                                 s_email
                           using p_vara1
                                 l_pro1
                                 l_c1.
    if s_email[] is initial.
      message e000 with 'No Id available for given Cost report1'(066).
    else.
      sort s_email by low.
      delete adjacent duplicates from s_email comparing low.
    endif.
  endif.
Reading the variant and fetching the mail-ids
  if p_c2 = c_x.
    clear : s_email1,
            s_email1[].
    l_c2 = '2'.
    perform read_variants tables it_mailid1
                                 s_email1
                           using p_vara2
                                 l_pro2
                                 l_c2.
    if s_email1[] is initial.
      message e000 with 'No Id available for given Cost report2'(067).
    else.
      sort s_email1 by low.
      delete adjacent duplicates from s_email1 comparing low.
    endif.
  endif.
endform.                    " validation
*&      Form  GET_VARIANTS
      Fetching Variants
form get_variants  tables   p_it_variant structure it_variant1
                   using    p_v_program  type rs38m-programm.
  select variant
         from varid
         into table p_it_variant
         where report = p_v_program.
endform.                    " GET_VARIANTS
*&      Form  GET_F4_HELP
      text
form get_f4_help  tables   p_it_variant1 structure it_variant1
                   using   p_l_vara1 like dfies-fieldname
                  changing p_p_vara like p_vara1.
Fn. for Pop-Up
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield        = p_l_vara1
      value_org       = 'S'
      display         = ' '
    tables
      value_tab       = p_it_variant1
      return_tab      = it_return
    exceptions
      parameter_error = 1
      no_values_found = 2
      others          = 3.
  if sy-subrc = 0.
    p_p_vara = it_return-fieldval.
  else.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
endform.                    " GET_F4_HELP
*&      Form  FETCH_VARIANTS1
      text
form fetch_variants1 .
  data : v_program1 like rs38m-programm value 'GP3DIEHXY88SNFJ0391V7KF9EK7050',
         l_vara2  type dfies-fieldname value 'P_VARA2'.
  clear : it_variant2,
          it_variant2[].
Get Variants
  perform get_variants tables it_variant2
                       using v_program1.
F4 Help
  if not it_variant2[] is initial.
    perform get_f4_help tables it_variant2
                        using  l_vara2
                      changing p_vara2.
  else.
    message e000 with 'No variants available for report2'(050).
  endif.
endform.                    " FETCH_VARIANTS1
*&      Form  read_variants
       Reading the variant and fetching the mail-ids
form read_variants tables p_it_mailid structure it_mailid
                          p_s_email   structure s_email
                   using  p_p_vara1   like p_vara1
                          p_l_pro1    like rs38m-programm
                          p_l_c1      type c.
  data : l_temp(44),
         it_valutab like rsparams occurs 0 with header line.
  ranges : r_cocen for csks-kostl.
Function Module to get the variant contents
  call function 'RS_VARIANT_CONTENTS'
    exporting
      report               = p_l_pro1
      variant              = p_p_vara1
    tables
      valutab              = it_valutab
    exceptions
      variant_non_existent = 1
      variant_obsolete     = 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.
  endif.
  clear : r_cocen,
          r_cocen[].
  loop at it_valutab where selname = 'KOSTL'
                        or selname = '_C-CCTR'.
Getting the range of cost centers
    if it_valutab-option = 'BT'.
      r_cocen-low    = it_valutab-low.
For Conversion Routine
      perform conversion using r_cocen-low.
      r_cocen-high   = it_valutab-high.
For Conversion Routine
      perform conversion using r_cocen-high.
      r_cocen-option = 'BT'.
      r_cocen-sign   = 'I'.
      append r_cocen.
      clear  r_cocen.
    endif.
Getting the single cost centers
    if it_valutab-option = 'EQ'.
      r_cocen-low    = it_valutab-low.
For Conversion Routine
      perform conversion using r_cocen-low.
      r_cocen-option = 'EQ'.
      r_cocen-sign   = 'I'.
      append r_cocen.
      clear  r_cocen.
    endif.
  endloop.
If no cost centers
  if not r_cocen[] is initial.
    select kokrs
           kostl
           datbi
           telx1
      from csks
           into table p_it_mailid
     where kostl in r_cocen.
    if p_it_mailid[] is initial.
      if p_l_c1 = '1'.
        message e000 with 'No IDs available for report1'(059).
      elseif p_l_c1 = '2'.
        message e000 with 'No IDs available for report2'(062).
      endif.
    endif.
Deleting the blank entries
    delete p_it_mailid where telx1 = space.
    clear l_temp.
    read table p_it_mailid index 1.
    l_temp = p_it_mailid-telx1.
    data : l_check.
    loop at p_it_mailid where telx1 <> l_temp.
      l_check = c_x.
    endloop.
For checking the unique ids
    if l_check = c_x.
      if p_l_c1 = '1'.
        message e000 with 'No unique mail-ids for  report1'(058).
      elseif p_l_c1 = '2'.
        message e000 with 'No unique mail-ids for  report2'(065).
      endif.
    endif.
Populating the IDs for the cost centers
    loop at p_it_mailid.
      set locale language sy-langu.
      translate p_it_mailid-telx1 to lower case.
      set locale language space .
      concatenate p_it_mailid-telx1 '@allergan.com' into l_temp.
      p_s_email-low = l_temp.
      p_s_email-sign = 'I'.
      p_s_email-option = 'EQ'.
      append p_s_email.
      clear  p_s_email.
    endloop.
  else.
    if p_l_c1 = '1'.
      message e000 with 'No Cost Center Available for report1'(057).
    elseif p_l_c1 = '2'.
      message e000 with 'No Cost Center Available for report2'(063).
    endif.
  endif.
endform.                    " read_variants
*&      Form  CONVERSION
      For Conversion Routine
form conversion  using    p_it_valutab_low type c.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
    exporting
      input  = p_it_valutab_low
    importing
      output = p_it_valutab_low.
endform.                    " CONVERSION
chk this one to send script to pdf
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
plzz refer to this link..it will solve ur problem
Re: Sending a PDF document as an attachment
sending the mail with PDF attachment
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450
Regards
Sree

Similar Messages

  • How to call Subroutines,Standard Text  & using Internal Table in SmartForm

    Hi all,
    need help in the following areas.Its very urgent!
    1.How to CAll Subroutines in Smart Forms
    2.How to CAll Standard Text in Smart Forms
    Situation:
    We have an Internal Table T_SALES with all the data which am going to display in the smartform,How to retrive data from an internal table in Smart forms
    Any Help in this direction would be highly appreciated.
    Regards
    Ramu

    Hi,
      When you are using quantity or currency fields, you have to mentiong the reference fileds in a tab called CURRENCY/QUANTITY FILEDS in the GLOBAL DATA node.
    Specifying a Currency or Quantity Reference
    Use
    In the ABAP Dictionary, you can assign a currency or quantity field to a table field. In the output of these fields, the system can then insert the relevant currency or unit:
    ·        If the value field is in the same table as the corresponding currency or quantity field, the system recognizes the reference automatically, and formats the value field according to the currency or unit in the assigned field.
    ·        If the value field is in a different table from the currency or quantity field, the system cannot recognize this reference automatically.
    In the second case, you must indicate this reference to the system in the form, to ensure that the value field is formatted correctly.
    Procedure
    You want to assign a currency or quantity field in one table (for example, CURTAB) to a value field in another table (for example, VALTAB).
           1.      Create the reference to the currency field by entering the following values:
    -         Field Name: VALTAB-VALUE, if this is the value field of VALTAB that you want to display.
    -         Reference Field: CURTAB-CURRENCY, which is the currency field of CURTAB.
           2.      Under Data Type, specify whether the data type is a currency or quantity.
    Result
    In the output of the PDF-based print form, the system formats the value field VALTAB-VALUE according to the assigned value in the currency or quantity field of the global variable CURTAB-CURRENCY.
    Thanks and Regards,
    Bharat Kumar Reddy.V
    Message was Added by: Bharat Reddy V
    Message was Added by: Bharat Reddy V

  • If condition in standard text in so10

    Hi,
    Im using a standard text where ive written an IF condition but its not working.Im calling that text in my program using READ_TEXT, TEXT_CONTROL_REPLACE and TEXT_SYMBOL_REPLACE function modules.Im not using sapscript or smartform.All my dynamic variables are working fine but for my IF condition what is happening is IF statement is also true and ELSEIF is also true.The statement under if is also getting printed and statement under elseif is also getting printed.
    Could anyone help please.
    Regards,
    Nidhi.

    Standard text " if conditions "  dont work other than scripts and smartforms.
    to my surprise, if conditions have not worked even when I used them as includes in ADOBE forms.
    Please handle the conditions in your program itself.
    << Moderator message - Point begging removed >>
    Edited by: Rob Burbank on Sep 30, 2011 2:49 PM

  • Call Standard Text by report replacing the variables with their values

    Hi,
    I have a requirement to call a standard text from a report.
    Following is the text present in standard text.
    &PTXT1-ENAME& will attend for interview
    on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
    I am doing it by using READ_TEXT. But READ_TEXT reads the entire text as it is.
    Is there any way I could retrieve the standard texts with  &PTXT1-ENAME& replaced by the value of  PTXT1-ENAME in report. And similarly &MEMOACT-PLDAT& replcaed with its actual value.
    Any pointers in this regard would be helpful.
    Points will be awarded.
    Regards,
    Mayank Agarwal

    Hi,
    In the Text
    &PTXT1-ENAME& will attend for interview
    on &MEMOACT-PLDAT& at &MEMOACT-PLTIM&.
    do not use the * as a paragrapgh , use /: as the paragraph
    Regards
    Sudheer

  • How to Print 25page standard text in Adobe form

    Hi Form Gurus.
    My requirement is to print a 25 pages form of standard text. Can any one please help me.
    Thanks in advance.
    Regards
    ASAHA1
    Moderator message: please work yourself first on your requirement, post specific problems later if necessary, always search for information before asking
    locked by: Thomas Zloch on Aug 31, 2010 9:11 AM

    hi,
    You can create a text module like you do for Smartforms and then you can add that in the interface and drag n drop it in the layout.
    regards,
    Sakshi

  • Smartforms,How to display different standard Text in a Text element.

    In smartform,if I want to according to the different conditions,display one of the serveral different standard Text objects which all  maintained in SO10 in a same text element,how to do it?
    if i put them in serval text elements, each condition only display the corresponding text element,but the text content can not display in the same position.
    Is there anyone can tell me?
    thanks.

    use Alternative to control it no problem
    for example you want to display the different SO10 to same position TEMPLATE's row 1 col2
    TEMPLATE1
    Alternative case1
    YES
    INCLUDE TEXT1(display SO10) [set output option line1 column2]
    NO
    Alternative case2
    YES
    INCLUDE TEXT2(display SO10) [set output option line1 column2]
    NO
    Alternative case3
    every case your SO10's text is always display at line2 column2
    just try to test it ,you can know

  • Is there a way to create standard text messages that can be reused easily

    is there a way to create standard text messages that can be reused easily

    if you meant phrases, then Yes
    Setteings> general>keyboard> add new shortcut

  • How to use Standard text in SAP SCRIPTS

    Hi all,
    Please tell me how can we use the standard text what we have created in SO10 with sap scripts.

    Hi Gaurav
    You can create standard texts using the transaction SO10. Then to insert these standard texts in the SAPScript choose the menu, Insert->Text->Standard and choose the standard text that you want to choose.
    Alternatively, you can display standard texts in your SAP Scripts using the command:
    INCLUDE ZSTEXT OBJECT TEXT ID ST LANGUAGE EN
    where ZSTEXT refers to the Standard Text name.
    Reward pts if found usefull
    Regards
    Sathish:)

  • Standard text (SO10) - To print the text in same line

    In Standard text (SO10) I would like to have my text in a single line. For that I have used the extended line (=) tag. But It is not working.
    Can anyone help me how can I achieve this.
    Actually how many characters I can put in a single line. I think it is 72. But my text is less than 72 characters.
    Can anyone Please help me.
    Regards
    Meshack Appikatla.

    A Text Symbol in Script or Smartform can take lenght of Maximum 80 characters. Any thing more than that will be truncated even if the window is long enoguh to hold more than 80 characters. Si your character formated need to be have the PROTECTED option checked.
    At Topic:
    Try increasing the window size in lenght or width, If that is not possible pratically, you can try by decreasing the font size.

  • How to add standard text in smartforms?

    Hi friends,
    How to add standard text in smartforms ?
    points rewarded soon
    Regards
    RH

    Creating the Standard Text:
    Go to SO10
    1. Enter Text Name.  For example, ZABC
    2. Text ID ST
    3. Language EN
    Click on Create.
    And enter the Required Information and save.
    To include a Standard text in SmartForm.
    Follow the steps below:
    1. Create a text node in the window.
    2. Under general attributes select "Include text" as Type.
    3. Specify the fields under Text.
    Text Name ZABC
    Text Object TEXT
    Text ID ST
    Language EN.
    Hope it helps.
    Regards.

  • How to use standard texts in smartforms

    Hi Friends,
          How to use standard texts in smartforms, ie in scripts we are using standard texts using tr so10.
    thanks in advance,
    regards,
    sharma.

    For long text
    method1
    Create TEXT node- general attributes change text type to include text
    then you can input text name/text object/text id/language
    method2
    create PROGRAM LINE node - use FM READ_TEXT to read it to a internal table
    then use LOOP or TABLE node to display it
    For TEXT module(For foreign language)
    Tr-code:smartforms -- choose Text module(not choose form)--create a text module object
    then enter smartform Create TEXT node- general attributes change text type to text module
    input the text module name which created by above
    btw SO10 is just for Scriptform, in smartforms we use text module to replace SO10

  • How to declare variables in standard text  - so10 t.code

    Hello Friends,
             How to declare variables in standard text  - so10 t.code? Your response will be appreciated much.
    Thanks
    Sri

    For Script & Smartform  Text - &VAR&

  • Error while transporting standard text using RSTXTRAN

    Hai Gurus
        I am trying to transport the standard text that was created in Development to Quality with the script I am working. I tried to attach the SO to the task Request using RSTXTRAN and SO are selected.Finally when I am trying attach to the correction it throws up error like this "You cannot transport client-specific objects"...what should we do for this...
    Thanks
    Ganesh

    Hi Gurus
      The Message is "You cannot transport client-specific objects".
      Diagnosis
      The object 'R3TR'  'TEXT'  'TEXT,Z_2200_REMIT2,ST,E' is client-specific. The current client is set so   that you cannot transport client-specific objects.
    System Response
    You cannot release the request.
    Procedure
    Delete the object from the request, or ask the system administrator to change the setting of this client.
    Should this occur of Settings by the Basis Guy in this client
    Thanks
    Ganesh

  • Getting error while transporting standard text

    Hi,
    I am trying to transport the standard text(created in SO10), by using RSTXTRAN program but i am getting this error message " Changes to objects are not allowed in correction/Repair" after click on "Trsfr texts to corr" button.
    I am doing in the following way.
    Program : RSTXTRAN
    Given
    Text key - Object - TEXT
    TEXT KEY Name - ZTEXT
    ID - ST
    Language EN
    Execute
    enter -> click on button called transf text to corr -> it is throwing message " Transfer text to a correction" i am saying "yes" then its throwing the following error  " Changes to objects are not allowed in correction/Repair"
    Regards,
    Sarath.J

    Hi,
       In order to assign a standard text to your request. You should be the owner of the request. Though you have a task on your name under that request, it doesnt allow you to assign. You will be getting the error which you got now.
    Regards

  • Adding standard Text as long text in QC01 of General data Section

    Hi ,
    I want to Append standard text in Certificate Profile Creation(QC01)of General data section. Can you suggest any Exit.
    Standard Texts created by SO10 Transaction.
          Thanks in advance

    Dear Raynard,
    Raynard Coscolluela wrote:
    As far as I can remember the Travel Request was conceptualize to be a simple ESS Form that's why most of the labels here are hard coded and didn't use OTR.
    I have to disagree. None of the labels, except this one are hard-coded via Personalization-Means and most Texts come indeed from the OTR, the Label T_ACTYPE_LABEL also has an entry in OTR (see my posts above) but is only non-changable by enhancements because the component configuration was "abused" to overload the OTR and coding in runtime. I still can't really believe this one is intentional....
    Raynard Coscolluela wrote:
    We don't recommend changing the label text in Web Portal as it can lead into inconsistency incase a new update will be > deliver by SAP into this fields. So yes this is a consider a modification.
    This will be an issue since the word "Spesen" which is a specific German one for "Expenses" is juridically wrong if used within a specific MOREI of the Public Sector. But this is another issue and I don't want to elaborate on this one here.
    Raynard Coscolluela wrote:
    My colleague who participate in this thread is still on vacation and she ask me to assist here.
    I see, and I'm glad you did assist here. Give Sally my regards.
    This one is answered then, if not really "solved". I'll close the OSS message now.
    thanks a lot and best regards,
    Lukas

  • Issue in creating standard text while uploading .ITF file

    Hi all,
    I have created a shipping label using BARONE software . Barone software create .ITF which is then loaded into the standard text and finally called into the SAP SCRIPT to print the label..
    The issue is that the lines of code generated  in standard text is 16667. So while saving it says that it cannot save more than 15000 lines . Thus the standard text is not created.
    Can anyone tell how to handle this standard text which has more than 15000 lines .
    Thanks and Regards,
    Syed

    hi,
    Make sure you save your TIFF file in Packbits compressed format and in
    SE78 when uploading make sure you have the compression option ticked

Maybe you are looking for