Cocatenate the two fields ERDAT and ERZET in one field
Hello Friends, Please suggest how to Cocatenate the two fields ERDAT and ERZET in one field . in my ZTABLE.ERDAT IS DATE 8 and ERZET tims 6
so what should be the new ZCOMBO field length and type
Please give the ABAP Code to write that in Exit to Populate this Cocatenation of these two fields.
Harimanjesh AN replied
u can declare ZCOMBO as CHAR with LENGTH 14 with any seperator.
<b>Concatenate ERDAT ERZET into ZCOMBO.
In this case, output would be like yyyymmddhhmmss.</b>
If u want any seperator b/w date and time then declare it wiht LENGTH 15.
<b>CONSTANTS : c_s TYPE c VALUE '/'.
CONCATENATE erdat erzet INTO zcombo SEPERATED BY c_s.
In this case, output would be like yyyymmdd/hhmmss.</b>
reward me if useful.........