Application Development 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: 

How to use select query with BSID which is not transparent table but it is DDL_SQL_VIEW ?

pashasapcha
Participant
0 Kudos

As per the requirement I have to add due date to smartform. I understood that we can not find due date in any table and

we have to calculated at code level using function module NET_DUE_DATE_GET . I have tested the function module in SE37

and it is giving the desired results.

Now I have to inculcate this FM in driver program.

I can see that the import section of function module contains field of BSID which I have to pass.

The challenge I am facing here is BSID is created not as transparent table but as DDL SQL VIEW as shown in image because of which

SELECT query is not working. it is throwing me error message that the table is unknown as shown in image.

How can I fix this issue ?

Kindly please help me out with this issue.

2 REPLIES 2

abo
Active Contributor

The message is about field TABLE, says nothing about BSID.

Move "into table...." before "from" and it should work

jack_graus2
Active Contributor

SELECT SINGLE and SELECT INTO TABLE don't go together.

  • The result of SELECT SINGLE is a single record or a structure variable.
  • The result of SELECT INTO TABLE is table data.

You might use something like:

SELECT * FROM bsid INTO TABLE @DATA(lt_bsid) UP TO 10 ROWS.

Or:

SELECT SINGLE * FROM bsid INTO @DATA(ls_bsid).