SQL Select statement

Hi All,

I have small problem while implementing this SELECT statement.

my requirement:

I will get RFC call from SAP: In that call they will send 1 or 4 types of input data ex: create date(High and Low), change date(High and Low), PO number (High and Low), Entity Numbers (High and Low). Using this input I need to get the out of PO results.

Which is the best way to aproach this.

1)Using SQL SELECT statement
2)USING Custom Statement

This is first time I am implementing SELECT statement. I read the documentation But I am not able to get the exact stuff.

Colud any one can guide me please.


My suggesting is to examine the data that you receive to construct a dynamic SQL statement.

Work backwards from the SQL statements that you would need to execute to process requests with some or all of the column names and containing either data values or data value ranges.

Read the dynamic SQL adapter service documentation and create a simple dynamic SQL service before diving into the more complicated case.


Thanks for your quick reply.

I did in the following way. Finally I worte one flow service which passes the complete where clause as a string.

I selected the custome SQL adapter service and passed that string as a input service. And selected the output fields same as in the tables.

I hope my Idea is fine, But there is small problem for me is date format.

I collected date(12-Jul-06) also as string,but i need to map to my UDM in the following format (12-day, Jul-Month, 06-Year).

my environment is: Select data in one server, subscribing system in other server… both are intracting through GATEWAYS

Question:Is my idea is correct?
How can I separate that date format into individuals…?

Do I need takecare of any other issues in this case.

Please guide me


Hi Mark,

I can use substring to separate that format. problem is converting month into number format…

ex: in DB month is Jul…I want to convert into 07… How can I do this?


Use pub.date:dateTimeFormat to convert dates from one format to another. You can also use this to only convert one portion of the date (e.g. month) to another.

My Custome SQL is not at all running!!!

I am doing as following steps
1)SQL place–I am writing query like (select PoNumber, POdate from PO_Table where = ?)

Input type place—I am feeding input query string
Outplace----adding all required fields from the table.

Is this the way is correct or not?

Could somebody guide me.



r u specifying the input and output fields in the custom Sql ,if not specify the select column fileds in the output and passing fileds of select statement as a input fileds in the input fileds,give SQL Command in the Sql Block,After u have done run the Adapter service ,it vl open the dialogue box for input fileds.give i/p and click o.k button . u vl get output