Inventory Implementation
Hi ,
I am implementing the Inventory. Its 7x flow.I am good with all most every steps. I am having issues with activating the transformations.
I am getting error while i am activating the BF and UM transformations. The error is...
Start Routine: Syntax error in routine
Rule (target: 0GN_VENDOR, group: 01 Standard Group): Syntax error in routine
Rule (target: 0GN_VENDOR, group: 02): Syntax error in routine
Then I checked the Info object 0GN_VENDOR. Yes, it was installed perfectly.
Does any one have any solution or is there any note to implement.
Plz advise..
Regards...KP
Hi ..
Here is the full code....
METHOD compute_0GN_VENDOR.
IMPORTING
request type rsrequest
datapackid type rsdatapid
SOURCE_FIELDS-STOCKCAT TYPE /BI0/OISTOCKCAT
SOURCE_FIELDS-VENDOR TYPE /BI0/OIVENDOR
SOURCE_FIELDS-GN_R3_SSY TYPE /BI0/OIGN_R3_SSY
EXPORTING
RESULT type tys_TG_1-GN_VENDOR
DATA:
MONITOR_REC TYPE rsmonitor.
$$ begin of routine - insert your code only below this line -
Data:
l_monitor TYPE STANDARD TABLE OF rsmonitor,
COMM_STRUCTURE type tys_SC_1__RULE_11,
l_subrc type sy-tabix,
l_abort type sy-tabix,
Ls_monitor type rsmonitor,
ls_monitor_recno type rsmonitors.
REFRESH:
MONITOR.
Runtime attributs
SOURCE_SYSTEM = p_r_request->get_logsys( ).
MOVE-CORRESPONDING SOURCE_FIELDS to COMM_STRUCTURE.
Migrated update rule call
Perform routine_0041
TABLES
l_monitor
USING
COMM_STRUCTURE
CHANGING
RESULT
l_subrc
l_abort.
*-- Convert Messages in Transformation format
LOOP AT l_monitor INTO ls_monitor.
move-CORRESPONDING ls_monitor to MONITOR_REC.
append monitor_rec to MONITOR.
ENDLOOP.
IF l_subrc <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
IF l_abort <> 0.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
Regards...KP
Similar Messages
-
hello there i am trying to define a new inventory organization. i have created inventory organization. i opened organization parameters and in the inventory parameters tab, when i tried to enter calendar, it is saying list of values has no entries. it is giving following error:
frm-41830: list of values contains no entries.
please help me
tommy.It seems that you don't define a work calender and build it. see the document
http://www.google.com.hk/url?sa=t&rct=j&q=Oracle+inventory++Implementation+Guide&source=web&cd=1&cad=rja&ved=0CCsQFjAA&u… -
I am so lost with Part 1 of the Inventory Program for my Java class. I am receiving an error and cannot figure out where it is comming from. The assignment is to:
Choose a product that lends itself to an inventory (for example, products at your
workplace, office supplies, music CDs, DVD movies, or software).
� Create a product class that holds the item number, the name of the product, the number
of units in stock, and the price of each unit.
� Create a Java application that displays the product number, the name of the product, the
number of units in stock, the price of each unit, and the value of the inventory (the
number of units in stock multiplied by the price of each unit). Pay attention to the good
programming practices in the text to ensure your source code is readable and well
documented.
Here is the code I have so far:
import java.util.Scanner; // program uses class Scanner
public class Inventory
private static void Quit()
System.out.println("Goodbye");
System.exit (0);
// main method begins execution of Java application
public static Void main (String args [] )
// create Scanner to obtain input from command window
Scanner input = new Scanner(System.in);
Product Prod = new Product();
System.out.printf (Prod.toString () );
System.out.print("\nEnter Prod Name (stop to quit): "); // prompt for name
Prod.setName(input.nextLine()); // get name
if(Prod.getName().compareToIgnoreCase("stop") == 0)
System.out.println("Stop entered, Thank you");
Quit();
} //end if
System.out.print("Enter Prod number for " + Prod.getName() + ": "); // prompt
Prod.setitemNum(input.nextLine()); // read Prod number from user
System.out.print("Enter Units on hand: "); // prompt
Prod.setunits(input.nextDouble()); // read second number from user
if(Prod.getunits() <= 0)
System.out.println ("Invalid amount, Units on hand worked must be positive");
System.out.print("Please enter actual units on hand: ");
Prod.setunits(input.nextDouble());
} //end if
System.out.print("Enter Unit Price: $ "); // prompt
Prod.setprice(input.nextDouble()); // read third number from user
if(Prod.getprice() <= 0)
System.out.println ("Invalid amount, Unit Price must be positive");
System.out.print("Please enter actual unit price: $ ");
Prod.setprice(input.nextDouble());
} //end if
String fmtStr = "\n%-7s %-10s %12s %12s %12s\n";
System.out.printf(fmtStr, "Prod #", "Prod Name",
"Units On Hand", "Unit Cost", "Total Cost");
for(int i = 0; i<5; i++);
string Product[] prodArray = new string[5]; *******************
//Prod[] myArray = new Prod[5]; // allocates memory for 5 strings
prodArray[0] = "Book"; // initialize first element
prodArray[1] = "Mag"; // initialize second element
prodArray[2] = "Hat"; // etc.
prodArray[3] = "Scarf";
prodArray[4] = "Rain Gauge";
System.out.println("Element at index 0: " + prodArray[0]);
System.out.println("Element at index 1: " + prodArray[1]);
System.out.println("Element at index 2: " + prodArray[2]);
System.out.println("Element at index 3: " + prodArray[3]);
System.out.println("Element at index 4: " + prodArray[4]);
}//end for
}//end while
} //end main
}// end class Inventory
// Class Product holds Product information
class Product
private String name;
private String itemNum;
private double units;
private double price;
//default constructor
public Product()
name = "";
itemNum = "";
units = 0;
price = 0;
}//end default constructor
//Parameterized Constructor
public Product(String name, String itemNum, double units, double price)
this.name = name;
this.itemNum = itemNum;
this.units = units;
this.price = price;
}//end constructor
public void setName(String name) {
this.name = name;
String getName()
return name;
public void setitemNum ( String itemNum )
this.itemNum = itemNum;
public String getitemNum()
return itemNum; }
public void setunits ( double units )
this.units = units;
public double getunits()
return units;
public void setprice ( double price )
this.price = price;
public double getprice()
return price;
public double getvalue()
return (units * price);
}//end Class Product
I am receiving an error on Line 61 ( I have place a few asterisks beside it). The error says inventory.java:61: ';' expected string Product[] prodArray = new string[5]
Does anyone have an idea what I am doing wrong.I reformatted the code and put it inside code tags to retain formatting, anywhere there is a comment, take a pause and compare it to your original to see the differences. Any questions don't hesitate to post them.
import java.util.Scanner;
public class Inventory implements Runnable{
private Product[] prodArray = new Product[5];
public Inventory() {
int arraySize = 5;
prodArray = new Product[arraySize];
//the for loop did not make sense, since you were loading each object with different information.
//This is an array of Product Objects
//anything between two double quotes is a String literal
//essentially an Object of type String
//Use your setter methods in the Product class to set the properties of each "new" Product Object.
//Or use the Parameterized version of your constructor to set the variables inside each "new" object
//everytime you use the "new" keyword you get a brand spanking new object
prodArray[0] = new Product();//"Book"; // initialize first element
//Since you use an empty constructor none of the variable in your Product object have the values you want.
//Set them after you create your object and assign it to the array.
prodArray[0].setName("Book");
//prodArray[0].setprice(0.00);
//etc...
prodArray[1] = new Product();//"Mag"; // initialize second element
prodArray[1].setName("Mag");
prodArray[2] = new Product();//"Hat"; // etc.
prodArray[2].setName("Hat");
prodArray[3] = new Product();//"Scarf";
prodArray[3].setName("Scarf");
prodArray[4] = new Product();//"Rain Gauge";
prodArray[4].setName("Rain Gauge");
//You never override the toString() method of Product to your output will be the String representation of the
//Object's reference.
//I have overidden the toString() method of Product for you using your format, look at it closely.
System.out.println("Element at index 0: " + prodArray[0]);
System.out.println("Element at index 1: " + prodArray[1]);
System.out.println("Element at index 2: " + prodArray[2]);
System.out.println("Element at index 3: " + prodArray[3]);
System.out.println("Element at index 4: " + prodArray[4]);
public void run() {
showHeader();
//You never set the name of the Product here and toString doesn't return anything you want to see.
Scanner input = new Scanner(System.in);
Product prod = new Product();
//This show nothing we want to see, try overriding the toString() method in the Product class if you
//want to see a specific variable of the Product class displayed with the toString() method.
// System.out.printf (prod.toString () );
String inputString;
int inputInt;
double inputDouble;
while( true ) {
//Don't set invalid data into your Product Object, check to see if it meets your criteria first and then
//set it.
System.out.print("\nEnter prod Name (stop to quit): "); // prompt for name
inputString = input.nextLine();
if( inputString.compareToIgnoreCase("stop") == 0 ) {
System.out.println("Stop entered, Thank you");
quit();
} else {
prod.setName(input.nextLine()); // get name
System.out.print("Enter prod number for " + prod.getName() + ": "); // prompt
prod.setitemNum(input.nextLine()); // read prod number from user
System.out.print("Enter Units on hand: "); // prompt
inputInt = input.nextInt(); // read second number from user
//to do this check, put your input into a loop, not an if statement.
//and get an integer from the Scanner not a double, doubles are not precise and cannot be checked
//consistently with a loop or if condition
while ( inputInt <= 0) {
System.out.println ("Invalid amount, Units on hand worked must be positive");
System.out.print("Please enter actual units on hand: ");
inputInt = input.nextInt();
prod.setunits( inputInt );
//There are better ways to store currency such as an integer, but there are a lot of conversion you need to do
// to display them, so just use double for now.
System.out.print("Enter Unit Price: $ "); // prompt
inputDouble = input.nextDouble(); // read third number from user
//while loop here as well and you don't want your products to be $0.00 do you?
while ( inputDouble < 0.01) {
System.out.println ("Invalid amount, Unit Price must be positive");
System.out.print("Please enter actual unit price: $ ");
prod.setprice(input.nextDouble());
} //end if
prod.setprice( inputDouble );
System.out.println( prod.toString() );
//You never store the input from the user consider implementing an ArrayList
private void showHeader() {
String fmtStr = "\n%-7s%-10s%12s%12s%12s\n";
System.out.printf(fmtStr, "prod #", "prod Name", "Units On Hand", "Unit Cost", "Total Cost");
private void quit() {
System.out.println("Goodbye");
System.exit (0);
//Void is not the same as the reseerved word "void"
//Be sure you watch your capitalizations, all Java reserved words (void, public, static, etc.) are lowercase
public static void main (String args [] ) {
//Create an object of type inventory
Inventory i = new Inventory();
//start the run method of that object;
i.run();
* Class Product holds Product information
class Product {
private String name;
private String itemNum;
private int units;
private double price;
* Constructor
public Product() {
//To save space and your sanity you could initialize these variables when they're declared like this.
// private String name = "";
name = "";
//private String item = ""; etc.
itemNum = "";
units = 0;
price = 0;
* Constructor
* @param name
* @param itemNum
* @param units
* @param price
public Product(String name, String itemNum, int units, double price) {
this.name = name;
this.itemNum = itemNum;
this.units = units;
this.price = price;
public void setName(String name) {
this.name = name;
//This method because it does not have the public keyword is now Package private,
// it cannot be used outside the current Package.
String getName() {
return name;
public void setitemNum( String itemNum ) {
this.itemNum = itemNum;
public String getitemNum(){
return itemNum;
//Try to be consistent with your variable and method names, they should start with lower case and each subsequent
//word should be capitalized like this
//public void setUnits( double units ) {
public void setunits( int units ) {
this.units = units;
public double getunits() {
return units;
public void setprice ( double price ) {
this.price = price;
public double getprice() {
return price;
public double getvalue() {
return (units * price);
public String toString() {
String fmtStr = "%-7s%-10s%12d%12.2f%12.2f";
return String.format(fmtStr, itemNum, name, units, price, getvalue() );
} -
SMI error on Web UI of SNC 5.1
Dear experts,
I'm working on SMI (Supplier Managed Inventory) implementation with SAP SNC 5.1. I'm trying to do a demo on SNC.
At moment I have:
1) Created our set of master data.
2) Configured the CIF communication to send from ECC to SNC the maser data: Material, Plant/Location, Vendor/Location, Contract.
3) Sent successfully the Master data from ECC to SNC according to the CIF communication defined before.
4) Configured Partner Profile in ECC.
5) Created a Business Partner in SNC.
6) Created a Transportation Line in SNC.
7) Created a demand in ECC.
8) Sent successfully the demand from ECC to SNC through PI (by PROACT and related XML).
9) I have approached the portal on Web User Interface where the Vendor creates the Replenishment Plan (SMI Monitor details), here I can see the material, the plant but there is an error with display of demand.
Here the error message is:
Time series error in class /SCF/CL_ICHDM_DATAAXS method /SCF/IF_ICHDMAXS_2_CNTL~SELECT
Planning object structure 9AINVM1 was not found
I have seen and implemented the customization of OSS note 1019289 but the error is still there.
I'm going crazy to solve it. Could you please help me?
Thank you very much in advance for your support.
Nicola
Edited by: PTP Team Accenture on Jul 11, 2011 9:57 PMHello Nicola,
To activate Planning object structure 9AINVM1 go to transaction code:/N/SCA/TSDM09 select inactive Times series data type INVM1(Note there will be 2 INVM1 time series data type one with active check box checked and second with uncheck check box select the second one uncheck INVM1).
Select Active planning Object structure and execute.
If you are still getting same problem then checkout the SAP note 1143456.
Regards,
Nikhil -
I need to create first, last, next, and previous buttons in my gui. I have them in there (in the code), but only one button shows up (instead of four), and it has "first" overlapped with the "previous" button. The "next" and "last" don't even show up at all.
Can some one guide me please? Can someone tell me what I am doing wrong?? Thank you in advance
Here is my maker.java which houses the navigation panel
package inventorymain;
import javax.swing.JFrame;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.text.NumberFormat;
import javax.swing.border.*;
import java.net.*;
import java.util.StringTokenizer;
class Maker extends Inventory implements ActionListener
{//begins Class Maker
static String manufact[] = new String[10];
static double restockingFee[] = new double[10];
static int i;
static double TotalVal;
static int navItem;
private Container cp = getContentPane();
GridBagConstraints c;
GridBagConstraints cconstraint;
Border titledborder;
JPanel pan;
String labels[] = {"Product Name:", "Manufacturer:", "Product ID Number:", "Units in Stock:",
"Price Per Unit: $", "Restocking Fee: $", "Value of Product in Stock Plus Restocking Fee: $",
"Value of All Merchandise Plus Restocking Fees: $"};
int len1 = labels.length;
JLabel lbl[] = new JLabel[len1];
JTextField txtfield1[] = new JTextField[len1];
String blabels[] = {"First", "Previous", "Next", "Last"};
int blen = blabels.length;
JButton navigate[] = new JButton[blen];
JLabel lblImg;
File file;
public String FileName;
public Maker(int Item_Number, String Item_Name, double Item_Price, int Items_in_Stock, String manufact, double restockingFee)// Constructor for varibles
super(Item_Number, Item_Name, Item_Price, Items_in_Stock);
this.manufact[i] = manufact;
this.restockingFee[i] = restockingFee;
i = i + 1;
public static void setManufact(int k, String value)
manufact[k] = value;
public static double getRestockFee(int val)
return restockingFee[val];
public void ShowInventory()
setLayout(new FlowLayout());
GridBagLayout contlayout = new GridBagLayout();//layout for container
GridBagConstraints cconstraint = new GridBagConstraints();//constraint for container
GridBagLayout gblayout = new GridBagLayout();//layout for panel
GridBagConstraints gbconstraint = new GridBagConstraints();
try
//first panel
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
for (int i = 0; i < 2; i++)
for (int j = 0; j < len1; j++)
int x = i;
int y = j;
if (x == 0)
lbl[j] = new JLabel(labels[j]);
lbl[j].setHorizontalAlignment(JLabel.LEFT);
lbl[j].setPreferredSize(new Dimension(250, 15));
gbconstraint.insets = new Insets(10, 0, 0, 0);
gbconstraint.gridx = x;
gbconstraint.gridy = y;
pan.add(lbl[j], gbconstraint);
}//end if
else
txtfield1[j] = new JTextField(15);
txtfield1[j].setPreferredSize(new Dimension(300, 15));
txtfield1[j].setHorizontalAlignment(JLabel.LEFT);
txtfield1[j].setEnabled(false);
lbl[j].setLabelFor(txtfield1[j]);
gbconstraint.gridx = x;
gbconstraint.gridy = y;
pan.add(txtfield1[j], gbconstraint);
}//end else
}//end for
}//end for
Border titledborder = BorderFactory.createTitledBorder("Current Inventory Data");
pan.setBorder(titledborder);
//adds panel to container
cconstraint.gridwidth = 1;
cconstraint.gridheight = 1;
cconstraint.gridx = 0;
cconstraint.gridy = 0;
cp.add(pan, cconstraint);
//add icon to display
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
gbconstraint.gridwidth = 1;
gbconstraint.gridheight = 1;
gbconstraint.gridy = 0;
lblImg = new JLabel((new ImageIcon(getClass().getResource("logo111.jpg"))));
lblImg.setPreferredSize(new Dimension(120, 60));
pan.add(lblImg);
cconstraint.gridwidth = 1;
cconstraint.gridheight = 1;
cconstraint.gridx = 0;
cconstraint.gridy = 1;
cp.add(pan, cconstraint);
//navigation panel
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
gbconstraint.gridwidth = 1;
gbconstraint.gridheight = 1;
gbconstraint.gridx = 0;
gbconstraint.gridy = 1;
for (int i = 0; i < blen; i++)
navigate[i] = new JButton(blabels);
gbconstraint.gridx = 1;
pan.add(navigate[i], gbconstraint);
navigate[i].addActionListener(this);
}//end for
titledborder = BorderFactory.createTitledBorder("Navigation");
pan.setBorder(titledborder);
//add panel to container
cconstraint.gridwidth = 4;
cconstraint.gridheight = 1;
cconstraint.gridx = 1;
cconstraint.gridy = 1;
cp.add(pan, cconstraint);
ShowInventory(0);
}//end try
catch (Exception e)
e.printStackTrace();
}//end catch
}//end showInventory
public void ShowInventory(int ItemNo)
txtfield1[0].setText(Integer.toString(ItemNo));
txtfield1[0].setText(Inventory.getItemName(ItemNo));
txtfield1[1].setText(manufact[ItemNo]);
txtfield1[2].setText(Integer.toString(Inventory.getItemNum(ItemNo)));
txtfield1[3].setText(Integer.toString(Inventory.getItemUnits(ItemNo)));
txtfield1[4].setText(Double.toString(Inventory.getItemPrice(ItemNo)));
txtfield1[5].setText(String.format("%3.2f",
Products.totalOfRestockFee(Inventory.getItemPrice(ItemNo),
getRestockFee(ItemNo))));
txtfield1[6].setText(String.format("%3.2f",
Products.totalOfInventory(Inventory.getItemPrice(ItemNo),
Inventory.getItemUnits(ItemNo), getRestockFee(ItemNo))));
txtfield1[7].setText(String.format("%3.2f",
GetTotalInvVal()));
}//end ShowInventory(int ItemNo)
public void EnableFields(boolean bflag)
txtfield1[1].setEnabled(bflag);
txtfield1[2].setEnabled(bflag);
txtfield1[3].setEnabled(bflag);
txtfield1[4].setEnabled(bflag);
txtfield1[5].setEnabled(bflag);
}//end EnableFields
public double GetTotalInvVal()
TotalVal = 0;
for(int j = 0; j < Inventory.getCount(); j++)
TotalVal += Products.totalOfInventory(Inventory.getItemPrice(j),
Inventory.getItemUnits(j), getRestockFee(j));
return TotalVal;
}//end GetTotalInvVal
public void actionPerformed(ActionEvent e)//button actions
String btnClicked = ((JButton)e.getSource()).getText();
if (btnClicked.equals("First"))
EnableFields(false);
navItem = 0;
ShowInventory(navItem);
}//end if
if (btnClicked.equals("Next"))
EnableFields(false);
if (navItem == getCount() - 1)
navItem = 0;
}//end if
else
navItem += 1;
}//end else
ShowInventory(navItem);
}//end if
if (btnClicked.equals("Previous"))
EnableFields(false);
if (navItem == 0)
navItem = getCount() - 1;
}//end if
else
navItem = navItem - 1;
}//end else
ShowInventory(navItem);
}//end if
if (btnClicked.equals("Last"))
EnableFields(false);
navItem = getCount() - 1;
ShowInventory(navItem);
}//end if
}//end ActionPerformed
}// end of class Makerfor (int i = 0; i < blen; i++)
navigate[i] = new JButton(blabels);
gbconstraint.gridx = 1; // ---- > You mean for this be = i, No?
// Somehow you need to be resetting the grid x for each button added
pan.add(navigate[i], gbconstraint);
navigate[i].addActionListener(this);
}//end for
Or check out gridx = GridBagConstraints.RELATIVE
Message was edited by:
nantucket -
Unable To Reserve Lots that are Expiring Later on the Current Date
Hi Guru's,
An item has an expiry date of 12-APR-2015 23:59:59.But it got expired, from 12-APR-2015 00:00:00 the lot shows an (Available To Reserve) ATR as 0 on the Onhand Availability , although the onhand quantity and Available To Transact (ATT) show the quantity.As per expiration date expiration of lots should starts from the date stamped on it and the timestamp doesn't really play a role.
Seen the note: Unable To Reserve Lots that are Expiring Later on the Current Date through Auto Detailing get Error of Could not Query Reservations (Doc ID 1193423.1).
But the solution provided is confusing, as in a R12.1.3 inventory implemented environment we cannot find the options to set picking rules with Lot --> Exp Date >= Expression --> Trunc(sysdate).It would be great if any body can let me know the solution.
Rgds,
Sri.Hello,
InContext Editing does no longer support HTTP authentication method, as the release notes state. As a result, users will not be able to edit sites, folder or pages that are password protected.
Currently we do not have a workaround for this issue and we recommend removing the password protection. The issue has been added on our feature list but we do not have a proposed timeframe to fix it.
Thank you,
Florin -
Here is my InventoryMain.java, Inventory.java, and Maker.java.
I am having trouble with my constructors in Maker.java. Here is the line (this line is at the bottom of my Maker.java)
Maker r = new Maker(txtfield1[1].getText(),txtfield1[4].getText(), 0.05, Integer.parseInt(txtfield1[2].getText()), txtfield1[3].getText(), Integer.parseInt(txtfield1[5].getText()),
Double.parseDouble(txtfield1[6].getText()));here is my error when compiling:
symbol : constructor Maker(java.lang.String,java.lang.String,double,int,java.lang.String,int,double)
location: class inventorymain.Maker
Maker r = new Maker(txtfield1[1].getText(),txtfield1[4].getText(), 0.05, Integer.parseInt(txtfield1[2].getText()), txtfield1[3].getText(), Integer.parseInt(txtfield1[5].getText()),
1 error
BUILD FAILED (total time: 0 seconds)
I have tried all kinds of different orders trying to match my constructors for Inventory(). Nothing seems to work. Can anyone help????
InventoryMain.java
package inventorymain;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
import javax.swing.JFrame;
public class InventoryMain
// main method begins execution of java application
public static void main(String[] args)
//variables
double restockFee = 0.05;
//create array for products in inventory
//enter elements into array
Maker p = new Maker( 5186521, "pens", 1.59, 346, "Bic", restockFee);
Maker q = new Maker( 9486452, "pencils", .59, 487,"Mead", restockFee);
Maker r = new Maker( 6317953, "markers", 1.29, 168,"Sharpie", restockFee);
Maker s = new Maker( 5152094, "paperclips", 1.19, 136,"Dennison", restockFee);
Maker t = new Maker( 4896175, "glue", .79, 72,"Elmer's", restockFee);
Maker u = new Maker( 5493756, "tape", .49, 127,"3m", restockFee);
Maker v = new Maker( 6537947, "paper", 1.79, 203,"Mead", restockFee);
Maker w = new Maker( 7958618, "staples", 1.19, 164,"Pentech", restockFee);
Maker x = new Maker( 5679139, "folders", .49, 238,"Mead", restockFee);
Maker y = new Maker( 7689110, "rulers", .17, 123,"Stanley", restockFee);
p.ShowInventory();
p.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
p.setVisible(true);
p.setSize(520, 490);
}//end main
}//end class Inventory____________________________
Inventory.java
package inventorymain; //file assigned to inventorymain package
import javax.swing.JFrame;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.text.NumberFormat;
import javax.swing.border.*;
import java.net.*;
import java.util.StringTokenizer;
public class Inventory extends JFrame
// set variables
private Container cp = getContentPane();
private static int itemNum[] = new int[100];
private static String name[] = new String[100];
private static int units[] = new int[100];
private static double price[] = new double[100];
private static int i = 0;
public Inventory()
setLayout(new FlowLayout());
public Inventory(int _itemNum, String _name, double _price, int _units)//varibles for constructor
itemNum[i] = _itemNum;//variable initialized
name[i] = _name;//variable initialized
units[i] = _units;//variable initialized
price[i] = _price;//variable initialized
i = i + 1;
// All setters and getters
public static int getItemNum(int k)
return itemNum[k];
public static String getItemName(int k)
return name[k];
public static int getItemUnits(int k)
return units[k];
public static double getItemPrice(int k)
return price[k];
public static void setItemNum(int k, int value)
itemNum[k] = value;
public static void setItemName(int k, String value)
name[k] = value;
public static void setItemUnits(int k, int value)
units[k] = value;
public static void setItemPrice(int k, double value)
price[k] = value;
public static void DeleteItem(int k)
for(int j=k; j<getCount()-1; j++)
setItemNum(j, getItemNum(j + 1));
setItemName(j,getItemName(j+1));
setItemUnits(j,getItemUnits(j+1));
setItemPrice(j,getItemPrice(j+1));
}//end for
i-=1;
}//end DeleteItem
public static int SearchItem(String value)
int k = -1;
for(int j=0;j<getCount();j++)
if(getItemName(j).equals(value))
k = j;
}//end for
return k;
}//end SearchItem
public static double totalOfInventory(double p, int u)//computes value of all merchandise in inventory
return p * u;
}//end method totalOfInventory
public static void swap(int j, int min)
String tmp;
tmp = name[j];
name[j] = name[min];
name[min] = tmp;
int temp = itemNum[j];
itemNum[j] = itemNum[min];
itemNum[min]= temp;
temp = units[j];
units[j] = units[min];
units[min] = temp;
double temp1 = price[j];
price[j] = price[min];
price[min]= temp1;
}//ends swap method
public double showTotalOfInventory()
double totalValue = 0;
for (int j = 0; j < getCount(); j++)
totalValue = totalValue + totalOfInventory(price[j], units[j]);
return totalValue;
}//end showTotalOfInventory
public static int getCount()
return i;
}// end class Inventory
class Products
public static double totalOfInventory(double p, double u, double rf)
double tOfI = (p * u) + (p * u * rf);
return (tOfI);
public static double totalOfRestockFee(double p, double rf)
double percent = 0;
percent = (p * 5) / 100;
return percent;
}//end class Products_______________________________
Maker.java
package inventorymain;
import javax.swing.JFrame;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.text.NumberFormat;
import javax.swing.border.*;
import java.net.*;
import java.util.StringTokenizer;
class Maker extends Inventory implements ActionListener
{//begins Class Maker
static String manufact[] = new String[100];
static double restockingFee[] = new double[100];
static int i;
static double TotalVal;
static int navItem;
static Boolean isRecordLoadedFromFile = false;
private Container cp = getContentPane();
GridBagConstraints c;
GridBagConstraints cconstraint;
Border titledborder;
JPanel pan;
String labels[] = {"Product Name:", "Manufacturer:", "Product ID Number:", "Units in Stock:",
"Price Per Unit: $",
"Restocking Fee: $",
"Value of Product in Stock: $",
"Value of All Merchandise Plus Restocking: $"};
int len1 = labels.length;
JLabel lbl[] = new JLabel[len1];
JTextField txtfield1[] = new JTextField[len1];
String blabels[] = {"First", "Previous", "Next", "Last"};
int blen = blabels.length;
JButton navigate[] = new JButton[blen];
String cmdlabels[] ={"Load File", "Add", "Modify", "Delete", "Search", "Save","Cancel" };
int cmdlen = cmdlabels.length;
JButton cmdbutton[] = new JButton[cmdlen];
JLabel lblImg;
File file;
public String FileName;
public Maker(int Item_Number, String Item_Name, double Item_Price, int Items_in_Stock, String manufact, double restockingFee)// Constructor for varibles
super(Item_Number, Item_Name, Item_Price, Items_in_Stock);
this.manufact[i] = manufact;
this.restockingFee[i] = restockingFee;
i = i + 1;
public static void setManufact(int k, String value)
manufact[k] = value;
public static double getRestockFee(int val)
return restockingFee[val];
public void ShowInventory()
setLayout(new FlowLayout());
GridBagLayout contlayout = new GridBagLayout();//layout for container
GridBagConstraints cconstraint = new GridBagConstraints();//constraint for container
GridBagLayout gblayout = new GridBagLayout();//layout for panel
GridBagConstraints gbconstraint = new GridBagConstraints();
FileName = "C://dat//inventory.dat";
try
String strDirectoy = "C://dat";
boolean success = (new File(strDirectoy)).mkdir();
file = new File(FileName);
success = file.createNewFile();
//ADD SAVE CANCEL DELETE EXIT
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
gbconstraint.gridwidth = 1;
gbconstraint.gridheight = 1;
gbconstraint.gridy = 0;
for (int i = 0; i < cmdlen; i++)
cmdbutton[i] = new JButton(cmdlabels);
cmdbutton[i].addActionListener(this);
gbconstraint.gridx = i;
pan.add(cmdbutton[i], gbconstraint);
}//end for
titledborder = BorderFactory.createTitledBorder("Confirmation");
pan.setBorder(titledborder);
//ADD PANEL TO CONTAINER
cconstraint.gridwidth = 4;
cconstraint.gridheight = 1;
cconstraint.gridx = 0;
cconstraint.gridy = 2;
cp.add(pan, cconstraint);
//ADDITION COMPLETE
//first panel
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
for (int i = 0; i < 2; i++)
for (int j = 0; j < len1; j++)
int x = i;
int y = j;
if (x == 0)
lbl[j] = new JLabel(labels[j]);
lbl[j].setHorizontalAlignment(JLabel.LEFT);
lbl[j].setPreferredSize(new Dimension(250, 15));
gbconstraint.insets = new Insets(10, 0, 0, 0);
gbconstraint.gridx = x;
gbconstraint.gridy = y;
pan.add(lbl[j], gbconstraint);
}//end if
else
txtfield1[j] = new JTextField(15);
txtfield1[j].setPreferredSize(new Dimension(300, 15));
txtfield1[j].setHorizontalAlignment(JLabel.LEFT);
txtfield1[j].setEnabled(false);
lbl[j].setLabelFor(txtfield1[j]);
gbconstraint.gridx = x;
gbconstraint.gridy = y;
pan.add(txtfield1[j], gbconstraint);
}//end else
}//end for
}//end for
Border titledborder = BorderFactory.createTitledBorder("Current Inventory Records");
pan.setBorder(titledborder);
//adds panel to container
cconstraint.gridwidth = 1;
cconstraint.gridheight = 1;
cconstraint.gridx = 0;
cconstraint.gridy = 0;
cp.add(pan, cconstraint);
//add icon to display
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
gbconstraint.gridwidth = 1;
gbconstraint.gridheight = 1;
gbconstraint.gridy = 0;
lblImg = new JLabel((new ImageIcon(getClass().getResource("logo111.jpg"))));
lblImg.setPreferredSize(new Dimension(70, 70));
pan.add(lblImg);
cconstraint.gridwidth = 1;
cconstraint.gridheight = 1;
cconstraint.gridx = 0;
cconstraint.gridy = 1;
cp.add(pan, cconstraint);
//ends icon insert
//navigation panel
pan = new JPanel();
gblayout = new GridBagLayout();
gbconstraint = new GridBagConstraints();
pan.setLayout(gblayout);
gbconstraint.gridwidth = 1;
gbconstraint.gridheight = 1;
gbconstraint.gridy = 1;
for (int i = 0; i < blen; i++)
navigate[i] = new JButton(blabels[i]);
gbconstraint.gridx = i;
pan.add(navigate[i], gbconstraint);
navigate[i].addActionListener(this);
}//end for
titledborder = BorderFactory.createTitledBorder("Navigation Panel");
pan.setBorder(titledborder);
//add panel to container
cconstraint.gridwidth = 4;
cconstraint.gridheight = 1;
cconstraint.gridx = 1;
cconstraint.gridy = 1;
cp.add(pan, cconstraint);
}//end try
catch (Exception e)
e.printStackTrace();
}//end catch
}//end showInventory
public void setContents(File aFile, String aContents)
BufferedWriter output = null;
try
//use buffering
//FileWriter always assumes default encoding is OK!
output = new BufferedWriter(new FileWriter(aFile, true));
output.write(aContents);
String newLine = System.getProperty("line.separator");
output.write(newLine);
}//end try
catch (Exception ex)
ex.printStackTrace();
}//end catch
finally
try
//flush and close both "output" and its underlying FileWriter
if (output != null) output.close();
}//end try
catch (java.io.IOException e)
e.printStackTrace();
}//end catch
public void AddModifyInventory(String Mode)
if (Mode.equals("Insert"))
String Content = txtfield1[1].getText() + "\t"
+ txtfield1[2].getText() + "\t" + txtfield1[3].getText()
+ "\t" + txtfield1[4].getText();
setContents(file, Content);
JOptionPane.showMessageDialog(null, "Record Successfully Inserted");
}//end if
}//end AddModifyInventory
public void ShowInventory(int ItemNo)
txtfield1[0].setText(Integer.toString(ItemNo));
txtfield1[0].setText(Inventory.getItemName(ItemNo));
txtfield1[1].setText(manufact[ItemNo]);
txtfield1[2].setText(Integer.toString(Inventory.getItemNum(ItemNo)));
txtfield1[3].setText(Integer.toString(Inventory.getItemUnits(ItemNo)));
txtfield1[4].setText(Double.toString(Inventory.getItemPrice(ItemNo)));
txtfield1[5].setText(String.format("%3.2f",
Products.totalOfRestockFee(Inventory.getItemPrice(ItemNo),
getRestockFee(ItemNo))));
txtfield1[6].setText(String.format("%3.2f",
Products.totalOfInventory(Inventory.getItemPrice(ItemNo),
Inventory.getItemUnits(ItemNo), getRestockFee(ItemNo))));
txtfield1[7].setText(String.format("%3.2f", GetTotalInvVal()));
}//end ShowInventory(int ItemNo)
public void EnableFields(boolean bflag)
txtfield1[1].setEnabled(bflag);
txtfield1[2].setEnabled(bflag);
txtfield1[3].setEnabled(bflag);
txtfield1[4].setEnabled(bflag);
txtfield1[5].setEnabled(bflag);
}//end EnableFields
public double GetTotalInvVal()
TotalVal = 0;
for(int j = 0; j < Inventory.getCount(); j++)
TotalVal += Products.totalOfInventory(Inventory.getItemPrice(j),
Inventory.getItemUnits(j), getRestockFee(j));
return TotalVal;
}//end GetTotalInvVal
public Integer GetRecordCount()
FileReader fr;
BufferedReader br;
LineNumberReader lnr;
String line;
int lno = 0;
try
lnr = new LineNumberReader(new BufferedReader(new FileReader(FileName)));
while ((line = lnr.readLine()) != null)
lno = lnr.getLineNumber();
lnr.close();
}//end try
catch (IOException ioErr)
System.out.println(ioErr.toString());
System.exit(100);
return lno;
public void showInventory(int itemNo)
int i;
FileReader fr;
BufferedReader br;
LineNumberReader lnr;
StringTokenizer st;
String line;
int item = itemNo + 1;
int ItemNo = 0;
int Units = 0;
String ItemGenre = "";
String ItemName = "";
String ItemRating = "";
double UnitPrice = 0;
double Total = 0;
Integer rFee = 0;
int lno;
try
lnr = new LineNumberReader(new BufferedReader(new FileReader(FileName)));
while ((line = lnr.readLine()) != null)
lno = lnr.getLineNumber();
String s1[];
if (item == lno)
s1 = new String[lno];
s1[0] = line;
st = new StringTokenizer(s1[0]);
//ItemNo = lno;
ItemGenre = st.nextToken();
ItemNo = Integer.parseInt(st.nextToken());
ItemName = st.nextToken();
ItemRating = st.nextToken();
Units = Integer.parseInt(st.nextToken());
UnitPrice = Double.parseDouble(st.nextToken());
//rFee = Integer.parseInt(st.nextToken());
}//end if
s1 = new String[lno];
s1[0] = line;
st = new StringTokenizer(s1[0]);
st.nextToken();
st.nextToken();
st.nextToken();
st.nextToken();
Integer units = Integer.parseInt(st.nextToken());
Double price = Double.parseDouble(st.nextToken());
Total += Products.totalOfInventory(price, units, 0.05);
}//end while
lnr.close();
}//end try
catch (IOException ioErr)
System.out.println(ioErr.toString());
System.exit(100);
}//end catch
txtfield1[0].setText(Integer.toString(itemNo));
txtfield1[0].setText(ItemName);
txtfield1[1].setText(manufact[ItemNo]);
txtfield1[2].setText(Integer.toString(ItemNo));
txtfield1[3].setText(Integer.toString(Units));
txtfield1[4].setText(Double.toString(UnitPrice));
txtfield1[5].setText(String.format("%3.2f", Products.totalOfRestockFee(UnitPrice, 0.05)));
txtfield1[6].setText(String.format("%3.2f", Products.totalOfInventory(UnitPrice, Units, 0.05)));
txtfield1[7].setText(String.format("%3.2f", Total));
}//end showInventory
public void actionPerformed(ActionEvent e)//button actions
String btnClicked = ((JButton)e.getSource()).getText();
if(btnClicked.equals("First"))
EnableFields(false);
if (isRecordLoadedFromFile)
navItem = 0;
showInventory(navItem);
}//end if
else
navItem = 0;
ShowInventory(navItem);
}//end else
}//end if
if (btnClicked.equals("Next"))
EnableFields(false);
if (isRecordLoadedFromFile)
if (navItem == GetRecordCount() - 1)
navItem = 0;
}//end if
else
navItem += 1;
}//end else
if ((GetRecordCount() - 1) >= navItem)
showInventory(navItem);
else
showInventory(GetRecordCount() - 1);
}//end if
else
if (navItem == getCount() - 1)
navItem = 0;
}//end if
else
navItem += 1;
}//end else
ShowInventory(navItem);
}//end else
}//end if
if (btnClicked.equals("Previous"))
EnableFields(false);
if (isRecordLoadedFromFile)
if (navItem == 0)
navItem = GetRecordCount() - 1;
}//end if
else
navItem = navItem - 1;
}//end else
showInventory(navItem);
}//end if
else
if (navItem == 0)
navItem = getCount() - 1;
}//end if
else
navItem = navItem - 1;
}//end else
ShowInventory(navItem);
}//end else
}//end if
if (btnClicked.equals("Last"))
EnableFields(false);
if (isRecordLoadedFromFile)
navItem = GetRecordCount() - 1;
showInventory(navItem);
}//end if
else
navItem = getCount() - 1;
ShowInventory(navItem);
}//end else
}//end if
if (btnClicked.equals("Save"))
AddModifyInventory("Insert");
}//end if
if (btnClicked.equals("Load File"))
isRecordLoadedFromFile = true;
if (GetRecordCount() == 0)
JOptionPane.showMessageDialog(null, "No Records Found in the File");
}//end if
else
showInventory(0);
}//end else
if (btnClicked.equals("Cancel"))
EnableFields(false);
cmdbutton[4].setText("Search");
cmdbutton[2].setText("Modify");
cmdbutton[1].setText("Add");
if(isRecordLoadedFromFile)
showInventory(navItem);
else
ShowInventory(navItem);
}//end if
if(btnClicked.equals("Delete"))
Inventory.DeleteItem(Integer.parseInt(txtfield1[0].getText()));
navItem = getCount() -1;
JOptionPane.showMessageDialog(null, "Record Successfully deleted");
ShowInventory(navItem);
}//end if
if(btnClicked.equals("Search"))
cmdbutton[4].setText("GO!");
txtfield1[3].setEnabled(true);
}//end if
if(btnClicked.equals("GO!"))
boolean valid = true;
if (txtfield1[3].getText().trim().length() == 0)
JOptionPane.showMessageDialog(null, "Product Name Required");
valid = false;
}//end if
if(valid)
int k = Inventory.SearchItem(txtfield1[3].getText().trim());
if(k>=0)
txtfield1[0].setText(Integer.toString(k));
txtfield1[0].setText(Inventory.getItemName(k));
txtfield1[1].setText(manufact[k]);
txtfield1[2].setText(Integer.toString(Inventory.getItemNum(k)));
txtfield1[3].setText(Integer.toString(Inventory.getItemUnits(k)));
txtfield1[4].setText(Double.toString(Inventory.getItemPrice(k)));
txtfield1[5].setText(String.format("%3.2f", Products.totalOfRestockFee(Inventory.getItemPrice(k), getRestockFee(k))));
txtfield1[6].setText(String.format("%3.2f", Products.totalOfInventory(Inventory.getItemPrice(k ), Inventory.getItemUnits(k), getRestockFee(k))));
txtfield1[7].setText(String.format("%3.2f",GetTotalInvVal()));
EnableFields(false);
cmdbutton[4].setText("Search");
}//end if
else
JOptionPane.showMessageDialog(null, "No Matches found");
cmdbutton[4].setText("Search");
EnableFields(false);
}//end else
}//end if
}//end if
if(btnClicked.equals("Modify"))
EnableFields(true);
cmdbutton[2].setText("Click to Modify!");
}//end if
if(btnClicked.equals("Click to Modify!"))
Boolean valid = true;
if (txtfield1[1].getText().trim().length() == 0)
JOptionPane.showMessageDialog(null, "Genre Required");
valid = false;
}//end if
try
Integer.parseInt(txtfield1[2].getText());
}//end try
catch (Exception ex)
JOptionPane.showMessageDialog(null, "Invalid Item Number (Only Numbers allowed)");
txtfield1[2].setText("");
valid = false;
}//end catch
if (txtfield1[3].getText().trim().length() == 0)
JOptionPane.showMessageDialog(null, "Product Name Required");
valid = false;
}//end if
if (txtfield1[4].getText().trim().length() == 0)
JOptionPane.showMessageDialog(null, "Rating Required");
valid = false;
}//end if
try
Integer.parseInt(txtfield1[5].getText());
}//end try
catch (Exception ex)
JOptionPane.showMessageDialog(null, "Invalid Units in Stock (Only Numbers allowed)");
txtfield1[4].setText("");
valid = false;
}//end catch
try
Double.parseDouble(txtfield1[6].getText());
}//end try
catch (Exception ex)
JOptionPane.showMessageDialog(null, "Invalid Price (Only Numbers allowed)");
txtfield1[5].setText("");
valid = false;
}//end catch
if (valid)
//setItemNum,setItemName,setItemUnits,setItemPrice
Inventory.setItemNum(navItem,Integer.parseInt(txtfield1[1].getText()));
Inventory.setItemName(navItem,txtfield1[2].getText());
Inventory.setItemUnits(navItem,Integer.parseInt(txtfield1[4].getText()));
Inventory.setItemPrice(navItem,Double.parseDouble(txtfield1[5].getText()));
txtfield1[6].setText(String.format("%3.2f", Products.totalOfRestockFee(Inventory.getItemPrice(navItem), getRestockFee(navItem))));
txtfield1[7].setText(String.format("%3.2f", Products.totalOfInventory(Inventory.getItemPrice(navItem ), Inventory.getItemUnits(navItem), getRestockFee(navItem))));
txtfield1[8].setText(String.format("%3.2f",GetTotalInvVal()));
EnableFields(false);
cmdbutton[2].setText("Modify");
}//end if
}//end if
if (btnClicked.equals("Add"))
EnableFields(true);
txtfield1[0].setText(Integer.toString(getCount()));
txtfield1[1].setText("");
txtfield1[2].setText("");
txtfield1[3].setText("0");
txtfield1[4].setText("0.00");
cmdbutton[1].setText("Click to Add!");
}//end if
if (btnClicked.equals("Click to Add!"))
Boolean valid = true;
try
Integer.parseInt(txtfield1[2].getText());
}//end try
catch (Exception ex)
JOptionPane.showMessageDialog(null, "Invalid Item Number (use numbers only)");
txtfield1[2].setText("");
valid = false;
}//end catch
if (txtfield1[0].getText().trim().length() == 0)
JOptionPane.showMessageDialog(null, "Product Name Required");
valid = false;
}//end if
try
Integer.parseInt(txtfield1[3].getText());
}//end try
catch (Exception ex)
JOptionPane.showMessageDialog(null, "Invalid Units in Stock (use numbers only)");
txtfield1[3].setText("");
valid = false;
}//end catch
tryYou do not need to post that massive amount of code to ask about a compile-time error.
I (and many others here) won't even consider looking at it. Create a small example that demonstrates what you're having trouble with. -
Help me please, what's wrong with my program...
My program has no problem writing data into file. But, I get garbages when my program retrieved data from file. How to solve this, anyone? I tried last 4 days still can't figure out. :(
/* myDate.java */
import java.util.*;
public class myDate extends Object{
private int year;
private int month;
private int day;
public myDate(String newDate) {
StringTokenizer st = new StringTokenizer(newDate, "/");
try {
this.day = Integer.parseInt(st.nextToken());
this.month = Integer.parseInt(st.nextToken());
this.year = Integer.parseInt(st.nextToken());
}catch (NumberFormatException nfe) {
System.out.println("Incorrect Date Format!!!");
System.out.println(nfe.getMessage());
public void setDay (int Day) { this.day = Day; }
public void setMonth (int Month) { this.month = Month; }
public void setYear (int Year) { this.year = Year; }
public String toString() {
return day + "/" + month + "/" + year;
public int getDay() { return day; }
public int getMonth() { return month; }
public int getYear() { return year; }
/* Inventory.java
* Book Name: 30 bytes Characters
* Book ISBN: 10 bytes Characters
* Book Author: 30 bytes Characters
* Book Genre : 30 bytes Characters
* Book Quantity : 4 bytes integer
* Date of the book purchased : 10 bytes Characters.
import java.io.*;
class Inventory{
private String bookName, bookISBN, bookAuthor, bookGenre;
private int quantity;
private myDate datePurchased;
public Inventory() {
this.bookName = "";
this.bookISBN = "";
this.bookAuthor = "";
this.bookGenre = "";
this.quantity = 0;
this.datePurchased = new myDate("00/00/0000");
public void setBookName(String bookname) {
this.bookName = bookname;
public void setISBN(String BookISBN) {
this.bookISBN = BookISBN;
public void setAuthor(String author) {
this.bookAuthor = author;
public void setGenre(String genre) {
this.bookGenre = genre;
public void setQuantity(int qty) {
this.quantity = qty;
public void setPurchaseDate(String dateOfPurchase) {
this.datePurchased = new myDate(dateOfPurchase);
public String getBookName() { return bookName;}
public String getISBN() { return bookISBN;}
public String getAuthor() { return bookAuthor;}
public String getGenre() { return bookGenre;}
public int getQuantity() { return quantity;}
public String getPurchaseDate() { return datePurchased.toString();}
public String toString() {
return bookName + "\n" + bookISBN + "\n" + bookAuthor + "\n" +
bookGenre + "\n" + quantity + "\n" + datePurchased.toString() +
"\n";
public String fillData(RandomAccessFile raf, int len) throws
IOException {
char data[] = new char[len];
char temp;
for(int i = 0; i < data.length; i++) {
temp = raf.readChar();
data[i] = temp;
return new String(data).replace('\0', ' ');
public void writeStr(RandomAccessFile file, String data, int len)
throws IOException {
StringBuffer buf = null;
if(data != null)
buf = new StringBuffer(data);
else
buf = new StringBuffer(len);
buf.setLength(len);
file.writeChars(buf.toString());
public void writeRecord(RandomAccessFile rafile) throws
IOException {
writeStr(rafile, getBookName(), 30);
writeStr(rafile, getISBN(), 10);
writeStr(rafile, getAuthor(), 30);
writeStr(rafile, getGenre(), 30);
rafile.writeInt(getQuantity());
writeStr(rafile, getPurchaseDate(), 10);
public void readRecord(RandomAccessFile rafile) throws
IOException {
setBookName(fillData(rafile, 30));
setISBN(fillData(rafile, 10));
setAuthor(fillData(rafile, 30));
setGenre(fillData(rafile, 30));
setQuantity(rafile.readInt());
setPurchaseDate(fillData(rafile, 10));
public final static int size() {
return 114;
/* btnPanel.java */
import javax.swing.*;
import java.awt.*;
class btnPanel extends JPanel {
JButton btnSave, btnCancel;
public btnPanel() {
btnSave = new JButton("Save Changes");
btnCancel = new JButton("Cancel");
add(btnSave);
add(btnCancel);
/* inpPanel2.java */
import javax.swing.*;
import java.awt.*;
class inpPanel2 extends JPanel{
JTextField tfBookName, tfBookISBN, tfGenre, tfQuantity,
tfAuthor, tfDatePurchased;
JLabel lblBookName, lblBookISBN, lblAuthor, lblGenre,
lblQuantity, lblDatePurchased;
public inpPanel2() {
tfBookName = new JTextField("",30);
tfBookISBN = new JTextField("",10);
tfGenre = new JTextField("",30);
tfAuthor = new JTextField("",30);
tfQuantity = new JTextField("",10);
tfDatePurchased = new JTextField("",10);
lblBookName = new JLabel("Book Name ");
lblBookISBN = new JLabel("ISBN ");
lblAuthor = new JLabel("Author ");
lblGenre = new JLabel("Genre ");
lblQuantity = new JLabel("Quantity ");
lblDatePurchased = new JLabel("Date Purchased ");
setLayout(new GridLayout(6,2));
add(lblBookName);
add(tfBookName);
add(lblBookISBN);
add(tfBookISBN);
add(lblAuthor);
add(tfAuthor);
add(lblGenre);
add(tfGenre);
add(lblQuantity);
add(tfQuantity);
add(lblDatePurchased);
add(tfDatePurchased);
/* InventoryAdd.java */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
class InventoryAdd extends JFrame {
btnPanel buttonPanel;
inpPanel2 inputPanel;
Inventory bookInventory;
RandomAccessFile rafile;
public InventoryAdd() {
super("Book Inventory - Add");
buttonPanel = new btnPanel();
buttonPanel.btnSave.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae){
openFile();
bookInventory = new Inventory();
bookInventory.setBookName(inputPanel.tfBookName.getText());
bookInventory.setISBN(inputPanel.tfBookISBN.getText());
bookInventory.setAuthor(inputPanel.tfAuthor.getText());
bookInventory.setGenre(inputPanel.tfGenre.getText());
bookInventory.setQuantity(
Integer.parseInt(
inputPanel.tfQuantity.getText()));
bookInventory.setPurchaseDate(inputPanel.tfDatePurchased.getText());
try {
bookInventory.writeRecord(rafile);
}catch(IOException ioe) {
System.out.println("Cannot Write Record into file...");
System.out.println(ioe.getMessage());
clearInput();
closeFile();
System.out.println(bookInventory.toString());
buttonPanel.btnCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae){
clearInput();
inputPanel = new inpPanel2();
Container c = getContentPane();
c.setLayout(new BorderLayout());
c.add(inputPanel, BorderLayout.CENTER);
c.add(buttonPanel, BorderLayout.SOUTH);
setSize(350, 190);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
public void clearInput() {
inputPanel.tfBookName.setText("");
inputPanel.tfBookISBN.setText("");
inputPanel.tfAuthor.setText("");
inputPanel.tfGenre.setText("");
inputPanel.tfQuantity.setText("");
inputPanel.tfDatePurchased.setText("");
public void openFile() {
try {
rafile = new RandomAccessFile("BOOK_INV.DAT","rw");
rafile.seek(rafile.length());
}catch(IOException ioe) {
System.out.println("Error, Cannot open File");
public void closeFile() {
try{
rafile.close();
}catch(IOException ioe) {
System.out.println("Error, Cannot Close File");
public static void main(String args[]) {
new InventoryAdd();
/* ReadInv.java */
import java.io.*;
class ReadInv {
RandomAccessFile rafile;
Inventory bookInv;
public ReadInv() {
bookInv = new Inventory();
try {
rafile = new RandomAccessFile("BOOK_INV.DAT","r");
rafile.seek(0);
for(int i=0; i < (rafile.length()/bookInv.size()); i++) {
bookInv.readRecord(rafile);
System.out.println(bookInv.toString());
}catch(IOException ioe) {}
public static void main(String args[]) {
new ReadInv();it's hard to read. please use code tag.
why don't u use object serialization by implements Serializable?
import java.io.Serializable;
public class Inventory implements Serializable {
// u don't need to change ur code here
}when saving & loading inventory, u can use ObjectOutputStream & ObjectInputStream.
here is an example:
Inventory i = new Inventory();
// set your inventory here
// save to file
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(
"InventoryFile.dat")); // file name
out.writeObject(i);
// u can write many object to one single file.
out.close();
// load the file
ObjectInputStream in = new ObjectInputStream(new FileInputStream(
"InventoryFile.dat"));
Inventory i = (Inventory) in.readObject(); -
Implementing Barcoding in Inventory Management in MM
Hello All,
We would like to implement bar coding functionality in inventory Management (MM). What are the pre-requisites for that and within how much time it can be implemented. I also would like to know is there any interface available in SAP so that barcoding functionality can be directly deployed in SAP for IM?
Your quick response is highly appreciated.
Best regards.
SanjayHello,
1) We have created one Z Output type in our project.
2) The condition record for that output type is maintained in transaction MN21
3) Whenever a GR is created, output is automatically assigned to that material document and the bar code label gets printed.
4) Technically a program needs to be created which needs to be asigned to your output in transaction NACE under category ME.
Regards
Karan -
Implementation of physical inventory
hi,
tell me the detail steps while implementing physical inventory newly for a company ( with t codes)Dear,
Please efer the link /people/community.user/blog/2007/05/04/physical-inventory-in-material-management
First you can use the trn. MI01 there put all the material save, then use T-Code MI04 there you have to enter the count the if you want put 0, put it and make the tick then save then use MI22 post the difference.
About Physical inventory process you have another way :
1. Use t-code MI31 instead of using MI01 , it will give you a document number of all your stock.
2. If you did not get the document number use t-code MI24 .
3. MI21 to print the document.
4. MI04 to enter the count if you want put 0.
5. MI07 post.
Create PI document using MI01 (MI31 -Using Batch)
Enter Count Using MI04 (Select Zero Stock Indicator)
Post Count results using MI07
Check Results using MI24
Upload initial Stock using MB1C 561
Reward if helpful
Regards
venu gopal
Edited by: venu kk on Apr 29, 2008 12:37 PM -
Implement PO, FA, AP without HRMS & INVENTORY (11.5.10)
Hi,
We are implementing PO, FA & AP as part of P2P impelementation for Bank (v 11.5.10). Can you please let me know if there are any specific things to keep in mind considering there is no plan to implement HRMS & Inventory module in near future.
Also is there any Banking Specific tips for implementing these modules?
Appreciate your help in advance & have great day.
Ashish1) It is possible that a patch changed it or that the user guide you looked at is not the latest version. What difference do you see? I have 25 columns in 11.5.10.2 instance.
2) Did you follow the suggestions in the user guide http://docs.oracle.com/cd/A85683_01/acrobat/115faug.pdf page 3-27
3) Did you run Physical Inventory comparison program after loading the records? Read the 10 pages upto 3-37 to find useful hints.
Sandeep Gandhi -
Implement PO without Inventory & HRMS Module.
Hi,
We are implementing PO, FA & AP as part of P2P impelementation for Bank (v 11.5.10). Can you please let me know if there are any specific things to keep in mind considering there is no plan to implement HRMS & Inventory module in near future.
Also is there any Banking Specific tips for implementing these modules?
Appreciate your help in advance & have great day.
AshishWhen you implement Purchasing, the Inventory module gets installed in a shared mode.
That shared mode will allow you to do receipts but the POs have to be "Expense" POs.
That is the destination on the PO distribution cannot be Inventory.
This ensures that you can do a 3-way match but you cannot increment your on-hand balances.
Hope this answers your question,
Sandeep Gandhi -
Non-Cumulative vs. Cumulative KeyFigures for Inventory Cube Implementation?
A non-cumulative is a non-aggregating key figure on the level of one or more objects, which is always displayed in relation to time. Generally speaking, in SAP BI data modeling, there are two options for non-cumulative management. First option is to use non-cumulative management with non-cumulative key figures. Second option is to use non-cumulative management with normal key figures (cumulative key figures). For SAP inventory management, 0IC_C03 is a standard business content cube based upon the option of non-cumulative management with non-Cumulative key figures. Due to specific business requirements (this cube is designed primarily for detailed inventory balance reconciliation, we have to enhance 0IC_C03 to add additional characteristics such as Doc Number, Movement type and so on. The original estimated size of the cube is about 100 million records since we are extracting all history records from ECC (inception to date). We spent a lot of time to debate on if we should use non-cumulative key figures based upon the standard business content of 0IC_C03 cube. We understand that, by using Non-Cumulative key figures, the fact table will be smaller (potentially). But, there are some disadvantages such as following:
(1) We cannot use the InfoCube together with another InfoCube with non-cumulative key figures in a MultiProvider.
(2) The query runtime can be affected by the calculation of the non-cumulative.
(3) The InfoCube cannot logically partition by time characteristics (e.g. fiscal year) which makes it difficult for future archiving.
(4) It is more difficult to maintain non-cumulative InfoCube since we have added more granularity (more characteristics) into the cube.
Thus, we have decided not to use the Cumulative key figures. Instead, we are using cumulative key figures such as Receipt Stock Quantity (0RECTOTSTCK) , Issue Stock Quantity(0ISSTOTSTCK)
, Receipt Valuated Stock Value (0RECVS_VAL) and Issue Valuated Stock Value (0ISSVS_VAL). All of those four key figures are available in the InfoCube and are calculated during the update process. Based upon the study of reporting requirements, those four key figures seems to be sufficient to meet all reporting requirements.
In addition, since we have decided not to use cumulative key figures, we have removed non-cumulative key figures from the 0IC_C03 InfoCube and logically partitioned the cube by fiscal year. Furthermore, those InfoCube are fiscally partitioned by fiscal year/period as well.
To a large extent, we are going away from the standard business content cube, and we have a pretty customized cube here. We'd like to use this opportunity to seek some guidance from SAP BI experts. Specifically, we want to understand what we are losing here by not using non-cumulative key figures as provided by original 0IC_C03 business content cube. Your honest suggestions and comment are greatly appreciated!Hello Marc,
Thanks for the reply.
I work for Dongxin, and would like to add couple of points to the original question...
Based on the requirements, we decided to add Doc Number and Movement type along few other characteristics into the InfoCube (Custom InfoCube - article movements) as once we added these characteristics the Non Cumulative keyfigures even when the marker was properly set were not handling the stock values (balance) and the movements the right way causing data inconsistency issues.
So, we are just using the Cumulative keyfigures and have decided to do the logical partitioning on fiscal year (as posting period is used to derive the time characteristics and compared to MC.1 makes more sense for comparison between ECC and BI.
Also, I have gone through the How to manual for Inventory and in either case the reporting requirement is Inception to date (not just weekly or monthly snapshot).
We would like to confirm if there would be any long term issues doing so.
To optimize the performance we are planning to create aggregates at plant level.
Couple of other points we took into consideration for using cumulative keyfigures are:
1. Parallel processes possible if non-cumulative keyfigures are not used.
2. Aggregates on fixed Plant possible if non-cumulative keyfigures are not used. (This being as all plants are not active and some of them are not reported).
So, since we are not using the stock keyfigures (non cumulative) is it ok not to use 2LIS_03_BX as this is only to bring in the stock opening balance....
We would like to know if there would be any issue only using BF and UM and using the InfoCube as the one to capture article movements along with cumulative keyfigures.
Once again, thanks for your input on this issue.
Thanks
Dharma. -
Job for V3 updates failing for inventory
Dear all,
We have implemented inventory in BW and are extracting data from R/3 using LO extraction method. The V3 update is scheduled in R/3 using 'Queued Delta' method. It has been running fine for last six months or so but suddenly the V3 update job in R/3 started failing with a dump (This does not happen for other LO applications). The dump says that a structure has been changed for this application but doesn't say which one. We found a solution for this kind of problem in SAP notes 834897, 838050 and 835466 but before we can implement these we need to identify which structure was changed. The dump is as follows:
START OF DUMP----
Runtime Errors MESSAGE_TYPE_X
Date and Time 05.10.2007 15:03:31
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
Short text of error message:
Structures have changed (sy-subrc=2)
Long text of error message:
Technical information about the message:
Message class....... "MCEX"
Number.............. 194
Variable 1.......... 2
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLMCEX" or "LMCEXU02"
"MCEX_UPDATE_03"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
System environment
SAP-Release 700
Application server... "erpdevmil"
Network address...... "10.100.100.22"
Operating system..... "Windows NT"
Release.............. "5.2"
Hardware type........ "4x AMD64 Level"
Character length.... 16 Bits
Pointer length....... 64 Bits
Work process number.. 24
Shortdump setting.... "full"
Database server... "ERPDEVMIL"
Database type..... "MSSQL"
Database name..... "RD1"
Database user ID.. "rd1"
Char.set.... "C"
SAP kernel....... 700
created (date)... "Mar 20 2007 00:05:20"
create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
Database version. "SQL_Server_8.00 "
Patch level. 102
Patch text.. " "
Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
SAP database version. 700
Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
Memory consumption
Roll.... 16192
EM...... 20949200
Heap.... 0
Page.... 40960
MM Used. 2661520
MM Free. 1525696
User and Transaction
Client.............. 200
User................ "ENTEG1"
Language key........ "E"
Transaction......... " "
Program............. "SAPLMCEX"
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where terminated
Termination occurred in the ABAP program "SAPLMCEX" - in "MCEX_UPDATE_03".
The main program was "RMCEXUP1 ".
In the source code you have the termination point in line 59
of the (Include) program "LMCEXU02".
The program "SAPLMCEX" was started as a background job.
Job Name....... "LIS-BW-VB_APPLICATION_03_200"
Job Initiator.. "ENTEG1"
Job Number..... 15033001
Source Code Extract
Line
SourceCde
29
30
IF NOT I_DDIC_HASH IS INITIAL.
31
32
IF gf_tmsp_hash_ok IS INITIAL.
33
34
CALL FUNCTION 'MCEX_GEN_AND_CHECK_HASH'
35
EXPORTING
36
I_FUNCNAME = 'MCEX_UPDATE_03'
37
I_COLLECTIVE_RUN = 'X'
38
I_APPLICATION = '03'
39
I_STORED_DDIC_HASH = I_DDIC_HASH
40
I_STORED_TMSP_HASH = I_TMSP_HASH
41
IMPORTING
42
E_DDIC_HASH = I_DDIC_HASH
43
E_TMSP_HASH = lf_TMSP_HASH
44
EXCEPTIONS
45
HASH_COMPARE_OK = 1
46
HASH_COMPARE_NOT_OK = 2
47
NO_INTERFACE = 3
48
HASH_ERROR = 4
49
DDIC_ERROR = 5
50
OTHERS = 6 .
51
52
IF I_TMSP_HASH = lf_tmsp_hash.
53
gf_tmsp_hash_ok = true.
54
ENDIF.
55
case sy-subrc.
56
when 0. " Compare OK - do nothing
57
when 1. " Compare OK - do nothing
58
when 2. " Compare not ok - abort
>>>>>
message x194(mcex) with sy-subrc.
60
when others.
61
message x193(mcex) with sy-subrc.
62
endcase.
63
endif.
64
endif.
65
66
HASH*****************************************************************
67
68
69
Structure for logging.
70
DATA: l_mcsi_key LIKE mcs06.
71
72
DATA: ls_mcexlog_info LIKE mcexlog_info. "MCEXLOG766622
73
74
Initialization of tables
75
REFRESH: mc03bf0_tab,
76
mc03bx0_tab,
77
mc03um0_tab.
78
Contents of system fields
Name
Val.
SY-SUBRC
2
SY-INDEX
0
SY-TABIX
3
SY-DBCNT
0
SY-FDPOS
30
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
SY-UCOMM
SY-TITLE
BW Logistics Extraction Delta Update
SY-MSGTY
X
SY-MSGID
MCEX
SY-MSGNO
194
SY-MSGV1
2
SY-MSGV2
SY-MSGV3
SY-MSGV4
SY-MODNO
0
SY-DATUM
20071005
SY-UZEIT
150331
SY-XPROG
SAPMSSY1
SY-XFORM
XAB_READ
Active Calls/Events
No. Ty. Program Include Line
Name
8 FUNCTION SAPLMCEX LMCEXU02 59
MCEX_UPDATE_03
7 FUNCTION SAPLMCEX LMCEXU43 13
MCEX_UPDATE_03_QRFC
6 FORM SAPLMCEX LMCEXU43 1
MCEX_UPDATE_03_QRFC
5 FORM SAPMSSY1 SAPMSSY1 271
XAB_RUN_DRIVER
4 FUNCTION SAPLSXAB LSXABU01 9
RFC_RUN_XAB_DRIVER
3 FUNCTION SAPLERFC LERFCU01 75
ARFC_EXECUTE
2 FUNCTION SAPLERFC LERFCU11 116
TRFC_QOUT_GET_AND_PROCESS
1 EVENT RMCEXUP1 RMCEXUP1 7
START-OF-SELECTION
Chosen variables
Name
Val.
No. 8 Ty. FUNCTION
Name MCEX_UPDATE_03
CONTR
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
I_DDIC_HASH
##ºªÜç##Ä#µõ#×#å
21BADE19C8BF0D0E
3AAAC7EC4C55C7F5
I_TMSP_HASH
gr\u00D3µ##A´}9Ç##*;
675DB824B73C8923
72C35F314D97BDAB
ZEITP
BF
44
26
00
00
XMCBEST[]
Table IT_140[6x1294]
FUNCTION-POOL=MCEXFORM=MCEX_UPDATE_03_QRFCDATA=%_%_XMCBEST
Table reference: 21
TABH+ 0(20) = 8088336DFE070000908B2A6DFE07000000000000
TABH+ 20(20) = 150000008C000000060000000E050000FFFFFFFF
TABH+ 40(16) = 04540000E06C000008000000C1308001
store = 0x8088336DFE070000
ext1 = 0x908B2A6DFE070000
shmId = 0 (0x00000000)
id = 21 (0x15000000)
label = 140 (0x8C000000)
fill = 6 (0x06000000)
leng = 1294 (0x0E050000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000566
occu = 8 (0x08000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x70B9376DFE070000
pgHook = 0x0000000000000000
idxPtr = 0x0000000000000000
shmTabhSet = 0x0000000000000000
id = 137 (0x89000000)
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 8 (0x08000000)
lineAlloc = 8 (0x08000000)
shmVersId = 0 (0x00000000)
shmRefCount = 1 (0x01000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
collHook = 0x0000000000000000
ext2 = 0x6089336DFE070000
>>>>> 2nd level extension part <<<<<
tabhBack = 0x2072226DFE070000
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
XMCMSEG[]
Table IT_141[3x4332]
FUNCTION-POOL=MCEXFORM=MCEX_UPDATE_03_QRFCDATA=%_%_XMCMSEG
Table reference: 23
TABH+ 0(20) = F088336DFE070000408A336DFE07000000000000
TABH+ 20(20) = 170000008D00000003000000EC100000FFFFFFFF
TABH+ 40(16) = 04540000406D000002000000C1308001
store = 0xF088336DFE070000
ext1 = 0x408A336DFE070000
shmId = 0 (0x00000000)
id = 23 (0x17000000)
label = 141 (0x8D000000)
fill = 3 (0x03000000)
leng = 4332 (0xEC100000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000568
occu = 2 (0x02000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x0024386DFE070000
pgHook = 0xE08F2A6DFE070000
idxPtr = 0x0000000000000000
shmTabhSet = 0x0000000000000000
id = 140 (0x8C000000)
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 4 (0x04000000)
lineAlloc = 4 (0x04000000)
shmVersId = 0 (0x00000000)
shmRefCount = 1 (0x01000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
collHook = 0x0000000000000000
ext2 = 0xD089336DFE070000
>>>>> 2nd level extension part <<<<<
tabhBack = 0x30A53A6DFE070000
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
SY-REPID
SAPLMCEX
5454444522222222222222222222222222222222
310CD35800000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
MC40RP0REVSETUP
0000000000###############################################################################
2222233333333330000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CKS_EN
9
3
9
0
0
SY-SUBRC
2
0000
2000
%_DUMMY$$
2222
0000
0000
0000
T001
00
2222222222222222222222222222222222222222222222222222222222222222222222332222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SY-XPROG
SAPMSSY1
5454555322222222222222222222222222222222
310D339100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SY-MSGID
MCEX
44452222222222222222
D3580000000000000000
00000000000000000000
00000000000000000000
ITAB_SETUPTAB
22222222222222222222222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000
MC06M_0ITM_TAB[]
Table[initial]
SPACE
2
0
0
0
SY-MSGNO
194
333
194
000
000
ITAB_SETUPTAB[]
Table[initial]
SY-MSGV1
2
32222222222222222222222222222222222222222222222222
20000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV2
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV3
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV4
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
%_VIASELSCR
0
4
GT_TMCEXUPD[]
Table[initial]
No. 7 Ty. FUNCTION
Name MCEX_UPDATE_03_QRFC
CONTR
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
I_DDIC_HASH
5)¢Ð#M###ÁÒ¼rHõº
32AD14919CDB74FB
59202D95E12C285A
I_TMSP_HASH
gr\u00D3µ##A´}9Ç##*;
675DB824B73C8923
72C35F314D97BDAB
ZEITP
BF
44
26
00
00
XMCBEST[]
Table IT_140[6x1294]
XMCMSEG[]
Table IT_141[3x4332]
CSTRUC_NTF
MCQMEL MCQMFE MCQMUR MCQM
4454442222222222222222222222224454442222222222222222222222224454552222222222222222222222224454
D31D5C000000000000000000000000D31D65000000000000000000000000D31D52000000000000000000000000D31D
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ESTRUC_I0
MC17I00NTF MC17I00ITM MC17I00CSE MC17
4433433454222222222222222222224433433454222222222222222222224433433454222222222222222222224433
D317900E4600000000000000000000D31790094D00000000000000000000D31790033500000000000000000000D317
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
No. 6 Ty. FORM
Name MCEX_UPDATE_03_QRFC
CON_MCVBUP
MCVBUP
445455222222222222222222222222
D36250000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
%_%_CONTR
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
%_%_I_DDIC_HASH
5)¢Ð#M###ÁÒ¼rHõº
32AD14919CDB74FB
59202D95E12C285A
%_%_I_TMSP_HASH
gr\u00D3µ##A´}9Ç##*;
675DB824B73C8923
72C35F314D97BDAB
%_%_ZEITP
BF
44
26
00
00
%_%_XMCBEST
Table IT_140[6x1294]
%_%_XMCMSEG
Table IT_141[3x4332]
No. 5 Ty. FORM
Name XAB_RUN_DRIVER
SYST-REPID
SAPMSSY1
5454555322222222222222222222222222222222
310D339100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
PROGRAM
SAPLERFC
5454454422222222222222222222222222222222
310C526300000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
PROG
SAPLERFC
5454454422222222222222222222222222222222
310C526300000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
NEW_FUNCTION
222222222222222222222222222222
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
%_ARCHIVE
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
RFCTYPE_ABAP4_EXIT
7
0000
7000
SY-XFORM
XAB_READ
544554442222222222222222222222
812F25140000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
IF_FOUND
0
0000
0000
SY-XPROG
SAPMSSY1
5454555322222222222222222222222222222222
310D339100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
%_SPACE
2
0
0
0
No. 4 Ty. FUNCTION
Name RFC_RUN_XAB_DRIVER
NEW_FUNCTION
222222222222222222222222222222
000000000000000000000000000000
000000000000000000000000000000
000000000000000000000000000000
PROGRAM
SAPLERFC
5454454422222222222222222222222222222222
310C526300000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
%_VIASELSCR
0
4
SY-XPROG
SAPMSSY1
5454555322222222222222222222222222222222
310D339100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SYST-REPID
SAPLSXAB
5454554422222222222222222222222222222222
310C381200000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
No. 3 Ty. FUNCTION
Name ARFC_EXECUTE
SYST-REPID
SAPLERFC
5454454422222222222222222222222222222222
310C526300000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
QRETDATA
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CL_BGRFC_SERVER=>TID
222222222222222222222222
000000000000000000000000
000000000000000000000000
000000000000000000000000
RECEIVER_TID
0A64641611A046DF840B0DEB
343333333343334433343444
016464161110464684020452
000000000000000000000000
000000000000000000000000
DATA[]
Table IT_134[2x1918]
FUNCTION=TRFC_QOUT_GET_AND_PROCESSDATA=IDATA[]
Table reference: 13
TABH+ 0(20) = 30A73A6DFE070000B06E226DFE07000000000000
TABH+ 20(20) = 0D00000086000000020000007E07000098000000
TABH+ 40(16) = 043300001013000008000000C1248001
store = 0x30A73A6DFE070000
ext1 = 0xB06E226DFE070000
shmId = 0 (0x00000000)
id = 13 (0x0D000000)
label = 134 (0x86000000)
fill = 2 (0x02000000)
leng = 1918 (0x7E070000)
loop = 152 (0x98000000)
xtyp = TYPE#000087
occu = 8 (0x08000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x709A316DFE070000
pgHook = 0x0000000000000000
idxPtr = 0x0000000000000000
shmTabhSet = 0x0000000000000000
id = 130 (0x82000000)
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 8 (0x08000000)
lineAlloc = 8 (0x08000000)
shmVersId = 0 (0x00000000)
shmRefCount = 1 (0x01000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
collHook = 0x0000000000000000
ext2 = 0xB071226DFE070000
>>>>> 2nd level extension part <<<<<
tabhBack = 0xA084236DFE070000
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
DATA
0A64641611A046DF840B0DEBNONE 00000002##############################
343333333343334433343444444422222222222222222222222222223333333300010000072005019DBBC16F0064E1
016464161110464684020452EFE5000000000000000000000000000000000002000000330B003002DE5635F51F2936
000000000000000000000000000000000000000000000000000000000000000000070000F0E0630108F066BDB0ADB6
000000000000000000000000000000000000000000000000000000000000000002000325A2A0910F2E4D08DAE5730D
<%_L001>
QRFC_VERSION
6.30.060
32332333
6E30E060
00000000
00000000
ACT_QIN
000000000000000000000000
2222222222222222222222222222222222222222222222222223333333333333333333333332222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
<%_L001>-ARFCBLCNT
USE_STOP
2
0
0
0
QRSTATE-ARFCTIME
22222222
00000000
00000000
00000000
NCALL
00000002
33333333
00000002
00000000
00000000
DATA-ARFCLUWCNT
00000002
33333333
00000002
00000000
00000000
STATE[]
Table IT_133[1x972]
FUNCTION=TRFC_QOUT_GET_AND_PROCESSDATA=ISTATE[]
Table reference: 15
TABH+ 0(20) = E0A83A6DFE070000208F286DFE07000000000000
TABH+ 20(20) = 0F0000008500000001000000CC030000FFFFFFFF
TABH+ 40(16) = 043300009011000010000000C1248001
store = 0xE0A83A6DFE070000
ext1 = 0x208F286DFE070000
shmId = 0 (0x00000000)
id = 15 (0x0F000000)
label = 133 (0x85000000)
fill = 1 (0x01000000)
leng = 972 (0xCC030000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000079
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 1
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
isCtfyAble = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x905D316DFE070000
pgHook = 0x0000000000000000
idxPtr = 0x0000000000000000
shmTabhSet = 0x0000000000000000
id = 129 (0x81000000)
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
shmVersId = 0 (0x00000000)
shmRefCount = 1 (0x01000000)
>>>>> 1st level extension part <<<<<
regHook = 0x0000000000000000
collHook = 0x0000000000000000
ext2 = 0xC08D286DFE070000
>>>>> 2nd level extension part <<<<<
tabhBack = 0x608E286DFE070000
delta_head = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
pb_func = 0x0000000000000000
pb_handle = 0x0000000000000000
STATE
0A64641611A046DF840B0DEBNONE 00000002READ MCEX_UPDATE_03_QRFC
3433333333433344333434444444222222222222222222222222222233333333544422224445555445453355544222
016464161110464684020452EFE500000000000000000000000000000000000225140000D358F504145F03F1263000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0Hi,
they're only two extract structures: MC03BF0 and MC03UM0.
Open SE11 with the structures and from the menu utilities -> Versions -> Version Management you should see the changes and the corresponding tp requests...
hope this helps...
Olivier. -
Hello all,
Users have asked me to create an inventory report that combines data from MCBE and MCBR (batch + no batch inventory). So far so good.
Now, users would like an additional display field for vendor.
I was thinking of getting the vendor (for batches) from tables mcha or mch1.
However, field lifnr in mcha is always blank, and only sometimes populated in mch1.
Hence these questions:
1) Is there an SAP standard inventory report that shows the vendor from which inventory was obtained?
2) Why would tables mcha / mch1 not always have the vendor field populated?
Sincerely,
PeterHi,
to print the alv header(for the REUSE_ALV_GRID_DISPLAY F.M.):
1.Activate the event into gt_events table
data: gt_events TYPE slis_t_event
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'
ls_event TYPE slis_alv_event
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events WITH KEY name = g_top_of_page INTO ls_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
2. Is the step that you have implemented.
3. Define the form called TOP_OF_PAGE:
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'HTMLCNTL_TESTHTM2_SAPLOGO'
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = gt_list_top_of_page. -> this is the i.t. where you have completed the data that must be written on the alv header.
Hope this help you,
Carles
ENDFORM. "TOP_OF_PAGE
Maybe you are looking for
-
Does the Macintosh 512k Enhanced use a VGA connection?
I've been thinking about sticking my mac mini inside one of these things.. I'm just woundering what connection the CRT monitor uses. Is it VGA? Somthing like this: http://hackedgadgets.com/2008/01/14/macintosh-512k-upgraded-to-run-os-x-24th-ann ivers
-
Problems with the output of an array
Hallo, I have got problems with giving out an array. I declared two arrays and puted them out, but with the resultarray it doesn�t work. Cansomebody help me? Here is a runtime output: Grad eingeben! 1 Koeffizienten eingeben! 1 2 1x^0 + 2x^1 + 1 Grad
-
Do we have ON-LOGON trigger in reports?
Hi Guys, we use ON-LOGON trigger to connect our form to the required database in forms. If we wanna run our report as a stand alone, how can we avoid that logon in screen, and how can in automatically logon to the required database. Is there any way
-
On Facebook I'm able to delete 1 of the duplicate posts. On Ebay after I click "buy now" & go to the next page I find I have 2 of the same item to pay for separately. This happens about 50% of the time.
-
Download new version now songs are playin messed up
I Just downloaded the new version and all my songs are playing screwed up there like staicy or playing to fast idk its weird anyone have this problem. Its all my songs and videos but they play normally on a differnt player