on 03-12-2013 6:20 AM
Hi,
I can write query like this in SQL.
SELECT VBELN, '1' AS Flag FROM VBAK WHERE.......
How can i do this in ABAP.
Please search SDN before posting such questions.
There are 2 ways to write select query:
1. Select single record
SELECT SINGLE * FROM VBAK INTO <structure name> WHERE VBELN = '1'.
2. Select multiple records
SELECT * FROM VBAK INTO TABLE <table name> WHERE VBELN = '1'.
-Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sathya
if you want to select data where vbeln = 1 then simply write
select * from vbak where vbeln = '1' and ...... into corresponding fields of table it.
where it is the name of internal table with header line of the same type as that of vbak.
this is a basic questions so try and search before posting for better scn help and also post such discussions under abap development .cheers !!
regards
vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just like in SQL.
select <field1> <field2> ... into table itab from dtab "VBAK in this case
where flag = '1'.
or
select single <field1> <field2> ... into wa from dtab "VBAK in this case
where flag = '1'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.