Ayuda SAP

Sapscript Dinamicos

Etiquetas: #<Tag:0x00007fb634ee1758>

Hola, estoy trabajando con un programa que imprime usando la instruccion: call function ‘SAPSCRIPT_MESSAGE_DEF’

call function ‘READ_TEXT_INLINE’

Me pueden indicar a que se refieren dichas instrucciones, existen sapscript dinamicos? gracias
Ana

Hola,

Creo que seria mejor si nos contaras bien cual es tu problema o requerimiento para poder entender mejor. Y mostrando la mayor parte del código, de ser posible. De esa manera te vamos a poder ayudar correctamente.

Sobre esas funciones una es para mandar un mensaje generalmente de error y la otra es para leer textos, pero de nuevo, no se a donde vamos con todo esto.

Saludos,
Sebastián

Hola, mi caso es que un reporte me muestra la informacion con una linea que imprime en una ubicacion que antes no hacia. Anexo archivo, el error esta en la parte con linea amarilla, fijense en la posicion como salen en ambas pantallas.
Codigo:

if not t_bseg[] is initial.
*Begin of Modification by SAPSDC1 on November 24, 2016 - Hana optimization
*  select single * from pa0001 where pernr eq pernr.
    select *
      UP TO 1 ROWS
       from pa0001 where pernr eq pernr.
      ENDSELECT.
*End of Modification by SAPSDC1 on November 24, 2016 - Hana optimization
  loop at t_zrecibos.
    move t_zrecibos-recibo to reciboc.
    select single * from bkpf
           where bukrs eq t_zrecibos-bukrs and
                 belnr eq t_zrecibos-belnr and gjahr eq t_zrecibos-gjahr.
    if sy-subrc eq 0 and bkpf-bktxt eq vkbur.
      new-page.
      sy-pagno = 1.
      skip 6.
      write: / sy-uline(110).
      write: /   'Fecha:', bkpf-budat, 90 'Pagina: ', sy-pagno,
             /40 'RECIBO DE COBRO', reciboc,
             /   'Comentario:', t_zrecibos-ltext.
      write: /   'Recibo de Caja:', t_zrecibos-belnr.
      clear: tcampo, totalfact.
      write: / 'Estado del Recibo:', tcampo.
      write:/ sy-uline(110).
      loop at t_bseg where bukrs eq t_zrecibos-bukrs and
                           belnr eq t_zrecibos-belnr and gjahr eq t_zrecibos-gjahr.
*       perform convertir_veb.
        t_bseg-dmbtr = t_bseg-wrbtr.
        if bkpf-stblg <> space.
          tcampo = 'ANULADO'.
          t_bseg-dmbtr = 0.
        endif.
        refresh tbanco.
        perform banco.
        read table tbanco index 1.
        txcheque = tbanco-tdline(20).
        read table tbanco index 2.
        txbanco = tbanco-tdline(20).
        read table tbanco index 3.
        tplanilla(12) = tbanco-tdline(20).
        read table tbanco index 4.
        tbancx(12) = tbanco-tdline(20).
        if t_bseg-kunnr is not  initial.
          select single * from kna1 where kunnr = t_bseg-kunnr.
          if t_bseg-augbl is not initial.
            augbl = t_bseg-augbl.
          endif.
          write:/ sy-uline(110).
          write: / 'Cliente:', kna1-name1 no-gap, '-' no-gap, kna1-kunnr,
                 / 'Direccion:', kna1-stras,
                 / 'Telefono:', kna1-telf1,
                 / 'Vendedor:', pa0001-sname no-gap, '-' no-gap, t_zrecibos-pernr.
          write:/ sy-uline(110).
          write:/ text-005, text-006, text-007, text-008, text-009, text-011.
          write:/ sy-uline(110).
        else.
          if bkpf-stblg <> space.
            tcampo = 'ANULADO'.
            t_bseg-dmbtr = 0.
          else.
            tcampo = space.
          endif.
          totalfact = totalfact + t_bseg-dmbtr.
          write: / txbanco(20) under text-005 ,
                   txcheque(10),
                   t_bseg-valut under text-007,
                   t_bseg-dmbtr under text-008,
                   tplanilla under text-009,
                   tbancx    under text-011.
          if t_bseg-zfbdt is not initial.
            write: / '********** Cheque Renegociado ***********'.
          endif.
        endif.
      endloop.
      write:/ sy-uline(110).
      write: / 'Total Recibo:',  totalfact under  text-008.
      totalfact = 0.
      skip 1.
      write:/ sy-uline(110).
      write: /30 text-030, text-031, text-032.
      write:/ sy-uline(110).
*    endif.

      if not augbl is initial.
        if not t_bsas[] is initial.
          loop at t_bsas where bukrs eq bukrs and augbl eq augbl.
            clear bkpf.
            select single * from bkpf where bukrs eq t_bsas-bukrs and
                            belnr eq t_bsas-belnr and gjahr eq t_bsas-gjahr.
            t_bsas-dmbtr = t_bsas-wrbtr.
            perform convertir_veb.
            if t_bsas-shkzg eq 'H'.
              t_bsas-dmbtr = t_bsas-dmbtr * -1.
            endif.
            if t_bsas-blart eq 'ZH'.
              bkpf-awkey = bkpf-awkey(10).
            endif.
            if t_bsas-blart eq 'DI'.
              clear bkpf-awkey.
            endif.
            write: / bkpf-awkey   under text-030,
                     t_bsas-dmbtr under text-031,
                     bkpf-budat   under text-032.
            if sy-linno > 35.
              perform saltar.
              write: /2  '.'.
              write: /2  '.'.
              write: /2  '.'.
              write: /2  '.'.
              write: /2   '.'.
              write: /2  '.'.
              write: /2 '.'.
              write: /2  '.'.
            endif.
            totalfact = totalfact +  t_bsas-dmbtr.
          endloop.
        endif.
        write:/ sy-uline(110).
        write: / 'Total Facturas:',  totalfact under  text-031.
      endif.
      perform saltar.
    endif.
  endloop.
endif.
exit.

form banco.
  stxl_id-tdobject = 'DOC_ITEM'.
  concatenate t_bseg-bukrs t_bseg-belnr bkpf-gjahr t_bseg-buzei
                                        into stxl_id-tdname.
*stxl_id-tdname = 'ALLE14000000112004003'.
  stxl_id-tdid = '0006'.
  stxl_id-tdspras = 'S'.
  call function 'READ_TEXT_INLINE'
    exporting
      id              = stxl_id-tdid
      inline_count    = '1'
      language        = stxl_id-tdspras
      name            = stxl_id-tdname
      object          = stxl_id-tdobject
    tables
      inlines         = tlinea
      lines           = tdata
    exceptions
      id              = 1
      language        = 2
      name            = 3
      not_found       = 4
      object          = 5
      reference_check = 6
      others          = 7.

  if sy-subrc  = 0.
    tbanco-tdline =  tdata-tdline.
    append tbanco.
  else.
    tbanco-tdline =  space.
    append tbanco.
  endif.
  stxl_id-tdid = '0007'.
  stxl_id-tdspras = 'S'.
  call function 'READ_TEXT_INLINE'
    exporting
      id              = stxl_id-tdid
      inline_count    = '1'
      language        = stxl_id-tdspras
      name            = stxl_id-tdname
      object          = stxl_id-tdobject
    tables
      inlines         = tlinea
      lines           = tdata
    exceptions
      id              = 1
      language        = 2
      name            = 3
      not_found       = 4
      object          = 5
      reference_check = 6
      others          = 7.
  if sy-subrc  = 0.
    tbanco-tdline =  tdata-tdline.
    append tbanco.
  else.
    tbanco-tdline =  'Efectivo'.
    append tbanco.
  endif.
  stxl_id-tdid = '0009'.
  stxl_id-tdspras = 'S'.
  call function 'READ_TEXT_INLINE'
    exporting
      id              = stxl_id-tdid
      inline_count    = '1'
      language        = stxl_id-tdspras
      name            = stxl_id-tdname
      object          = stxl_id-tdobject
    tables
      inlines         = tlinea
      lines           = tdata
    exceptions
      id              = 1
      language        = 2
      name            = 3
      not_found       = 4
      object          = 5
      reference_check = 6
      others          = 7.
  if sy-subrc  = 0.
    tbanco-tdline =  tdata-tdline.
    append tbanco.
  else.
    tbanco-tdline =  space.
    append tbanco.
  endif.
  stxl_id-tdid = '0010'.
  stxl_id-tdspras = 'S'.
  call function 'READ_TEXT_INLINE'
    exporting
      id              = stxl_id-tdid
      inline_count    = '1'
      language        = stxl_id-tdspras
      name            = stxl_id-tdname
      object          = stxl_id-tdobject
    tables
      inlines         = tlinea
      lines           = tdata
    exceptions
      id              = 1
      language        = 2
      name            = 3
      not_found       = 4
      object          = 5
      reference_check = 6
      others          = 7.
  if sy-subrc  = 0.
    tbanco-tdline =  tdata-tdline.
    append tbanco.
  else.
    tbanco-tdline =  space.
    append tbanco.
  endif.
endform.                    "banco