2009 Jun 03 9:41 AM
Hi Experts,
I am concatenating number range status which field name is NRLEVEL with sy-datum in which i am taking first two digit of date and month and last digit of NRLEVEL from table NRIV of length 10 to generate new number which i have to assume batch number.
i used:
IF SY-SUBRC = 0.
CONCATENATE SY-DATUM+2(2)
SY-DATUM+4(2) INTO DATE. "GET DATE FORM CURRENT DATA
IF WA_FINAL-NRLEVEL IS NOT INITIAL.
BATNO = WA_FINAL-NRLEVEL+19(1).
CONCATENATE DATE '00000' BATNO INTO WA_FINAL-NRLEVEL1.
ENDIF.
MODIFY IT_FINAL FROM WA_FINAL INDEX IDX TRANSPORTING NRLEVEL1.
ENDIF.
In debugging its coming correct length 10 digit as 0906000004 but in alv print its giving 906000004 output.
so how can i solve this problem.
thank you.
2009 Jun 03 9:55 AM
2009 Jun 03 9:56 AM
2009 Jun 03 10:28 AM
Hi,
i added lzero like this but still it not solved so please check this is it correct or not.
WA_FCAT-COL_POS = 4.
WA_FCAT-FIELDNAME = 'NRLEVEL1'.
WA_FCAT-SELTEXT_M = 'CURRENT LOT NO'.
WA_FCAT-TABNAME = 'IT_FINAL'.
WA_FCAT-LZERO = ' '.
APPEND WA_FCAT TO IT_FCAT.
thanks.
2009 Jun 03 10:35 AM
2009 Jun 03 11:09 AM
Hi!
I agree with Veeranji Reddy, you have to asign 'X' to WA_FCAT-LZERO .And it will work!
wa_fcat-lzero = 'X'.
2009 Jun 03 11:22 AM
Sorry, i have forgotten to say that there are 2 possibilities:
1-Your variable has type c (you don´t have to use lzero)
2-Your variable hast type n and you have to use lzero
2009 Jun 03 10:41 AM
Hi,
Make sure that BATNO have declared as a CHAR type in declaration and try to make the process.
Regards
Thiru