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.
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
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 deseas agregar 0 a la izq, pasa el char a una variable tipo N con la longitud deseada, y de esta manera tendras el matnr con el número relleno de ceros.
Si lo quieres quitar, usa REMPLACE '0' with space y despues el CONDENSE NO-GAPS
Espero te sirva, si quieres un ejemplo avisame para hacer uno.
Comentario