Table control disables all the lines
hi Goo day,
i have worked a lot on on TC and am struggling to get it right with the insert option.
i have button on the main screen where i read the data and fill the table control and display on the RADIO Button How many records are in the TC.
So i click the button and get into the TC but accept the records that i have displayed will all be disabled. even if i try to enable a line by insert i cant do it.
PROCESS AFTER INPUT.
LOOP AT IT_WAGON.
chain.
field : IT_WAGON-TRAIN_NUM,
IT_WAGON-DELAY_MIN.
MODULE modify_tabview_wagon.
endchain.
ENDLOOP.
IF sy-ucomm = 'INST'.
DESCRIBE TABLE it_wagon LINES v_count.
ADD 1 TO v_count.
INSERT it_wagon INDEX v_count.
ENDIF.
i want to know why they are are disabled.
what can i do to overcome.
Do this in the PBO.
rob
Similar Messages
-
Hi all
In the component overview screen of CO01 I want to disable all the field in screen of table control.I want to make it as output screen only.
Thanks & Regards,
Rajib.Isn't that just exactly what transaction CO02 does? CO01 is for creating production orders so what sense does it make to have it display mode only?
Maybe your goal is to stop then end user changing the component assignment that is automatically detected by the system. If so, personally I think a better starting point would be PP configuration or user authorizations rather than looking to change the screen by whatever method. As we don't know what you are trying to achieve it's hard to offer much more advice maybe all you need is to change transaction to CO02 -
Disable all the foreign keys in a database
Hy, what sql to use to disable all the foreign keys in a database and how to enable all them again. Thanks
select * from dba_constraints where constraint_type = 'R' and status = 'ENABLED'
ALTER TABLE table_name
disable CONSTRAINT constraint_name;
ALTER TABLE table_name
enable CONSTRAINT constraint_name;
select
'ALTER TABLE ' || OWNER || '.' || table_name || ' enable CONSTRAINT ' || constraint_name || ';'
from dba_constraints where constraint_type = 'R' and status = 'ENABLED';
Execute and save result for enable before disable
select
'ALTER TABLE ' || OWNER || '.' || table_name || ' disable CONSTRAINT ' || constraint_name || ';'
from dba_constraints where constraint_type = 'R' and status = 'ENABLED';
Execute result for disable. -
Sapscript Issue . Same line appears in all the line
Hi All ,
By using the logic below , i am able to find the 4 diffrenet line item in my window .
Now i am getting the same line in all the lines in sapscript.
Pls suggest , how to avoid this .
In my final table it_excdtl , all diffrent line item are shown ( shown while debugging )
Thanks & Regards
Kiro
below is the code
CLEAR WA_EXCDTL .
Loop at it_excdtl INTO WA_EXCDTL.
IF WA_excdtl-menge NE 0.
wa_excdtl_amt_unit = ( WA_excdtl-exbed / WA_excdtl-menge ).
WA_EXCDTL_ED_UNIT = ( WA_excdtl-ecs / WA_excdtl-menge ).
WA_EXCDTL_CVD_UNIT = ( WA_excdtl-exaed / WA_excdtl-menge ).
modify it_excdtl from wa_excdtl.
ENDIF.
PERFORM write_form2.
FORM write_form2 .
loop at it_excdtl.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'EMAIN2'
function = 'APPEND'
function = 'SET'
type = 'BODY'
window = 'MAIN2'
IMPORTING
PENDING_LINES =
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
OTHERS = 9
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDFORM. " WRITE_FORM2ok guys i found the solution thanks to steve muench and his "upload text file and image example" on his weblog..
thanks steve :)
insted of:
<adf:render model="bindings.Pic"/>
it should be
<adf:render model="Row.Pic"/> -
Wizard generated table control: bug in insert line function?
Hi,
I added a table control to a dynpro using the wizard in the screen painter. Now I have an issue with the inserting line button:
If I add a new line the first time, a new empty line is added to the table control before my last line. So far so good.
If I add now another line, again a new line empty is added before my last line and two lines are added after my last line: one empty line and a line with the same content as my former second last line.
The following should explain it a bit better:
table before inserting new line:
line 1
line 2
line 3
line 4
line 5
after inserting a new line:
line 1
line 2
line 3
line 4
new empty line
line 5
table before inserting the second line:
line 1
line 2
line 3
line 4
line 5
line 6
after inserting the second line:
line 1
line 2
line 3
line 4
line 5
new empty line
line 6
new empty line
line 5
I didn't change the generated coding yet!
Thanks in advance and regards,
Martin
Edited by: fischerman on May 29, 2008 9:08 AMHere is the code of the form which is called in PAI if the insert button was pressed:
FORM fcode_insert_row
USING p_tc_name TYPE dynfnam
p_table_name .
*&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
DATA l_lines_name LIKE feld-name.
DATA l_selline LIKE sy-stepl.
DATA l_lastline TYPE i.
DATA l_line TYPE i.
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <lines> TYPE i.
*&SPWIZARD: END OF LOCAL DATA------------------------------------------*
ASSIGN (p_tc_name) TO <tc>.
*&SPWIZARD: get the table, which belongs to the tc *
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
*&SPWIZARD: get looplines of TableControl *
CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
ASSIGN (l_lines_name) TO <lines>.
*&SPWIZARD: get current line *
GET CURSOR LINE l_selline.
IF sy-subrc <> 0. " append line to table
l_selline = <tc>-lines + 1.
*&SPWIZARD: set top line *
IF l_selline > <lines>.
<tc>-top_line = l_selline - <lines> + 1 .
ELSE.
<tc>-top_line = 1.
ENDIF.
ELSE. " insert line into table
l_selline = <tc>-top_line + l_selline - 1.
l_lastline = <tc>-top_line + <lines> - 1.
ENDIF.
*&SPWIZARD: set new cursor line *
l_line = l_selline - <tc>-top_line + 1.
*&SPWIZARD: insert initial line *
INSERT INITIAL LINE INTO <table> INDEX l_selline.
<tc>-lines = <tc>-lines + 1.
*&SPWIZARD: set cursor *
SET CURSOR LINE l_line.
ENDFORM. " FCODE_INSERT_ROW -
How can i extend the table control while transfering the data
hi
how can i extend the table control while transfering the data.Hi,
For table control we have to handle the page down (P+, or what ever function codes are assigned to that activity) activity with our coding.
Just check out this code:
This is the bdc to update the XK01 transaction code (Vendor Creation).
Here we will use table controls for bankings. Here Iam sending the coding and text files.
Coding
REPORT zprataptable2
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
i1 TYPE i,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
anred LIKE lfa1-anred,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
j1 TYPE i,
banks LIKE lfbk-banks,
bankl LIKE lfbk-bankl,
bankn LIKE lfbk-bankn,
END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\first1.txt'
filetype = 'DAT'
TABLES
data_tab = itab.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\second.txt'
filetype = 'DAT'
TABLES
data_tab = jtab.
LOOP AT itab.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
itab-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
itab-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
itab-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
itab-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-LAND1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFA1-ANRED'
itab-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
itab-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
itab-sortl.
PERFORM bdc_field USING 'LFA1-LAND1'
itab-land1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
cnt = 0.
LOOP AT jtab WHERE j1 = itab-i1.
cnt = cnt + 1.
CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-banks.
CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankl.
CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankn.
IF cnt = 5.
cnt = 0.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'. " Page down activity
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFB1-AKONT'
itab-akont.
PERFORM bdc_field USING 'LFB1-FDGRV'
itab-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFM1-WAERS'
itab-waers.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
PERFORM close_group.
**Flat files for the above code***
Intial screen data file.
1 63190 0001 0001 0001 mr bal188 b in 31000 a1 inr
2 63191 0001 0001 0001 mr bal189 b in 31000 a1 inr
Table control Data:
1 in sb 11000
1 in sb 12000
1 in sb 13000
1 in sb 14000
1 in sb 15000
1 in sb 16000
1 in sb 17000
1 in sb 18000
1 in sb 19000
1 in sb 20000
1 in sb 21000
1 in sb 22000
2 in sb 21000
2 in sb 22000
Regards,
Kumar. -
I scanned an image and want to use the image trace tool, but it doesn't pick up all the lines. Is there a way to darken the lines before using the image trace tool? Help!
If the scan is in B&W, then play with the Threshold setting here
If it's in Color, then you will have to open the scan in a Raster editing software (like Photoshop) and play with the Brightness/Contrast settings to make the lines bolder. -
How do I click on a cell in a table control, and display the value in a string?
What I would like to do is to click on a cell in a table control, and have the value of the cell be displayed in a string indicator. What ever cell I click on, I would like the value to be displayed in the indicator.
Thank you!
Solved!
Go to Solution.... or
Event >>> ouse down for table.
Use Coords" to feed invoke node "point To Row Column" and returned "Cell Postion" can be unbundled to produce the row and column tht can be used to index out the value.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
How can i read all the lines from a text file in specific places and use the data ?
string[] lines = File.ReadAllLines(@"c:\wmiclasses\wmiclasses1.txt");
for (int i = 0; i < lines.Length; i++)
if (lines[i].StartsWith("ComboBox"))
And this is how the text file content look like:
ComboBox Name cmbxOption
Classes Win32_1394Controller
Classes Win32_1394ControllerDevice
ComboBox Name cmbxStorage
Classes Win32_LogicalFileSecuritySetting
Classes Win32_TapeDrive
What i need to do is some things:
1. Each time the line start with ComboBox then to get only the ComboBox name from the line for example cmbxOption.
Since i have already this ComboBoxes in my form1 designer i need to identify where the cmbxOption start and end and when the next ComboBox start cmbxStorage.
2. To get all the lines of the current ComboBox for example this lines belong to cmbxOption:
Classes Win32_1394Controller
Classes Win32_1394ControllerDevice
3. To create from each line a Key and Value for example from the line:
Classes Win32_1394Controller
Then the key will be Win32_1394Controller and the value will be only 1394Controller
Then the second line key Win32_1394ControllerDevice and value only 1394ControllerDevice
4. To add to the correct belonging ComboBox only the value 1394Controller.
5. To make that when i select in the ComboBox for example in cmbxOption the item 1394Controller it will act like i selected Win32_1394Controller.
For example in this event:
private void cmbxOption_SelectedIndexChanged(object sender, EventArgs e)
InsertInfo(cmbxOption.SelectedItem.ToString(), ref lstDisplayHardware, chkHardware.Checked);
In need that the SelectedItem will be Win32_1394Controller but the user will see in the cmbxOption only 1394Controller without the Win32_
This is the start of the method InsertInfo
private void InsertInfo(string Key, ref ListView lst, bool DontInsertNull)
That's why i need that the Key will be Win32_1394Controller but i want that the user will see in the ComboBox only 1394Controller without the Win32_Hello,
Here is a running start on getting specific lines in the case lines starting with ComboBox. I took your data and placed it into a text file named TextFile1.txt in the bin\debug folder. Code below was done in
a console app.
using System;
using System.IO;
using System.Linq;
namespace ConsoleApplication1
internal class Program
private static void Main(string[] args)
var result =
from T in File.ReadAllLines(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TextFile1.txt"))
.Select((line, index) => new { Line = line, Index = index })
.Where((s) => s.Line.StartsWith("ComboBox"))
select T
).ToList();
if (result.Count > 0)
foreach (var item in result)
Console.WriteLine("Line: {0} Data: {1}", item.Index, item.Line);
Console.ReadLine();
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions. -
Is anyone else experiencing the same? WiFi is running fine, disabled all the Anti-Virus, still barely runs.
2013 27" iMacI'm having the same issue, mine says prepairing to backup. I let it run for 12 hours and it never performed a backup. I have a Mac Book Pro
-
How can I disable all the components in a JPanel?
I want to disable all the components( button, text field ) in a JPanel. I know I can search the panel and disable each of its children component recursively. Is there a better way to do this?
I want to disable all the components( button, text field ) in a JPanel.You haven't defined what you mean by "disable".
If you mean you want the component to be repainted in its disabled state, then you would need to set the property of each individual component to disable, which would imply some kind of recursion.
If you just want to prevent components from receiving key events and mouse events, then you can use a glass pane or maybe a panel with an overlay layout that contains a non-opaque panel that intercepts all events. -
Disable all the previous dates in a calendar form
hi guys,
I am having a calendar form in which it displays all the previous,current,future dates and months.when i click on the particular button on the
calendar it dispalys the date, month, and year.its working fine.But what i need is, i want to disable all the previous dates in the calendar till the current
date.But not to disable the previous button.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class CalendarForm extends JFrame
JButton[] btn = new JButton[49];
int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
JLabel lbl = new JLabel("", JLabel.CENTER);
JTextField tf1=new JTextField();
public CalendarForm()
buildGUI();
setDates();
public void buildGUI()
setLocation(200,350);
setDefaultCloseOperation(HIDE_ON_CLOSE);
String[] header = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
JPanel midPanel = new JPanel(new GridLayout(7,7));
midPanel.setPreferredSize(new Dimension(350,250));
for(int x = 0; x < btn.length; x++)
final int selection = x;
btn[x] = new JButton();
btn[x].setFocusPainted(false);
if(x>6)
btn[x].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
displayDatePicked(btn[selection].getActionCommand());}});
if(x < 7)
{btn[x].setFont(new Font("Lucida", Font.PLAIN, 8)); btn[x].setText(header[x]);}
midPanel.add(btn[x]);
JPanel lowPanel = new JPanel(new GridLayout(1,3));
JButton prevBtn = new JButton("<< Previous");
prevBtn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
month--;setDates();}});
lowPanel.add(prevBtn);
lowPanel.add(lbl);
JButton nextBtn = new JButton("Next >>");
nextBtn.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
month++;setDates();}});
lowPanel.add(nextBtn);
getContentPane().add(midPanel,BorderLayout.CENTER);
getContentPane().add(lowPanel,BorderLayout.SOUTH);
pack();
public void setDates()
for(int x = 7; x < btn.length; x++) btn[x].setText("");
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year,month,1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
for(int x = 6+dayOfWeek,day = 1; day <= daysInMonth; x++,day++) btn[x].setText(""+day);
lbl.setText(sdf.format(cal.getTime()));
setTitle("Calendar - "+lbl.getText());
public void displayDatePicked(String day)
if(day.equals("") == false)
// java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("EEEE d MMMM, yyyy");
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year,month,Integer.parseInt(day));
System.out.println(tf1.getText());
getContentPane().add(tf1,BorderLayout.NORTH);
// JOptionPane.showMessageDialog(this,"You picked "+sdf.format(cal.getTime()));
tf1.setText(sdf.format(cal.getTime()));
System.out.println("from date"+tf1.getText());
this.setVisible(false);
public String getFromDate()
return tf1.getText();
public static void main(String[] args)
new CalendarForm().setVisible(true);
the above code is to diaplay the calendar form.plzzzzzzzzzzzzzzzz help me. thanks in advancehi michael,i disabled all the previous buttons in a calendar form.this is my code
import java.awt.*;
import java.awt.event.*;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
class CalendarForm extends JFrame {
JButton[] btn = new JButton[49];
int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);
int date = java.util.Calendar.getInstance().get(java.util.Calendar.DATE);
int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);
JLabel lbl = new JLabel("", JLabel.CENTER);
JTextField tf1 = new JTextField();
public CalendarForm() {
buildGUI();
setDates();
private String getMonthAndYearAsString() {
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM yyyy");
return sdf.format(new Date(System.currentTimeMillis()));
private Date getCurrentDate() {
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd MM yyyy");
return new Date();
public void buildGUI() {
setLocation(450, 350);
setDefaultCloseOperation(HIDE_ON_CLOSE);
String[] header = {"Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"};
JPanel midPanel = new JPanel(new GridLayout(7, 7));
midPanel.setPreferredSize(new Dimension(350, 250));
for (int x = 0; x < btn.length; x++) {
final int selection = x;
btn[x] = new JButton();
btn[x].setFocusPainted(false);
if (x > 6) {
btn[x].addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
displayDatePicked(btn[selection].getActionCommand());
if (x < 7) {
btn[x].setFont(new Font("Lucida", Font.PLAIN, 8));
btn[x].setText(header[x]);
midPanel.add(btn[x]);
JPanel lowPanel = new JPanel(new GridLayout(1, 3));
JButton prevBtn = new JButton("<< Previous");
prevBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month--;
setDates();
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, 1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
String currentMonth = getMonthAndYearAsString();
System.out.println("CURRENT MONTH AND YEAR " + currentMonth);
String selectedMonth = sdf.format(cal.getTime());
System.out.println("SELECTED MONTH AND YEAR " + selectedMonth);
Date currentDate = getCurrentDate();
Date selectedDate = new Date(cal.getTimeInMillis());
//Comparing currentDate nad selectedDate
int off = currentDate.compareTo(selectedDate);
int currentDay = date;
if (currentMonth.compareTo(selectedMonth) == 0) {
for (int x = 7 + dayOfWeek, day = 1; day <= btn.length; x++, day++) {
btn[x].setEnabled(true);
if (day < currentDay) {
int k = x - 1;
for (int j = 7; j <= k; j++) {
btn[j].setEnabled(false);
} else if (off == 1) {
for (int x = 6 + dayOfWeek, day = 1; day < daysInMonth; x++, day++) {
for (int i = 6 + dayOfWeek; day < currentDay; i++) {
btn.setEnabled(false);
} else if (off == -1) {
for (int x = 7, day = 1; day < btn.length; x++, day++) {
btn[x].setEnabled(true);
lowPanel.add(prevBtn);
lowPanel.add(lbl);
JButton nextBtn = new JButton("Next >>");
nextBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
month++;
setDates();
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, 1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
String currentMonth = getMonthAndYearAsString();
System.out.println("CURRENT MONTH AND YEAR " + currentMonth);
String selectedMonth = sdf.format(cal.getTime());
System.out.println("SELECTED MONTH AND YEAR " + selectedMonth);
Date currentDate = getCurrentDate();
Date selectedDate = new Date(cal.getTimeInMillis());
//Comparing currentDate and selectedDate
int off = currentDate.compareTo(selectedDate);
int currentDay = date;
if (currentMonth.compareTo(selectedMonth) == 0) {
for (int x = 7 + dayOfWeek, day = 1; day <= btn.length; x++, day++) {
btn[x].setEnabled(true);
if (day < currentDay) {
int k = x - 1;
for (int j = 7; j <= k; j++) {
btn[j].setEnabled(false);
if (off == -1) {
for (int x = 7, day = 1; day < btn.length; x++, day++) {
btn[x].setEnabled(true);
} else if (off == 1) {
for (int x = 6 + dayOfWeek, day = 1; day < daysInMonth; x++, day++) {
for (int i = 6 + dayOfWeek; day < currentDay; i++) {
btn[i].setEnabled(false);
lowPanel.add(nextBtn);
getContentPane().add(midPanel, BorderLayout.CENTER);
getContentPane().add(lowPanel, BorderLayout.SOUTH);
pack();
public void setDates() {
for (int x = 7; x < btn.length; x++) {
btn[x].setText("");
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("MMMM yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, 1);
int dayOfWeek = cal.get(java.util.Calendar.DAY_OF_WEEK);
int daysInMonth = cal.getActualMaximum(java.util.Calendar.DAY_OF_MONTH);
lbl.setText(sdf.format(cal.getTime()));
setTitle("Calendar - " + lbl.getText());
int currentDay = date;
for (int x = 6 + dayOfWeek, day = 1; day <= daysInMonth; x++, day++) {
btn[x].setText("" + day);
if (day < currentDay) {
for (int j = 7; j <= x; j++) {
btn[j].setEnabled(false);
public void displayDatePicked(String day) {
if (day.equals("") == false) {
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy");
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.set(year, month, Integer.parseInt(day));
System.out.println(month);
System.out.println(tf1.getText());
tf1.setText(sdf.format(cal.getTime()));
System.out.println("from date" + tf1.getText());
// VStudentAttendanceForm class ....
if (VStudentAttendanceForm.jcalFlag == 1) {
VStudentAttendanceForm.jtfFromDate.setText(tf1.getText());
if (VStudentAttendanceForm.jcalFlag == 2) {
VStudentAttendanceForm.jtfToDate.setText(tf1.getText());
if (ManageStudents.cal == 1) {
ManageStudents.jTextField22.setText(tf1.getText());
ManageStudents.FromjTextField10.setText(tf1.getText());
if (ManageStudents.cal == 2) {
ManageStudents.jTextField23.setText(tf1.getText());
ManageStudents.TojTextField11.setText(tf1.getText());
if (vAuditTrail.cal == 1) {
vAuditTrail.jTextField3.setText(tf1.getText());
if (vAuditTrail.cal == 2) {
vAuditTrail.jTextField4.setText(tf1.getText());
if (Attendance.cal == 1) {
Attendance.jTextField7.setText(tf1.getText());
if (Attendance.cal == 2) {
Attendance.jTextField8.setText(tf1.getText());
this.setVisible(false);
public String getFromDate() {
return tf1.getText();
public static void main(String[] args) {
new CalendarForm().setVisible(true); -
Defaulting the Sotrage location for all the line items in my sales order
Hi,
I have a scenario to default the storage location automatically in my sales order for all the line items. It is not going to change for a particular sales org. Dist. channel & Division combination. Can you pls. suggest me a solution for this.
Thanks
Ghanesh.Hi,
You can default the storage location by using the below user exit
Storage location
Auto determination of storage location as u2018XXXXu2019 for sales order
Include - MV45AFZB
Form - USEREXIT_SOURCE_DETERMINATION
IF (VBAK-AUART = 'XXXX' and VBAK-VKORG = 'XXXX' and VBAK-VTWEG = 'XX').
VBAP-LGORT = 'ABCD'.
Regards,
Gopal.
Edited by: Gopalakrishnan S on Feb 25, 2010 7:35 AM -
AD ACCOUNT GETTING DISABLED ALL THE TIME
Hi all,
Helpdesk has reported that user account get's disabled all the time & they have to enable it.
What could be the cause of this & how to troubleshoot.Hi all,
Helpdesk has reported that user account get's disabled all the time & they have to enable it.
What could be the cause of this & how to troubleshoot.
Remove the help-desk access to user objects and see if it gets disabled again or not. :)
If you have third party tools which manage user accounts, review their configuration. FIM for example is one of the tools that has authority to disable/enable the accounts. Also If I had no clue what is going one I would enable auditing on user objects and
filter my security event viewer for user changes to see who is disabling them.
AD DS Auditing Step-by-Step Guide
Mahdi Tehrani |
|
www.mahditehrani.ir
Please click on Propose As Answer or to mark this post as
and helpful for other people.
This posting is provided AS-IS with no warranties, and confers no rights.
How to query members of 'Local Administrators' group in all computers? -
Table name where all the SAP Script names are stored
Hi Gurus,
Can i know the table name where all the SAP Script names are stored in SAP Database.
Thanks in advance,
Shyam.Yes TNAPR is the table which contains sapscipts name and print program names.
Step:1: Goto to the Table TNAPR using SE11
Step:2: Get the Contents of the Table(CNTRLSHIFTF10)
Step:3: On the Table Content Selection Screen, Type the driver program name in the field PGNAM and execute(F8).
Step:4: FONAM field of the result display contains the SAPScript Name for our driver program.
Regards,
Lalit Mohan Gupta.
Maybe you are looking for
-
Trying to use SQL to implement a VPD policy
could some please help me with the following code :- these are the steps i took. i'm trying to implement a VPD(virtual private database) also know as Fine Grained Accessed on my APEX 3.2.1 ------ login as SYS CREATE USER vpd_admin IDENTIFIED BY Passw
-
Extracting text (UTF8 and UTF16) from the SWF file format
Hello. Just wondering if this newsgroup is the right one to talk about the 'open' SWF file format. I'm looking for a utility to pull out the text strings inside of a SWF file (both UTF8 and UTF16). The file format is open-sourced, so I guess that I c
-
Skype's Crashing each time I start up LoL
Whenever I have Skype open and have start League of Legends and I'm in a call, it instantly crashes Skype. Repeatedly. It's been an issue for a while but only recently resurfaced again. If I try to start up League of Legends while Skype has a voice c
-
Why FORCE_LOGGING?
When configure Data Guard, why must i say extra: ALTER DATABASE force logging;Is this not already the database default? ..Any changes on the database are writed to redo log before the corresponding transaction is committed Thanks
-
Now that SSDT BI has been released for 2014 for a while, is it possible for a single shared DataSource to be referenced/used across SSRS Projects? If not, why has this functionality been added yet? With all the power and functionality of Visual Stu