How to Call Smartform from User defined Transaction
Hi All,
my requirement is users enters the data in the module pool program and clicks on the save and generate smartform button and the data is updates the database tables and updated data should be printed on smartform
Can anyone Please tell me How to link Smart Program with module pool program.
Regards,
Prasad.
In smartforms , right click any window and create->flow logic->program lines, then the screen for program logic appears. In the left most corner there a icon named statement struct.
Click the statement struct icon, it will show the screen for pattern, there give the function module name that you want to include in smartforms
case okcode.
when 'SAVE'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = P_FORM "Your form name
variant = ' '
direct_call = ' '
IMPORTING FM_NAME = FM_NAME
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
calling the generated function module
CALL FUNCTION FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = CPARAM
OUTPUT_OPTIONS = OUTOP
USER_SETTINGS = SPACE
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
IMPORTING
JOB_OUTPUT_INFO = TAB_OTF_DATA
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
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.
ENDIF.
endcase.
endform.
endcase.
Similar Messages
-
How to call Microsoft SQL User defined function??
I am trying to call Miscrosoft SQL user defined function (not stored procedure) and experience problems. The function -- func_profile_history takes 3 inputs and returns resultSet.
Please let me know if there is any examples some where. All the examples I found are for stored procedure.
Thanks....
Siu
************ source *************
public Vector callSqlFunction(String eidTradcom, String idSku, String endDate, String idUserPost)
throws TradcomException, RemoteException
System.out.println("--------------in callSqlFunction--------------1");
Connection conn = null;
java.sql.CallableStatement cstmt = null;
ResultSet rs = null;
ForecastInfo info = null;
Vector v = new Vector();
try{
conn = TradcomUtils.getConnection();
String sql = "{call func_profile_history(?,?,?)}";
System.out.println("--------------in callSqlFunction--------sql="+sql);
cstmt = conn.prepareCall(sql);
System.out.println("--------------in callSqlFunction-------2");
cstmt.setString(1, eidTradcom);
cstmt.setString(2, idSku);
cstmt.setString(3, endDate);
System.out.println("--------------in callSqlFunction-------3");
rs = cstmt.executeQuery();
System.out.println("--------------in callSqlFunction-------4");
while (rs.next()){
info = new ForecastInfo ();
info.setEidTradcom(rs.getString("eid_tradcom"));
info.setIdSku(rs.getString("id_sku"));
info.setQtOnHand(rs.getDouble("qt_on_hand"));
info.setQtOnHold(rs.getDouble("qt_hold"));
info.setQtNetOnHand(rs.getDouble("qt_net_on_hand"));
info.setQtAlloc(rs.getDouble("qt_alloc"));
info.setQtAvailUnalloc(rs.getDouble("qt_avail_unalloc"));
info.setQtPoShip(rs.getDouble("qt_po_ship"));
info.setQtPoRcvd(rs.getDouble("qt_po_rcvd"));
info.setQtTransit(rs.getDouble("qt_transit"));
info.setQtAsn(rs.getDouble("qt_asn"));
info.setQtPo(rs.getDouble("qt_po"));
info.setQtPoBalance(rs.getDouble("qt_po_balance"));
info.setQtSoShip(rs.getDouble("qt_so_ship"));
info.setQt4Cast(rs.getDouble("qt_4cast"));
v.addElement(info);
System.out.println("--------------in callSqlFunction-------5");
System.out.println("--------------in callSqlFunction-------v="+v);
return v;
}catch(Exception ex){
System.out.println("Error in callSqlFunction:"+ ex.getMessage());
throw CachingManager.getTradcomException(ex, "Error in callSqlFunction");
}finally{
try{ if (cstmt != null) cstmt.close(); } catch(Exception ex){}
try{ if (conn != null) conn.close(); } catch(Exception ex){}
********************* error output ***************
********************* bef calling callSqlFunction
--------------in callSqlFunction--------------1
--------------in callSqlFunction--------sql={call func_profile_history(?,?,?)}
--------------in callSqlFunction-------2
--------------in callSqlFunction-------3
Error in callSqlFunction:The request for procedure 'func_profile_history' failed
because 'func_profile_history' is a function object. Severity 18, State 1, Proc
edure 'LAP_DUAL null', Line 4
ERROR=Error in callSqlFunction...The request for procedure 'func_profile_history
' failed because 'func_profile_history' is a function object. Severity 18, State
1, Procedure 'LAP_DUAL null', Line 4well, I tried the preparedStatemnet and it worked. Case closed.
-
How to Call Smartform from Custom Transaction.
Hi All,
I have developed Module pool Program , in module pool program i have save button and Execute button when i press save button whatever the data is there in transaction, it will store in the tables and when i click Execute button, it will generate a smartform.
so here my question is how to link with the smartform with Module Pool Program.
plese help me on this
Thanks in Advance.
Prasad.in your Module pool program
in PBO event you can do like this...
either use
CALL FUNCTION '/1BCDWB/SF00003434'.
here /1BCDWB/SF00003434 is name of function module generated from smartform
==========================
or if you want to get the function module name dynamically then use below function module to get the FM name for your Smart form name.
SSF_FUNCTION_MODULE_NAME
and then use that from export parameter..
Hope it will solve your problem.
Thanks & Regards
ilesh 24x7 -
How to call smartforms from abap
hi experts,
I TRIED AND NOW I AM GETTING MY SF IN MY PROG.(I TRIED BY OWN)
NOW I WANT TO CONVERT IT INTO PDF FORM ,AND THEN SAVE THIS SF IN COMPUTER ,
thanks
sunnyhello mr thakur
please take reference of this code
REPORT ZTESTCURRENCY.
data : IT_DATA type table of zstruct1.
DATA : FM_NAME TYPE RS38L_FNAM.
DATA : FORM_NAME TYPE TDSFNAME.
selection-screen begin of block b1 with frame title text-000.
parameters p_date type vbak-audat.
selection-screen pushbutton /10(5) pb1 USER-COMMAND UC01.
selection-screen end of block b1.
initialization.
move 'PRINT' to pb1.
AT SELECTION-SCREEN.
case SY-UCOMM.
when 'UC01'.
PERFORM SELECT_DATA.
ENDCASE.
*& Form SELECT_DATA
* text
* --> p1 text
* <-- p2 text
FORM SELECT_DATA .
FM_NAME = '/1BCDWB/SF00000042'.
FORM_NAME = 'ZSF_TESTSMARTFORM'.
SELECT AUDAT
AUART
NETWR
WAERK
INTO TABLE IT_DATA FROM VBAK WHERE AUDAT = p_date.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = FORM_NAME
* VARIANT = ' '
* DIRECT_CALL = ' '
* IMPORTING
* FM_NAME =
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
IF SY-SUBRC 0.
* 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
IT_DATA = IT_DATA
* 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.
ENDIF.
ENDFORM. " SELECT_DATA -
How can an user defined Transaction type in Inventory be configured in IB?
Need to know how to make an user defined transaction to update the status in IB automatically. i.e. suppose there is an user defined transaction "XYZ". I need to update the instance stause of an item to "CANCELLED" once that transaction happens on the item.
Edited by: user13340970 on Aug 13, 2010 7:14 AMHi Atheek,
I was looking at doing the transform manually, but my challenge is how to parse the inbound String into XML Elements with their properties. For example:
Example Message:
<abd:TypedDocument>
<abd:someElement>
<abd:aString><jkl:embeddedMessage jkl:attributeABc="Hello There"><jkl:someOtherElement>OSB Rules!<jkl:someOtherElement><jkl:aNumber>123456</jkl:aNumber></jkl:embeddedMessage>
</abd:aString>
</abd:someElement>
</abd:TypedDocument>
If I get the value of the embedded XML as a string, how can I parse our or address the various elements and attributes in the embedded XML? I was hoping to use:
$aString cast as jkl:embeddedMessage
But on OSB10g this fails. Is there another way with XQuery or XSL to convert an embedded XML that comes in as a string, into a complex User-Defined type?
Thanks,
David. -
User Defined Transaction in Logical Data Service
Hi
I have few physical data services created from database store procedures. I've corresponding logical services for each of the physical data services.
Now I've created a logical data service that calls 2 store procedures & trying to update this 2 store procs in a single transaction.
Also I dont have a read operation in my logical data services. In this case both store proc. should take part in a single transaction & should commit or rollback as per success/failure.
I tried testing this scenario & it fails. ALDSP was able to update first store proc. but there was an error in second store proc. so it should have rollback the entire transaction.
Is there any way that we can have user defined transaction in logical data service?
My Scenario:
InsertData(RequestA,RequestB) as response
res1 := call First Store Proc (RequestA) ;
res2 := call Second Store Proc (RequestB);
response := res1 + res2
So my question was is it possible to define user transaction before making calls & have commit/rollback define around it.
Apprecaite for your help!
Thanks
PashI have assumed that you realize you need XA drivers for this. What is the exception you see? Something about "mixed outcome"?
But in the case of store procedure, we cant drag & drop physical ds into logical ds. Why?Since your stored procedure updates, it should be defined in the physical ds as a "procedure" not a "function" - it sounds like it is. (procedure means it will update, function means it will not - not that it is a "stored procedure"). Because it updates it cannot be called by an xquery function because xquery is by definition read-only. It can only be called directly from the client, or from another procedure (which is XQSE, not Xquery). If you created a logical ds with a "procedure" - you could drop your procedure into that.
created a new library procedure in which i am calling 2 physical ds assuming it will be executed in a single transaction. But it does not. Please verify.
But it does not. Please verify.I won't verify it because it is not correct. It should be treated as though it is one transaction. And barring the bugs with JNDI/data source names and multi-data sources, I do not know how how it would not be. So either there is a misunderstanding or a new bug.
Either way you need to open a case with customer support to resolve this. When you open your case, the more information you provide them with (i.e the smallest possible dataspace that will reproduce the problem along with DML to create the stored procedures and the tables that they use, and also any/all exceptions/stack traces and server logs).
- Mike
ps. there are no means to explicitly create a transaction in ODSI. -
Java user-defined transaction management not working correctly???
Hi everyone,
I have encountered a problem when using Java user-defined transaction management in my session bean. It threw an exception but I could not work out what that means. Could anyone comment on this? Thanks.
This BrokerBean is a stateless session calling other entities bean to perform some simple operations. There are 2 Cloudscape databases in use. Invoices (EB) use InvoiceDB and all the other EBs use StockDB.
If I comment out the user-defined transaction management code, then everything works fine. Or if I comment out the Invoices EB code, it is fine as well. It seemed to me that there is something wrong in transaction management when dealing with distributed databases.
--------------- source code ----------------------
public void CreateInvoices(int sub_accno) {
try {
utx = context.getUserTransaction();
utx.begin();
SubAcc subAcc = subAccHome.findByPrimaryKey(new SubAccPK(sub_accno));
String sub_name = subAcc.getSubName();
String sub_address = subAcc.getSubAddress();
Collection c = stockTransHome.findBySubAccno(sub_accno);
Iterator i = c.iterator();
ArrayList a = new ArrayList();
while (i.hasNext()) {
StockTrans stockTrans = (StockTrans)i.next();
int trans_id = stockTrans.getTransID();
String tran_type = stockTrans.getTranType();
int stock_id = stockTrans.getStockID();
float price = stockTrans.getPrice();
Invoices invoices = invoicesHome.create(sub_accno, sub_name, sub_address, trans_id, stock_id, tran_type, price);
stockTrans = stockTransHome.findByPrimaryKey(new StockTransPK(trans_id));
stockTrans.remove();
utx.commit();
utx = null;
} catch (Exception e) {
if (utx != null) {
try {
utx.rollback();
utx = null;
catch (Exception ex) {}
// e.printStackTrace();
throw new EJBException("BrokerBean.CreateInvoices(): " + e.getMessage());
--------------- exception ----------------------
Initiating login ...
Enter Username:
Enter Password:
Binding name:`java:comp/env/ejb/BrokerSB`
EJB test succeed
Test BuyStock!
Test BuyStock!
Test BuyStock!
Test BuyStock!
Test SellStock!
Test SellStock!
Caught an exception.
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.RemoteException: BrokerBean.CreateInvoices(): CORBA TRANSACTION
_ROLLEDBACK 9998 Maybe; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806
completed: Maybe
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemExceptio
n(ShutdownUtilDelegate.java:64)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at BrokerStub.CreateInvoices(Unknown Source)
at Client.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:22
9)
at com.sun.enterprise.appclient.Main.main(Main.java:155)
Caused by: java.rmi.RemoteException: BrokerBean.CreateInvoices(): CORBA TRANSACT
ION_ROLLEDBACK 9998 Maybe; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806
completed: Maybe
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.ja
va:389)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:43
1)
at BrokerBean_EJBObjectImpl.CreateInvoices(BrokerBean_EJBObjectImpl.java
:265)
at BrokerBeanEJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Ge
nericPOAServerSC.java:520)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Gen
ericPOAServerSC.java:210)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAS
erverSC.java:112)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProces
sor.java:84)
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadP
ool.java:99)Three things:
first, maybe you should think of putting ut.begin() just before the invoicesHome.create() method and ut.commit() just after the stockTrans.remove() method.It wont solve the current problem but will help in performance once the problem is solved.
second, your utx.commit() is outside the try block. how come the code is compiling then??
third, try doing a SOP call before and after invoicesHome.create() method and see where the problem actually lies.
let us know...
Hi SteveW2,
Thanks for being so helpful. Here are my replies:
Can I just ask why you're not using containermanaged
transactions?The reason why I didn't use container managed
transactions is because I don't really know how to do
that. I am more familiar with this user-defined
transaction handling.
I have attempted to implement the same method in an
entity bean and just let the container manage the
rollback itself. The same exception was thrown when
running the client.
Also, the transaction behaviour is likely to relateto
the app server youre using - which is it?What do you mean by the app server? I am using J2EE
1.3.1 if that is what you meant.
Finally, if your code has a problem rolling back,and
throws an exception, you discard your exception
thereby losing useful information.I have tried to print the exception stack as well, but
it is the same as just printing the general
exception.
This problem is very strange cause if I comment out
the transaction management thing, then everything
works fine. Or if I am only working with 1 single
database, with this user-defined transaction handling,
everything works fine as well.
Here is the error log from J2EE server if you are
interested.
------------ error log ---------------
javax.ejb.TransactionRolledbackLocalException:
Exception thrown from bean; nested exception is:
javax.ejb.EJBException: ejbCreate: Connection
previously closed, open another Connection
javax.ejb.EJBException: ejbCreate: Connection
previously closed, open another Connection
at InvoicesBean.ejbCreate(Unknown Source)
at
InvoicesBean_RemoteHomeImpl.create(InvoicesBean_Remote
omeImpl.java:31)
at InvoicesHomeStub.create(Unknown Source)
at BrokerBean.CreateInvoices(Unknown Source)
at
BrokerBean_EJBObjectImpl.CreateInvoices(BrokerBean_EJB
bjectImpl.java:261)
at BrokerBeanEJBObjectImpl_Tie._invoke(Unknown
Source)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispa
chToServant(GenericPOAServerSC.java:520)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.inter
alDispatch(GenericPOAServerSC.java:210)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispa
ch(GenericPOAServerSC.java:112)
at
com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:25
at
com.sun.corba.ee.internal.iiop.RequestProcessor.proces
(RequestProcessor.java:84)
at
com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThr
ad.run(ThreadPool.java:99)
javax.ejb.TransactionRolledbackLocalException:
Exception thrown from bean; nested exception is:
javax.ejb.EJBException: ejbCreate: Connection
previously closed, open another Connection
at
com.sun.ejb.containers.BaseContainer.checkExceptionCli
ntTx(BaseContainer.java:1434)
at
com.sun.ejb.containers.BaseContainer.postInvokeTx(Base
ontainer.java:1294)
at
com.sun.ejb.containers.BaseContainer.postInvoke(BaseCo
tainer.java:403)
at
InvoicesBean_RemoteHomeImpl.create(InvoicesBean_Remote
omeImpl.java:37)
at InvoicesHomeStub.create(Unknown Source)
at BrokerBean.CreateInvoices(Unknown Source)
at
BrokerBean_EJBObjectImpl.CreateInvoices(BrokerBean_EJB
bjectImpl.java:261)
at BrokerBeanEJBObjectImpl_Tie._invoke(Unknown
Source)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispa
chToServant(GenericPOAServerSC.java:520)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.inter
alDispatch(GenericPOAServerSC.java:210)
at
com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispa
ch(GenericPOAServerSC.java:112)
at
com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:25
at
com.sun.corba.ee.internal.iiop.RequestProcessor.proces
(RequestProcessor.java:84)
at
com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThr
ad.run(ThreadPool.java:99)
What is "connection previously closed, open another
connection"? This might be the cause of the
exception.
I'll keep trying till I solve the problem.
Thanks,
Sasuke -
How to call smartform in me54n
Hai All,
Iam developing a smartform for PR print with ztcode,the user asked me that,he dont want seperate tcode,in me54n tcode itself he want
print.I have tried in the enhancement spot but it is not firing.
Regards,
Siva jyothi.Hi ,
The print button creates a spool number through which you can get ALV output of the ITEM details but cannot call smartform from that.
PR is just an internal document.There is no other way to do it(As far as i know).
You now have only two options to go for:
1) Create a subscreen with a pushbutton , and then call the driver program to print the smartform.
2) A Z transaction to print the PR , which you have already done.
Let me know if you find any other way to do it.
Br.
Giri -
How to use negation in user defined rules?
Hi,
Can you please show me an example to use negation in user defined rule? I created a rule like below (the rule says if a patient has a fever problem and not have penicillin hypersensitivity, then recommend medication1):
INSERT INTO mdsys.semr_myMedicineRB VALUES('rule1',
'(?p rdf:type :Patient) (?p :present ?c1) (?c1 rdf:type :Fever) (?c2 rdf:type :Penicillin_Hypersensitivity)',
'(NOT_EXISTS(p :present c2))',
'(?p :recommendation :medication1)',
SEM_ALIASES(SEM_ALIAS('','http://www.example/medicine#')));
The rule successfully inserted into the rulebase. However, I cannot pass the entailment creation phase and got the errors:
ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
ORA-06512: at "MDSYS.SDO_SEM_INF_INTERNAL", line 16453
ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 302
ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 352
ORA-06512: at "MDSYS.RDF_APIS", line 118
ORA-06512: at line 2
29532. 00000 - "Java call terminated by uncaught Java exception: %s"
*Cause: A Java exception or error was signaled and could not be
resolved by the Java code.
*Action: Modify Java code, if this behavior is not intended.
According to the post built-in primitives(noValue,remove) for user defined rules, it seems negation is not supported in user defined rules. Can you please advice how to implement negation in user defined rules? Thanks a lot in advance.
HongHi Hong,
Let's look at this similar but simplified problem:
if (?p rdf:type :Patient) and (NOT_EXISTS(?p :present :c2)) ==> (?p :recommendation :medication1)
You can use something like this in the user defined inferencing:
-- First get the numeric IDs for the relevant URIs
recomID := sdo_sem_inference.oracle_orardf_add_res('http://..../recommendation');
medID := sdo_sem_inference.oracle_orardf_add_res('http://..../medication1')
rdfTypeID := sdo_sem_inference.oracle_orardf_res2vid('... full URI for rdf:type');
patientID := ...
presentID := ...
c2ID := ...
-- Now this query will find out ?p that satisfy (?p rdf:type :Patient) but not
-- (?p :present :c2)
sqlStmt := '
select ids1.sid sub
from ' || src_tab_view || ' ids1
where ids1.pid= ' || to_char(rdfTypeID,'TM9') || '
and not exists (
select 1
from ' || src_tab_view || '
where sid = ids1.sid
and pid = ' || to_char(presentID, 'TM9') || '
and oid = '|| to_char(c2ID,'TM9') || '
insertStmt := '
insert /*+ parallel append */
into ' || output_tab || '(sid, pid, oid)
select sub, '||to_char(recomID,'TM9') || ',' || to_char(medID,'TM9') || '
from (' || sqlStmt || ')'
More details can be found in
http://docs.oracle.com/cd/E16655_01/appdev.121/e17895/inference_extension.htm#CHDDBGEC
Hope it helps,
Zhe Wu -
Calling Smartforms from Module pool: Most Urgent
Hi, Exeperts
how can I call smartforms from module pool.
I have done like below.
First Created a push button on screen and used
these code in user command through PAI
FORM CALL_SMARTFORMS .
DATA: V_FORM_NAME TYPE RS38L_FNAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZSMART'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
ENDFORM. " CALL_SMARTFORMS
now I am getting form name in v_form_name, but it is not executing.
Please help me out.
Regards
Rajiv singh.Well, as it's most urgent....
One you have a value in V_FORM_NAME you need to call this function module, passing the fields and strucures that make up the interface to your form.
Eg.
DATA: DEVICE TYPE SSFCTRLOP .
DEVICE-DEVICE = 'PRINTER'.
DEVICE-NO_DIALOG = 'X'.
CALL FUNCTION V_FORM_NAME
EXPORTING
CONTROL_PARAMETERS = device
USER_SETTINGS = 'X'
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
Regards,
Nick -
Are Sql functions different from user defined functions ?
Hello,
SQL functions are built into Oracle Database and are available for use in various appropriate SQL statements. Do not >confuse SQL functions with user-defined functions written in PL/SQL.according to first paragraph of this document Sql functions are different from user defined functions . How is that ?
Is they really differ from each other ?bootstrap wrote:
If you don't know what compilation is, please use Wikipedia or other online resources.I know what is compilation . But i was confused whether those sql functions are compiled in my machine when i install Oracle Database in my machine or they are pre-compiled .
As you said these Sql functions are pre-compiled , it is clear now that they are pre-compiled platform dependent code .
Can you provide actual source code of any SQL function , say SUM function .
I want to see it, how they have defined . Eagerly waiting for any reply. please help .
Edited by: bootstrap on Aug 19, 2011 11:50 AMYou can ask oracle if they give you their code. I doubt they will. However if you want to write you own user-defined aggregation function, there are examples in the documentation how to do that.
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17125/adfns_packages.htm#i1008575
Edited by: Sven W. on Aug 19, 2011 9:24 AM -
How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
Hi Experts,
How to call smartform FM after using SSF_FUNCTION_MODULE_NAME?
I mean, in driver program i called SSF_FUNCTION_MODULE_NAME to get the related FM for my smart form. after that How do I call it(smartform fm) . I tried to call by pressing PATTERN button in Report. but it is showing FM is not exist error.
Call function SSF_FUNCTION_MODULE_NAME
Export
formname = 'zsmartform'
import
fm_name = function_name.
function_name is stored the corresponding smartform fm. then How do i call it to process my smartform?
thanks in advance.hi,
Chk this sample.
DATA: p_output_options TYPE ssfcompop, "occurs 0 with header line
p_control_parameters TYPE ssfctrlop. "occurs 0 with header line
p_output_options-TDCOPIES = 3. "number of copies.
p_output_options-tddest = 'LP01'. "def
p_control_parameters-no_dialog = 'X'. "no dilog box
p_control_parameters-preview = 'X'. "no preview
DATA : v_form_name TYPE rs38l_fnam.
*---- Function to get the function module name of the ----
*---- specified Smart form. ----
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'GIVE YOUR SMART FORM NAME'
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
fm_name = v_form_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3 .
*---- Function Module to call the Smart Form ----
*step 1 - go to ur smart form
*step2 - take environment
*step3-take function module name
*copy that unique number.
*step4 -come back to ur driver program.
*step5 - place ur cursur here. take patter,.give that unique number.
*at that time u will get the below code.
*step6 - rename that unique number with 'v_form_name' in the code generated by pattern.
CALL FUNCTION v_form_name
EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_PARAMETERS =
control_parameters = p_control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = p_output_options
user_settings = ' '
* ARCHIVE_INDEX_TAB =
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
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.
ENDIF.
for any clarifiaction pls revert.
regards,
Reshma -
Related documents or links on how to call webservices from WDJ
Hi all
i need documents & links on how to call webservices from Webdynpro for Java.
if anybody send the documents on sample scenarios on the same then it is the great help to me...
Thanks
SunilHi Sunil,
May these links help you.
http://help.sap.com/saphelp_nw04/helpdata/en/f7/f289c67c759a41b570890c62a03519/frameset.htm
http://help.sap.com/saphelp_nwce10/helpdata/en/64/0e0ffd314e44a593ec8b885a753d30/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/d2/0357425e060d53e10000000a155106/frameset.htm
and the below thread to call weservices in java.
Re: How to call a web service from Java
Regards,
Supraja -
How can you change a user defined swatch
How can you change a user defined swatch
Double click on the swatch in the swatches palette.
In most case you can do that , unless for example you have a placed image that has that color in a spot channel. -
How do you create a user defined functions UDF and passing a value like a ID to GEt a Value.
How do you create a user defined functions UDF and passing a
value like a ID to GEt a Value.
using a query.
are there example.
Thankstons of examples at cflib.org - good place to start, even
though many
udfs there are a bit outdated in their code...
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Maybe you are looking for
-
Using iWork, iCloud for ultra-portable presentations
I am considering buying a refurbished iPod Touch or iPad Mini, and I wanted to discuss how to apply iWork for iOS in concert with iWork 2009 for Mac.To wit: As you can see from the listings below, I have access to useful hardware and software. I am w
-
I accidentally deleted GarageBand on my MacBook Pro, version 10.6.8. The new version of GarageBand is only compatible with 10.9 and above. Is it possible to still get the older version? OR, can I get another copy of the startup CD that came with m
-
In sales order item level billing tab
in sales order item level billing tab you have nine fields for payment terms i want to know from where is the payment terms coming in the fields , i have checked that whatever payment term is there in SP/SH/PY they are not getting updated in the nine
-
Dots on screen/crystalized
The screen on my ipod looks like there are tiny dots on it, don't know what caused it and if it can be fixed? Screen looks crystalized.
-
How do I get the notes app to stop erasing my notes?
How do I get the notes app to stop erasing my notes? It will save them for up to a week and then erase them? I loved the notes app and since January 2013 it has stopped saving my notes?