cancel
Showing results for 
Search instead for 
Did you mean: 

syntax query

Former Member
0 Kudos

hi all,

what is the difference between the followig declerations.

DATA: WA_KNA1 TYPE KNA1,

IT_ITAB TYPE TABLE OF ZCREDIT_PAYMENTS.

declaration wa_kna1 does not represent an internal table??

Thank You.

yateendra.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

DATA: WA_KNA1 TYPE KNA1,

It is a structure as the type (KNA1)y ou referred is a standard structure.

And second one is internal table As you mention the table type.

For Creating a internal table you have three different Parameters.

1. Table kind.

2. Line type,

3. Key fields.

In the First case you ahave mention only the line type as KNA1.

Thats why its merely a structure, not an internal table.

But in second case you you mentioned the 'Table type' and 'Line type' Both.

By default if you do not mention table ttype it takes 'Standard 'type. So its internal table.

For Details follow the link-

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35de358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb367a358411d1829f0000e829fbfe/content.htm

Regards,

Sujit

Edited by: Sujit Pal on Jul 10, 2008 1:40 PM

Answers (7)

Answers (7)

Former Member
0 Kudos

wa_kna1 is a work area which is directly referred to internal table kna1,fields so first create a internal table

it_itab refers to fields of created table ZCREDIT_PAYMENTS.

Former Member
0 Kudos

WA_KNA1 -> work area

IT_ITAB --> an internal table

Former Member
0 Kudos

Hi

WA_KNA1 is a work area is not an internal table, it has only one row.

While

IT_ITAB is an internal Table.

With Regards

Nikunj shah

bpawanchand
Active Contributor
0 Kudos

Hi

DATA: WA_KNA1 TYPE KNA1,

IT_ITAB TYPE TABLE OF ZCREDIT_PAYMENTS.

Heer wa_kan1 is a line type that means is a explicit work area where you can use this work are with a internal table whose line type is same as wa_kna1.

IT_ITAB is STANDARD table of your Z table by default when you use TYPE TABLE OF addtion a STANDARD table is Created

Regards

Pavan

Former Member
0 Kudos

Hi Yateendra,

DATA: WA_KNA1 TYPE KNA1.

WA_KNA1 is workarea of type KNA1.

As KNA1 is a table, WA_KNA! is workarea of type KNA1.

IT_ITAB TYPE TABLE OF ZCREDIT_PAYMENTS.

IT_ITAB is the internal table of type ZCREDIT_PAYMENTS.

As you deaclared TYPR TABLE for IT_ITAB this represents the declaration of a internal table.

Best regards,

raam

Former Member
0 Kudos

if the varible contains any type standard table of or type table of or occurs 0 or any occur clause or if the varible used a type referance of these than only it is a table type other than that it is a structure.

if there are more than one field in the varible it is called structure.

if there is only on field it is a varible.

former_member195383
Active Contributor
0 Kudos

WA_KNA1 is not an internal table...its a work area..it is like a table line...has one row only...

where as IT_ITAB is a internal table..

Edited by: Rudra Prasanna Mohapatra on Jul 10, 2008 1:38 PM