‎2012 Sep 29 7:55 PM
hi gurus, i have written the below code ,
types : begin of stud_emp,
name type c length 10,
rno type i,
dob type d,
end of studn_emp.
data itab type table of stud_emp.
data wa type stud_emp.
wa-name = 'a'. wa-rno = 1. wa-dob = 20120101.
append wa to itab.
loop at itab into wa.
write : wa-name,
wa-rno,
wa-dob,
endloop.
but here i am getting the below output ,
a 1 00000000.
but i should get the output as a 1 20120101.
I am performed the debuging also , during debuging also i m getting 00000000 in the workarea.
please what might be the issue, to get the unexpected output.
tnx ,
praveen kodam.
‎2012 Sep 29 11:49 PM
Hi Praveen,
try: wa-dob = '20120101'. (i.e. with quotation marks).
Best regards
Thorsten
‎2012 Sep 29 11:49 PM
Hi Praveen,
try: wa-dob = '20120101'. (i.e. with quotation marks).
Best regards
Thorsten
‎2012 Sep 30 4:49 AM
Hi thorsten
tnx for the reply, but why to place those in the quotation. As per my idea only string has to be placed in the quotation mark.
tnx
praveen kodam
‎2012 Sep 30 4:15 PM
Hi Praveen,
D is considered as character type, see:
http://help.sap.com/saphelp_nw70ehp3/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/frameset.htm
Best regards
Thorsten
‎2012 Sep 30 5:35 PM
Thanks Thorsten,
This was a useful link for our future reference.
‎2012 Sep 30 4:25 PM