2012 May 23 4:42 PM
Hi,
I am new to abap and i am learning abap my self by reading materials and books,
while i am practising i wrote code like below and the output of the programme is empty with report heading.
data:begin of struct1,
carid type sflight-carrid,
conid type sflight-connid,
fdate type sflight-fldate,
cost type sflight-price,
end of struct1.
select single carrid connid fldate from sflight into corresponding fields of struct1.
write struct1-carid.
I have checked by using debugger and it is not fetching the data to the structure.
Can anyone please tell me what might be the reason for this?
Regards,
Kumar.
Moderator message - basic question locked.
Rob
2012 May 23 4:45 PM
The name in Internal table should match with the fields in the select query.
Use:
data:begin of struct1,
carrid type sflight-carrid,
connid type sflight-connid,
fldate type sflight-fldate,
cost type sflight-price,
end of struct1.
2012 May 23 4:57 PM
Te SELECT statment retrieves the Values and tries to pass the values to the corresponding fields ( which are suppose to be of the same name ). please check and make sure you have the same field names. It will work.
2012 May 23 6:33 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |