Need some help regarding value date
hiii experts...i want little clarification about value date and its effects... i searched scn and google but my issue is like...when we receive cheque today i.e 11/06/2014... it will be come in bank a/cs nearly on 14/06/2014... so if we write the value date 14/06/2014... will that bank ledger show effect on 14/06/2014... moreoveer the user posted a entry development server for 1/3/2014 and gave value date of 1/4/2014.. now in faglb03... how it will reflect..i know its basic question but i didnt find any solution through searching soo posted... please guide me..
Regards
Abhay
hey mani... thankss for the reply... its shows the meaning which i understood but the effect in ledger... when it will show... value date or posting date??
e.g
a customer gives cheque today 11/6/2014.. user deposits cheque today and it will come into bank account near on 14/6.2014..
IN SAP
user does entry today i.e 11/06/2014
in bank g/l... he gives value date 14/06/2014... now when he posts the entry... the entry will shown in ledger on 11/06/2014... but the actual amount will come in 14/06/2014... soo my question is ... whts the user of value date then if he is posting the document on posting date
Similar Messages
-
I need some help Regarding Cumulative totals
Hi ,
i have a requirement
1) we have columns calender Periods and actual to date. The requirement is we need cumulate the actual to date. i have applyed RSUM function in column formula.
2) it is working fine. But again the requirement is this cumulative solution is changed based on selected calender periods. but this is not expected.
3) ex:-
calender period actual Units Cumulative Units
oct - 2010 10 10
Nov-2010 9 19
Dec-2010 15 34
Jan-2011 25 59
Feb-2011 12 71
March-2011 19 90
April - 2011 13 103
May - 2011 18 121
June - 2011 24 145
this is the reqiurement but i have a Prompt Like
i hve selected resource categery some xyz and stert period is Jan -2011 and end period is May - 2011
the values disply's like bellow
Resource Category start Period End Period
xyz Jan - 2011 May - 2011
Jan-2011 25 25
Feb-2011 12 37
March-2011 19 58
April - 2011 13 71
May - 2011 18 89
But this is not actual cumulative units the actual value for Jan 2011 cumulative value is 59 not 25
can any one help me regarding this issue
regards,
rameshHi,
Refer this link abt iview properties & set authorization ...
http://help.sap.com/saphelp_nw04/helpdata/en/13/81a66d100011d7b84b00047582c9f7/frameset.htm
Color- you have to change portal theme...
Width- create a new Loyout..
Regards,
Senthil K. -
Need some help regarding the component usage
Dear ALL,
I have one scenario something like this .
I have a main component say ZComp1 and in it i have created one view in which we two drop downs and i have 28 view containers depending upon the drop down values these view containers will be visible here all the view container i am using for displaying by means of component usage (i.e 28 compoenents i am calling into my main ). So now when i run my main application it is taking minimu of 2 mins to display the screen . To test whats the problem i have written some code in the handle default of main window and set the break point what i observed is quite surprising that when i run the apllication it takes hardly 2 mins of time to reach my handledefault method (which is the first one to trigger when i run the apllicatin) . Please suggest me what can be doen to overcome this issue. or suggest some alternative to improve performance.
Note : When there is less amount of data in the screen then it takes less time to execute or else it takes hell lot of time plz suggest :(.
Awaiting for your valuable suggestions.
Regards,
Sana.Hi Misbah,
28 VCO are too much in a view.
So, try to revamp teh design and reduce the VCO's in a view.
Another thing would be, Every WDDOINIT, and WDDOMODIFY view of the used components would be called when you try to load the component at first.
In your case that is happening, and please check and confirm it.
A proper modular design would be a better approach in handling the situation.
Good day!
Regards,
Shashikanth. D -
Need some help regarding validation of input in a text field
Hello everyone,
i am new to all this website designing stuff and is working on my first website (treausre hunt types) and expecting some guidance over here. :-)
I have successfully managed to validate the login page using server behaviour.
Let me explain what i need guidance with.
After login , the user is redirected to a page where a question is asked and he has to type the answer in the given text field and click on the submit button. Now i want to validate the given answer with the correct one and if it is answered correctly then the user is redirected to the next page.
the question is what and how am i supposed to do this? i am using adobe dreamweaver cc and wampserver as localhost.This becomes complicated to do it the way you want BUT YOU CAN do it - you just need to be a bit more efficient and get a template together.
Copy the 4 documents below and paste into seperate DW files to see how this works then look at the code and see if a pattern becomes noticeable to you. What we are doing is adding 1 to each level and checking the user has accumulated a score to that level - if not they are bumped down to the level which they have reached or in the case of not reaching any level to question 1.
question_1.php:
<?php
// Start the session
session_start();
?>
<?php
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Green" || $answer == "green")) {
$_SESSION['question'] = 2;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_2.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 1.</h3>
<h2>What color is grass?</h2>
<form id="quiz" action="question_1.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_2.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 2
if($_SESSION['question'] < 2) {
header('Location: question_1.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Blue" || $answer == "blue")) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_3.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 2.</h3>
<h2>What color is the sky?</h2>
<form id="quiz" action="question_2.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_3.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 3
if($_SESSION['question'] < 3) {
header('Location: question_2.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == "Yellow" || $answer == "yellow")) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_4.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 3.</h3>
<h2>What color is the sun?</h2>
<form id="quiz" action="question_3.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html>
question_4.php
<?php
// Start the session
session_start();
?>
<?php
// This sends the user to question 1 if SESSION question has not been set
if(!isset($_SESSION['question'])) {
header('Location: question_1.php');
// This sends the user back if SESSION question is LESS than 4
if($_SESSION['question'] < 4) {
header('Location: question_3.php');
if (isset($_POST['submit'])) {
$answer = trim($_POST['answer']);
if(($answer == 4 || $answer == 4)) {
$_SESSION['question'] = $_SESSION['question']+1;
$correct = "<p>Correct Answer</p><p>You will automatically be taken to the next level</p>";
header( "refresh: 5; url=question_5.php" );
else {
$wrong = "<p>Wrong, please try again,</p>";
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Quiz</title>
<style>
p {
font-size: 20px;
color:#930;
margin: 0;
padding: 10px 0 8px 0;
</style>
</head>
<body>
<h3>Question 4.</h3>
<h2>What is 2 + 2?</h2>
<form id="quiz" action="question_4.php" method="post">
<label for="answer">Answer<br>
<input type="text" name="answer" id="answer"></input>
<input type="submit" name="submit" value="Sumbit">
</label>
</form>
<?php
if(isset($wrong)) {
echo $wrong;
elseif(isset($correct)) {
echo $correct;
?>
</body>
</html> -
Need some help regarding PO numbering
This is for a Real Estate Company. Here each Project is Inventory Org.
Presently we are following automatic numbering for purchase orders.
However here client is insisting for Purchase order numbering to be automatic- alpha numeric and again the crucial requirement is that it should be inventory organization(project) wise i.e. different alphanumeric numbering sequence for each inventory org.
Eg: If we have two inventory orgs (say A, B) , then Purchase orders for A should follow numbering like A-001,A-002.......
Similarly for inventory org B, it should be B-001,B-002....
Can anyone suggest is there any way to achieve this..
RamSo I have seen this done, but none of it was standard. You would leave your normal numbering system in place, but then have a SQL guy create a custom script to upload PO directly into your system. Typically with these loaders you can script in the use of any PO numbering scheme that you designate. If you migrated Oracle from a previous system you may have some of these tools especially if you had your historical data uploaded prior to going live. We used to call these PO Loaders, but the function operates in a similar fashion to a requisition loader which takes a flat file and uploads it directly into the system.
-
Need some help regarding the backgrounds
I am new to adobe dreamweaver & I would like to ask some sort of a stupid question
When I save a website over the net, the folder always contains the background & the other images as small tiny images while when using Dreamweaver if I want to use a background image, I just load it.
My question is do they actually load the background image as small parts or the browser devides the image to smaller parts when saving the page?
Thanks for ur help & I hope some 1 gonna answer me soon enough.If you (or someone else) use a repeating background image (128X128 for instance) the browser, per instructions from the HTML or CSS, will "tile" the same image over and over to create the background. This doesn't display multiple copies of the image, but references it over and over alongside and below itself until the page reaches it's end.
One exception to this is when there is a single large image (1024X768 for instance) used as a background, which usually doesn't repeat. In that case, if you were to download it, it would download as the one large image.
Another exception is if the image is cut into pieces and put back together in divs inside the page. Often this is done to create the illusion of an image in a layer above the page, unrestricted by the square dimensions of HTML layout. -
Need some help regarding Client Proxy generation and test via SOAMANAGER
Hello,
we are integrating a 3rd party Java client via webservices.
For that matter I generated a client proxy (consumer proxy) in se80 using the existing WSDL.
This worked fine.
The I wanted to create a logical port.
Since this is only possible in SOAMANAGER I tried it there.
Trying to do this automatically by the given WSDL file didn't work. The system dumps.
So, I tried the manual approach by entering the server name and path in the 'Transport settings' tab.
Now I wanted to test this.
Unfortunately the test function in se80 (Proxy->Test) doesn't show a positive result.
I always get an error
SOAP:1.023 SRT: Processing error in Internet Communication Framework: ("ICF Error when receiving the response:
ICM_HTTP_CONNECTION_FAILED")
So, I am kind of stuck here.
Do you guys have any idea what's wrong (approach, settings, bugs)?.
I tested the webservices with a test application (soapUI), and they work fine.
So it seems to be a problem in the proxy framework or a network problem?
I really appreciate any kind of help.
Thanks,
Michaeli created the port in soamanager.Do i need to create in lpconfig also?
yes i have loaded the certificate in strust.
i am getting the response also from the web service. as Security requirements are not satisfied because the security header is not present in the incoming message.
i need to pass the user name and password while using the method.wsse security.wld u have any clue? -
Need some help in Rounding a double value to a whole number
Hey Peeps,
Need some help here, I got a method that returns a value in double after a series of calculation.
I need to know how can I round the double value, so for example,
1. if the value is 62222.22222222, it rounds to 62222 and
2. if the value is 15555.555555, it rounds to 15556
How can i do this
ZubHi Keerthi- Try this...
1. if the value is 62222.22222222, it rounds to 62222 and
double d = 62222.22222222;long l = (int)Math.round(d * 100); // truncatesd = l / 100.0;
double d = 62222.22222222;
System.out.println(d);
long l = (int)Math.round(d * 100);
// truncatesSystem.out.println(l);
d = l / 100.0;System.out.println(d);
for (int i = 0; i < 1000; i++)
{ d -= 0.1;}
for (int i = 0; i < 1000; i++)
{ d += 0.1;}System.out.println(d);
regards- Julie Bunavicz
Output:
62222.22222222
62222
62222.22
62222.22000000000001 -
Need some help: my itunes won't sync with my iphone anymore. Both softwares are up to date and I've reinstalled itunes. After I reinstall, it syncs. But then when I reboot my computer, it no longer syncs anymore and I have to keep reinstalling itunes. Thoughts???
thought that it was possible to have the same iTunes library on any machine that was authorised, a kind of cloud-iTunes I guess.
That would convenient, but sadly it is not the case. Sorry!
Either way your welcome and best of luck!
B-rock -
Need help regarding Value Object Concept in flex/java
I need to map the java objects to flex use value objects in flex.
The problem is I have a class in java which is referring to another class and again that class referring another class.
For instance
Class A
protected User user;
Class User
protected Address address;
Now I need to map class A to the flex using value object concept and I have to display the user info in the grid as well.
Need some help to get started.You need to set the "scope" property in your remoting destination definition to "session" or "application".
-
The backup disk image “/Volumes/Data/David Witkowski’s Mac Pro.sparsebundle” is already in use. Whenever Time Machine starts to backup to Time Capsuel I get the previous error message Where can I find this disk image?. I need some help to fix this.
Thanks,
David WThere are multiple answers and solutions if you look just to the right under the heading of More Like This.
-
I bought a new song on itunes, but for some reason it won't play on my itunes library or Ipod. It skips to another song. Need some help on this if you can spare your time.
Hello
Thanks for using Apple Support Communities.
For more information on this, take a look at:
iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
http://support.apple.com/kb/ts1389
Best of luck,
Mario -
Need some help in creating Search Help for standard screen/field
I need some help in adding a search-help to a standard screen-field.
Transaction Code - PP01,
Plan Version - Current Plan (PLVAR = '01'),
Object Type - Position ( OTYPE = 'S'),
Click on Infotype Name - Object ( Infotype 1000) and Create.
I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
I specify again, I have to add a new search help to standard screen/field and not to enhance it.
This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
It's urgent.
Thanks in advace. Suitable answers will be rewardedHi Pradeep,
Please have a look into the below site which might be useful
Enhancing a Standard Search Help
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
edc983384237
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
A search help exit is called at certain timepoints in the input help process.
Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
timepoints
The following timepoints are defined:
1. SELONE
Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
2. PRESEL1
After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
3. PRESEL
Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
4. SELECT
Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
5. DISP
Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
6. RETURN (usually as return value for the next timepoint)
The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
7. RETTOP
You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
8. EXIT (only for return as next timepoint)
The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
9. CREATE
The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
10. APP1, APP2, APP3
If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
F4IF_SHLP_EXIT_EXAMPLE
This module has been created as an example for the interface and design of Search help exits in Search help.
All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
A search help exit is called repeatedly in connection with several
events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
Hope this info will help you.
***Reward points if found useful
Regards,
Naresh -
Please I need some help with a table
Hi All
I need some help with a table.
My table needs to hold prices that the user can update.
Also has a total of the column.
my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
I have tried using but as I need to set the toal with something like total
totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
Can any one please advise on some way I can get this to work ?
Thanks for reading
CraigHi there camickr
thanks for the help the other day
this is my full code....
package printing;
import java.awt.*;
import java.awt.event.*;
import java.awt.print.*;
import javax.swing.*;
import javax.swing.table.*;
import java.text.DecimalFormat;
public class tablePanel
extends JDialog implements Printable {
BorderLayout borderLayout1 = new BorderLayout();
private boolean printing = false;
private Dialog1 dialog;
JPanel jPanel = new JPanel();
JTable table;
JScrollPane scrollPane1 = new JScrollPane();
DefaultTableModel model;
private String[] columnNames = {
private Object[][] data;
private String selectTotal;
private double total;
public tablePanel(Dialog1 dp) {
dp = dialog;
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
public tablePanel() {
try {
jbInit();
catch (Exception exception) {
exception.printStackTrace();
private void jbInit() throws Exception {
jPanel.setLayout(borderLayout1);
scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
this.add(jPanel);
jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
scrollPane1.getViewport().add(table);
jPanel.setOpaque(true);
newTable();
addToModel();
addRows();
setTotal();
public static void main(String[] args) {
tablePanel tablePanel = new tablePanel();
tablePanel.pack();
tablePanel.setVisible(true);
public void setTotal() {
total = 0;
int i = table.getRowCount();
for (i = 0; i < table.getRowCount(); i++) {
String name = (String) table.getValueAt(i, 1);
if (!"".equals(name)) {
if (i != table.getRowCount() - 1) {
double dt = Double.parseDouble(name);
total = total + dt;
String str = Double.toString(total);
table.setValueAt(str, table.getRowCount() - 1, 1);
super.repaint();
public void newTable() {
model = new DefaultTableModel(data, columnNames) {
table = new JTable() {
public Component prepareRenderer(TableCellRenderer renderer,
int row, int col) {
Component c = super.prepareRenderer(renderer, row, col);
if (printing) {
c.setBackground(getBackground());
else {
if (row % 2 == 1 && !isCellSelected(row, col)) {
c.setBackground(getBackground());
else {
c.setBackground(new Color(227, 239, 250));
if (isCellSelected(row, col)) {
c.setBackground(new Color(190, 220, 250));
return c;
table.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
if (e.getClickCount() == 1) {
if (table.getSelectedColumn() == 1) {
table.setTableHeader(null);
table.setModel(model);
scrollPane1.getViewport().add(table);
table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
public void addToModel() {
Object[] data = {
"Price", "5800"};
model.addRow(data);
public void addRows() {
int rows = 20;
for (int i = 0; i < rows; i++) {
Object[] data = {
model.addRow(data);
public void printOut() {
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(tablePanel.this);
pj.printDialog();
try {
pj.print();
catch (Exception PrintException) {}
public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.black);
int fontHeight = g2.getFontMetrics().getHeight();
int fontDesent = g2.getFontMetrics().getDescent();
//leave room for page number
double pageHeight = pageFormat.getImageableHeight() - fontHeight;
double pageWidth = pageFormat.getImageableWidth();
double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
double scale = 1;
if (tableWidth >= pageWidth) {
scale = pageWidth / tableWidth;
double headerHeightOnPage = 16.0;
//double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
//System.out.println("this is the hedder heigth " + headerHeightOnPage);
double tableWidthOnPage = tableWidth * scale;
double oneRowHeight = (table.getRowHeight() + table.getRowMargin()) * scale;
int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
double pageHeightForTable = oneRowHeight *numRowsOnAPage;
int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
if (pageIndex >= totalNumPages) {
return NO_SUCH_PAGE;
g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
//bottom center
g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages), (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
g2.translate(0f, headerHeightOnPage);
g2.translate(0f, -pageIndex * pageHeightForTable);
//If this piece of the table is smaller
//than the size available,
//clip to the appropriate bounds.
if (pageIndex + 1 == totalNumPages) {
int lastRowPrinted =
numRowsOnAPage * pageIndex;
int numRowsLeft =
table.getRowCount()
- lastRowPrinted;
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(oneRowHeight *
numRowsLeft));
//else clip to the entire area available.
else {
g2.setClip(0,
(int) (pageHeightForTable * pageIndex),
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(pageHeightForTable));
g2.scale(scale, scale);
printing = true;
try {
table.paint(g2);
finally {
printing = false;
//tableView.paint(g2);
g2.scale(1 / scale, 1 / scale);
g2.translate(0f, pageIndex * pageHeightForTable);
g2.translate(0f, -headerHeightOnPage);
g2.setClip(0, 0,
(int) Math.ceil(tableWidthOnPage),
(int) Math.ceil(headerHeightOnPage));
g2.scale(scale, scale);
//table.getTableHeader().paint(g2);
//paint header at top
return Printable.PAGE_EXISTS;
class TableRenderDollar extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean isFocused,
int row, int column) {
setHorizontalAlignment(SwingConstants.RIGHT);
Component component = super.getTableCellRendererComponent(
table,
value,
isSelected,
isFocused,
row,
column);
if( value == null || value .equals("")){
( (JLabel) component).setText("");
}else{
double number = 0.0;
number = new Double(value.toString()).doubleValue();
DecimalFormat df = new DecimalFormat(",##0.00");
( (JLabel) component).setText(df.format(number));
return component;
} -
Need some help with the Select query.
Need some help with the Select query.
I had created a Z table with the following fields :
ZADS :
MANDT
VKORG
ABGRU.
I had written a select query as below :
select single vkorg abgru from ZADS into it_rej.
IT_REJ is a Work area:
DATA : BEGIN OF IT_REJ,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
This is causing performance issue. They are asking me to include the where condition for this select query.
What should be my select query here?
Please suggest....
Any suggestion will be apprecaiated!
Regards,
DeveloperHello Everybody!
Thank you for all your response!
I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
I had created a Z table with the following fields :
ZADS :
MANDT
VKORG
ABGRU.
I had written a select query as below :
I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table
select vkorg abgru from ZADS into it_rej.
Earlier :
IT_REJ is a Work area:
DATA : BEGIN OF IT_REJ,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
Now :
DATA : BEGIN OF IT_REJ occurs 0,
VKORG TYPE VBAK-VKORG,
ABGRU TYPE VBAP-ABGRU,
END OF IT_REJ.
I guess this will fix the issue correct?
PLease suggest!
Regards,
Developer.
Maybe you are looking for
-
Aligning a report to center of page
I'm new to Apex, and in working through my first application the one thing I can't figure out how to do (so far) is align my report to the center of the page rather than the left side of the page. It is the only thing on the page and is currently loc
-
Drop Down in self registration
Hi All, I am working on customization of self registration page. Everything is fine if I am using TEXT FIELDS in self registration. If use drop down and Date Fields in self registration page i am able to see the drop down and date fields in self regi
-
Frage zu Testversion Adobe Premiere Elements 11
Ich habe mir die Testversion runtergeladen, weil ich ein neues Video-Bearbeitungsprogramm suche. Leider kann ich meine Filme aber nicht in den Editor laden, er erkennt mein format offenbar nicht. Meine Filme sind MPEG2 bzw. M2TS. Für welche formate
-
How to create a blinking starfield with one mc
I have create one blinking star in a mc. It´s moving in a circle and blinking and changing colors. Now I want to create a starfield with blinking stars where every individual star is moving in a different way. The problem is, if I copy and past 100 o
-
Start up is taking hours...please help!
Hi, i just purchased a Macbook pro 3 months ago. Just 2 days ago I downloaded Anti-virus barrier and scanned my comp, but from the next day the start up takes hours - OVERNIGHT. Please help!