Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal table issue

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

schneidertho
Advisor
Advisor
0 Kudos

Hi Praveen,

try: wa-dob = '20120101'. (i.e. with quotation marks).

Best regards

Thorsten

5 REPLIES 5

schneidertho
Advisor
Advisor
0 Kudos

Hi Praveen,

try: wa-dob = '20120101'. (i.e. with quotation marks).

Best regards

Thorsten

0 Kudos

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

0 Kudos

Hi Praveen,

D is considered as character type, see:

http://help.sap.com/saphelp_nw70ehp3/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/frameset.htm

Best regards

Thorsten

0 Kudos

Thanks Thorsten,

This was a useful link for our future reference.

Former Member
0 Kudos

Yes praveen kodam,

You need to use   quotation mark

Regards

Naga