‎2007 Sep 03 8:47 AM
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.
‎2007 Sep 03 8:51 AM
To indicate that LGNUM is a field of table LTAP.
i.e. '~' stands for relationship
‎2007 Sep 03 8:53 AM
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>
‎2007 Sep 03 9:05 AM
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.
‎2007 Sep 03 11:11 AM
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.
‎2007 Sep 03 11:24 AM
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.