Centring items using SpringLayout
I'm writing a dictionary program that uses Spring Layout to position things in exactly the way I want them.
However, some elements, such as the results table, or the masses of buttons to perform searches, don't stay centred and I don't know how to do this using Spring Layout.
Snippets of my code below. Centred Dictionary Window just sets the size, background colour, etc. There are 5 of each element (eg "Not" ComboBoxes, etc) except Operator ComboBoxes, of which there are 4. and yeah I understand that I can use 'object arrays' to shorten my code and avoid duplication but I've not worked out exactly how to do that yet >.<
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.lang.*;
import java.io.*;
public class searchWindowFrame extends CentredDictionaryWindow {
//Title image
JLabel searchImage = new JLabel(new ImageIcon("resources/SearchImage.jpg"));
boxFont = new Font("Tahoma", Font.PLAIN, 12);
//First 'Not' ComboBox
String[] notItems = { "", "NOT" };
notCombo = new JComboBox(notItems);
notCombo.setPreferredSize(new Dimension(95, 40));
notCombo.setBackground(new Color(241, 239, 240));
notCombo.setForeground(new Color(93, 58, 64));
notCombo.setFont(boxFont);
notCombo.setEnabled(true);
//First 'Dictionary Type' ComboBox
String[] dictTypeItems = { "<Dictionary Type>", "Orthography", "Pronunciation" };
dictTypeCombo = new JComboBox(dictTypeItems);
dictTypeCombo.setPreferredSize(new Dimension(135, 40));
dictTypeCombo.setBackground(new Color(241, 239, 240));
dictTypeCombo.setForeground(new Color(93, 58, 64));
dictTypeCombo.setFont(boxFont);
dictTypeCombo.setEnabled(true);
//First 'Search Type' ComboBox
String[] searchTypeItems = { "<Search Type>", "Contains", "Starts With",
"Ends With", "Minimal Pairs" };
searchTypeCombo = new JComboBox(searchTypeItems);
searchTypeCombo.setPreferredSize(new Dimension(125, 40));
searchTypeCombo.setBackground(new Color(241, 239, 240));
searchTypeCombo.setForeground(new Color(93, 58, 64));
searchTypeCombo.setFont(boxFont);
searchTypeCombo.setEnabled(true);
//First 'Query' TextField
searchTermField = new JTextField("<Query>", 10);
searchTermField.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
searchTermField.setPreferredSize(new Dimension(100, 40));
searchTermField.setBackground(new Color(249, 249, 249));
searchTermField.setForeground(new Color(93, 58, 64));
searchTermField.setFont(boxFont);
//First 'Operator' ComboBox
String[] operatorItems = { "", "AND", "OR" };
operatorCombo = new JComboBox(operatorItems);
operatorCombo.setPreferredSize(new Dimension(95, 40));
operatorCombo.setBackground(new Color(241, 239, 240));
operatorCombo.setForeground(new Color(93, 58, 64));
operatorCombo.setFont(boxFont);
operatorCombo.setEnabled(true);
//Panel containing Not Combo Boxes
firstQueryPanel = new JPanel();
firstQueryPanel.setLayout(new GridLayout(5, 0, 10, 10));
firstQueryPanel.setBackground(new Color(241, 239, 240));
firstQueryPanel.setBorder(new EmptyBorder(10, 10, 0, 0));
firstQueryPanel.add(notCombo);
firstQueryPanel.add(notComboTwo);
firstQueryPanel.add(notComboThree);
firstQueryPanel.add(notComboFour);
firstQueryPanel.add(notComboFive);
//Panel containing Dictionary Type Combo Boxes
secondQueryPanel = new JPanel();
secondQueryPanel.setLayout(new GridLayout(5, 0, 10, 10));
secondQueryPanel.setBackground(new Color(241, 239, 240));
secondQueryPanel.setBorder(new EmptyBorder(10, 0, 0, 0));
secondQueryPanel.add(dictTypeCombo);
secondQueryPanel.add(dictTypeComboTwo);
secondQueryPanel.add(dictTypeComboThree);
secondQueryPanel.add(dictTypeComboFour);
secondQueryPanel.add(dictTypeComboFive);
//Panel containing Search Type Combo Boxes
thirdQueryPanel = new JPanel();
thirdQueryPanel.setLayout(new GridLayout(5, 0, 10, 10));
thirdQueryPanel.setBackground(new Color(241, 239, 240));
thirdQueryPanel.setBorder(new EmptyBorder(10, 0, 0, 0));
thirdQueryPanel.add(searchTypeCombo);
thirdQueryPanel.add(searchTypeComboTwo);
thirdQueryPanel.add(searchTypeComboThree);
thirdQueryPanel.add(searchTypeComboFour);
thirdQueryPanel.add(searchTypeComboFive);
//Panel containing Query Text Fields
fourthQueryPanel = new JPanel();
fourthQueryPanel.setLayout(new GridLayout(5, 0, 10, 10));
fourthQueryPanel.setBackground(new Color(241, 239, 240));
fourthQueryPanel.setBorder(new EmptyBorder(10, 0, 0, 0));
fourthQueryPanel.add(searchTermField);
fourthQueryPanel.add(searchTermFieldTwo);
fourthQueryPanel.add(searchTermFieldThree);
fourthQueryPanel.add(searchTermFieldFour);
fourthQueryPanel.add(searchTermFieldFive);
//Panel containing Operator Combo Boxes
fifthQueryPanel = new JPanel();
fifthQueryPanel.setLayout(new GridLayout(4,0,10,10));
fifthQueryPanel.setBackground(new Color(241, 239, 240));
fifthQueryPanel.setBorder(new EmptyBorder(10, 0, 0, 10));
fifthQueryPanel.add(operatorCombo);
fifthQueryPanel.add(operatorComboTwo);
fifthQueryPanel.add(operatorComboThree);
fifthQueryPanel.add(operatorComboFour);
//Search button
searchButton = new JButton("Search");
searchButton.setFont(boxFont);
searchButton.setBackground(new Color(249, 249, 249));
searchButton.setForeground(new Color(93, 58, 64));
searchButton.setToolTipText("Search with the set parameters");
searchButton.setPreferredSize(new Dimension(100, 40));
searchButton.setFocusPainted(false);
//Back button
backButton = new JButton("< Back");
backButton.setFont(boxFont);
backButton.setBackground(new Color(249, 249, 249));
backButton.setForeground(new Color(93, 58, 64));
backButton.setPreferredSize(new Dimension(100, 40));
backButton.setFocusPainted(false);
//Exit button
exitButton = new JButton("Exit");
exitButton.setFont(boxFont);
exitButton.setBackground(new Color(249, 249, 249));
exitButton.setForeground(new Color(93, 58, 64));
exitButton.setPreferredSize(new Dimension(100, 40));
exitButton.setFocusPainted(false);
layout = new SpringLayout();
getContentPane().setLayout(layout);
layout.putConstraint(SpringLayout.NORTH, searchImage, 10, SpringLayout.NORTH, getContentPane());
layout.putConstraint(SpringLayout.EAST, searchImage, 0, SpringLayout.EAST, getContentPane());
layout.putConstraint(SpringLayout.NORTH, firstQueryPanel, 10, SpringLayout.SOUTH, searchImage);
layout.putConstraint(SpringLayout.WEST, secondQueryPanel, 10, SpringLayout.EAST, firstQueryPanel);
layout.putConstraint(SpringLayout.NORTH, secondQueryPanel, 10, SpringLayout.SOUTH, searchImage);
layout.putConstraint(SpringLayout.WEST, thirdQueryPanel, 10, SpringLayout.EAST, secondQueryPanel);
layout.putConstraint(SpringLayout.NORTH, thirdQueryPanel, 10, SpringLayout.SOUTH, searchImage);
layout.putConstraint(SpringLayout.WEST, fourthQueryPanel, 10, SpringLayout.EAST, thirdQueryPanel);
layout.putConstraint(SpringLayout.NORTH, fourthQueryPanel, 10, SpringLayout.SOUTH, searchImage);
layout.putConstraint(SpringLayout.WEST, fifthQueryPanel, 10, SpringLayout.EAST, fourthQueryPanel);
layout.putConstraint(SpringLayout.NORTH, fifthQueryPanel, 10, SpringLayout.SOUTH, searchImage);
layout.putConstraint(SpringLayout.SOUTH, backButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, backButton, 10, SpringLayout.WEST, getContentPane());
layout.putConstraint(SpringLayout.WEST, exitButton, 10, SpringLayout.EAST, backButton);
layout.putConstraint(SpringLayout.SOUTH, exitButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.EAST, helpButton, -10, SpringLayout.WEST, searchButton);
layout.putConstraint(SpringLayout.SOUTH, helpButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.SOUTH, searchButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.EAST, searchButton, -10, SpringLayout.EAST, getContentPane());
getContentPane().setBackground(new Color(241, 239, 240));
getContentPane().add(searchImage);
getContentPane().add(firstQueryPanel);
getContentPane().add(secondQueryPanel);
getContentPane().add(thirdQueryPanel);
getContentPane().add(fourthQueryPanel);
getContentPane().add(fifthQueryPanel);
getContentPane().add(backButton);
getContentPane().add(exitButton);
getContentPane().add(searchButton);
...
-__- On searchWindowFrame I want to centre all 24 input components. On resultsFrame I want to centre the scroll pane containing the JTable.
To say I rewrote most of the program I had to completely redo this to get it to run, nor can I even use them all because that's 'too much', so that was fun.
Like I said, I can centre things, just when the window resizes, it doesn't move with it.
Originally the window is set to the right size, so everything is in its correct place.
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class searchFrame extends JFrame
public searchFrame()
setTitle("Dictionary A'la Lewis");
// Get the toolkit for reading System information
Toolkit tk = Toolkit.getDefaultToolkit();
// Get the dimensions of the screen
Dimension screenDimension = tk.getScreenSize();
// Set the size
setSize(620, 535);
// Centre window on screen
setLocation(new Point((screenDimension.width - 600) / 2, (screenDimension.height - 535) / 2));
JComboBox notCombo = new JComboBox();
notCombo.setPreferredSize(new Dimension(95, 40));
notCombo.setEnabled(true);
JComboBox notCombo2 = new JComboBox();
notCombo2.setPreferredSize(new Dimension(95, 40));
notCombo2.setEnabled(true);
JComboBox dictionaryType = new JComboBox();
dictionaryType.setPreferredSize(new Dimension(95, 40));
dictionaryType.setEnabled(true);
JComboBox dictionaryType2 = new JComboBox();
dictionaryType2.setPreferredSize(new Dimension(95, 40));
dictionaryType2.setEnabled(true);
JPanel notPanel = new JPanel();
JPanel dictionaryPanel = new JPanel();
notPanel.setLayout(new GridLayout(2, 0, 10, 10));
notPanel.add(notCombo);
notPanel.add(notCombo2);
dictionaryPanel.setLayout(new GridLayout(2, 0, 10, 10));
dictionaryPanel.add(dictionaryType);
dictionaryPanel.add(dictionaryType2);
//Search button
JButton searchButton = new JButton("Search");
//Back button
JButton backButton = new JButton("< Back");
//Exit button
JButton exitButton = new JButton("Exit");
SpringLayout layout = new SpringLayout();
getContentPane().setLayout(layout);
layout.putConstraint(SpringLayout.NORTH, notPanel, 10, SpringLayout.NORTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, notPanel, 10, SpringLayout.WEST, getContentPane());
layout.putConstraint(SpringLayout.NORTH, dictionaryPanel, 10, SpringLayout.NORTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, dictionaryPanel, 10, SpringLayout.EAST, notPanel);
layout.putConstraint(SpringLayout.SOUTH, backButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, backButton, 10, SpringLayout.WEST, getContentPane());
layout.putConstraint(SpringLayout.WEST, exitButton, 10, SpringLayout.EAST, backButton);
layout.putConstraint(SpringLayout.SOUTH, exitButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.SOUTH, searchButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.EAST, searchButton, -10, SpringLayout.EAST, getContentPane());
getContentPane().add(notPanel);
getContentPane().add(dictionaryPanel);
getContentPane().add(searchButton);
getContentPane().add(backButton);
getContentPane().add(exitButton);
public static void main(String[] args) throws IOException
JFrame search = new searchFrame();
search.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
search.show();
}On this one I want to keep the scroll pane centred (which it won't be at the mo) and I also want to keep the label saying so many results found to the scroll pane's right edge (which it won't be at the moment if the table moves because of the screen resizing).
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class resultsFrame extends JFrame
public resultsFrame()
setTitle("Dictionary A'la Lewis");
// Get the toolkit for reading System information
Toolkit tk = Toolkit.getDefaultToolkit();
// Get the dimensions of the screen
Dimension screenDimension = tk.getScreenSize();
// Set the size
setSize(620, 535);
// Centre window on screen
setLocation(new Point((screenDimension.width - 600) / 2, (screenDimension.height - 535) / 2));
//Search button
JButton refineButton = new JButton("Refine");
//Back button
JButton homeButton = new JButton("Home");
//Exit button
JButton exitButton = new JButton("Exit");
//Results Table
JTable resultsTable = new JTable();
resultsTable.doLayout();
//Table's Scroll Pane
JScrollPane tableScrollPane = new JScrollPane(resultsTable);
tableScrollPane.setPreferredSize(new Dimension(520, 290));
//Number of Results
JLabel numberOfResults = new JLabel("0 results found.");
SpringLayout layout = new SpringLayout();
getContentPane().setLayout(layout);
layout.putConstraint(SpringLayout.SOUTH, homeButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, homeButton, 10, SpringLayout.WEST, getContentPane());
layout.putConstraint(SpringLayout.WEST, exitButton, 10, SpringLayout.EAST, homeButton);
layout.putConstraint(SpringLayout.SOUTH, exitButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.SOUTH, refineButton, -10, SpringLayout.SOUTH, getContentPane());
layout.putConstraint(SpringLayout.EAST, refineButton, -10, SpringLayout.EAST, getContentPane());
layout.putConstraint(SpringLayout.NORTH, tableScrollPane, 10, SpringLayout.NORTH, getContentPane());
layout.putConstraint(SpringLayout.WEST, tableScrollPane, 50, SpringLayout.WEST, getContentPane());
layout.putConstraint(SpringLayout.EAST, numberOfResults, 0, SpringLayout.EAST, tableScrollPane);
layout.putConstraint(SpringLayout.NORTH, numberOfResults, 5, SpringLayout.SOUTH, tableScrollPane);
getContentPane().add(tableScrollPane);
getContentPane().add(refineButton);
getContentPane().add(homeButton);
getContentPane().add(exitButton);
getContentPane().add(numberOfResults);
public static void main(String[] args) throws IOException
JFrame result = new resultsFrame();
result.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
result.show();
}
Similar Messages
-
How to change Service Item using BAPI_ENTRYSHEET_CREATE.
Hi All,
There's a requirement for me to upload/ Create Entry Sheet using BAPI_ENTRYSHEET_CREATE from the source file.
The Header was given to me but the Service Item, they would like the flexibility to change the existing lines that was adopted from ML81N.
Eg of the file.
Header given:-
PO NO
Po Item
Short Text
Ext Entry Sheet No
Service Location
Period Start
Period End ....n so on
Service Item given:-
Service Line (Extrow)
Service Order Qty (Memge)
Ext Service No (EXTSRVNO)
The objective of this file is
1) Create Service Entry Sheet (using Header)
2) Adopt the Service Item
3) Change Service Item (using Service Item)
Could anyone guide me how to do it? If Using BAPI_ENTRYSHEET_CREATE...is actually creating it with full details of the upload file. but given to me, t requrement is they would like to create n change the item.
Appreciates your help.
Thank you.
Regards,
Sheena WeeHi ,
If you are trying to test the FM through TCode SE37 then it will not give you the desired output.Do one thing create a test program and there you call the FM with your data.I hope in this way you can solve the issue.
Regards,
Sarbajit. -
Not able to process open items using F-53
Hello All,
I am trying to process open items using F-53, I m getting error message as "Entry SAG1 is missing in table T043G". This was working fine for GL accounts, but failing for vendors.
I checked the tolerance group for same and its fine and also tried checking table se16, but not able to find the root cause of issue. please let me know how can i resolve this.
Thanks in advance.
--SagarHI,
Check following...
1. Make sure you have created one null (Blank) tolrance group using transaction OBA3 for your company code SAG1...
2. If you do not want to create null tolerance group then make sure you have mapped the tolerance group created to the customer master and also see the use assignment...
Regards,
Chintan Joshi -
I have an HP photosmart 2610 4 in1. How can I scan multiple items and put them in the same attachment using e-mail? Using my laptop.
Hi @needyrhelp,
Welcome to the HP Forums!
I see that you are wondering how to scan multiple items using your HP photosmart 2610 and for them to be able to be in one attachment in your e-mail. I am happy to look into this for you!
Please see the how to scan guide for the Operating System you are using. Here is the list of how to scan guides, Scan. Select your Operating System from the list, then select How to scan with HP software, then How to scan a multi-page original text document into a single file. You will need to scan each page one at a time, and add it to the same document. The how to scan guide will show you how. After done scanning to the file, then see the link for How to attach a scan to an email.
If you do not know the Operating System you are using, please visit this website. Whatsmyos.
Hope this information is helpful, and thank you for posting!
RnRMusicMan
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" to say “Thanks” for helping! -
Error while receiving Item using MB1C.
I get the following error message while receiving Item using T-Code MB1C.
Accounting Data not yet maintained for Material NPPL 2707.
Not sure which setup is missing. Can somebody please help?Dear Nitesh Patil,
After we do a posting, the changes need to be reflected in FI and since your material master does not contain the accounting 1 and accounting 2 views you are getting this problem.
To rectify, go to MM01 > give the same material name for which you are getting this problem > select accounting 1 and 2 views and fill up the required data.
Hope this helps.
Thanks
Murtuza -
Add Multiple Detail Items Using the Same Query String Parameter
I am using InfoPath 2010 and SharePoint 2010.
I have 2 forms libraries - Expense and Expense Details.
The 2 libraries are linked via a custom site column Expense ID.
The Expense form contains the main header type info you would typically find on an expense report; e.g., name, purpose, department, etc.
The Expense Details form contains multiple detail expenses related to the main expense report such as airfare, rental car, etc.
I have created a page that displays an expense report with all of the related expense detail items.
The page contains a link to add a new expense detail and passes the Expense ID of the Expense form to the Expense Detail form.
This all works fine. The problem comes in after the first expense detail form is submitted.
I can successfully submit the first detail item. However, the expense detail form loses the Expense ID that was passed to it after the first expense detail form has been submitted.
The parameter still shows in the URL but the detail form no longer shows the value of the parameter.
What do I need to do in order to be able to add multiple expense detail items using the same Expense ID that was passed to the form?
I have tried using a Submit Behavior of Open a new form, Close the form, and Leave the form open.
None of these options give me what I need. Thanks for your help.
pamLaura Rogers Blog
In case anyone stumbles upon this looking for an answer. Laura Rogers has the answer found in the comments section of her blog above. It’s not the best but it
does work. You have to add an extra Info Path Web Form for it to work. I know, you can roll your eyes.<o:p></o:p>
Steps.<o:p></o:p>
1. Add Query String<o:p></o:p>
2. Add the extra Info Path form to the page. This form will be a hidden on the page and will receive the value from the query string.<o:p></o:p>
3. Add your original Info Path form and have it receive a parameter from the hidden Info Path form.<o:p></o:p>
Now, when you hit save and it opens a new form the 3 Info Path form will function properly. <o:p></o:p> -
How to populate an application item using ONCHANGE.
I am trying to populate an application item, TAB_INSTATE using an onchange command. I cannot figure out how to do it. Does anyone know the syntax, or can you point me in the right direction. I am unfamiliar with javascript and have been relying on previous examples, posts. thanks
apex_item.select_list_from_query
(20,
c020,
'select partner_name, partner_abbrev
from partners
where state_code is not null order by partner_name ',
'style="width:100px"'
|| 'onchange="'
|| CASE
WHEN :p300_authorization1 = 1
THEN 'f_set_casc_area(this,f21_'
|| LPAD (seq_id, 4, '0')
|| ');'
ELSE
<THIS IS WHERE I WOULD LIKE A THE VALUE OF c020 TO BE PLACED INTO :TAB_INSTATE>
END
|| 'f_set_casc_subarea(this,f22_'
|| LPAD (seq_id, 4, '0')
|| ')"',
'YES',
'0',
'- Select State -',
'f20_' || LPAD (seq_id, 4, '0'),
NULL,
'NO'
) in_state,Hello Karen,
>> I am trying to populate an application item, TAB_INSTATE using an onchange command.
I believe I answered you in here - Re: once more...4 cascading LOVs, 3rd is hidden 4th no longer works However, for future reference…
You don’t have a direct access to an application item, using JavaScript, because application items don’t render on page. You can, however, using the AJAX framework to do that, using the add() method. The generic code I’m using is the following:
<script type=”text/JavaScript”>
function setSessionValue(pItem, pValue) {
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,null,0);
get.add(pItem, pValue);
get.get();
get = null;
</script>This code can set any page or application item value.
Regards,
Arie. -
Hi All,
Can anybody give me a clear concept of line items used in Infocube. I want to know what is the concept behind using the line items. How does it effect the performance of a Infocube.
Regards,
KshitijHi,
go throught the link, you will get a clear idea.
http://help.sap.com/saphelp_nw2004s/helpdata/en/a7/d50f395fc8cb7fe10000000a11402f/frameset.htm
rgrds,
v.sen. -
How to show two items using $f_Show_On_Value_Item_Row
Hi,
I have a select list with values with Yes, No and two items(1 check box, 1 text field) below it.
I want to show two items if i select 'Yes' in select list.
I am able to show/hide one item using onchange="$f_Show_On_Value_Item_Row(this,'P1_A_EMAIL_PERS_REQ','Yes');"
How can i pass two items to this function.
Thanks for ur help in advance
Regards,
RamRam,
Rather than putting the call to $f_Show... inline with the onchange handler, create a separate function and call that function does the work and call that function instead. See this thread for some more details:
Problem when calling more than 1 Javascript function
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen -
Adding a new schedule line for a line item using bapi_po_change
hi experts,
can i know how to add a new schedule line for a line item using<u> bapi_po_change</u>. what are the parameters that need to be filed. i filled poitem with total quantities and poschedule table with 2 different schedule lines and passing as the parameter.but then i get the error saying item 0000 doesnt existHi,
Please check if you have properly populated the following fields in POSCHEDULE:
PO_ITEM
SCHED_LINE
and the other fields required for your schedule line such as delivery date and quantity, etc.
After that, make sure to properly populate fields in POSCHEDULEX:
PO_ITEM -> same value as found in POSCHEDULE
SCHED_LINE -> same value as found in POSCHEDULE
All other values populated in POSCHEDULE should be ticked as 'X' in POSCHEDULEX.
Kind Regards,
Darwin
Kind Regards,
Darwin -
Error Add Item using DI API 2007 B
Sirs,
I gettin a error on add a item using a follow code:
If m_Item.GetByKey('100') = True Then
m_Item.ItemType = ItemTypeEnum.itItems
m_Item.ItemsGroupCode = 1
m_Item.ItemClass = ItemClassEnum.itcMaterial
'This line ocorred a error 'oToBP.ItemClass = {"Property 'ItemClass' of 'Item' is invalid"}
lErrorCode = m_Item.Update()
Else
lErrorCode = 1
End If
Please,
I'm waiting a urgent response .
Great.
Fábio NascimentoFabio,
In 2007 A the ItemsgroupCode start at 100 and not 1.
Perhaps this is your problem.
Christophe -
Material BOMs with document items using RCSBI010
Has anyone uploaded material BOMs with document items using RCSBI010? I set the item category to D, but receive an error in LSMW when I attempt to convert the data. The error specifies that the document items are not valid material numbers. They are not material numbers. They are document info records.
Found the problem. The document number was being mapped to BOM Component IDNRK instead of document number DOKNR.
-
How to update 500 list items using Rest API
Hi All,
i have requirement that is "required to update 500 list items using rest Api".
how can i do it,please share your thoughts with me.
Thanks,
Madhu.Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development -
How to add new line item using BAPI BAPI_CONTRACT_CHANGE for contract-ME32K
HI Experts,
how to add new line item using BAPI: BAPI_CONTRACT_CHANGE for existing contract.
Requirement:
Already the contract having two line items using ME31K.
Custom program has to add new line items in existing contract.
Thanks,
SendilI got the solution:
We can do like this:
1. Get all details using details, BAPI_CONTRACT_GETDETAIL.
2. After getting results, append new line item. Then use your BAPI.
Check this posting program.. where this bapi is used, use the same coding technique.
IDOC_INPUT_PURCONTRACT_CHANGE -
Setting value of an item using item_id
howdy,
You know when you set value of a text or display item using its name, ie:
:block_name.item_name := 'abc';
Well, I would like to do the same, but using its item_id.
Can it be done?
The reason behind it is that, I have 50 text items on canvas. They all follow some naming convention, and I would like to set their values in some elegant loop, rather than writing a page-long code referencing their :block_name.item_name.
thanks and kind regards
mz.Would the COPY built-in work for you? For example 50 items called genericItem1, genericItem2, ...
for i in 1..50 loop
COPY('new value', 'block.genericItem' || to_char(i));
end loop;
Regards,
Candace Stover
Forms Product Management
Maybe you are looking for
-
Open multiple indd docs through SDK
Hi guys How can I open multiple indesign documents found in a folder chosen through a folder chooser? I need to open each indesign doc in that folder and do some modification on each. Here is what I have already written. Now how do I proceed please S
-
Calendar won't start after install Mountain Lion
After I upgraded my OSX Lion tot Mountain Lion I can't open my calendar. When I try to open it it's starts to blink but that's all. Nothin happens. I reinstalled ML but the problem stays. Does anybody know a solution?
-
Problem in getting HR data .... in declaring Infotype 9205
i want to save some HR data using an FM so i am calling FM HR_infotype_operation in my method this require a 4 char infotyp as exporting parameter which I have to declare using INFOTYPES statement inside the method the issue is the environment is not
-
Renaming files in the Bin ?
This question concerns renaming a file when duplicated 4-5 times. The footage is about 5 minutes long and I would like to use 45 seconds, 30 seconds, 15 seconds, etc...from the same file. I duplicated the file; however, I can't rename it...all of the
-
Checkbox = true based on textbox
I am new to Adobe Live Cycle, my background is in SQL and Access. I have a form in Adobe that is linked using a DSN to an Access dbf and it is working fine. The end user clicks on a submit button and the data is then in the dbf. The form is a Chec