Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.

Thanks

Sincerely

Soniya Kapoor

Former Member
Former Member replied

hi soniya,

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.........

Harimanjesh AN

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question