Hi,
i´m developing a ZTABLE. In this ztable there are two key fields. One of them (
ZNUMDE
) must be the result of concatenatingsy-uname(3) sy-datum+2(2) and a secuential
number of 2 digits
DATA: v_max(2) TYPE i,
v_numde(7) TYPE c,
v_conta(2) TYPE c.
CLEAR: v_max, v_numde, v_conta.
Here i check the number of entries of a the user
SELECT COUNT( DISTINCT usuar ) INTO v_max
FROM ZTABLE WHERE usuar = sy-uname.
IF v_max GT 0.
v_max = v_max + 1.
v_conta = v_max.
ELSE.
v_max = 1.
v_conta = v_max.
ENDIF.
SHIFT v_conta RIGHT.
REPLACE '' WITH '0' INTO v_conta.
CONCATENATE sy-uname(3) sy-datum+2(2) v_conta
INTO z_v_devolucion-numde.
z_v_devolucion-usuar = sy-uname.
The question is that thus i´m not able to get ZDEVNUM as desired.
Any suggestion?
Best regards.