How to write join queries in Smartforms
how to write join queries in Smartforms pls give me sample
just as u write it in normal reports u can do the same in smartforms but it is suggested tht i u havve a custom print program do it thr and pass it thru interface
кu03B1ятu03B9к
Similar Messages
-
How to write join queries in EJBQL
Hi
I have a join query as follows:
SELECT a.person_seq_id FROM fr_node_employees a,fr_nodes b,fr_node_owners c
WHERE b.node_seq_id=c.node_seq_id AND a.node_seq_id=c.node_seq_id AND c.person_seq_id=?
O/R mapping for tables:
fr_node_employees - NodeEmployee
fr_nodes - Node
fr_node_owners - NodeOwner
How to write this query in ejbql or can anyone give some information about ejbql will be helpful.
Thanks,
Satish.http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/queryhql.html
-
How to write Join View Adaptor which will pull data from Siebel and OID ?
Hi Experts,
I wanted to write web service call where OIF will talk to OVD than OVD will have join adaptor which will pull few data like msisdn from Siebel and view data from oid like given name and generate SAML assertion.
I wanted to know how to write join adaptor for the same
Help Appreciated.Hi Experts,
Is anyone has any idea on webservice call to OIF which will call OVD that will have join adaptor connecting siebel and oid ?
any help is appreciated -
How to write driver programming in smartforms
hi Floks
<i>how to write driver programmig and how many types of driver programs available to trigger smartforms what are they . how to call the url in smartforms ?
help me out .thanking you ,</i>
with regards,
sureshHi
Try to get the Function module name from the smart form
how to find Driver program for a smartform
and now goto SE38 and create a progarm for calling the smartform
smartform driver program
Regards
Kathirve -
How to write print program for smartforms
Hi all
I need to develop new smartform and its print program.
But Im not experience in writing print program for smartform.
Ive gone through the simple print program sample that use only one table as input and one table for output.
But my smartforms require few tables for input and output.
How should I define the Data?
Can anyone guide me on how to write it.
Thanks & Regards
azTransaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
Reward points... -
How to write Inline queries in Oracle 10g
Hi all,
The following Procedure is written in SQL Server 2005 . It uses Inline queries and executes it in the end . I want to write the same stored procedure in Oracle 10g.
Could you guys please help me in doing the same .
CREATE PROCEDURE [dbo].[proc_MDM_ShowDetails]
@MASTERCODE VARCHAR(50),
@MDMCode VARCHAR(50),
@IsDrpDwnFill BIT,
@CntryCode INT,
@StateCode INT,
@CityCode INT = 0,
@GetParent INT = 0,
@PinCode BIT = 0
AS
BEGIN
DECLARE @strSQL VARCHAR(4000)
DECLARE @TableName VARCHAR(4000)
SET NOCOUNT ON;
SELECT @TableName = MASTER_TABLE FROM MDM_MASTER WHERE MASTER_CODE=@MASTERCODE
IF @IsDrpDwnFill = 0 AND @CntryCode = 0 AND @GetParent = 0
BEGIN
SET @strSQL = 'SELECT M.*,H.* FROM ' + @TableName + ' M LEFT JOIN MDM_HIERARCHY H ON M.MDM_MASTER_CODE=H.MASTER_CODE WHERE M.MDM_CODE=' + @MDMCode
END
ELSE IF @CntryCode = 0 AND @IsDrpDwnFill = 1
BEGIN
SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' + ' AND MDM_EXIST=1'
END
ELSE IF @CntryCode > 0 and @GetParent = 0
BEGIN
SET @strSQL = 'SELECT M.MDM_DESCRIPTION,M.MDM_CODE,H.* FROM ' + @TableName + ' M INNER JOIN MDM_HIERARCHY H ON M.MDM_MASTER_CODE=H.MASTER_CODE WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@CntryCode)
END
ELSE IF @StateCode > 0 and @GetParent = 0
BEGIN
SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@StateCode)
END
ELSE IF @CityCode > 0 and @GetParent = 0
BEGIN
SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
' AND MDM_EXIST = 1 AND MDM_PARENT_CODE =' + str(@CityCode)
END
ELSE IF @PinCode = 1 and @GetParent = 0 and @IsDrpDwnFill = 1
BEGIN
SET @strSQL = 'SELECT MDM_DESCRIPTION,MDM_CODE FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
' AND MDM_EXIST = 1 '
END
ELSE IF @GetParent > 0
BEGIN
SET @strSQL = 'SELECT * FROM ' + @TableName + ' WHERE MDM_STATUS=' + '''' + 'approved' + '''' +
' AND MDM_EXIST = 1 AND MDM_CODE =' + str(@GetParent)
END
EXEC(@strSQL)
SET NOCOUNT OFF;
END
Thanks
ShobhitHi,
I dont know sql server 2005. But by observing it I feel you are generating sql dynamically based on condition inside the proc.
DECLARE
TYPE EmpCurTyp IS REF CURSOR;
emp_cv EmpCurTyp;
emp_rec employees%ROWTYPE;
sql_stmt VARCHAR2(200);
v_job VARCHAR2(10) := 'ST_CLERK';
BEGIN
sql_stmt := 'SELECT * FROM employees WHERE job_id = :j';
OPEN emp_cv FOR sql_stmt USING v_job;
LOOP
FETCH emp_cv INTO emp_rec;
EXIT WHEN emp_cv%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('Name: ' || emp_rec.last_name || ' Job Id: ' ||
emp_rec.job_id);
END LOOP;
CLOSE emp_cv;
END;something like this it will be. it is in oracle documentaion
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/dynamic.htm#i14500 -
How to write complex queries in ejb2.0
Hi ,
i want to write query for search option since query depend on options choosen by user so the query is created dynamically i.e search params(table colums) may differ
.Hence i cant use ejb-ql ..... can i use hibernate if yes how can i configure ejb to use hibernate ... else is there any other way
this is related to ejb2.o ,....... i cant upgrade to ejb3.0just as u write it in normal reports u can do the same in smartforms but it is suggested tht i u havve a custom print program do it thr and pass it thru interface
кu03B1ятu03B9к -
How to use join queries with toplink
Hi there
I'm using toplink within the JDeveloper 10.1.3.3. with great success.
Now, I need to query multiple tables using a join SQL.
How do you configure toplink now without creating database views?
I could not find an easy with within the JDev IDE or from google search.
Any help please?
Thanks
HenkieIn a TopLink query you can query across any relationship to another object. You can also join or batch read the object's relationship using the ObjectLevelReadQuery and ReadAllQuery API (see TopLink documentation).
You can also map a class to multiple tables.
-- James : http://www.eclipselink.org -
How to write nested queries using DB Adapter?
I want to write following nested query using DB Adapter can any one help...
SELECT INVOICE_ID,FILE_NAME FROM BILLING_INVOICE_PDF_V where FILE_ID =(
(SELECT MAX(FILE_ID) FROM BILLING_INVOICE_PDF_V WHERE (INVOICE_ID = ‘12345’)));
Thanks,
Ram.Hi Ram,
Most likely it is the semicolon at the end of the SQL statement that's causing the db adapter to throw the error; just enter the custom sql statement without a semicolon at the end.
SELECT INVOICE_ID,FILE_NAME FROM BILLING_INVOICE_PDF_V where FILE_ID = (SELECT MAX(FILE_ID) FROM BILLING_INVOICE_PDF_V WHERE INVOICE_ID = '12345') -
How to write Protect endprotect concept in Smartforms
hi
can any one suggest me
How to write Protect endprotect concept in Smartforms
i have some content to coem without break in SMARTFORM
how to do that
Thanks & Regards
kalyan
<thread moved, has nothing to do with ABAP Objects. Please choose your forums more carefully in future>
Edited by: Mike Pokraka on Sep 26, 2008 12:50 AMHi,
For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window) there is not enough space left for the paragraph, the entire paragraph appears on the next page.
Regards,
Himanshu Verma -
How to write queries more efficiently? Please Help a sinking guy
Hello Query Guru's,
I am having issue writing the SQL statements efficiently, please help/guide me to learn how to write SQL’s more efficiently and logically. At my work I am being a fun every day by my team when comes the coding please guide me to become an efficient query writer. I am starving and ready to do hard work but need to know the correct path.
Thanks in Advance.You could pick up examples from introductory books on Oracle.
For example the Certification Guides for the Oracle SQL Fundamentals Guide (1Z0-051 http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-051&p_org_id=&lang= ) . Search bookstores / amazon.com for books for 1Z0-051
You could also look at Jason Price's book Oracle Database 11g SQL : http://www.amazon.com/Oracle-Database-11g-SQL-Press/dp/0071498508/ref=sr_1_1?ie=UTF8&qid=1372742972&sr=8-1&keywords=Jason+Price
Hemant K Chitale -
Problem with Join Queries using PHP and an Orcale Database
Ok, I am trying to build a simple php querying tool for my oracle database and for the most part it is working however I am having a problem getting data from my join queries. If I run the following query :
QUERY:
SELECT lastfirst,EnteredBy,Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
Lastfirst EnteredBy Debit
caiu, test 204 1
But when I run the query correctly I get no results
QUERY:
SELECT sts.lastfirst,gl.EnteredBy,gl.Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
sts.lastfirst gl.EnteredBy gl.Debit
and if I run the query combining the two above methods and adding a field (schoolid) that has the same name on both table I get the following result sets
QUERY:
SELECT lastfirst,EnteredBy,Debit,sts.schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
lastfirst EnteredBy Debit sts.schoolid
caiu, test 204 1
QUERY:
SELECT lastfirst,EnteredBy,Debit,schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
RESULT SET:
NONE
Therefore, I have to have something written incorrectly in my php code and I just can not figure it out. My entire code is pasted below please provide me with an assistance you might have to offer. I have change the odbc_connec line so I could post it to this forum. In addition, I had to phrase out the column headers there for when you write the column headers you have to use ~ instead of , as the separator and then I turn back into the correct format for sql.
//These scripts just open help windows if somone clicks on the icon
<script>
function submit()
{document.sqlform.submit();}
</script>
<script>
function colwin(){
window.open("colnames.php",null,"height=300,width=400,scrollbars=1");}
</script>
<script>
function tabwin(){
window.open("tablenames.php",null,"height=300,width=400,scrollbars=1");}
</script>
<script>
function help(){
window.open("http://www.w3schools.com/sql/default.asp",null,"height=500,width=700,scrollbars=1");}
</script>
<form method="post" action="<?php echo $PHP_SELF;?>" name="sqlform">
<?php
//Cookie to check for authorization to the site
if($_COOKIE['cookie']=="CheckCookieForAuth")
//These get the values of the textareas after the form has been submitted
$sqlSELECT = $_POST["SELECT"];
$sqlFROM = $_POST["FROM"];
$sqlJOIN = $_POST["JOIN"];
$sqlWHERE = $_POST["WHERE"];
$sqlOTHER = $_POST["OTHER"];
$sqlSELECTTYPE = $_POST["SELECTTYPE"];
//This is the variable used to parse out my headers the user entered
$sqlColNames = split('~',$sqlSELECT);
//This converts the ~ separator to , so I can actually use it as part of my sql string
$search = array('~');
$replace = array(',');
$mystring = $sqlSELECT;
$sqlString = str_replace($search, $replace, $mystring);
//These are the textareas and the drop down options that the end users has to create queries
echo "<table border=0>";
echo "<tr><td valign='top'>";
echo "<B>SELECT TYPE</B> <BR><SELECT NAME=SELECTTYPE>
<OPTION VALUE='SELECT' SELECTED>SELECT</OPTION>
<OPTION VALUE='SELECT DISTINCT'>SELECT DISTINCT</OPTION>
<OPTION VALUE='INSERT'>INSERT</OPTION>
<OPTION VALUE='UPDATE'>UPDATE</OPTION>
<OPTION VALUE='DELETE'>DELETE</OPTION>
</SELECT>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=SELECT wrap=physical>$sqlSELECT</textarea>";
echo "</td><td valign='top'>";
echo "<img src='images/sqlC.jpg' width='25' height='25' onclick='colwin()'>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>FROM</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=FROM wrap=physical>$sqlFROM</textarea>";
echo "</td><td valign='top'>";
echo "<img src='images/sqlT.jpg' width='25' height='25' border=0 onclick='tabwin()'>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>JOIN</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=JOIN wrap=physical>$sqlJOIN</textarea>";
echo "</td></tr>";
echo "<tr><td valign='top'>";
echo "<b>WHERE</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=WHERE wrap=physical>$sqlWHERE</textarea>";
echo "</td></tr>";
//This is where the end user would enter group by, having, order by, etc..
echo "<tr><td valign='top'>";
echo "<b>OTHER</b>";
echo "</td><td>";
echo "<textarea rows=2 cols=75 name=OTHER wrap=physical>$sqlOTHER</textarea>";
echo "</td></tr>";
This is a run query icon and a help icon
echo "<tr><td colspan=2 align=right>";
echo "<img src='images/RunQuery.jpg' width='30' height='28' onclick='submit()'> <img src='images/qm.jpg' border=0 width='25' height='25' onclick='help()'>";
echo "</td></tr></table>";
echo "<br>";
echo "<br>";
//This is where I connect to my remote oracle database
$conn=odbc_connect('ODBC_ConnectionName','USERNAME','PASSWORD');
//This is the sql string created by the end users
$sql="$sqlSELECTTYPE $sqlString FROM $sqlFROM $sqlJOIN $sqlWHERE $sqlOTHER";
//This executes the connection string and the sql string
$rs=odbc_exec($conn,$sql);
//This will display the query or a message if the query is empty
if($rs!=NULL){
echo "<table border=1>";
echo "<tr>";
//This loops through the string array the end user enter the field name text area to get column headers
for($i=0; $i<count($sqlColNames); $i++)
echo "<td>";
print_r($sqlColNames[$i]);
echo "</td>";
echo "</tr><tr>";
//This actually fetchs the rows from the statement and then display the data based on the column names the end user speificed
while (odbc_fetch_row($rs))
for($i=0; $i<count($sqlColNames); $i++)
$results=odbc_result($rs,$sqlColNames[$i]);
echo "<td>$results</td>";
echo "</tr>";
odbc_close($conn);
echo "</table>";}else{echo "Results will be displayed here";}
echo "<br><br>";
echo $sql;
else
echo "Not logged in";
?>
</form>This looks more like a SQL question than a PHP issue. There are a couple of JOIN examples at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2066611 that might you work through the problem.
-
How to create Dynamic Window in Smartforms
Hi all,
Could you please help me out on how to create Dynamic Window in smartforms excluding Main Window.
Thanks in Advance.
Vinay.hi,
Hi,
1.If you are creating the Different windows for the Countries,then In conditions tab of window specify the Condition i.e.
company -code = '2201'.
2.Then that window can trigger ofr that condition.
3.Other wise, if you are using the different layouts ,then write the condition in Print program and call that form .
reward me if helpful. -
How to write source code in smart forms?
hi friends,
can anyone can help me in writing sorcecode in smartforms r
any materail link.
if it is helpful points can b rewarded.Thanks in advance.Hi,
Check this link for
how to write source code in smart forms?
http://****************/Tutorials/Smartforms/GettingStarted/SimpleText.htm
You can write Source Code in smartforms By Choosing Program Lines.
Check this link with Screen Shots
http://****************/Tutorials/Smartforms/PO/page1.htm
Reward All Helpfull Answers
Regards
Fareedas
Edited by: Fareeda Tabassum S on May 21, 2008 3:09 PM -
How to write a java function for use in where clause in SQL statement
Hi,
Does anyone know a good tutorial on how to write and include a Java class/function into Oracle.
I'd like to write mathematical function to use in my queries, but the resources available in PL/SQL are very limited.
Many thanxPim,
I see you got an answer in the PL/SQL forum.
But in case you haven't seen it, perhaps this Web page will help:
http://www.oracle.com/technology/tech/java/jsp/index.html
Good Luck,
Avi.
Maybe you are looking for
-
Digital Signatures in Adobe Forms (Non-Interactive)
Hi everyone, I need to sign a receipt that will be sent by e-mail. The form is non-interactive, it´s only a simple receipt. This form may be printed or sent by e-mail; in case of being sent it must be signed before sending it. The receiver should be
-
I am new in XI. I was trying to send the IDOC data into mail using mail adapter. I have imported the CREMAS04 idoc in IR. Made data type messege type , messege interfaces, messege mapping , and interface mapping. I gave created SC , Technical system,
-
Hello I want to estimate the parameters of an AutoRegressive model order p=5, and from netsearches I understand this entails 1) estimating the autocorrelationfunction up to and including lag 5 2) creating a correlationmatrix R from these, where r_ij
-
Do apex supports self registration
Do apex supports self registration? so new users enter their information and then they are added to system as users .. Each time they login to system they enter the user name and password that they register with..
-
Create pop-up windows in forms 10g
I have an application in which several formal controls are made before insert/update a record. Some of them are blocking, some others arent. Actually, at every constraint violation, a message is displayed with an alert. So, the user may got one or mo