10-31-2007 4:31 PM
hi,
i wont to now what is doing this select because it didn't have into
SELECT SINGLE *
FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
Regards
10-31-2007 4:34 PM
It will select the data from the TADIR into TADIR workarea ... you can access the data like TADIR-PGMID.
Regards,
Naimesh Patel
10-31-2007 4:34 PM
This select statement places the d/b table entry in the TABLES work area declared using the <b>TABLES: TADIR</b> statement
10-31-2007 4:34 PM
It will select the data from the TADIR into TADIR workarea ... you can access the data like TADIR-PGMID.
Regards,
Naimesh Patel
10-31-2007 4:38 PM
Hi,
Just check out there might be a endselect statement, in between select & endselect statement there might be some statement getting executed to move the data to internal table.
<b><REMOVED BY MODERATOR></b>
Satish
Message was edited by:
Alvaro Tejada Galindo
10-31-2007 5:33 PM
hi ricardo,
This type of SELECT statements are helpful in validations.
Example consider u have parameter or select-options statement for WERKS which takes input from user. In this case, u want to validate the input value. In such cases, we can use SELECT statement without INTO clause......
Example.:
PARAMETERS : p_werks TYPE marc-werks.
SELECT SINGLE *
FROM t001w
WHERE werks = p_werks.
IF sy-subrc <> 0.
MESSAGE 'Invalid Plant' TYPE 'I'.
ENDIF.
Like this, we can validate user input for plant.
<b><REMOVED BY MODERATOR></b>
Harimanjesh AN
Message was edited by:
Alvaro Tejada Galindo
10-31-2007 5:41 PM
Hi,
SELECT SINGLE returns just one row from a table and store it in a working area, so thats why you don't need an ENDSELECT...
Now, if you have a definition like
TABLES: tadir.
It define a waorking area for table 'tadir' with the same name... and that's why you don't need an INTO clause in your SELECT statement.
cya,
dimas.
10-31-2007 8:50 PM
It defines a Header area internally (not Work Area) and you can make use of TADIR-<field1> to acces the fields.