How to add dynamic pulldown to this code ?
I have a form that will gererate up to 10 line items for entry when a button is clicked. My partial code is below. Everything works fine. What I am trying to do now is to replace the condtion code manual pulldown list with a dynamic list. When I try that, my button to add more line items does not work anymore.
Can someone show me how to replace the manaul pulldown with a dynamic one, so that it will continue to add extra lines ?
<cfloop index="x" from="1" to="10">
<tr id="row_#x#" <cfif x GT 1>style="display:none"</cfif> >
<td class="TitleText" align="center">
<select name="conditionCode_#x#">
<option value="A">A</option>
<option value="F">F</option>
<option value="H">H</option> <===== Need to replace this part with dynamic pulldown
<option value="U">U</option>
</select>
</td>
<td class="TitleText" align="center"><input type="text" name="materialNumber_#x#" id="materialNumber" size="40"></td>
<td class="TitleText" align="center"><input type="text" name="quantity_#x#" id="quantity" size="8" value="0"></td>
<td class="TitleText" align="center"><input type="text" name="unitValue_#x#" id="unitValue" size="8" value="0.00"></td>
<td class="TitleText" align="center"><input type="radio" name="snFlag_#x#" id="snFlag_#x#Y" size="1" value="1">Yes
<input type="radio" name="snFlag_#x#" id="snFlag_#x#N" size="1" value="0">No</td>
<cfif x GT 1>
<td class="TitleText" align="center"><input type="Button" value="Delete" onclick="hide()"></td>
</cfif>
</tr>
</cfloop>
</table>
</td>
</tr>
</table>
</center>
</cfoutput>
<br>
<input type="button" value="Add Another Material Number" onclick="show()">
<br>
Hi Olivia,
I'm not quite sure if you're only refreshing the drop down as the page refreshes, or dynamically (i.e. many times without the page refreshing). If it is the former, the code below should work fine. If you need it truly dynamically, I'd bind the code through a function/cfc that will populate the select.
<!--- Select the data from the db for the select box --->
<cfquery name="getSelectOptions" DATASOURCE="#DSN#" >
SELECT blah...blah...select options
FROM blah...blah...table
</cfquery>
<!--- On recordcount, use the number coming back in the query, +4 for A,F,H,U, +1 for whatever you want to "name" this.
if you have 6 + 4 + 1, ultimately totalrows = 11) so this could be (getSelectOptions.recordcount+5)--->
<CFSET totalRows = (getSelectOptions.recordcount+1)>
<!--- Here, replace "Category" with whatever your "SELECT" field was. Could be "OPTION".--->
<CFSET getCategory = QueryNew("Category", "VarChar")>
<CFSET newRow = QueryAddRow(getCategory, totalRows)>
<!--- Here, replace the getCategory with whatever you want to call this query. Roll this throughout the code. Replace "Category" with what
you used above ... "OPTION". --->
<CFSET temp = QuerySetCell(getCategory, "Category", "", 1)>
<!--- Now you can insert your A & F, like this--->
<cfset temp = QuerySetCell(getCategory, "Category", A, 2)>
<cfset temp = QuerySetCell(getCategory, "Category", F, 3)>
<!--- Now run through your query options--->
<CFSET counter = 4>
<CFLOOP QUERY="getSelectOptions">
<CFSET temp = QuerySetCell(getCategory, "Category", Category, counter)>
<CFSET counter = counter+1>
</CFLOOP>
<!--- You can add in your other options H, U--->
Your new query is getCategory, and/or whatever you call it.
To make this bindable, wrap it in a function, declare a var, use cfreturn to return getCategory.
good luck!
cfwild
Similar Messages
-
How to add stop button in this code AS3
Hello, im new to this adobe flash AS3. i want to create a simple play sound using flash + XML file for wbesite., this is my code
all this code are working greate.. but i have the problem to add stop_btn code my playlist button already have pause, prevous and next and play.. only stop button i have fail to create. this is my code
var my_songs:XMLList;
var my_total:Number;
var my_sound:Sound;
var my_channel:SoundChannel;
var current_song:Number = 0;
var song_position:Number;
var song_paused:Boolean;
var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("playlist2.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML (e:Event):void{
var myXML:XML = new XML(e.target.data);
my_songs = myXML.SONG;
my_total = my_songs.length();
function playSong(mySong:Number):void{
var myTitle = my_songs[mySong].@TITLE;
var myArtist = my_songs[mySong].@ARTIST;
var myURL = my_songs[mySong].@URL;
title_txt.text = myTitle;
artist_txt.text = myArtist;
if (my_channel){
my_channel.stop();
my_sound = new Sound();
my_sound.load(new URLRequest(myURL));
my_channel = my_sound.play();
my_channel.addEventListener(Event.SOUND_COMPLETE, onNext);
next_btn.addEventListener(MouseEvent.CLICK, onNext);
function onNext(e:Event):void{
current_song++;
if (current_song>=my_total){
current_song=0;
playSong(current_song);
prev_btn.addEventListener(MouseEvent.CLICK, onPrev);
function onPrev(e:MouseEvent):void{
current_song--;
if (current_song<0){
current_song = my_total-1;
playSong(current_song);
pause_btn.addEventListener(MouseEvent.CLICK, onPause);
function onPause(e:MouseEvent):void{
if (my_channel){
song_position = my_channel.position;
my_channel.stop();
song_paused=true;
play_btn.addEventListener(MouseEvent.CLICK, onPlay);
function onPlay(e:MouseEvent):void{
if (song_paused){
my_channel = my_sound.play(song_position);
song_paused=false;
} else if (!my_channel){
playSong(current_song);
can some one help with me... thank youstop_btn.addEventListener(MouseEvent.CLICK, onStop);
function onStop(e:MouseEvent):void{
if (my_channel){
my_channel.stop(); -
How to add dynamic calc storage property in planning?
<p>hi</p><p>i am having problem in adding dynamic storage property inplanning application.</p><p>i am using HAL to load members (metadata) into planningapplication i have all non level o members as dynamic calc. when irun HAL 3/4th of records are rejected.</p><p>can anyone tell how to add dynamic calc property to mymembers.</p><p> </p><p>thanks and regards,</p><p>Balu</p>
Hi Ritu,
It's not difficult once you know how.
1) Go to: System Administration -> System Configuration -> Knowledge Management -> Content Management -> User Interface -> Search -> Search Option Set
2) Edit UISearch
3) Select your custom property from the list beside the option 'Allowed Predefined Properties' and hit save.
On 'Advanced Search' your property should now be listed under 'Filter by Predefined Properties'.
You may also add it to 'Allowed Sort Properties' if you like.
I hope this helps,
Patrick. -
How to use parrallel cursor in this code
hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008 -
How to add Document group in t code S_ALR_87012082 for dynamic selection.
Hi Gurus,
I Need to add Document group in t code S_ALR_87012082 for dynamic selection.
Currently here two groups are showing , Vender and Comp Code. i need to add Document group there. Kindly guide me in this.
Thanks in advance.Hi
Pls follow below report
*S_ALR_87012103 - List of Vendor Line Items *
In dynamic selections you can find Document number, there you can give the range
Reg
Vishnu -
How to add dynamic data type as one of the terminals of a Custom VI
Hello,
Can anybody tell me if it's possible and how to add a dynamic data type as one of the terminals of a sub-VI? I would like to have a terminal that I can connect signal from DAQmx to my sub-VI. Thanks.Here is one of the coolest things about LV, and one of its major advantages over languages like VB - it has automatic memory management and it compiles whenever you make a change. This allows you to be very free in the way you handle data and change your code. In this case, you should note the small gray dot that appears when you wire the dynamic data into the Array of Waveforms input. This gray dot means that LV coerces the source data type (DDT, in this case) to the target data type (Array of waveforms). If it wouldn't match, you would get a broken wire, the VI couldn't run, and if you hover over the wire or press the broken run button you would get an exact description of the error. Cool, eh?
This can also be seen in other things. For example, you can change an array's data type or number of dimensions by simply doing it. This will automatically be reflected anywhere the array is called in the program, and if anything won't match, the VI will be broken. If you change the # of dimensions of an array, any array function which that array is wired to will adapt. This allows you to be very safe in the way you write code, because you have LV watching all that annoying stuff for you. You don't have to worry about misspelling a variable here (for the most part).
One important point about coercion - it does take processor power. This will usually only be evident in large arrays or loops, but it is an important point. Another thing is that coercing numeric types can cause you to lose data - coercing a DBL to a U16, for example, will cause you to lose all the fractional data.
To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
Try to take over the world! -
How to add dynamic ClientAttribute in RichCommandLink in ADF in JAVA
Hi
how to add client attribute in RichCommandLink of ADF dynamically in java code.
I used like this
RichCommandLink richMenuLink = new RichCommandLink();
richMenuLink.setText("text");
richMenuLink.setShortDesc("desc");
richMenuLink.setId("id7");
richMenuLink.setPartialSubmit(true);
richMenuLink.setClientComponent(true);
ClientListenerSet cls = new ClientListenerSet();
cls.addListener("action", "JSMethodName");
richMenuLink.setClientListeners(cls);
Set setObj = new HashSet();
ClientAttributeTag tag = new ClientAttributeTag();
tag.setName("myID");
tag.setValue(); //this sets the value for the client attribute. But the method takes ValueExpression and i have my value in string.
setObj .add(tag);
richMenuLink.setClientAttributes(setObj);
menuBarObj.getChildren().add(richMenuLink);
Is ClientAttributeTag is to be used to add client attributes in rich command link? or is there any other way to add client attribute in that ??
Edited by: Datta,Sudeep on Apr 24, 2013 3:12 AMAnd the setClientAttributes() takes Set object, so i added ClientAttributeTag and then set it in HashSet. Is this the way to do it ??
and how can i set string value in ClientAttributeTag.setValue() ??
Please help.
Sudeep -
How to add dynamic columns & rows
I want to display the data in the columns (seperated by partition) of the fieldNames I select.
Suppose my Query is like
Select Fax,Phone from Customers
Now I want to display the data of Fax& Phone in two different columns & its heading as also Fax & Phone
My code for the same is like this
This is my Northwind.jsp
<%@ taglib uri = "http://java.sun.com/jsf/core" prefix = "f"%>
<%@ taglib uri = "http://java.sun.com/jsf/html" prefix = "h"%>
<f:view>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Northwind</TITLE>
<LINK REL = "STYLESHEET" HREF = "./css/styles.css" TYPE = "text/css">
</HEAD>
<BODY>
<CENTER>
<TABLE BORDER = 5>
<TR>
<TH CLASS = "TITLE">
Northwind Database
</TH>
</TR>
</TABLE>
<P>
<h:panelGrid id="MainGrid" />
<h:dataTable binding="#{fieldList.dataTable}"
value= "#{fieldList.data11}"
var= "#{row}" border="1"
id="RootTable" />
</CENTER>
</BODY>
</HTML>
</f:view>My java code for the same is as follows
public UIData getDataTable()
javax.faces.component.UIViewRoot root = FacesContext.getCurrentInstance().getViewRoot();
UIComponent panelGrid1= root.findComponent("MainGrid");
UIComponent datatable = panelGrid1.findComponent("RootTable");
UIData dataTable= new UIData();
UIColumn col;
UIOutput out = null;
Application app = FacesContext.getCurrentInstance().getApplication();
int ctr=getCounter();
int colCount = 1;
for(int j = 0; j < colCount; ++j)
out = new UIOutput();
col = new UIColumn();
HtmlOutputText headerComponent = new HtmlOutputText();
headerComponent.setId("Header1"+ctr);
col.setHeader(headerComponent);
headerComponent.setValue(fieldName);
ValueBinding vb = app.createValueBinding("#{data11}");
out.setValueBinding("value", vb);
out.setRendererType("javax.faces.Text");
col.getChildren().add(out);
dataTable.getChildren().add(col);
ctr++;
panelGrid1.getChildren().add(dataTable);
return dataTable;
public Result getData11()
System.out.println("In getData11");
try
Context context = new InitialContext();
Map sessionMap=FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
FieldList flist=(FieldList)sessionMap.get("fieldList");
DataSource dataSource =
(DataSource)context.lookup("java:comp/env/jdbc/Northwind");
Connection connection = dataSource.getConnection();
Statement statement = connection.createStatement();
String query = getQuery();
System.out.println("In getData11 ::query::::::::"+query);
ResultSet resultSet = statement.executeQuery(query);
ResultSetMetaData rsmd = resultSet.getMetaData();
int numberOfColumns = rsmd.getColumnCount();
// System.out.println("resultSet.getMetaData() numberOfColumns="+numberOfColumns );
for(int ii=1;ii<=numberOfColumns;ii++)
System.out.println("rsmd.getColumnName(ii)::::::::"+rsmd.getColumnName(ii));
System.out.println("numberOfColumns::::::::"+numberOfColumns);
boolean b = rsmd.isSearchable(1);
Result result=ResultSupport.toResult(resultSet);
return(result);
} catch(Exception e)
System.out.println("Connection error "+e);
return(null);
}Here I am not getting the data but I am getting the header name with no data in it.
Can Anybody tell what is wrong in the code or how it should be done.Hi,
You can add columns dynamically ,
In your bean code
private UIColumn mycolumn = new UIColumn();
public UIColumn getMyColumn() {
return mycolumn ;
public void setMyColumn(UIColumn uic) {
this.mycolumn = uic;
and in your jsf page
<h:column binding="#{YourBean.mycolumn }" id="column1">
<h:outputText value="My Value"/>
<f:facet name="header">
<h:outputText value="My Header"/>
</f:facet>
</h:column> -
How to add dynamically called files to a teststand workspace?
I am using TestStand 4.1.1 and LabVIEW 8.6.1 to try and install dynamically called VI's into a TestStand workspace. I am following the instructions on pp. 14-8 through 14-10 in the TestStand Reference Manual (May 2008) edition. So far I have not been successful, and the instructions are not clear. For example, I cannot see in the instructions anywhere that I am supposed to add my test sequence. Should the test sequence already be loaded in the project before this set of instructions is followed? Could someone clarify this set of instructions for me?
Then when I get a successful build, I would like to try out the deployment and installation on a target computer. Please provide a detailed and clear set of instructions on how this can be accomplished.
Also, is there anyway to do this without building an installation? Originally I just wanted to create the deployment without an installation. But please explain both ways.
Thank you.
epsilon-deltaEpsilon,
What are you using dynamically called VI's for? Are you adding dynamic VI's to LabVIEW, or to TestStand? If you are calling from TestStand, you don't need to do anything, the deployment utility will do all of the work for you. The section on adding dynamically called files to a workspace listed in the Test Stand Reference Manual is a mini-tutorial, and not exactly step by step instructions. All you need to do to add dynamically called VI's is to add them to your workspace file, and make sure the TSW is saved before you build your deployment. The example right before that one, covers how to deploy from a TSW, and mentions that you need to add your sequence file to the project that is in the workspace.
The steps needed to deploy a sequence is as follows:
1. Create a new workspace file
2. Right click on the workspace file and select "Add a project"
3.
Right click the project and select add additional files (here you
should add your sequence file and any files that are dynamically called
(e.g. VIs))
4. Go to Tools --> Deploy TestStand System
5. Check "Deploy Files from TestStand Workspace File"
6. Select the appropriate file path where you saved the workspace file
7. Add in a path for the location you want to store your deployable image (for instance your desk top)
8.
Go to the distributed files tab and select "yes" to analyze the source
files [here you will find all the files you chose to include with your
distribution, this is automatically populated from the workspace and
its dependencies), if you are deploying and plan on using a User
Interface and not the TestStand Sequence Editor, here you would need to
include the UI as well
9. If you were making an installer, you
could check the "Create installer" box under installer options and
specify a location. Also here you could click on the drivers and
components box to add additional driver installation (only if you are
building an installer)
10. Click on build status, then build
You can also reference the same manual 14-7 through 14-8 which goes through an example deployment, and installation on a target computer.
After you build your installer, copy the files to the target computer and run the setup.exe to install to the new computer, what problems do you have? Do you get errors, and if so can you take screenshots of them?
If you do not wish to create an installer, and you already have a user interface installed, and the TestStand engine on your target machine, you can just copy all of your files to the target machine, and run them normally. We generally recommend building installers, so that any missing dependencies on the target system could be installed, and the TestStand deployment tool takes care of pulling out all the needed files for you (except for the dynamiclly called ones, which is why you need to add them yourself). If you want you can use the deployment tool to create an image and then move that image to the target computer. The image should have all of your non-dynamic files included, but still requires that your system have all needed components installed. Please let me know what part of the deployment, installation process you are having errors, and we can help you troubleshoot. I always recommend trying to deploy a very simple example sequence with no code modules, if you are having problems. This is always a good troubleshooting tip that will help to determine if the problem is with one of your systems, or with your specific sequence file.
Richard S -- National Instruments --Applications Engineer -- Data Acquisition with TestStand -
How to improve the performance of this code
Hi gurus
code is given below with LDB
this code look big but most of lines are commented
plz help its urgent
thanks in advance
*& Report ZSALES_RECON
REPORT ZSALES_RECON.
TYPE-POOLS : SLIS.
nodes: bseg , bkpf.
data : begin of zbseg occurs 0,
kunnr like bseg-kunnr,
*lifnr like bseg-lifnr,
dmbtr like bseg-dmbtr,
*shkzg like bseg-shkzg,
*gsber like bseg-gsber,
bschl like bseg-bschl,
*sgtxt like bseg-sgtxt,
total like bseg-dmbtr,
hkont like bseg-hkont,
BUDAT LIKE Bkpf-BUDAT,
belnr LIKE BSEG-belnr,
cash like bseg-dmbtr,
credit like bseg-dmbtr,
abn_voucher like bseg-dmbtr,
barista_voucher like bseg-dmbtr,
accor like bseg-dmbtr,
sodexho like bseg-dmbtr,
gift like bseg-dmbtr,
corp like bseg-dmbtr,
card like bseg-dmbtr,
miscellaneous like bseg-dmbtr,
werks like bseg-werks,
gjahr like bseg-gjahr,
SR_NO TYPE I,
shkzg like bseg-shkzg,
end of zbseg,
TP_TBL_DATA like ZBSEG.
DATA : idx TYPE sy-tabix.
Report data to be shown.
data: it_data like ZBSEG.
Heading of the report.
data: t_heading type slis_t_listheader.
AT SELECTION-SCREEN.
get bkpf.
START-OF-SELECTION.
data : sum_mis like bseg-dmbtr,
sum_abn like bseg-dmbtr,
sum_cash like bseg-dmbtr,
sum_credit like bseg-dmbtr,
sum_card like bseg-dmbtr,
sum_barista_voucher like bseg-dmbtr,
sum_accor like bseg-dmbtr,
sum_sodexho like bseg-dmbtr,
sum_gift like bseg-dmbtr,
sum_corp like bseg-dmbtr.
data : wa1_total like bseg-dmbtr.
data : wa_belnr like bseg-belnr,
wa_kunnr like bseg-kunnr,
wa_werks like bseg-werks,
belnr1 like bseg-belnr,
wa_sr_no type i.
GET BSEG.
data : wa like line of zbseg.
data : count type i,
count1 type i.
move-corresponding bseg to zbseg.
*idx = sy-tabix.
on change of zbseg-belnr.
wa_kunnr = zbseg-kunnr.
wa_kunnr = wa_kunnr+6(4).
select single werks into wa_werks from bseg where belnr = zbseg-belnr
and kunnr = '' and gjahr = zbseg-gjahr.
if wa_kunnr = wa_werks.
if zbseg-bschl <> '01'.
clear: sum_mis,wa1_total,sum_abn,sum_cash,sum_credit,sum_card,
sum_barista_voucher,sum_accor,sum_sodexho,sum_gift,sum_corp.
wa-BUDAT = BKPF-BUDAT.
wa-bschl = zbseg-bschl.
wa-hkont = zbseg-hkont.
wa-belnr = zbseg-belnr.
wa_belnr = wa-belnr.
wa-shkzg = zbseg-shkzg.
wa-kunnr = zbseg-kunnr.
count = wa-sr_no.
*wa-sr_no = count + 1.
idx = idx + 1.
append wa to zbseg.
**count = wa-sr_no.
*wa-sr_no = wa-sr_no + 1.
clear wa-total.
endif.
endif.
endon.
*clear : wa1_total.
if wa_belnr = zbseg-belnr.
loop at zbseg into wa.
wa-total = wa1_total.
wa-bschl = zbseg-bschl.
wa-hkont = zbseg-hkont.
count = sy-tabix.
wa-sr_no = count.
count1 = count.
*wa_sr_no = count.
modify zbseg from wa transporting sr_no.
IF wa-bschl eq '40' and wa-hkont eq '0024013020'.
if sy-tabix = 1.
wa-cash = zbseg-dmbtr.
sum_cash = sum_cash + wa-cash.
wa-cash = sum_cash.
modify zbseg index idx from wa transporting cash.
endif.
endif.
IF wa-bschl eq '40' and wa-hkont eq '0026060010'.
if sy-tabix = 1.
wa-credit = zbseg-dmbtr.
sum_credit = sum_credit + wa-credit.
wa-credit = sum_credit.
modify zbseg index idx from wa transporting credit.
endif.
endif.
IF wa-bschl eq '40' and wa-hkont eq '0026060015'.
if sy-tabix = 1.
wa-abn_voucher = zbseg-dmbtr.
sum_abn = sum_abn + wa-abn_voucher.
wa-abn_voucher = sum_abn.
modify zbseg index idx from wa transporting abn_voucher.
endif.
endif.
IF wa-bschl eq '40' and wa-hkont eq '0026060017'.
if sy-tabix = 1.
wa-barista_voucher = zbseg-dmbtr.
sum_barista_voucher = sum_barista_voucher + wa-barista_voucher.
wa-barista_voucher = sum_barista_voucher.
modify zbseg index idx from wa transporting barista_voucher.
endif.
endif.
IF wa-bschl eq '40' and wa-hkont eq '0026060020'.
if sy-tabix = 1.
wa-sodexho = zbseg-dmbtr.
sum_sodexho = sum_sodexho + wa-sodexho.
wa-sodexho = sum_sodexho.
modify zbseg index idx from wa transporting sodexho.
endif.
endif.
IF wa-bschl eq '40' AND wa-hkont eq '0026060030'.
if sy-tabix = 1.
wa-accor = zbseg-dmbtr.
sum_accor = sum_accor + wa-accor.
wa-accor = sum_accor.
modify zbseg index idx from wa transporting accor.
endif.
endif.
IF wa-bschl eq '40' AND wa-hkont eq '0026070040'.
if sy-tabix = 1.
wa-gift = zbseg-dmbtr.
sum_gift = sum_gift + wa-gift.
wa-gift = sum_gift.
modify zbseg index idx from wa transporting gift.
endif.
endif.
IF wa-bschl eq '40' AND wa-hkont eq '0026060070'.
if sy-tabix = 1.
wa-card = zbseg-dmbtr.
sum_card = sum_card + wa-card.
wa-card = sum_card.
modify zbseg index idx from wa transporting card.
endif.
endif.
IF wa-bschl eq '40' AND wa-hkont eq '0026060018'.
if sy-tabix = 1.
wa-corp = zbseg-dmbtr.
sum_corp = sum_corp + wa-corp.
wa-corp = sum_corp.
modify zbseg index idx from wa transporting corp.
endif.
endif.
*IF wa-bschl eq '11' .
*wa-total = zbseg-dmbtr.
*modify zbseg index idx from wa transporting total.
*endif.
IF wa-bschl EQ '40' or wa-bschl = '01' .
if sy-tabix = 1.
wa-total = zbseg-dmbtr.
wa1_total = wa1_total + wa-total.
wa-total = wa1_total.
*if idx = 2.
*modify zbseg index 1 from wa transporting total.
*else.
modify zbseg index idx from wa transporting total.
*endif.
endif.
endif.
*IF zbseg-TOTAL NE zbseg-DMBTR.
IF wa-BSCHL NE '11' AND wa-BSCHL NE '40'. "AND wa-BSCHL NE '01'.
if sy-tabix = 1.
if wa-shkzg = 'S'.
wa-miscellaneous = - wa-miscellaneous.
endif.
wa-miscellaneous = ZBSEG-DMBTR.
sum_mis = sum_mis + wa-miscellaneous.
wa-miscellaneous = sum_mis.
modify zbseg index idx from wa transporting miscellaneous.
endif.
ENDIF.
*wa1-miscellaneous = wa-miscellaneous.
*modify zbseg index idx from wa.
*ENDIF.
*append wa to zbseg.
*clear:zbseg-dmbtr.
endloop.
endif.
*****endif.
*****endon.
*ENDFORM.
*append zbseg.
*endloop.
End-of-selection.
perform build_alv using zbseg t_heading.
*& Form build_alv
Builds and display the ALV Grid.
form build_alv using t_data
*tp_tbl_data
t_heading type slis_t_listheader.
ALV required data objects.
data: w_title type lvc_title,
w_repid type syrepid,
w_comm type slis_formname,
w_status type slis_formname,
x_layout type slis_layout_alv,
t_event type slis_t_event,
t_fieldcat type slis_t_fieldcat_alv,
t_sort type slis_t_sortinfo_alv.
refresh t_fieldcat.
refresh t_event.
refresh t_sort.
clear x_layout.
clear w_title.
Field Catalog
perform set_fieldcat2 using:
1 'SR_NO' 'SR_NO' 'BKPF' '5' space space 'SR NO' space space space
space space space space space t_fieldcat ,
2 'BELNR' 'BELNR' 'BKPF' '10' space space 'Document No' space space
space space space space space space t_fieldcat ,
3 'BUDAT' 'BUDAT' 'BKPF' '10' space space 'Document Date' space
space space space space space space space t_fieldcat ,
4 'KUNNR' space space space space space 'Site' space space
space space space space space space t_fieldcat ,
5 'TOTAL' space 'BSEG' space space space 'Total' space space space
space space space space 'X' t_fieldcat ,
6 'CASH' 'CASH' 'BSEG' space space space 'Cash Sales'
space space space space space space space 'X' t_fieldcat ,
7 'CREDIT' 'CREDIT' 'BSEG' space space space 'Credit Card'
space space space space space space space 'X' t_fieldcat ,
8 'ABN_VOUCHER' space 'BSEG' space space space 'ABN Voucher' space
space
space space space space space 'X' t_fieldcat ,
9 'BARISTA_VOUCHER' space 'BSEG' '15' space space 'BARISTA Voucher'
space space
space space space space space 'X' t_fieldcat ,
10 'CORP' 'CORP' 'BSEG' space space space 'ABN Corp' space space
space space space space space 'X' t_fieldcat ,
11 'SODEXHO' 'SODEXHO' 'BSEG' space space space 'Sodexho' space
space space space space space space 'X' t_fieldcat ,
12 'ACCOR' 'ACCOR' 'BSEG' space space space 'Accor'
space space space space space space space 'X' t_fieldcat ,
13 'GIFT' 'GIFT' 'BSEG' space space space 'Gift Coupon'
space space space space space space space 'X' t_fieldcat ,
14 'CARD' 'CARD' 'BSEG' space space space 'Diners Card' space
space space space space space space 'X' t_fieldcat ,
15 'MISCELLANEOUS' space 'BKPF' '18' space space
'Miscellaneous Income' space space space space space space space 'X'
t_fieldcat .
*14 'KBETR' 'KBETR' 'KONP' '10' space space 'Tax %age' space space
*space space space space space space t_fieldcat ,
*15 'MWSKZ1' 'MWSKZ1' 'RBKP' space space space 'Tax Type' space
*space
space space space space space space t_fieldcat ,
*16 'AMT' 'AMT' 'RBKP' space space space 'Amount Payable' space
*space
space space space space space 'X' t_fieldcat ,
*17 'WERKS' 'SITE' 'RSEG' space space space 'State' space space
*space space space space space space t_fieldcat .
*18 'GSBER' 'GSBER' 'RBKP' space space space 'Business Area' space
*space space space space space space space t_fieldcat .
Layout
x_layout-zebra = 'X'.
Top of page heading
perform set_top_page_heading using t_heading t_event.
Events
perform set_events using t_event.
GUI Status
w_status = ''.
w_repid = sy-repid.
Title
w_title = <<If you want to set a title for
the ALV, please, uncomment and edit this line>>.
User commands
w_comm = 'USER_COMMAND'.
Order
Example
PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
Displays the ALV grid
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = w_repid
it_fieldcat = t_fieldcat
is_layout = x_layout
it_sort = t_sort
i_callback_pf_status_set = w_status
i_callback_user_command = w_comm
i_save = 'X'
it_events = t_event
i_grid_title = w_title
tables
t_outtab = zbseg
t_data
exceptions
program_error = 1
others = 2.
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. " build_alv.
*& Form set_top_page_heading
Creates the report headings.
form set_top_page_heading using t_heading type slis_t_listheader
t_events type slis_t_event.
data: x_heading type slis_listheader,
x_event type line of slis_t_event.
Report title
clear t_heading[].
clear x_heading.
x_heading-typ = 'H'.
x_heading-info = 'SALES RECONCILIATION REPORT'(001).
append x_heading to t_heading.
Top of page event
x_event-name = slis_ev_top_of_page.
x_event-form = 'TOP_OF_PAGE'.
append x_event to t_events.
endform.
*& Form set_events
Sets the events for ALV.
The TOP_OF_PAGE event is alredy being registered in
the set_top_page_heading subroutine.
form set_events using t_events type slis_t_event.
data: x_event type line of slis_t_event.
Example
clear x_event.
x_event-name = .
x_event-form = .
append x_event to t_event.
endform.
*& Form set_order
Adds an entry to the order table.
FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
t_sort TYPE slis_t_sortinfo_alv.
DATA: x_sort TYPE slis_sortinfo_alv.
CLEAR x_sort.
x_sort-fieldname = p_fieldname.
x_sort-tabname = p_tabname.
x_sort-up = p_up.
x_sort-down = p_down.
x_sort-subtot = p_subtot.
APPEND x_sort TO t_sort.
ENDFORM. "set_order
*& Form set_fieldcat2
Adds an entry to the field catalog.
p_colpos: Column position.
p_fieldname: Field of internal table which is being described by
* this record of the field catalog.
p_ref_fieldname: (Optional) Table field / data element which
* describes the properties of the field.
* If this field is not given, it is copied from
* the fieldname.
p_ref_tabname: (Optional) Table which holds the field referenced
* by <<p_ref_fieldname>>.
If this is not given, the parameter
<<p_ref_fieldname>> references a data element.
p_outputlen: (Optional) Column width.
p_noout: (Optional) If set to 'X', states that the field is not
* showed initially. If so, the field has to be
included in the report at runtime using the display
options.
p_seltext_m: (Optional) Medium label to be used as column header.
p_seltext_l: (Optional) Long label to be used as column header.
p_seltext_s: (Optional) Small label to be used as column header.
p_reptext_ddic: (Optional) Extra small (heading) label to be
* used as column header.
p_ddictxt: (Optional) Set to 'L', 'M', 'S' or 'R' to select
whether to use SELTEXT_L, SELTEXT_M, SELTEXT_S,
or REPTEXT_DDIC as text for column header.
p_hotspot: (Optional) If set to 'X', this field will be used
* as a hotspot area for cursor, alolowing the user
* to click on the field.
p_showasicon: (Optional) If set to 'X', this field will be shown
as an icon and the contents of the field will set
* which icon to show.
p_checkbox: (Optional) If set to 'X', this field will be shown
as a checkbox.
p_edit: (Optional) If set to 'X', this field will be editable.
p_dosum: (Optional) If set to 'X', this field will be summed
(aggregation function) according to the grouping set
by the order functions.
t_fieldcat: Table which contains the whole fieldcat.
FORM set_fieldcat2 USING
p_colpos p_fieldname p_ref_fieldname p_ref_tabname
p_outputlen p_noout
p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
p_hotspot p_showasicon p_checkbox p_edit
p_dosum
t_fieldcat TYPE slis_t_fieldcat_alv.
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CLEAR wa_fieldcat.
General settings
wa_fieldcat-fieldname = p_fieldname.
wa_fieldcat-col_pos = p_colpos.
wa_fieldcat-no_out = p_noout.
wa_fieldcat-hotspot = p_hotspot.
wa_fieldcat-checkbox = p_checkbox.
wa_fieldcat-icon = p_showasicon.
wa_fieldcat-do_sum = p_dosum.
Set reference fieldname, tablenam and rollname.
If p_ref_tabname is not given, the ref_fieldname given
is a data element.
If p_ref_tabname is given, the ref_fieldname given is a
field of a table.
In case ref_fieldname is not given,
it is copied from the fieldname.
IF p_ref_tabname IS INITIAL.
wa_fieldcat-rollname = p_ref_fieldname.
ELSE.
wa_fieldcat-ref_tabname = p_ref_tabname.
IF p_ref_fieldname EQ space.
wa_fieldcat-ref_fieldname = wa_fieldcat-fieldname.
ELSE.
wa_fieldcat-ref_fieldname = p_ref_fieldname.
ENDIF.
ENDIF.
Set output length.
IF NOT p_outputlen IS INITIAL.
wa_fieldcat-outputlen = p_outputlen.
ENDIF.
Set text headers.
IF NOT p_seltext_m IS INITIAL.
wa_fieldcat-seltext_m = p_seltext_m.
ENDIF.
IF NOT p_seltext_l IS INITIAL.
wa_fieldcat-seltext_l = p_seltext_l.
ENDIF.
IF NOT p_seltext_s IS INITIAL.
wa_fieldcat-seltext_s = p_seltext_s.
ENDIF.
IF NOT p_reptext_ddic IS INITIAL.
wa_fieldcat-reptext_ddic = p_reptext_ddic.
ENDIF.
IF NOT p_ddictxt IS INITIAL.
wa_fieldcat-ddictxt = p_ddictxt.
ENDIF.
Set as editable or not.
IF NOT p_edit IS INITIAL.
wa_fieldcat-input = 'X'.
wa_fieldcat-edit = 'X'.
ENDIF.
APPEND wa_fieldcat TO t_fieldcat.
ENDFORM. "set_fieldcat2
======================== Subroutines called by ALV ================
*& Form top_of_page
Called on top_of_page ALV event.
Prints the heading.
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = <<If you want to set a logo, please,
uncomment and edit this line>>
it_list_commentary = t_heading.
endform. " alv_top_of_page
*& Form user_command
Called on user_command ALV event.
Executes custom commands.
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
Example Code
Executes a command considering the sy-ucomm.
CASE r_ucomm.
WHEN '&IC1'.
Set your "double click action" response here.
Example code: Create and display a status message.
DATA: w_msg TYPE string,
w_row(4) TYPE n.
w_row = rs_selfield-tabindex.
CONCATENATE 'You have clicked row' w_row
'field' rs_selfield-fieldname
'with value' rs_selfield-value
INTO w_msg SEPARATED BY space.
MESSAGE w_msg TYPE 'S'.
ENDCASE.
End of example code.
endform. "user_command
*********************************ldb code start from here *************************************************************
DATABASE PROGRAM OF LOGICAL DATABASE ZBRM_3
top-include and nxxx-include are generated automatically
Do NOT change their names manually!!!
*include DBZBRM_3TOP . " header
*include DBZBRM_3NXXX . " all system routines
include DBZBRM_3F001 . " user defined include
PROGRAM SAPDBZBRM_3 DEFINING DATABASE ZBRM_3.
TABLES:
BKPF,
BSEG.
Hilfsfelder
DATA:
BR_SBUKRS LIKE BKPF-BUKRS,
BR_SBELNR LIKE BKPF-BELNR,
BR_SGJAHR LIKE BKPF-GJAHR,
BR_SBUDAT LIKE BKPF-BUDAT,
BR_SGSBER LIKE BSEG-GSBER.
BR_SBUZEI LIKE BSEG-BUZEI,
BR_SEBELN LIKE BSEG-EBELN,
BR_SEBELP LIKE BSEG-EBELP,
BR_SZEKKN LIKE BSEG-ZEKKN.
working areas for the authority check "n435991
for the company code "n435991
*TYPES : BEGIN OF STYPE_BUKRS, "n435991
BUKRS LIKE T001-BUKRS, "n435991
WAERS LIKE T001-WAERS, "n435991
RETCODE TYPE N, "n435991
END OF STYPE_BUKRS. "n435991
"n435991
*DATA : G_S_BUKRS TYPE STYPE_BUKRS, "n435991
G_T_BUKRS TYPE STYPE_BUKRS OCCURS 0. "n435991
"n435991
for the document type "n435991
*TYPES : BEGIN OF STYPE_BLART, "n435991
BLART LIKE BKPF-BLART, "n435991
RETCODE TYPE N, "n435991
END OF STYPE_BLART. "n435991
"n435991
*DATA : G_S_BLART TYPE STYPE_BLART, "n435991
G_T_BLART TYPE STYPE_BLART OCCURS 0. "n435991
"n435991
for the business area "n435991
*TYPES : BEGIN OF STYPE_GSBER, "n435991
GSBER LIKE BSEG-GSBER, "n435991
RETCODE TYPE N, "n435991
END OF STYPE_GSBER. "n435991
"n435991
*DATA : G_S_GSBER TYPE STYPE_GSBER, "n435991
G_T_GSBER TYPE STYPE_GSBER OCCURS 0. "n435991
"n435991
for the purchasing organization "n435991
*TYPES : BEGIN OF STYPE_EKORG, "n435991
EKORG LIKE EKKO-EKORG, "n435991
RETCODE TYPE N, "n435991
END OF STYPE_EKORG. "n435991
"n435991
*DATA : G_S_EKORG TYPE STYPE_EKORG, "n435991
G_T_EKORG TYPE STYPE_EKORG OCCURS 0. "n435991
"n435991
for the plant "n435991
*TYPES : BEGIN OF STYPE_WERKS, "n435991
WERKS LIKE EKPO-WERKS, "n435991
RETCODE TYPE N, "n435991
END OF STYPE_WERKS. "n435991
"n435991
*DATA : G_S_WERKS TYPE STYPE_WERKS, "n435991
G_T_WERKS TYPE STYPE_WERKS OCCURS 0. "n435991
"n435991
*DATA : G_F_TABIX LIKE SY-TABIX. "n435991
"n435991
working tables for array database access "n934526
*types : begin of stype_key, "n934526
bukrs type bkpf-bukrs, "n934526
belnr type bkpf-belnr, "n934526
gjahr type bkpf-gjahr, "n934526
end of stype_key, "n934526
"n934526
stab_key type standard table of "n934526
stype_key "n934526
with default key. "n934526
Initialwerte setzen
FORM INIT.
ENDFORM.
Selection Screen: Process before output
FORM PBO.
ENDFORM.
Selection Screen: Process after input
FORM PAI USING FNAME MARK.
CHECK MARK = SPACE.
ENDFORM.
Lesen BKPF und Uebergabe an den Selektionsreport
FORM PUT_BKPF.
define locla working areas "n934526
data : l_t_key type stab_key, "n934526
l_t_key_block type stab_key, "n934526
l_t_bkpf type standard table of bkpf. "n934526
"n934526
----------------------------------------------------------"n934526
"n934526
database seletion improved "n934526
at first read all FI doc keys into a lean table "n934526
data: wa like bkpf-belnr.
SELECT * FROM BKPF
where budat in br_budat
AND GJAHR EQ BR_GJAHR-LOW
AND BLART = 'RV'.
AND BLART IN BR_BLAR "n934526
"n934526
check sy-subrc is initial. "n934526
"n934526
then process the found FI doc keys in small blocks "n934526
do. "n934526
if l_t_key[] is initial. "n934526
exit. " no more keys -> leave this DO loop "n934526
endif. "n934526
"n934526
form small blocks with 100 FI docs each "n934526
refresh l_t_key_block. "n934526
append lines of l_t_key from 1 to 100 "n934526
to l_t_key_block. "n934526
delete l_t_key from 1 to 100. "n934526
"n934526
read the complete FI doc headers for the block "n934526
SELECT * FROM BKPF "n934526
into corresponding fields of table l_t_bkpf "n934526
for all entries in l_t_key_block "n934526
WHERE BUKRS = l_t_key_block-BUKRS "n934526
AND BELNR = l_t_key_block-BELNR "n934526
AND GJAHR = l_t_key_block-GJAHR. "n934526
"n934526
provide the complete structure for the PUT "n934526
loop at l_t_bkpf into bkpf. "n934526
process this company code : authority and read T001 "n934526
PERFORM F1000_COMPANY_CODE. "n934526
"n934526
go on if the first authority check was successful "n934526
CHECK : G_S_BUKRS-RETCODE IS INITIAL. "n934526
"n934526
set the currency key and save the keys "n934526
MOVE : G_S_BUKRS-WAERS TO T001-WAERS, "n934526
BKPF-BUKRS TO BR_SBUKRS, "n934526
MOVE BKPF-BELNR TO BR_SBELNR.
MOVE BKPF-GJAHR TO BR_SGJAHR . "n934526
BKPF-GJAHR TO BR_SGJAHR. "n934526
PUT BKPF. "n934526
endloop. "n934526
enddo. "n934526
ENDSELECT.
ENDFORM.
Lesen BSEG und Uebergabe an den Selektionsreport
FORM PUT_BSEG.
define local working areas "n934526
data : l_t_bseg type standard table of bseg. "n934526
"n934526
----------------------------------------------------------"n934526
BR_SGSBER = BR_GSBER-LOW.
"n934526
SELECT * FROM BSEG "n934526
WHERE BELNR EQ BR_SBELNR
AND GJAHR EQ BR_SGJAHR
AND GSBER EQ BR_SGSBER.
check sy-subrc is initial. "n934526
"n934526
loop at l_t_bseg into bseg. "n934526
MOVE BSEG-BUZEI TO BR_SBUZEI.
MOVE BSEG-EBELN TO BR_SEBELN.
MOVE BSEG-EBELP TO BR_SEBELP.
MOVE BSEG-ZEKKN TO BR_SZEKKN.
PUT BSEG.
endSELECT. "n934526
ENDFORM.
"n435991
FORM AUTHORITYCHECK_BKPF "n435991
"n435991
"n435991
*FORM AUTHORITYCHECK_BKPF. "n435991
"n435991
the authority-check for the company code was successful; "n435991
check authority for the document type here "n435991
"n435991
does the buffer contain this document type ? "n435991
READ TABLE G_T_BLART INTO G_S_BLART "n435991
WITH KEY BLART = BKPF-BLART BINARY SEARCH. "n435991
"n435991
CASE SY-SUBRC. "n435991
WHEN 0. "document type is known "n435991
"n435991
WHEN 4. "docment type is new --> insert "n435991
MOVE SY-TABIX TO G_F_TABIX. "n435991
PERFORM F1200_CREATE_BLART_ENTRY. "n435991
INSERT G_S_BLART INTO G_T_BLART "n435991
INDEX G_F_TABIX. "n435991
"n435991
WHEN 8. "document type is new --> append "n435991
PERFORM F1200_CREATE_BLART_ENTRY. "n435991
APPEND G_S_BLART TO G_T_BLART. "n435991
ENDCASE. "n435991
"n435991
set the return code "n435991
MOVE G_S_BLART-RETCODE TO SY-SUBRC. "n435991
"n435991
*ENDFORM. "authoritycheck_bkpf "n435991
"n435991
"n435991
FORM AUTHORITYCHECK_BSEG "n435991
"n435991
"n435991
*FORM AUTHORITYCHECK_BSEG. "n435991
"n435991
does the buffer contain this document type ? "n435991
READ TABLE G_T_GSBER INTO G_S_GSBER "n435991
WITH KEY GSBER = BSEG-GSBER BINARY SEARCH. "n435991
"n435991
CASE SY-SUBRC. "n435991
WHEN 0. "business area is known "n435991
"n435991
WHEN 4. "business area is new --> insert "n435991
MOVE SY-TABIX TO G_F_TABIX. "n435991
PERFORM F1300_CREATE_GSBER_ENTRY. "n435991
INSERT G_S_GSBER INTO G_T_GSBER "n435991
INDEX G_F_TABIX. "n435991
"n435991
WHEN 8. "business area is new --> append "n435991
PERFORM F1300_CREATE_GSBER_ENTRY. "n435991
APPEND G_S_GSBER TO G_T_GSBER. "n435991
ENDCASE. "n435991
"n435991
set the return code "n435991
MOVE G_S_GSBER-RETCODE TO SY-SUBRC. "n435991
"n435991
*ENDFORM. "authoritycheck_bseg "n435991
"n435991ABAP provides few tools to analyse the perfomance of the objects, which was developed by us.
Run time analysis transaction SE30
This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
SQL Trace transaction ST05
by using this tool we can analyse the perfomance issues related to DATABASE calls.
Perfomance Techniques for improve the perfomance of the object.
1) ABAP/4 programs can take a very long time to execute, and can make other processes have to wait before executing. Here are some tips to speed up your programs and reduce the load your programs put on the system:
2) Use the GET RUN TIME command to help evaluate performance. It's hard to know whether that optimization technique REALLY helps unless you test it out.
3) Using this tool can help you know what is effective, under what kinds of conditions. The GET RUN TIME has problems under multiple CPUs, so you should use it to test small pieces of your program, rather than the whole program.
4) Generally, try to reduce I/O first, then memory, then CPU activity. I/O operations that read/write to hard disk are always the most expensive operations. Memory, if not controlled, may have to be written to swap space on the hard disk, which therefore increases your I/O read/writes to disk. CPU activity can be reduced by careful program design, and by using commands such as SUM (SQL) and COLLECT (ABAP/4).
5) Avoid 'SELECT *', especially in tables that have a lot of fields. Use SELECT A B C INTO instead, so that fields are only read if they are used. This can make a very big difference.
6) Field-groups can be useful for multi-level sorting and displaying. However, they write their data to the system's paging space, rather than to memory (internal tables use memory). For this reason, field-groups are only appropriate for processing large lists (e.g. over 50,000 records). If you have large lists, you should work with the systems administrator to decide the maximum amount of RAM your program should use, and from that, calculate how much space your lists will use. Then you can decide whether to write the data to memory or swap space.
Use as many table keys as possible in the WHERE part of your select statements.
7)Whenever possible, design the program to access a relatively constant number of records (for instance, if you only access the transactions for one month, then there probably will be a reasonable range, like 1200-1800, for the number of transactions inputted within that month). Then use a SELECT A B C INTO TABLE ITAB statement.
8) Get a good idea of how many records you will be accessing. Log into your productive system, and use SE80 -> Dictionary Objects (press Edit), enter the table name you want to see, and press Display. Go To Utilities -> Table Contents to query the table contents and see the number of records. This is extremely useful in optimizing a program's memory allocation.
9) Try to make the user interface such that the program gradually unfolds more information to the user, rather than giving a huge list of information all at once to the user.
10) Declare your internal tables using OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to be accessing. If the number of records exceeds NUM_RECS, the data will be kept in swap space (not memory).
11) Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of the records into the itab in one operation, rather than repeated operations that result from a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB is declared with OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to access.
12) If the number of records you are reading is constantly growing, you may be able to break it into chunks of relatively constant size. For instance, if you have to read all records from 1991 to present, you can break it into quarters, and read all records one quarter at a time. This will reduce I/O operations. Test extensively with GET RUN TIME when using this method.
13) Know how to use the 'collect' command. It can be very efficient.
14) Use the SELECT SINGLE command whenever possible.
15) Many tables contain totals fields (such as monthly expense totals). Use these avoid wasting resources by calculating a total that has already been calculated and stored.
Some tips:
1) Use joins where possible as redundant data is not fetched.
2) Use select single where ever possible.
3) Calling methods of a global class is faster than calling function modules.
4) Use constants instead of literals
5) Use WHILE instead of a DO-EXIT-ENDDO.
6) Unnecessary MOVEs should be avoided by using the explicit work area operations
see the follwing links for a brief insifght into performance tuning,
http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp
1. Debuggerhttp://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
2. Run Time Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617cafe68c11d2b2ab080009b43351/content.htm
3. SQL trace
http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm
4. CATT - Computer Aided Testing Too
http://help.sap.com/saphelp_47x200/helpdata/en/b3/410b37233f7c6fe10000009b38f936/frameset.htm
5. Test Workbench
http://help.sap.com/saphelp_47x200/helpdata/en/a8/157235d0fa8742e10000009b38f889/frameset.htm
6. Coverage Analyser
http://help.sap.com/saphelp_47x200/helpdata/en/c7/af9a79061a11d4b3d4080009b43351/content.htm
7. Runtime Monitor
http://help.sap.com/saphelp_47x200/helpdata/en/b5/fa121cc15911d5993d00508b6b8b11/content.htm
8. Memory Inspector
http://help.sap.com/saphelp_47x200/helpdata/en/a2/e5fc84cc87964cb2c29f584152d74e/content.htm
9. ECATT - Extended Computer Aided testing tool.
http://help.sap.com/saphelp_47x200/helpdata/en/20/e81c3b84e65e7be10000000a11402f/frameset.htm
Performance tuning for Data Selection Statement
http://www.sap-img.com/abap/performance-tuning-for-data-selection-statement.htm -
How to optimize the performance of this code ?
I've two Movie clips on a flash project. One of them is fixed and the other can be moved by arrow buttons on the keyboard. The two Movie clips have irregular shapes, so HitTestObject and HitTestPoint doesn't work very well. I've a function that detects collision of two movie clips using bitmap. I wanted to update the position of the movable Movie clip so I put the collision detection function under the code of ENTER_FRAME event listener. It works very well, but when I add many fixed movie clips ( about 10 fixed movie clips in one frame ), the game (.swf file) becomes slower and the performance of the PC becomes slower. I thought that my collision detection function has a negative effect on PC performance so I used the class on this page : https://forums.adobe.com/thread/873737
but the same thing happens.
Would you tell me how to speed up the execution of my codes ?
Here is part of my code :
stage.addEventListener(Event.ENTER_FRAME, myOnEnterFrame);
function myOnEnterFrame(event:Event):void
if (doThisFn) // doThisFn is a variable to allow or prevent the movable movie clip form being moved with keyboard arrows
if ( left && !right ) {
player.x -= speed;
player.rotation = player.rotation - speed ;
if( right && !left ) {
player.x += speed;
player.rotation = player.rotation + speed ;
if( up && !down ) {
player.y -= speed;
if( down && !up ) {
player.y += speed;
// The fixed movie clips are wall1 ,wall2 , wall3 , wall4 , ... and so on
// the following code checks how many walls exists on each frame and pushes them into the wallA array
for(var i:int=0;i<1000;i++) // We can put up to 1000 wall object into the wallA array
if(this['wall'+i]) // If the object wall exists, push it into the wallA array
wallA.push(this['wall'+i]);
for(i=0;i<wallA.length;i++)
if( h.hitF (player , wallA[i] ) || gameOverTest ) // This code checks if the player ( the movable movie clip ) hits the walls or not
trace ( "second try" ) ;
gameOver.visible = true ;
doThisFn = false ;
//I think the following codes are easy to excite and run. I think the performance issue is due to previous codes.
if (player.hitTestObject(door))
win.visible = true ;
doThisFn = false ;
if (key) // if there is a key on frame
if (player.hitTestObject(key))
key.visible = false ;
switch( currentFrame )
case 4:
wallA[0].visible = false ;
wallA[0].x = 50000;
break;
case 5:
wall14.play();
wall8.x = 430 ;
break;it's a simple question that usually has no simple answer.
here's an excerpt from a book (Flash Game Development: In a Social, Mobile and 3D World) i wrote.
Optimization Techniques
Unfortunately, I know of no completely satisfactory way to organize this information. In what follows, I discuss memory management first with sub-topics listed in alphabetical order. Then I discuss CPU/GPU management with sub-topics listed in alphabetical order.
That may seem logical but there are, at least, two problems with that organization.
1. I do not believe it is the most helpful way to organize this information.
2. Memory management affects CPU/GPU usage, so everything in the Memory Management section could also be listed in the CPU/GPU section.
Anyway, I am going to also list the information two other ways, from easiest to hardest to implement and from greatest to least benefit.
Both of those later listings are subjective and are dependent on developer experience and capabilities, as well as, the test situation and test environment. I very much doubt there would be a consensus on ordering of these lists. Nevertheless, I think they still are worthwhile.
Easiest to Hardest to Implement
1. Do not use Filters.
2. Always use reverse for-loops and avoid do-loops and avoid while-loops.
3. Explicitly stop Timers to ready them for gc (garbage collection).
4. Use weak event listeners and remove listeners.
5. Strictly type variables whenever possible.
6. Explicitly disable mouse interactivity when mouse interactivity not needed.
7. Replace dispatchEvents with callback functions whenever possible.
8. Stop Sounds to enable Sounds and SoundChannels to be gc'd.
9. Use the most basic DisplayObject needed.
10. Always use cacheAsBitmap and cacheAsBitmapMatrix with air apps (i.e., mobile devices).
11. Reuse Objects whenever possible.
12. Event.ENTER_FRAME loops: Use different listeners and different listener functions applied to as few DisplayObjects as possible.
13. Pool Objects instead of creating and gc'ing Objects.
14. Use partial blitting.
15. Use stage blitting.
16. Use Stage3D
Greatest to Least Benefit
Use stage blitting (if there is enough system memory).
Use Stage3D.
Use partial blitting.
Use cacheAsBitmap and cacheAsBitmapMatrix with mobile devices.
Explicitly disable mouse interactivity when mouse interactivity not needed.
Do not use Filters.
Use the most basic DisplayObject needed.
Reuse Objects whenever possible.
Event.ENTER_FRAME loops: Use different listeners and different listener functions applied to as few DisplayObjects as possible.
Use reverse for-loops and avoid do-loops and while-loops.
Pool Objects instead of creating and gc'ing Objects.
Strictly type variables whenever possible.
Use weak event listeners and remove listeners.
Replace dispatchEvents with callback functions whenever possible.
Explicitly stop Timers to ready for gc.
16. Stop Sounds to enable Sounds and SoundChannels to be gc'd. -
How to add dynamic table in DW CC?
I am relatively new to DW. I am trying to set up a searchable database where I can input an area code, and return a table with associated data (say diseases in that area). I need a dynamic table for this, but DW CC does not have a dynamic object link in the "insert" menu. Any help? I am running on a Mac
Hi Ben,
Thank you for telling us how to create a dynamic table in Dw CC (It was a breeze in CS6 with the wizard, but why would Adobe keep a tool that makes life easy for developers when they can make life harder instead? - and don't even get me started on the missing spry form evaluation widgets!).
However, two things are missing from your solution.
Firstly, if I create a table connected to a database, with each cell in the top row displaying a caption for each column, followed by a second row where I drag the field names from the bindings tab into the appropriate cell beneath each column name, and then set repeat region in the recordset, the table displayed in my browser shows a repeated column caption above each individual record that is displayed, which is far from ideal. There does not seem to be a way to isolate the column records from the column names.
Secondly, each cell width of each row is displayed according to the width of the cell data, meaning that there is no uniformity to the table (see screenshot below). Ideally, I would like each column to be uniform in width.
If you or anyone can give me the solution to these knotty problems I would be very grateful.
Thanks in anticipation. -
How to ADD dynamic header text to Right hand Corner of IDR -FPM OVP/OIF
Hi,
How can we add dynamic header text to right hand side corner in FPM OVP?
I know we can handle left hand side.. but i do need simultaneously right hand side..
ANy thoughts??
Rgds
TarunI am not sure how it is arranged in 7.02, in 7.01 IDR layout is flow layout so you cannot have layouts other than that. I thought that this has been changed in 7.02 to accommodate the matrix layout. I am not sure about it. If this was true then you can try to play with the layout to fit right hand side. It is not easy though.
-
How to add Dynamic .php content to a Dreamweaver Template
OS: Windows 7
DW Version: CS5
PHP: XAMP Local Server
I hope someone can help. I have created a Dreamweaver Template for .php and created 5 child pages of this template. Everything is in working order as far as that is concerned. Here is my problem:
I want to add some dynamic data (some categories) from a MySQL database to a nonEditable section of the main template so that it will flow to the 5 child pages. I can create a connection to the database with no problem, but when I go to insert a recordset into the template, it asks me to set up the "site", "document type" and "testing server" which I have already done. I am pretty sure that this is because it is looking at the .dwt file type and saying that it needs to be a dynamic document like .php. I have tried going through those steps, but then it just ends up renaming my .dwt file to .php and then it is no longer a template. I do not know why I cannot add dynamic data to a dreamweaver template. It seems like it should be a no-brainer, but it just isn't working out for me. In my research, I did locate the following
http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d610 8-7fdb.html
but wasn't completely sure how to apply it or if it only pertained to CS4 since I am using CS5. To be honest, it confused me more than it helped.
I really hope there is a logical and simple solution to this issue as I have spent a lot of time researching/testing this.
Any help/direction is greatly appreciated. I am not looking for someone to just solve my problem and am willing to dig deep to learn, I am just do not know where to go from here.
Thanks again in advance for your assistance.Brad,
Thanks that worked! Although I will have to re-create my child pages and re-link my style sheets and scripts. But that will not be too difficult as I have not yet added any content to them and is a very small price to pay for the answer to my bigger problem. What is a bit quirky is that I did try to create a test .php template but when I saved it, DW did not automatically add the .php to the end after .dwt. but rather just named it test.php. I didn't think to just rename it since I had read that it would add it automatically so I thought I was doing something wrong.
Maybe there are settings in the preferences that will fix this. None-the-less, I can now move forward with my development thanks to your timely response. I really appreciate it. -
How to add Dynamic Pick List in Parameter
Hi all,
While Selecting parameters in that Properties-.>value->List of Values >Pick list>in that two options 1.value
2.Description- in that i am entering static it is taking but i want to take values Dynamic from Database Table
Any can help me in this how to add parametes dynamically from Data base table
Sincerly,
AmolHi All;
I am using this version Eclipse-jee-europa-fall2-win32-with-CR4E-v.1.0.4 for making crystal reports
Is there any another version that can support Dynamic choice from the List of Values drop down when i create parameter.
or any other link that support / version
Sincerly;
Amol
Maybe you are looking for
-
Lr Mobile - syncing of exposure values a bit confusing
Lr Mobile with Lr 5.4 seems to works as advertised but I have some issues with syncing of basic exposure values. For example, when I import 7D images to desktop Lr I default with white balance As Shot, Clarity +12, and Vibrance +10. All other exposur
-
Session Specific Materialized Views...
Its my understanding that when creating a materialized view, the default table the data is loaded into (from the query of the materialized view) is not session specific. Is there any way to make it session specific? Below is a view I just created...
-
+ sign in front of called party number
Dear All, I've created SIP Trunk between CUCM 10.5 and Siemens HiPath 4000. When I'm dialing from Siemens Ip Phone ( ext. 2200) it shows 2305 . But when I'm calling from Cisco Ip phone (ext. 2305) it shows me +2200 How can I strip this + sign CUCM
-
Client installation on AIX fails
Hi, I'm in a process of install 9.2 Client on AIX box. OUI : on the page "File locations" , "Source..." looking for products.jar file - not found!!! products.jar is nowhere to locate.. Any suggestions please? Thx, Dobby
-
Is this producer-consumer scenario safe about dead-lock?
Hi friends! I'm developing an application with a producer-consumer scenario. It produces a dead-lock 10% of times approx I execute it . I think the real reason of the crashing resides on the concurrency, because executing only the following code it g