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

SAP-.Net @variable

former_member290321
Participant
0 Likes
512

The following SELECT statement returns all the columns in the SPFLI table for flights from New York to a city that is specified by the value of a variable. Where ABAP developer should add this variable.

To execute this statement, you must create a SAPParameter with the name @variable, specify its value, and add the SAPParameter to the SAPCommand object corresponding to the query.

[link|http://technet.microsoft.com/en-us/library/ms141761.aspx]

Code SnippetSELECT * FROM SPFLI WHERE cityfrom='NEW YORK' AND cityto=@variable

4 REPLIES 4
Read only

matt
Active Contributor
0 Likes
470

So what's the question?

Read only

0 Likes
470

Where to add the variable in SAP so i can pull the table using that variable.

Read only

matt
Active Contributor
0 Likes
470

Not an ABAPers task. SAPParameter and SAPCommand are part of ADO.NET interfaces.

http://msdn.microsoft.com/en-us/library/cc185328.aspx

Read only

0 Likes
470

I have thought other option please tell me whether it will work of not.

Say if I ask ABAP developer to make custom RFC with simple select statment

i.e.

select * from Table_Name

where Field_Name between @StartDateofLastMonth and @EndDateofLastMonth.

The aforesaid select statment will get the calculated startdate and enddate from sap system date.

where as i have to give @Table_Name and @Field_Name from my end as variable...

What do u think will it work and how much time it will requir to develop.

One more favor where i can get sample RFC for the aforesaid.