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

INTO CORRESPONDING FIELDS OF

Former Member
0 Likes
642

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.

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.

3 REPLIES 3
Read only

Former Member
0 Likes
599

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.

Read only

Former Member
0 Likes
599

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.

Read only

Former Member
0 Likes
599

Moderator message - basic question locked.

Rob