Dynamic Variable - Time/Date
I am trying to update a standard query and make it less manually intensive. The issue at hand is that the way the query and data is structured, we need to go into the query each quarter and then add another quarter column at the end.
I am not sure how to write the query using a dynamic date variable that we can add which would automatically pull the trailing 12 quarters data, without having to manually change the query columns.
Here's the SQL. I broke it up into modules so you can see what each step does.
TIMESTAMPADD(SQL_TSI_DAY, DAY_OF_QUARTER(CURRENT_DATE)*-1,CURRENT_DATE) gives you last day of previous quarter.
TIMESTAMPADD(SQL_TSI_DAY,1, TIMESTAMPADD(SQL_TSI_DAY, DAY_OF_QUARTER(CURRENT_DATE)*-1,CURRENT_DATE)) gives you first day of current quarter.
TIMESTAMPADD(SQL_TSI_QUARTER,-12, TIMESTAMPADD(SQL_TSI_DAY,1, TIMESTAMPADD(SQL_TSI_DAY, DAY_OF_QUARTER(CURRENT_DATE)*-1,CURRENT_DATE))) gives you 12 quarters ago.
Use the last SQL statement as a filter in your query using the operator "greater than or equal to" and you will get all the dates from 12 quarters ago to current date.
Similar Messages
-
Dynamic variable Time for Select
Hi,
I try to develop some scripts but always I have the same problem , when I try to put in a Select instruction the variable Time, it doesn´t work correctly (for example):
*SELECT(%example%,"ID","TIME","[ID]='%TIME_SET%' ")
It doesn´t read correctly the variable Time_Set.
Have you got any idea to try to do selects using dynamic variable?
Thanks for all.Hi,
Dynamic variables like %TIME_SET% do not interact very well with the compiled default logic (LGX files) when it is run after a data send. If you look at the Default.LGX file, you will notice that your *SELECT statement does not appear there because that *SELECT statement has already been compiled. That is why the logic works when it is run via the debugger (because the LGF file is getting executed at run time) and it does not work when it is run via a data send (because the LGX is being executed).
What you will need to do is:
1. Create a another logic file (for example: Calculation1.LGF) and copy the text from the Default.LGF to this new logic file.
2. Place the following text in the Default.LGF file:
*RUNLOGIC
*LOGIC=Calculation1.LGF
*ENDRUNLOGIC
3. Validate and save the Default.LGF file
Now try running the logic after a data send and see if that works.
Good luck,
John -
Dynamic variant - time variable
Hello!
I want to create a variant for an IDoc housekeeping program (rbdmani2) and I want to save the following in a program variant:
For the current date (I have managed to use a dynamic variable for this) and IDocs created in the past hour, i.e. the select option for Creation time should be "from"='current time-1hour' and "to"='current time'.
How can I express current time minus 1 hour and the current time respectively?
Please advice. Thanks!
::Ellenhi,
You can't perform the dynamic calculation on the TIME selection fields. That is possible only for DATE fields. So you may have to write a custom wrapper program with same selection screen as RBDMANI2 and then call program RBDMANI2 using SUBMIT from your custom program.
In your custom program, you can set the time values in the Initialization block as
S_TIME-low = sy-uzeit - 60.
s_time-high = sy-uzeit.
In the variant you are going to create, for the time field select as P - "Save Field without values". This way the values maintained in the initialization blcok won't be overwritten by the variant. Hoep this helps
But you still need to consider the issue raised by Rob for the past midnight run scenario. Whatever we do, we can't handle the midnight scenario, unless you want to break it as two runs, one for prior to midnight and another for after midnight. This can be possible by putting some logic in the custom program to check time and call the RBDMANI2 twice.
Hari -
Dynamic load vs time data issue
Let me start off by saying that I am very new to labview...
I am tryng to gather data from a load cell. I can see the force plot on my front panel and can set it to display time & date on the x axis, but my problem lies in extracting that data to a file.
The .lvm file I save to successfully shows the force values in the second column, but gives me all zeroes in the first column, i.e. I don't get any time output.
Any help in this matter would be greatly appreciated!
Saba
Attachments:
load cell.vi 61 KBHi Saba,
Have you tried writing to a spreadsheet or text file with tab-delimited output. The examples for writing to a spreadsheet are there in the Fle IO section of Example Finder in LabVIEW. Hope this helps!
Ipshita C.
National Instruments
Applications Engineer -
Using Global Variables in Data Quality Address Cleanse Transforms
I am currently developing in Data Services 12.2.
I am trying to dynamically populate the List Owner information in the option tabs of the USA Regulatory Address Cleanse by using global variables. It populates the 3553 with the variable name instead of the value assigned.
According to the Technical Manual, it is possible to use global variables in Data Quality Address Cleanse transforms:
However, you can use substitution parameters in all places where global variables are supported, for example:
Query transform WHERE clauses
Mappings
SQL transform SQL statement identifiers
Flat-file options
User-defined transforms
Address cleanse transform options
Matching thresholds
Does anyone know if it is possible to use global variables in the option tab of the Address Cleanse; if so, can you describe how it is done?
Thanks in advance,
RickHi,
U can refer to the following links in help.sap.com
GlobalContainer Object
http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm
Container Object
http://help.sap.com/saphelp_nw04/helpdata/en/78/b4ea10263c404599ec6edabf59aa6c/content.htm
Also some of the RUN TIME CONSTANTS are available in your BPM. So if you are trying to retrieve those variables in your Mapping(that is used in BPM), also read the following thread.
Re: Message id in BPM
Cheers,
Siva Maranani. -
Problem with currency translation and variable time ref. with 0FISCPER
Hello,
We have a problem with a currency conversion with a variable time reference (as iobject we use 0fiscper)
We created a currency conversion for several key fig:
Our settings:
Exchange rate Type: EURX
dynamic ex rate determination
Source cur from datarecord
Fixed Target Curr (EUR)
Variable time ref.: End of Period
Special Infoobject: 0fiscper
When we run the DTP we get the following error:
<i>Enter rate GBP / EUR rate type EURX for 00.00.0000 in the system settings.</i>
ending the DTP in a message type X.
In table TCURR and T009/T009B all necessary information is available.
After debugging the function module, it looks like the created date (created from the FISCPER) is set to 00.00.0000. This results in the error above.
Does anybody have experience with this error and more important know how to solve it?
We also have a 0FISCYEAR available but in the TCURR table al rates are defined per end of the month. When trying to use 0FISCYEAR as InfoObject in the variable time reference, a diffrent error occurs: Enter rate GBP / EUR rate type EURX for 01.01.1001 in the system settings. While the 0FISCPER is 2001001.
Is there a bug in the function module? (couldn't find a SAP note)
We are working with BI 7.0 and SP12
Best regards
StevenPlease can you give more detail on how you were able to resolve this issue? How did you add 0fiscper to the transformation? I am on BW 3.5, how do I fix this same issue on it? Please help, this is urgent.
-
11.1.1.6.11 / Essbase Substitution Variables / RPD Init Block / Dynamic Variables
How do I update the Init Block which is populated with the Essbase Substitution variables. This is dynamically created the first time I import an Essbase cube and is populated with the Substitution variables when it is first imported into the RPD. If later on new Substitution variables are added, they are not being reflected in the Init Block or its dynamic variables. I have done the re-import of the data source with no change to the Init Block Dynamic Variables. How do I get these new Substitution variables imported?
It appears that the only way is to delete it from the Physical Layer, however this deletes any changes I have made to Cube in the physical layer.So delete it from the Physical Layer, change the Substitution Variables associated with the cube. Import it back into the physical layer. It does NOT delete existing Init Block Dynamic variables that no longer exist as Substitution variables.
-
Passing Session variable of DATE data type to opaque view filter
Hi Everyone,
Can you guys please help me in passing session variable of DATE data type in RPD's physical layer 'opaque view' filter for Oracle database
I tried following syntax, syntax wise I didn't got getting any error, but at the same time this opaque view is not fetching any records as well. my session variable is "END_DATE" and its value is 1998/12/31:00:00:00(as shown in RPD session windows, datatype is DATETIME)
SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
WHERE TIME_ID =TO_DATE( 'VALUEOF(NQ_SESSION.END_DATE)','MM/DD/YYYY')
SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
WHERE TIME_ID = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
WHERE TRUNC(TIME_ID) = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
In past, I was able to pass a session variable into a opaque view filter using DATEOF function, but that was in DB2.
I appreciate your time and helpFinally, I got right format. here it is
to_date(substr('valueof(NQ_SESSION.END_DATE)',1,10), 'yyyy-mm-dd')
and here is the source from where I got this information
Using OBIEE Session Variables in Select Tables in the Physical Layer -
Dynamic creation of date in selection variant
Hi All,
I have a Z program for updating a field in BOM item. One of the input field in the report is "Valid From Date". Actually the current date is automatically fetched through a function module and it is defaulted in that field.
Our client is using selection variant for ease of use. The problem here is old date in the selection variant is replacing the current date. I want current date to be created automatically during insertion of variant also. How can i solve this problem. Is there any selection variable inside the variant for dynamic creation of Date?
Thanks
SankarAs I know there is no setting for this. For any std or Z report variant function with L should act same way...anyway you discuss with your ADABer.
See the help for variables
Selection Variables
The following three types of selection variables are currently
supported:
o Table variables from TVARV
You should use these variables if you want to store static
information. TVARV variables are proposed by default.
o Dynamic date calculations:
To use these variables, the corresponding selection field must have
type 'D' (date). If the system has to convert from type T to type D
when you select the selection variables, the VARIABLE NAME field is
no longer ready for input. Instead, you can only set values using
the input help.
The system currently supports the following dynamic date
calculations:
Today's date
From beginning of the month to today
Today's date +/- x days
First quarter ????
Second quarter ????
Third quarter ????
Fourth quarter ????
Today's date - xxx, today's date + yyy
Previous month
o User-specific variables
Prerequisite: The selection field must have been defined in the
program using the MEMORY ID pid addition. User-specific values,
which can be created either from the selection screen or from the
user maintenance transaction, are placed in the corresponding
selection fields when the user runs the program.
The SELECTION OPTIONS button is only supported for date variables that
fill select-options fields with single values.
i.e means we can do that with D also. -
Detect if time/date browse button was used
Hi,
I have a position control vi for indexing elements inside array and displaying corresponding time and date. I have large number of control signals inside my block, but I have removed all irrelevant blocks and signal for this discussion. I have replaced all unnecessary controls with constant values, so don't waste time analyzing it.
If you take a look at my vi, you will see Star/Stop control, Position control and a time stamp indicator (Waveform time) with a time/date browse button from another time stamp control. I have all desired functionalities, but I have problem when using browse button for setting up time. I can't set my time two times in a row at same value because I'm comparing "Last entered time stamp" value with current one just entered. I would not like to completely change my blocks because I'm using a lot of property nodes and variables inside my project. I'm just looking for a way to figure out if time/date browse button has been pressed so I could jump to desired point in my recorded waveform.
Solved!
Go to Solution.
Attachments:
position_control_lite.vi 16 KBI can't change Waveform Time Indicator to a Control because that would make other controls much complex (not shown in attached vi)
I have modified my block to the simplest form. I have changed some control names.
There is now only one problem - how can I detect if user has pressed time/date browse button? I'm not interested at this point which value has been entered.
I need to replace User has entered value in Jump to time/date with some kind of Boolean logic or event case.
Message Edited by _thomas on 11-17-2009 09:23 AM
Attachments:
position_control_lite_lv8.6.vi 14 KB
position_control_lite_lv8.0.vi 19 KB
position_control.png 33 KB -
Hello,
I am trying to sort my query based on a dynamic variable p_sorton in the cursor as follows:
function getMarketView2(
p_event_id in ex_event.event_id%type,
p_fromrow in integer,
p_torow in integer,
p_appTZ in char,
p_calcTZ in char,
p_sorton in varchar2) return varchar2 as
type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
v_return varchar2(32767);
v_return_integer integer;
v_String varchar2(32767);
v_ex_ticket_trade_obj ex_ticket_trade_obj;
v_rowcount integer:=0;
v_rowtotal integer:=0;
v_done boolean:=false;
v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
cursor cur_ticket_trade_event_open (p_event_id in ex_event.event_id%type, v_sysdate in date) is
select "TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
"BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
"TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
"TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE","OPEN_BID_PRICE",
"CURRENT_BID_COUNT","CURRENT_HIGH_BID","CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY","TICKET_TRANSACTION_DATE",
"TICKET_TRADE_STATUS" from ex_ticket_trade
where ex_ticket_trade.TICKET_EVENT_ID = p_event_id
and (ex_ticket_trade.ticket_datetime > v_sysdate)
and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
order by p_sorton desc;
--ex_ticket_trade.ticket_datetime desc;
........then comes the rest of the code........
This code compiles fine but does not use the value passed in the param p_sorton in the order by clause.
the same code works fine when hardcoded to "ex_ticket_trade.ticket_datetime"
No idea where I may be going wrong?
Also can I do anything like ORDER BY v1 v2
where v1 specifies columns to sort on and v2 asc/desc, coz that's what I really need to do?
Pls help ...
Thanks,
KarunaHi,
Thanks for the reply ... I tried the same but due to my basic knowledge of pl-sql, I'm running into some other problem.
================================================
CREATE OR REPLACE FUNCTION testMarketView(p_event_id in ex_event.event_id%type,
p_fromrow in integer,p_torow in integer,
p_appTZ in char, p_calcTZ in char, p_sorton in varchar2
) return varchar2 as
type t_ticket_trade is ref cursor return ex_ticket_trade%rowtype;
v_return varchar2(32767);
v_return_integer integer;
v_String varchar2(32767);
v_ex_ticket_trade_obj ex_ticket_trade_obj;
v_rowcount integer:=0;
v_rowtotal integer:=0;
v_done boolean:=false;
v_sysdate date:=NEW_TIME(SYSDATE,trim(p_appTZ),trim(p_calcTZ));
TYPE t_ticket_trade_event IS REF CURSOR;
cur_ticket_trade_event t_ticket_trade_event;
v_dynQuery VARCHAR2(1000);
cursor cur_event_seat_section_row (p_ticket_trade in ex_event_seat_inv.ticket_trade_id%type) is
select distinct event_seat_section, event_seat_row
from ex_event_seat_inv
where ticket_trade_id = p_ticket_trade;
type t_event_seat_section_row is ref cursor return cur_event_seat_section_row%rowtype;
/*v_section varchar2(32767);
v_section_row varchar2(32767);
the 26 variables that belong to table ex_ticket_trade-----------
v_ticket_transaction_date date;
v_ticket_trade_status varchar2(10);*/
begin
v_dynQuery := 'select
"TICKET_TRADE_ID","SELLER_ACCESS_ID","CREATE_DATETIME","MODIFY_DATETIME","LASTMODIFY_BY",
"BUYER_ACCESS_ID","OPEN_TRADE_DATE","CLOSE_TRADE_DATE","TICKET_SUITE_CODE","TICKET_DATETIME",
"TICKET_TIMEZONE","TICKET_EVENT_ID","TICKET_TYPE","TICKET_SEAT_TYPE","TICKET_OPPONENT",
"TICKET_TOTAL_SEAT","TICKET_PRICE","TICKET_PRICE_EXT","START_BID_DATE",
"OPEN_BID_PRICE","CURRENT_BID_COUNT","CURRENT_HIGH_BID",
"CURRENT_LAST_BID_DATETIME","CURRENT_BID_INCREMENT_BY",
"TICKET_TRANSACTION_DATE","TICKET_TRADE_STATUS"
from ex_ticket_trade where
ex_ticket_trade.TICKET_EVENT_ID = ' || p_event_id || ' and (ex_ticket_trade.ticket_datetime > '|| v_sysdate||')
and (ex_ticket_trade.ticket_trade_status in ('||'''F'''||','||'''A'''||','||'''AB'''||'))
and (ex_ticket_trade.ticket_suite_code='||'''N'''||' OR ex_ticket_trade.ticket_suite_code='||'''Y'''||')
order by '|| p_sorton ||'desc ' ;
select count(*) into v_rowtotal
from ex_ticket_trade
where
ex_ticket_trade.TICKET_EVENT_ID = p_event_id
and (ex_ticket_trade.ticket_datetime > v_sysdate)
and (ex_ticket_trade.ticket_trade_status in ('F','A','AB'))
and (ex_ticket_trade.ticket_suite_code='N' OR ex_ticket_trade.ticket_suite_code='Y')
order by ex_ticket_trade.ticket_datetime asc;
v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.initialize;
v_rowcount:=1;
OPEN cur_ticket_trade_event FOR v_dynQuery;
LOOP
FETCH cur_ticket_trade_event INTO t_ticket_trade;
/* -- THIS IS WHAT I HAVE TO DEAL WITH IF I CAN"T
--PUT THE RESULTS OF THE CURSOR in t_ticket_trade
v_ticket_trade_id , v_seller_access_id , v_create_datetime, v_modify_datetime , v_lastmodify_by ,
v_buyer_access_id, v_open_trade_date, v_close_trade_date, v_ticket_suite_code, v_ticket_datetime,
v_ticket_timezone, v_ticket_event_id , v_ticket_type, v_ticket_seat_type, v_ticket_opponent,
v_ticket_total_seat, v_ticket_price , v_ticket_price_ext , v_start_bid_date, v_open_bid_price ,
v_current_bid_count , v_current_high_bid , v_current_last_bid_datetime , v_current_bid_increment_by ,
v_ticket_transaction_date , v_ticket_trade_status ;
if (t_ticket_trade.TICKET_SEAT_TYPE is null) then
for t_event_seat_section_row in cur_event_seat_section_row(t_ticket_trade.ticket_trade_id) loop
if (t_event_seat_section_row.event_seat_section is not null) then
v_section := t_event_seat_section_row.event_seat_section;
BEGIN
select alt_txt into v_parking_desc from ex_alt_txt
where event_id = p_event_id
and alt_txt_type = 'PARKING_DESC'
and original_txt = v_section;
t_ticket_trade.TICKET_SEAT_TYPE := v_parking_desc;
EXCEPTION
WHEN no_data_found THEN
v_section_row := 'Sec. ' || v_section;
if (t_event_seat_section_row.event_seat_row is not null) then
v_section_row := v_section_row || ', Row ' || t_event_seat_section_row.event_seat_row;
end if;
v_section_row := substr(v_section_row, 1, 30);
t_ticket_trade.TICKET_SEAT_TYPE := v_section_row;
END;
exit;
end if;
end loop;
end if;
if ((v_rowcount >= p_fromrow) and (v_rowcount <= p_torow)) then
-- p_ex_ticket_trade => t_ticket_trade
-- THIS IS WHAT I CAN'T DO in the next line IF I get the results of the cursor in seperate variables
v_ex_ticket_trade_obj:=ex_ticket_trade_tabobj.maprowtoobj(p_ex_ticket_trade => t_ticket_trade);
v_string:=v_string||v_ex_ticket_trade_obj.todatastring;
end if;
if (v_rowcount>=p_torow) then
exit;
end if;
v_section := null;
v_section_row := null;
v_parking_desc := null;
v_rowcount:=v_rowcount+1;
end loop;
v_prefix:='1' || v_delimiter || v_rowtotal || v_terminator;
v_return:= v_prefix || v_ex_ticket_trade_obj.tometadata||v_string;
return v_return;
end;
===========================================
I keep running into one error:
PLS-00403: expression 'T_TICKET_TRADE' cannot be used as an INTO-target of a SELECT/FETCH statement
How can I get each row of the cursor either as an object or as 'T_TICKET_TRADE' ?
Thanks,
Karuna -
Dynamic Variable In a Type Definition
Can someone tell me how to define and use a dynamic variable, which resides in a Type Definition. I.E...
Type: beg of type1,
field 1 type c,
field 2 <---this dynamic
field 3 type c.
end of type1.
Can this be done in Netweaver 2004. And if so, can you show me how?
Thanks for your time.
Kind Regards,
JasonDon't think it is available now, but I do believe they are working on this for a future release.
Regards,
Rich Heilman -
Getting correct Date/Time data in DIAdem 11 from LabView tdms data
I've got a handful of large tdms files (9-18 million data points) collected with LabView that I need to extract elements of, and export as a text file, with the time data as a string.
I'm using DataFileLoadSelect and the Register option and then DataBlCopy to bring in a chunk of data at a time, but I'm having to explicitly convert each time value from a LabView timebase (1/1/1904) to the DIAdem timebase (1/1/0000), not to mention the offset, before writing the date-time as a text string - this really slows the process down.
I't strikes me that DIAdem(11.1) has got to have a way to read LabView timestamps correctly, but I'm a DIAdem novice, so any suggestions would be helpful. And no, I don't have LabView installed locally, so using a LabView vi is not an option for me.
Thanks,
Eric
Solved!
Go to Solution.WfmToDateWfm works great, but there is a bug in the code if you want to use DataFileLoadRed and your starting point is not at the beginning of the file. There is a provision in WfmToDateWfm to handle the offset, but it's not hooked up:
OffStartTime = ChnPropValGet(Channel, "wf_start_offset") ChnDeltaTime = ChnPropValGet(Channel, "wf_increment")
RelStartTime = 24*3600*(Trunc(ChnStartTime) + 693958 + Abs(Frac(ChnStartTime)))
To make WfmToDateWfm work with an offset, simly add the variable OffStartTime to the RHS of RelStartTime
Eric -
Dynamic variable names and invalid_character_err
I'm neither an expert at structure notation nor dynamic
variable naming conventions and would appreciate any help with the
following. Thanks!
This code works fine.
<cfset idx="123">
<cfset form.product[idx]=StructNew()>
<cfparam name="form.product[idx].product_nm"
default="Raspberry Jam">
<cfform name="data_entry" method="post" format="flash"
height="525" width="675" action="formdump.cfm">
<cfformgroup type="tabnavigator" height="400"
width="650">
<cfformgroup type="page" label="Product #idx#">
<cfinput name="static_form_name" type="text"
label="Product" value="#form.product[idx].product_nm#" height="350"
width="600" readonly="yes">
</cfformgroup>
</cfformgroup>
</cfform>
The following code results in the following error:
"ORG.W3C.DOM.DOMEXCEPTION ERROR. Message: INVALID_CHARACTER_ERR: An
invalid or illegal XML character is specified." The only change is
in the "name" attribute of the <cfinput> tag:
<cfset idx="123">
<cfset form.product[idx]=StructNew()>
<cfparam name="form.product[idx].product_nm"
default="Raspberry Jam">
<cfform name="data_entry" method="post" format="flash"
height="525" width="675" action="formdump.cfm">
<cfformgroup type="tabnavigator" height="400"
width="650">
<cfformgroup type="page" label="Product #idx#">
<!--- Change value of name attribute from
"static_form_name" to "product[idx].product_nm" --->
<cfinput name="product[idx].product_nm" type="text"
label="Product" value="#form.product[idx].product_nm#" height="350"
width="600" readonly="yes">
</cfformgroup>
</cfformgroup>
</cfform>
Pam Grieger
[email protected]Thanks for the info. Knowing what WON’T work is
helpful!
Here’s what I’m trying to do. I’m rewriting
one of my apps, switching out conventional HTML form controls for
<cfform> controls in Flash format. Many of the existing forms
in my app are for updating data contained in a central database.
When such a form is rendered to the screen, each form control is
pre-populated with existing data. All form controls are named
dynamically based upon the unique ID of the record being updated.
Here’s a streamlined but typical example:
<!--- User selected projects 14, 15, 16, and 17 for
update. Get existing project data. --->
<cfquery name="get_project_detail"
datasource="#application.DataSource#">
SELECT project_oid_nbr, project_nm
FROM project_table
WHERE project_oid_nbr IN (14,15,16,17)
ORDER BY project_oid_nbr
</cfquery>
<!--- Initialize the project_nm form control. Form names
are dynamic, based upon get_project_detail.project_oid_nbr. --->
<cfloop query="get_project_detail">
<cfparam name="form.project_nm_#project_oid_nbr#"
default="#get_project_detail.project_nm#">
</cfloop>
<!--- Create HTML form control. --->
<table>
<cfloop query="get_project_detail">
<tr>
<td>
<cfoutput>
Project #project_oid_nbr#:
<input type="text" name="project_nm_#project_oid_nbr#"
value="#Evaluate("form.project_nm_#project_oid_nbr#")#">
</cfoutput>
</td>
</tr>
</cfloop>
</table>
This has been working just fine. However, I’m wondering
if using the Evaluate() function is the most efficient way to go.
Therefore I wanted to use structure notation to avoid the
Evaluate() function, but as mentioned in my original post, this
naming convention won’t work with <cfform> tags.
Any suggestions as to the most efficient way to get the same
result while still using <cfform> tags? Thanks so much! -
All,
I had created a Dialog text using transaction SE61 that contains a dynamic variable
Data Sheet not printed for Sales Order Number &WA_OUTPUT-VBELV&
This diagonose object i am calling in function module POPUP_TO_CONFORM
like
call function 'POPUP_TO_CONFIRM'
exporting
titlebar = text-t01
diagnose_object = p_dobject "<<==== Here
But the issue while calling the function module i am not getting the dynamic variable &WA_OUTPUT-VBELV&
in the display is it showing like the following
Data Sheet not printed for Sales Order
Number &WA_OUTPUT-VBELV& "<=Here i need in display the sales order to be displayed
a®Hi
Yes I've understood what you mean
When I've spoken about sapscript and driven program, I means the sapscript and program manage the long text (dialog text created by SE61).
In your situation those elements are not used, because the text is directly shown on popup, so the variable inserted in the text (it's usually defined in the main program) has to assigned the PARAMETER table ( I thought you defined the variable in the program calling popup).
So try this:
PARAMETER-PARAM = WA_OUTPUT-VBELV.
PARAMETER-VALUE = <document number>.
It works
Max
Maybe you are looking for
-
OS: Ubuntu 9.0.4 Browser: Firefox 3.6.10 upon updating to firefox 3.6.10, java does not work at all. websites that use java do not work at all anymore, when they worked just fine before the updating thru update manager. e.g. hulu website cannot play
-
Camera raw 6.6 and 7.0 preview problem after done "click" in bridge
Hi, when i update camera raw from 6.5 to 6.6 the preview can`t give me right preview after 1 adjustment in camera raw.Image apears like when we open it in camera raw and the first few seconds with the yellow exclamation mark. Months ago the only solu
-
Can't import audio files into Logic Pro
I have some original compositions previously recorded on a Windows PC that I want to work on in Logic Pro. However, despite converting them to .raw, mp3, apple tiff and having the original file as. Wav, Logic Pro doesn't recognise them; they're all g
-
Hi all Here is my XML file structure <book> <section title="My Life"> <p> <ol> <li>item 1</li> <li>item 2</li> <li>item 3</li> <li>item 4 <ol> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ol> </li> </ol> </p> </se
-
I am a book editor and work with very large files. When I search a PDF to find out whether, for example, "Mr " appears without a period, the search results include "Mr." and "Mrs." even though I did not type a period and even though I selected exact