Salto del Línea en un TXT

Colapsar
X
 
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
  • karvi
    Junior Member
    • nov
    • 9

    #1

    Salto del Línea en un TXT

    Buenas, quiero adjuntar un txt a un email. El txt lo genero en el momento de enviar el mail, simplemente tomo el objbin y le agrego lineas para generar el txt. El problema es que me genera una sola linea, en lugar de una linea por cada carga. Necesito saber como ponerle un salto de linea a cada linea que cargo.

    Muchas gracias!
  • mysmb2
    Senior Member
    • ene
    • 406

    #2
    buenas,
    podrias decirnos que funcion estas usando.

    Saludos.
    Sebastián Chiavia
    http://www.programacionabap.com.ar

    Comentario

    • karvi
      Junior Member
      • nov
      • 9

      #3
      Hola, estoy usando la siguiente funcion:
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
      document_data = doc_chng
      put_in_outbox = 'X'
      commit_work = 'X'
      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.

      Donde objbin es la tabla que lleva el txt adjunto, y es de tipo solisti1

      Comentario

      • valequique
        Junior Member
        • oct
        • 1

        #4
        Hola que tal, tengo el mismo problema que tu y los textos me los esta separando por espacios ¿encontraste alguna solucion?

        Saludos.

        Comentario

        • francesc
          Member
          • mar
          • 58

          #5
          Hola debes informar también la tabla packing_list. Es aquí donde se informa entre otras cosas del nº de líneas del documento anexo ( campo packing_list-body_num ), el tipo de fichero anexado (excel, txt, etc..). Adjunto un ejemplo donde se anexa un .XLS:

          * Cuerpo del mensaje
          CLEAR t_packing_list.
          REFRESH t_packing_list.
          t_packing_list-transf_bin = space.
          t_packing_list-head_start = 1.
          t_packing_list-head_num = 0.
          t_packing_list-body_start = 1.
          DESCRIBE TABLE it_mess_att LINES t_packing_list-body_num.
          * it_mess_att es la tabla con la información anexada
          t_packing_list-doc_type = 'RAW'.
          APPEND t_packing_list.
          * Notificación de anexo
          t_packing_list-transf_bin = 'X'.
          t_packing_list-head_start = 1.
          t_packing_list-head_num = 1.
          t_packing_list-body_start = 1.
          DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
          t_packing_list-doc_type = 'XLS'. "Tipo de fichero
          t_packing_list-obj_descr = 'Inventario y consumos'. "Título
          t_packing_list-doc_size = t_packing_list-body_num * 255.
          APPEND t_packing_list.

          Comentario

          Trabajando...