Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Define "Event Handler" in BSP Application

$
0
0

Hi.

 

I have built a BSP Application which functions as a Reporting Interface.

The frontend of the application, has selections for the user to either select a date or to type information into an input field.

When the user clicks submit, a SQL query should be executed accordingly which runs a query against an external MS SQL Server.

 

I have already managed to establish the SQL Connection by defining it in the DBCON Table and testing it in the DBACOCKPIT.

 

My problem is as follows, if I try to write a SQL Query which is linked to the SUBMIT button, then the BSP gives errors such as:

 

"my_table_name" is not defined in the ABAP Dictionary as a table, projection view, or database view.

^^ This is my first time trying to do something like this in ABAP. ^^

 

Can someone who is willing, please guide me through this, step by step so that I can learn how to do this basic task?

 

What my Query needs to do is the following:
It needs to take the data from the FORM on the HTML page, run a query against the SQL Database.

 

The table name in the database is:   dbo.eof

There are several columns in the table, such as:  CARDID, REGNO, DATE1, DATE2, MASS1, MASS2, NETT, CONSNO

 

I tried the following Query, but it would obviously be incorrect as I have no knowledge of this:

This is in the "OnInputProcessing" event handler.


when 'submit'.

   select * from eof WHERE Date1 LIKE %specificdate%

 

SpecificDate is the name of the input field on the HTML form.

 

What do I need to define where in the BSP to make this work??

My "Page Attributes" and "Type Definitions" sections in the BSP are empty as I do not know what to put there.

 

I have attached a screenshot of the HTML code of the FORM section.

Capture.PNG


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>