Application Development and Automation 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: 
Read only

tilde

Former Member
0 Likes
3,598

please tell me the meaning for the follwing 2 statements. why do we use tilde.what is the purpose of tilde .

1. LGNUM like ltap-LGNUM,

T173 TYPE C VALUE '~',

2 SELECT

ltap~LGNUM INTO TABLE GT_DATA2

thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
1,449

To indicate that LGNUM is a field of table LTAP.

i.e. '~' stands for relationship

Read only

Former Member
0 Likes
1,449

Hi,

Tild is used while using joins in the select query.

1. In this T173 is assigned a default value tild.Based on requirement you are doing this.

2. In select statement when you use joins you have to use tild .This is the syntax.

<b>Reward if helpful.</b>

Read only

Former Member
0 Likes
1,449

hi

'~'(tild) is used for selecting data from your main table.

And u write it like mara~matnr so u specifies that u want to select matnr field from mara.

thats it.

I hope so this can help you in your problem.

thanks.

Reward point if helpful.

Read only

Former Member
0 Likes
1,449

Hi,

1. T173 TYPE C VALUE '~'

<b>For the above statement, it means T173 is a variable with value '~'.</b>

2. LGNUM like ltap-LGNUM

<b>For the above statement, it means Itap is a table with field LGNUM.</b>

3. SELECT

ltap~LGNUM INTO TABLE GT_DATA2

<b>In the above statement, u r taking only LGNUM field eventhough it contain many fields in it.</b>

Reward if useful.

Read only

Former Member
0 Likes
1,449

hi,

1. LGNUM like ltap-LGNUM,

means ur creating a variable which takes the reference of existing object like itap-lgnum.

generally for existing abap objects only we use LIKE keyword.

for ex: matnr like mara-matnr. /// where mara is a standard sap table and matnr is the filed of mara. here we r creating a field which is like matnr in mara.

2.T173 TYPE C VALUE '~',

T173 is a character variable which is assigned with a character '~'. here we are creating a varaiable so we are using TYPE keyword. TYPE keyword generally used for creating varaiable with respect to standard data types in SAP.

3.SELECT

ltap~LGNUM INTO TABLE GT_DATA2

here using select st we are passing data of lgnum field of Itap table into internal table GT_DATA2.

select statement is used for selecting values from database table and passing to user defined tables [internal tables].

if helpful reward some points.

with regards,

Suresh Aluri.