Fetch vbeln parameter from VL02,.VL71
Dear experts,
There is a standard smartform of delivery note that works
both with VL02n as well as VL71.
I have replaced this smartform with my newly developed smartform.In order to fetch the input parameter i am using
get parameter id
Here there is a restriction.Though VL02n gives correct output,
VL71 also give correct output provided delivery no is given in text box.
But when we are taking multiple printouts or single printout
by selecting checkboxes in VL71 then i get blank delivery note.
I used debugger but could not find the chosen list in sap memory area as variable anywhere.
My idea is to pick from NAST table in a way concurrent users should be able to do.Anybody can help me or tell me a way
out ?
Hello Aditya,
Please try it yaar. I have done one sample program to fetch the internal table from stack. Check it out.I have seen the internal table IT_output in stack while debugging mode.
Please note that instead of 'SAPLKKBL(T_OUTTAB)' in previous answer write '(SAPLKKBL)T_OUTTAB' .
*Check this example
Report Ztemp.
data : vbak type standard table of vbak.
select * from vbak into table vbak up to 10 rows.
perform stack in program temp1.
Report Ztemp2.
form stack.
data str(20) type c value '(ZTEMP)VBAK'.
field-symbols <field> type any.
assign (str) to <field>.
*check values of field.
*Check stack in debugging mode.
endform.
Edited by: Anil Mane on Aug 7, 2008 2:23 PM
Similar Messages
-
How to fetch the data into one out parameter from two different queries
Hi,
I have an a problem how to implement condition in above procedure,and scenario is
i have to get the output into one out parameter from two queries.i.e if one query data is null
then i have to pick out data from another query into same out parameter.
CREATE OR REPLACE PROCEDURE GET_POLICIESMAP_BASEDON_GHPLID(I_COMPANYID IN NUMBER,
I_CARDID IN VARCHAR2,
PR_RESULTSET OUT SYS_REFCURSOR) IS
/* LOC_INSUREDID VARCHAR2(200);
LOC_RELATIONCODE VARCHAR2(200);
LOC_CURRENTPOLICYID VARCHAR2(4000);*/
BEGIN
OPEN PR_RESULTSET FOR
WITH A AS
(SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where EIN IN (SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)
AND IP.CURRENTPOLICYID in
(SELECT ID
from policies
where companyid = I_COMPANYID
and dead = 0
AND POLICYTO > SYSDATE - 1))
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE = 0
AND (A.MAINPOLICYID is null or
RELATIONCODE = 0 AND CURRENTPOLICYID = MAINPOLICYID)
UNION
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE > 0;
/* HERE I NEED TO GET THE DATA FROM THIS BELOW QUERY INTO SAME OUT PARAMETER
WHEN ABOVE QUERY DATA CONTAINS NULLS */
/* IF PR_RESULTSET IS NULL THEN*/
OPEN PR_RESULTSET FOR
WITH A AS
(SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where FAMILYID IN (SELECT FAMILYID
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)
AND IP.CURRENTPOLICYID in
(SELECT ID
from policies
where companyid = I_COMPANYID
and dead = 0
AND POLICYTO > SYSDATE - 1))
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE = 0
AND (A.MAINPOLICYID is null or
RELATIONCODE = 0 AND CURRENTPOLICYID = MAINPOLICYID)
UNION
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE > 0;
/* END IF;*/
END GET_POLICIESMAP_BASEDON_GHPLID;
Thanks in Advance,
vvr.SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where EIN IN (SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)In this code
where EINEIN is a column in INSUREDPERSONS?
and in the sub query below
(SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)EIN belongs to INSUREDPERSONS or VW_INSUREDINFO?
Please use Alias as we dont know your table structure. -
Passing a parameter from one class to another class in the same package
Hi.
I am trying to pass a parameter from one class to another class with in a package.And i am Getting the variable as null every time.In the code there is two classes.
i. BugWatcherAction.java
ii.BugWatcherRefreshAction.Java.
We have implemented caching in the front-end level.But according to the business logic we need to clear the cache and again have to access the database after some actions are happened.There are another class file called BugwatcherPortletContent.java.
So, we are dealing with three java files.The database interaction is taken care by the portletContent.java file.Below I am giving the code for the perticular function in the bugwatcherPortletContent.java:
==============================================================
public Object loadContent() throws Exception {
Hashtable htStore = new Hashtable();
JetspeedRunData rundata = this.getInputData();
String pId = this.getPorletId();
PortalLogger.logDebug(" in the portlet content: "+pId);
pId1=pId;//done by sraha
htStore.put("PortletId", pId);
htStore.put("BW_HOME_URL",CommonUtil.getMessage("BW.Home.Url"));
htStore.put("BW_BUGVIEW_URL",CommonUtil.getMessage("BW.BugView.Url"));
HttpServletRequest request = rundata.getRequest();
PortalLogger.logDebug(
"BugWatcherPortletContent:: build normal context");
HttpSession session = null;
int bugProfileId = 0;
Hashtable bugProfiles = null;
Hashtable bugData = null;
boolean fetchProfiles = false;
try {
session = request.getSession(true);
// Attempting to get the profiles from the session.
//If the profiles are not present in the session, then they would have to be
// obtained from the database.
bugProfiles = (Hashtable) session.getAttribute("Profiles");
//Getting the selected bug profile id.
String bugProfileIdObj = request.getParameter("bugProfile" + pId);
// Getting the logged in user
String userId = request.getRemoteUser();
if (bugProfiles == null) {
fetchProfiles = true;
if (bugProfileIdObj == null) {
// setting the bugprofile id as -1 indicates "all profiles" is selected
bugProfileIdObj =(String) session.getAttribute("bugProfileId" + pId);
if (bugProfileIdObj == null) {
bugProfileId = -1;
else {
bugProfileId = Integer.parseInt(bugProfileIdObj);
else {
bugProfileId = Integer.parseInt(bugProfileIdObj);
session.setAttribute(
("bugProfileId" + pId),
Integer.toString(bugProfileId));
//fetching the bug list
bugData =BugWatcherAPI.getbugList(userId, bugProfileId, fetchProfiles);
PortalLogger.logDebug("BugWatcherPortletContent:: got bug data");
if (bugData != null) {
Hashtable htProfiles = (Hashtable) bugData.get("Profiles");
} else {
htStore.put("NoProfiles", "Y");
} catch (CodedPortalException e) {
htStore.put("Error", CommonUtil.getErrMessage(e.getMessage()));
PortalLogger.logException
("BugWatcherPortletContent:: CodedPortalException!!",e);
} catch (Exception e) {
PortalLogger.logException(
"BugWatcherPortletContent::Generic Exception!!",e);
htStore.put( "Error",CommonUtil.getErrMessage(ErrorConstantsI.GET_BUGLIST_FAILED));
if (fetchProfiles) {
bugProfiles = (Hashtable) bugData.get("Profiles");
session.setAttribute("Profiles", bugProfiles);
// putting the stuff in the context
htStore.put("Profiles", bugProfiles);
htStore.put("SelectedProfile", new Integer(bugProfileId));
htStore.put("bugs", (ArrayList) bugData.get("Bugs"));
return htStore;
=============================================================
And I am trying to call this function as it can capable of fetching the data from the database by "getbugProfiles".
In the new class bugWatcherRefreshAction.java I have coded a part of code which actually clears the caching.Below I am giving the required part of the code:
=============================================================
public void doPerform(RunData rundata, Context context,String str) throws Exception {
JetspeedRunData data = (JetspeedRunData) rundata;
HttpServletRequest request = null;
//PortletConfig pc = portlet.getPortletConfig();
//String userId = request.getRemoteUser();
/*String userId = ((JetspeedUser)rundata.getUser()).getUserName();//sraha on 1/4/05
String pId = request.getParameter("PortletId");
PortalLogger.logDebug("just after pId " +pId); */
//Calling the variable holding the value of portlet id from BugWatcherAction.java
//We are getting the portlet id here , through a variable from BugWatcherAction.java
/*BugWatcherPortletContent bgAct = new BugWatcherPortletContent();
String portletID = bgAct.pId1;
PortalLogger.logDebug("got the portlet ID in bugwatcherRefreshAction:---sraha"+portletID);*/
// updating the bug groups
Hashtable result = new Hashtable();
try {
request = data.getRequest();
String userId = ((JetspeedUser)data.getUser()).getUserName();//sraha on 1/4/05
//String pId = (String)request.getParameter("portletId");
//String pId = pc.getPorletId();
PortalLogger.logDebug("just after pId " +pId);
PortalLogger.logDebug("after getting the pId-----sraha");
result =BugWatcherAPI.getbugList(profileId, userId);
PortalLogger.logDebug("select the new bug groups:: select is done ");
context.put("SelectedbugGroups", profileId);
//start clearing the cache
ContentCacheContext cacheContext = getCacheContext(rundata);
PortalLogger.logDebug("listBugWatcher Caching - removing markup content - before removecontent");
// remove the markup content from cache.
PortletContentCache.removeContent(cacheContext);
PortalLogger.logDebug("listBugWatcher Caching-removing markup content - after removecontent");
//remove the backend content from cache
CacheablePortletData pdata =(CacheablePortletData) PortletCache.getCacheable(PortletCacheHelper.getUserHandle(((JetspeedUser)data.getUser()).getUserName()));
PortalLogger.logDebug("listBugWatcher Caching User: " +((JetspeedUser)data.getUser()).getUserName());
PortalLogger.logDebug("listBugWatcher Caching pId: " +pId);
if (pdata != null)
// User's data found in cache!
PortalLogger.logDebug("listBugWatcher Caching -inside pdata!=null");
pdata.removeObject(PortletCacheHelper.getUserPortletHandle(((JetspeedUser)data.getUser()).getUserName(),pId));
PortalLogger.logDebug("listBugWatcher Caching -inside pdata!=null- after removeObject");
PortalLogger.logDebug("listBugWatcher Caching -finish calling the remove content code");
//end clearing the cache
// after clearing the caching calling the data from the database taking a fn from the portletContent.java
PortalLogger.logDebug("after clearing cache---sraha");
BugWatcherPortletContent bugwatchportcont = new BugWatcherPortletContent();
Hashtable httable= new Hashtable();
httable=(Hashtable)bugwatchportcont.loadContent();
PortalLogger.logDebug("after making the type casting-----sraha");
Set storeKeySet = httable.keySet();
Iterator itr = storeKeySet.iterator();
while (itr.hasNext()) {
String paramName = (String) itr.next();
context.put(paramName, httable.get(paramName));
PortalLogger.logDebug("after calling the databs data from hashtable---sraha");
} catch (CodedPortalException e) {
PortalLogger.logException("bugwatcherRefreshAction:: Exception- ",e);
context.put("Error", CommonUtil.getErrMessage(e.getMessage()));
catch (Exception e) {
PortalLogger.logException("bugwatcherRefreshAction:: Exception- ",e);
context.put( "Error",CommonUtil.getErrMessage(ErrorConstantsI.EXCEPTION_CODE));
try {
((JetspeedRunData) data).setCustomized(null);
if (((JetspeedRunData) data).getCustomized() == null)
ActionLoader.getInstance().exec(data,"controls.EndCustomize");
catch (Exception e)
PortalLogger.logException("bugwatcherRefreshAction", e);
===============================================================
In the bugwatcher Action there is another function called PostLoadContent.java
here though i have found the portlet Id but unable to fetch that in the bugWatcherRefreshAction.java . I am also giving the code of that function under the bugWatcherAction.Java
================================================
// Get the PortletData object from intermediate store.
CacheablePortletData pdata =(CacheablePortletData) PortletCache.getCacheable(PortletCacheHelper.getUserHandle(
//rundata.getRequest().getRemoteUser()));
((JetspeedUser)rundata.getUser()).getUserName()));
pId1 = (String)portlet.getID();
PortalLogger.logDebug("in the bugwatcher action:"+pId1);
try {
Hashtable htStore = null;
// if PortletData is available in store, get current portlet's data from it.
if (pdata != null) {
htStore =(Hashtable) pdata.getObject( PortletCacheHelper.getUserPortletHandle(
((JetspeedUser)rundata.getUser()).getUserName(),portlet.getID()));
//Loop through the hashtable and put its elements in context
Set storeKeySet = htStore.keySet();
Iterator itr = storeKeySet.iterator();
while (itr.hasNext()) {
String paramName = (String) itr.next();
context.put(paramName, htStore.get(paramName));
bugwatcherRefreshAction bRefAc = new bugwatcherRefreshAction();
bRefAc.doPerform(pdata,context,pId1);
=============================================================
So this is the total scenario for the fetching the data , after clearing the cache and display that in the portal.I am unable to do that.Presently it is still fetching the data from the cache and it is not going to the database.Even the portlet Id is returning as null.
I am unable to implement that thing.
If you have any insight about this thing, that would be great .As it is very urgent a promt response will highly appreciated.Please send me any pointers or any issues for this I am unable to do that.
Please let me know as early as possible.
Thanks and regards,
Santanu Raha.Have you run it in a debugger? That will show you exactly what is happening and why.
-
How to pass parameter from 1 stored procedure to another stored procedure inside crystal report
Hi
I have several stored procedure in my Crystal Report. I am wondering if it is possible for me to pass a parameter to one of the stored procedure and to use the result of that stored procedure E.g. CustomerCode. To another 2 stored procedure to generate the report dynamically?
I have 3 stored procedure
The 1st one is used to gather information and process the calculation
another 2 stored procedure is used for generate the graph and both of them required to take 2 parameters. The 1st stored procedure will require 1 parameter (E.G. Reference Code) and will return a set of information including the data that could be use on the other 2 stored procedures.
After I added these 2 stored procedure, it requires me to pass 3 parameters to the report. I would like to know if I could only pass the Reference Code for stored procedure 1 and use it to retrieve the information for the other 2 parameter?
Thanks in advance
ChiHi Chi
To pass parameter from 1 stored procedure to another stored procedure, you will have to create sub report. In your case you will have to create 2 sub reports for 2nd and 3rd stored procedure and link those sub reports with the main report using Reference Code field in order to pass the values.
After creating the report when you will refresh the report, it will ask 4 parameters, one parameter for main report, one for the first subreport and two for second subreport to fetch the data correctly.
Regards
Poonam Thorat. -
Hiding the business partner search parameter from search criteria
Hi,
I have business partner search parameter whose value is hardcoded in the lead search..
I would like to hide the business partner search parameter from displaying only..
I need to achieve it programatically and not in configuration and all.
Do I need to write the code in P method or which method?
Thanks
MadhukarHi,
The code is as below and I just need to have the functionality of BP search field intact but hide it from display in web UI..if any correction is required let me know..
***current date is populated into LV_DATE
DATA lv_date TYPE string.
lv_date = sy-datum.
***current user login name is populated into LV_SUNAME
DATA lv_suname TYPE string.
lv_suname = sy-uname.
***Fetching the BP ID of the current user who logged into L_PARTNER
DATA:l_partner TYPE bu_partner.
CALL FUNCTION 'CRM_ERMS_FIND_BP_FOR_USER'
EXPORTING
iv_user_id = sy-uname
IMPORTING
ev_bupa_no = l_partner.
***structure for BUT051
TYPES : BEGIN OF ty_data,
relnr TYPE bu_relnr,
partner1 TYPE bu_partner,
partner2 TYPE bu_partner,
date_to TYPE bu_datto,
END OF ty_data.
***work area for BUT051
DATA wa_but051 TYPE ty_data.
***Fetching Dealer BP ID which is 'PARTNER1' field in BUT051
SELECT relnr
partner1
partner2
date_to
FROM but051
INTO wa_but051
UP TO 1 ROWS
WHERE partner2 = l_partner.
ENDSELECT.
***Geting the dealer BP ID into LV_DEALER
DATA lv_dealer TYPE string.
lv_dealer = wa_but051-partner1.
DATA: lr_qs TYPE REF TO cl_crm_bol_dquery_service,
lr_search_node TYPE REF TO cl_bsp_wd_context_node_asp,
lr_col TYPE REF TO if_bol_bo_col ,
lr_iterator TYPE REF TO if_bol_bo_col_iterator ,
lr_param TYPE REF TO if_bol_bo_property_access,
ls_selection TYPE genilt_selection_parameter,
lv_low TYPE sy-datum,
lv_attr_name TYPE name_komp ,
lv_value_set TYPE abap_bool .
IF iv_first_time EQ abap_true.
* to initialize the search view.
CALL METHOD super->do_prepare_output
EXPORTING
iv_first_time = iv_first_time.
* fetch the search node and its content.
lr_qs = me->get_current_dquery( ).
lr_col = lr_qs->get_selection_params( ).
* check the currently visible search attributes.
lr_iterator = lr_col->get_iterator( ).
lr_param = lr_iterator->get_first( ).
WHILE lr_param IS BOUND.
* get the parameters
lr_param->get_properties( IMPORTING es_attributes = ls_selection ).
IF ls_selection-attr_name = 'VALID_FROM'.
* SET_PROPERTIES
ls_selection-low = lv_date.
CALL METHOD lr_param->set_properties
EXPORTING
is_attributes = ls_selection.
lv_value_set = abap_true .
EXIT.
ENDIF.
IF ls_selection-attr_name = 'BU_PARTNER'.
* SET_PROPERTIES
ls_selection-low = lv_suname.
CALL METHOD lr_param->set_properties
EXPORTING
is_attributes = ls_selection.
lv_value_set = abap_true .
EXIT.
ENDIF.
lr_param = lr_iterator->get_next( ).
ENDWHILE.
IF lv_value_set EQ abap_false .
* it was not part of the visible attributes, then add it at the end.
CALL METHOD lr_qs->add_selection_param
EXPORTING
iv_attr_name = 'VALID_FROM'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_date.
CALL METHOD lr_qs->add_selection_param
EXPORTING
iv_attr_name = 'BU_PARTNER'
iv_sign = 'I'
iv_option = 'EQ'
iv_low = lv_dealer.
ENDIF.
* for a proper display of the added / changed attribute.
lr_search_node = get_dquery_cnode( ).
lr_search_node->build_parameter_tab( ).
ELSE.
* non first time call - just delegate to superclass.
CALL METHOD super->do_prepare_output
EXPORTING
iv_first_time = iv_first_time.
ENDIF. -
Dump when fetching the Parameter.
Hi Gurus,
I want to pass some parameter to when i m calling another application in the portal by calling this mehod.
CALL METHOD l_portal_manager->navigate_to_object
EXPORTING
system = 'SAP_R3'
object_type = 'com.sap.obn.so'
operation = 'SALESORDER'
business_parameters = lt_params
USE_FORWARDPARAMETERS_OF_AL = abap_true.
In the lt_params, i ve two element i.e. REF_DOC and FROM_DATE which contails the value also.And the value are passing successfully.
But when i m trying to fetch the data from the other component its throwing some exception "REF_DOC contain Invalid Variable". Basically what i did in the other component i have declared the REF_DOC in the inbound parameter and also in the parameter tab of the application.
Can any body tell , what exactly the problem is ?
Do i need to do some code for fetching the data .
Points'll be surely rewarded.
Thanks!
-Satya
Edited by: satya pujahari on Jun 30, 2008 5:16 PM>
satya pujahari wrote:
> Hi Thomas,
> Here i am getting the exception.
> *====================
> method handledefault.
> *====================
> " typecasting from generic to specific arguments
>
> * data declaration
> data:
> !wdEvent like !Event.
> field-symbols:
> <cur_Param> type Wdr_Event_Parameter.
>
> wdEvent = Event.
>
> " mandatory parameter sales_order_number
> data:
> !sales_order_number type String.
> read table Event->Parameters[]
> with table key Name = `SALES_ORDER_NUMBER` assigning <cur_Param>.
> if ( 0 ne sy-Subrc ).
> >>> raise exception type Cx_Wd_Bad_Args
> exporting
> Parameter = `SALES_ORDER_NUMBER`.
> endif.
Maybe I am missing something, but you called it REF_DOC when you exported the parameter but you are trying to read SALES_ORDER_NUMBER when you import it. Does that make sense? Have you debugged to see what records are contained in Event->parameters? -
Need to fetch the data from CMS database
Hi All,
I'm using BO XI 3.1 SP2 and looking for below data to retrieve:
1. I would like to pull the data for universe as below and here my parameter would be my Universe name
Groups
Reports
Groups: which are having access to that universe?
Reports: Reports which are builds using that Universe
2. Also the below data is required for the universe is:
List of Users those are having access to universe. User active is user's status enabled or disabled. And last column is whether user is having permissions to edit the data provider or not.
User ID
User Name
User Group
User Active
Data Provide Edit
Please let me know how I could fetch this data from CMS database.
Thank you..!!There is a spreadsheet in BOB forum under download that extracts the users and groups, etc fromt he CMS database.
You can customize it to get the universes and reports.
User ID - yes available
User Name - yes Available
User Group - yes available
User Active - yes available
Data Provide Edit - I didn't see it in that spreadsheet but I am sure you can find it. -
How can we fetch the information from standard ItemDetails iView of SAP MDM
Hi Portal/MDM experts,
Is there any chance to fetch the information from standard ItemDetails iView? if it is possible please tell me the process.
If it's not, how can we customize the ItemDetails iView using java WebDynpro .
my requirement is, I have to fetch some of information from itemdetails iview and it'll be used in other WebDynpro application, means we have fetch some details from itemdetails iview and populate them in another application. Please suggest me the procedure to do this.
Regards,
Mahi.Hi Mahi,
Please follow the below steps:
1. Create the Result Set iView.
2. Select the Custom Events button and Add the Custom Event
3. Select Event Type=EPCF
4. Give Event Name=EpfcTest and Namespace=urn:com.sap.tc.webdynpro.mdm.epfc.test
5. Select the desired fields to be passed to the WebDynpro application and give the parameter name.
6. Save the iView
7. Create WebDynpro application and write the below code.
public void wdDoInit()
//@@begin wdDoInit()
namespace = "urn:com.sap.tc.webdynpro.mdm.epfc.test";
eventname = "EpfcTest";
WDPortalEventing.subscribe (namespace,eventname,wdThis.wdGetCatchValueAction());
//@@end
public void onActionCatchValue(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String dataObject )
//@@begin onActionCatchValue(ServerEvent)
int marked=dataObject.indexOf("=");
String value=dataObject.substring(marked+1);
wdContext.currentContextElement().setCatchedValue(value);
//@@end
variable Data Object will contain all the Mapped fileds separated by ;. You can then use the String functions to separate the parameters.
Regards,
Jitesh Talreja -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Delta package not fetching all records from Delta queue in r/3
Hello,
I have loaded Goods Movement Data using 2LIS_03_BF datasource into my BI system.
The Delta has been initialized and everyday the delta is being moved from r/3.
I observed that when I execute my delta package not all delta records are fetched into PSA from r/3.
For Ex: Before starting my delta package I checked in SMQ1 of my R/3 system and see that there are around 1000 records.On executing the delta package I see that the record count is reduced from 1000 to 400 in SMQ1.On executing the delta package again I get the remaining 400 records into my PSA.
Shouldn't the delta package get all records from the queue on single execution??
Is there some setting to define the nr of records to be loaded?
I'm confused with this behaviour.Please help me understand this behaviour.
Thank You.Hello,
First thing: the data is not transferred from the SMQ1 queue, rather the data is transfered to BW from the RSA7 Delta queue. You need to check the number of records present in the RSA7 queue.
Since SMQ1 is involved, i think you are using the unserialized V3 update method. In this method, when data is first written to the application tables, it is first transferred to the SMQ1 update queue,then via a job to the LBWQ extractor queue and then to the RSA7 delta queue. So the number of entries that you see in the SMQ1 queue are not the number of entries that have to be transferred to BW but rather the records that are waiting to be transferred to the extractor queue in LBWQ. Similarly, in LBWQ, the number of entries displayed here are not the no of entries that are going to be transferred to BW, they are the no of entries that will be transferred to the delta queue RSA7 when the next v3 update job runs.
If you want to check the number of records that will be transferred to BW, select the datasource in rsa7 and then click on the display data entries button.
Hope this helps.
Regards. -
Fetch the values from internal table inside an internal table (urgent!!)
data : BEGIN OF PITB2_ZLINFO occurs 0,
BEGDA LIKE SY-DATUM,
ENDDA LIKE SY-DATUM,
PABRJ(4) TYPE N, "Payroll Year
PABRP(2) TYPE N, "Pay. Period
ZL LIKE PC2BF OCCURS 0,
END OF PITB2_ZLINFO.
I have a internal table like this,
How to Fetch the values from internal table inside an internal table.
Kindly Help me on this..
Regards,
Ram.Hi,
Try this....
Loop at PITB2_ZLINF0.
Loop at PITB2_ZLINF0-ZL.
endloop.
Endloop.
Thanks...
Preetham S -
Can viewObject get a parameter from sessionScope to binding variable?
hello,
using Jdev11g ADF Fusion application
Can viewObject get a parameter from sessionScope and assign into binding variable ? without using executeWithParameter
Thanks
greenAppleA. Safwat,
As I said before, I was not trying to be offensive, but simply to explain some of the shortcomings of one solution over another. One of the reasons people give such short answers is that many questions (including this one) have been asked and answered many many many times before on the forum. As to my reasons:
1). Overkill - overkill because you are writing code to do what the framework already provides for you.
2). Not bind-variable friendly - you are gluing in literals into a SQL statement. That means that Oracle will have to hard parse the query for each new value of the filter clause, yielding to poor performance, particularly in a multiuser environment. It should ideally be done using bind variables.
3). Insecure (think about what happens if you put "'xyz' or 1=1" into the filterValue there) - not using bind variables is a security hole. Think through what happens if a filter criteria comes through like the one I mentioned.
4). Inflexible - because you are overriding executeQueryForCollection, this VO becomes inflexible and can only be used in this particular place. Using the declarative approach outlined by Timo is more flexible
5). Bad (ok, that's my opinion there) - OK, perhaps this was a bit offensive ;)
Please don't take a critique of a post as offensive, as I assure you it was not intended to be in that spirit. As I mentioned, I greatly appreciate when people point out issues/problems/etc with my ideas, as that is the best way for me to learn. I have in the past written applications that were not bind-variable friendly, and I learned the downsides the hard way (system was horribly non-performant) - I wish someone had reviewed my approach and told me "bad idea" before the application made it into production.
Respectfully,
John -
How to pass a date parameter from report builder query designer to oracle database
i'm using report builder 3.0 connected to oracle database. i'm trying to pass a date parameter in the query with no success, i don't
know the exact syntax. I've tried :
SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date('01/01/2014','mm/dd/yyyy')
it worked perfectly.
However if i try to put a date parameter "From" instead of 01/01/2014 it will not work, a Define Query Parameter popup window appear and error occurred after i fill
the values (usually i shouldnt get this popup i should enter the value when i run the report)
SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date(:From,'mm/dd/yyyy')
appreciate your assistanceHi Gorgo,
According to your description, you have problem when in passing a parameter for running a Oracle Query. Right?
Based on my knowledge, it use "&" as synax for parameter in Oracle, like we use "@" in SQL Server. In this scenario, maybe you can try '01/01/2014' when inputing in "From". We are not sure if there's any limitation for To_Date()
function. For your self-testing, you can try the query in sqlplus/sql delveloper. Since your issue is related to Oracle query, we suggest you post this thread onto Oracle forum.
Best Regards,
Simon Hou -
Passing date parameter from forms to report
Hi,
I'm using forms and reports 6i.
I want to pass one date parameter from forms to reports.
Using
Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);
giving me error REP-0091- Invalid value for parameter 'P_FROM_DATE'
This i think is because report expects date and here it is converted as varchar.
Please helpHi Divya,
Even I use this kind of statement
Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);and works fine for me.
This i think is because report expects date and here it is converted as varchar
Correct.
Open the report in the builder and under Data Model -> User Parameters, Go to the Property Inspector of P_FROM_DATE. Under Parameter, set Datatype as Character instead of Date.
Hope this should work. and tell me if it works(coz it wokred for me). -
To get date Parameter from an OAF page
Hi,
I want to get a date parameter from an OAF page and pass them to a query in Vo as binding variables.
How can that be done.
I tried this to get the date from my page but it gives an error when I pass it to the query-
String v_date = pageContext.getParameter("StartDate");My CO --------------------------
if( pageContext.getParameter("Submit") != null)
String userid = (new Integer(pageContext.getUserId())).toString();
String personid = (new Integer(pageContext.getEmployeeId())).toString();
String v_date = pageContext.getParameter("StartDate")+"";
String v_end_date = pageContext.getParameter("EndDate")+"";
System.out.println("call to process request0 : " + userid);
System.out.println("call to process request0 : " + personid);
System.out.println("call to process request0 : " + v_date);
System.out.println("call to process request0 : " + v_end_date);
Serializable[] params = {personid,v_date,v_end_date};
OAApplicationModule am = pageContext.getApplicationModule(webBean);
String empUserid = pageContext.getUserName();
System.out.println(pageContext.getUserName());
System.out.println("Calling initMoverQuery");
am.invokeMethod("initMoverQuery", params);
System.out.println("Call out of initMoverQuery");
My AM------------------------------------------------------------
public void initMoverQuery(String pid,String sd,String ed)
System.out.println("In init Query of AM" +pid);
EmployeeMoverVOImpl vorep = getEmployeeMoverVO1();
Number personid = new Number(Integer.parseInt(pid));
System.out.println("user id"+ personid);
System.out.println("start date"+ sd);
System.out.println("end date"+ ed);
if (vorep == null)
MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "EmployeeMoverRepVO1")};
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
if (!vorep.isPreparedForExecution())
// vorep.initQuery(personid,sd1,ed1);
vorep.setWhereClauseParam(0,personid);
vorep.setWhereClauseParam(1,sd);
vorep.setWhereClauseParam(2,ed);
vorep.executeQuery();
System.out.println("End SP VO Query");
}
Maybe you are looking for
-
How to create a different browser session within the same profile
Internet Explorer 8 lets you create a new session within a new browser window but how can I do the same with Firefox? I know if you switch user profiles then you can have two browsers in different sessions but I would like to have two sessions using
-
I just installed an update from Firebox on a Macbook with OS X. I got a message from Firefox telling me to install an adobe update right away, but I don't remember which adobe product it told me to install. Do you know which it was?
-
Hetis 965 and large-screen displays
Has anybody tried to use Hetis 965 barebone (or any MSI motherboards based on Intel 965G chipset) with 24" LCD monitors? I wonder whether the barebone provides native support for 1920x1200 resolution.
-
DW CS4 drop-down issue - maybe browser issue?
http://prosol1.com/employment2.html Hi - I put this drop-down thing together using JS and DW. The Training expand and collapse seems to work for me in Chrome and IE but 2 other people tell me it's not working for them. Does anyone have any idea what
-
IMovie '11 hang and close when browse photos
iMovie always no response and its close automatically. But if I browse music or transition, it is working as per normal. Any help or suggestion for this issue?