If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
necesito una funcion para agregar ceros a izquierda a un char
necesito una funcion para agregar ceros a izquierda a un char
Hola, necesito una funcion para agregar ceros a izquierda a un char y otra para quitar ceros a izquierda a un char (MATNR). Espero me puedan ayudar, muchas gracias
existen estas funciones.
CONVERSION_EXIT_ALPHA_INPUT: llena con 0 la izq. '000000001'.
CONVERSION_EXIT_ALPHA_OUTPUT: borra 0 a la izq.
ojala te sirvan.
salu2.
existen estas funciones.
CONVERSION_EXIT_ALPHA_INPUT: llena con 0 la izq. '000000001'.
CONVERSION_EXIT_ALPHA_OUTPUT: borra 0 a la izq.
ojala te sirvan.
salu2.
No me sirve ya que es un char y cuando pongo una letra no me quita/agrega los ceros. Ej: 00067U3064
loop at it_File.
SHIFT it_file-matnr RIGHT DELETING TRAILING SPACE.
Do.
replace space with '0 ' into it_file-matnr.
if sy-subrc <> 0.
exit.
endif.
enddo.
endloop.
espero te sirva
Un Huevon No Inútil
Solo di lo que piensas, a la mejor tienes la mejor respuesta....
Si alguien ya lo hizo, copialo y cambiale las variables total es un codigo nuevo.....
Si SAP lo hace se puede hacer, no me pidas hacer algo que SAP no ha hecho.....
si el problema para usar las funciones que te ha dicho gcid por que es un texto no tienes mas convertirlo a integer y luego aplicar la funcion.
MOVE STRCLAVE(char3) TO INTCLAVE(int).
lo de las parentesis no creo que es necesario ponerlo pero cada variable si que tiene del tipo correspondiente.
y luego aplicar la funcion con la variable integer.
Comentario