Need help in Creating classes for my assignment

Hi ,
I just started learning Java and have the following requirement
1)     Create the following classes/interfaces using descriptions:
a)     Account � data members : id:String, type:String, balance:BigDecimal, methods : Account, Account with String parameter, getId, getType, getBalance, setId, setType, setBalance, deposit, withdraw, compareTo, toString
b)     Bank � data members: instance:Bank, accountsMap:Map, customersMap:Map, customersAccount:Map, transactionMap:Map, methods: getAccountsMap, getCustormersMap, getCustomersAccounts, getTransactionMap, associate, addTransaction, getAccount, getCustomer, getAccounts, getTransactions, deposit, withdraw, transfer
c)     AccountDoesNotExistException, BankException, CustomerDoesNotExistException, InsufficientFundsException, InvalidAmountException, ZeroAmountException
2)     Create the util package using the following class
a)     AmountConverter � methods: fromDecimal(BigDecim     al), fromString(String)
In 1 b how to Create Instance:bank in the class .Also how to do part2.If possible can you help me with all the parts.Based on these I've some more to do.

Here is what I've come with
ACCOUNT.JAVA
import java.math.*;
public class Account {
private String Id;
private String Type;
private BigDecimal balance;
public Account( ) {
public Account(String Id,String Type,BigInteger balance) {
this.Id = Id;
this.Type = Type;
this.balance = balance;
public String getId( ) {
return Id;
public void setId(String Id) {
this.Id = Id;
public String getType( ) {
return Type;
public void setType(String Title) {
this.Title = Type;
public String getBalance( ) {
return id;
public void setBalance(String balance) {
this.balance = balance;
public String withdraw( ) {
public String deposit( ) {
public void setLastName(String LastName) {
this.id = id;
CUSTOMER.JAVA
public class Customer {
private String Id;
private String Title;
private String firstName;
private String lastName;
/** Construct a Customer with no data -- must be a no-argument */
public Customer( ) {
/** Construct a Customer with String Parameter */
public Customer(String Id,String Title,String firstName,String lastName) {
this.Id = Id;
this.Title = Title;
this.firstName = firstName;
this.lastName = lastName;
/** Return the Id. */
public String getId( ) {
return Id;
/** Set the Id */
public void setId(String Id) {
this.Id = Id;
/** Return the Title */
public String getTitle( ) {
return Title;
/** Set the Title */
public void setTitle(String Title) {
this.Title = Title;
/** Return the Firstname. */
public String getFirstName( ) {
return id;
/** Set the Firstname. */
public void setFirstName(String FirstName) {
this.id = id;
/** Return the Lastname. */
public String getLastName( ) {
return LastName;
/** Set the Lastname. */
public void setLastName(String LastName) {
this.id = id;
TRANSRECORD.JAVA
import java.util.*;
import java.math.*;
public class TransRecord implements Comparable{
private Date timeStamp;
private String transType;
private BigDecimal transAmt;
/** Construct a Trans Record with no data -- must be a no-argument */
public TransRecord( ) {
/** Construct a Customer with String Parameter */
public Customer(String transType,String transAmt) {
this.transType = transType;
this.transAmt = transAmt;
/** Return the timeStamp. */
public String gettimeStamp( ) {
return timeStamp;
/** Set the timeStamp */
public void settimeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
/** Return the TransType */
public String getTransType( ) {
return TransType;
/** Set the TransType */
public void setTransType(String TransType) {
this.TransType = TransType;
/** Return the TransAmt */
public String getTransAmt( ) {
return TransAmt;
/** Set the TransAmt */
public void setTransAmt(String TransAmt) {
this.TransAmt = TransAmt;
/** Return a String representation. */
public String toString( ) {
/** CompareTo method */
public int compareTo(Object argument)
===============
ACCOUNTDOESNOTEXISTEXCEPTION.JAVA
public class AccountDoesNotExistException
               extends Exception
     public AccountDoesNotExistException()
          super();
     public AccountDoesNotExistException(String message)
          super(message);
=================
BANKEXCEPTION.JAVA
public class BankException
               extends Exception
     public BankException()
          super();
     public BankException(String message)
          super(message);
CUSTOMERDOESNOTEXISTEXCEPTION.JAVA
public class CustomerDoesNotExistException
               extends Exception
     public CustomerDoesNotExistException()
          super();
     public CustomerDoesNotExistException(String message)
          super(message);
ACCOUNTDOESNOTEXISTEXCEPTION.JAVA
public class AccountDoesNotExistException
               extends Exception
     public AccountDoesNotExistException()
          super();
     public AccountDoesNotExistException(String message)
          super(message);
INSUFFICIENTFUNDSEXCEPTION.JAVA
public class InsufficientFundsException
               extends Exception
     public InsufficientFundsException()
          super();
     public InsufficientFundsException(String message)
          super(message);
INVALIDAMOUNTEXCEPTION.JAVA
public class InvalidAmountException
               extends Exception
     public InvalidAmountException()
          super();
     public InvalidAmountException(String message)
          super(message);
ZEROAMOUNTEXCEPTION.JAVA
public class ZeroAmountException
               extends Exception
     public ZeroAmountException()
          super();
     public ZeroAmountException(String message)
          super(message);
I need help with Bank Class and the util class.Correct me If I've missed any exceptions or if any syntax is wrong
THanks
AKsh

Similar Messages

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need help in creating prompt for Month To Date Report.

    <span class="postbody"><font size="2">Hi All <br />I need to create a Month To Date Report using month(Start date & End date) as prompts, By default it has to run on the previous month data or if user selects his own range of dates then it has to bring the data for that range of dates ,one more thing is i am not showing the month and date columns on the report.Can any one help me how to create prompt for this in DeskI XIR2</font></span>

    Could you clarify some things? You are saying you are trying to transform the xml output of a webservice with an xsd, but an xsd is a schema that describes the allowed format of a xml file. If you want to transform xml from one format to an other (from one xsd to an other) you have to use a xsl file. You can make and test this with JDeveloper. Are you calling the webservice from esb or bpel?
    Kind Regards,
    Andre

  • Need help on Creating YTD for a month variable in WEBi...

    Dear Experts,
    I am using BO4.1. I am creating a WEBi report where I have a month variable which shows months in the below format
                                                                                                                                             I need to create YTD for the year ...Please help me .. this has to be displayed in chart.. So using the sum(No.Of.Ans ) doesnt work in chart.
    Please suggest any other ideas...

    Hi Bala,
    Create a variable at universe level,and assigned table must be the table from which you are getting month.
    Now take the object "YTD" into second query
    Merge the Month object and YTD object
    Create a variable for balance,
    =If [month]="YTD" then sum([balance]) else [balance]
    Noe you will get the required output as your requirement,
    Regards,
    Samatha B

  • Need help in creating documents for Contacts in Oracle HRMS

    We are trying to add documents to Contacts in Oracle HRMS. (11.5.10.2)
    Navigation: Oracle HR Super User -> Fastpath -> Documents of Record
    Search for a Contact -> Manage Documents of Record -> Create Document of Record.
    In Document Information -> Type is mandatory field but the LOV is not returning any values.
    The LOV works fine for both system defined and custom document types when trying to create documents for Employees or External Contractors.
    But we would need to be able to add documents for Contacts also.
    Please let us know if this expected functionality or if there is any setup that is needed.
    Any help in this regard is highly appreciated.
    Thanks,
    Kiranmayi.

    We are trying to add documents to Contacts in Oracle HRMS. (11.5.10.2)
    Navigation: Oracle HR Super User -> Fastpath -> Documents of Record
    Search for a Contact -> Manage Documents of Record -> Create Document of Record.
    In Document Information -> Type is mandatory field but the LOV is not returning any values.
    The LOV works fine for both system defined and custom document types when trying to create documents for Employees or External Contractors.
    But we would need to be able to add documents for Contacts also.
    Please let us know if this expected functionality or if there is any setup that is needed.
    Any help in this regard is highly appreciated.
    Thanks,
    Kiranmayi.

  • Hi I need help in creating role for DEVELOPERS and HCM GUYS in ERP DEV. sys

    Hi Experts
    I am working as a Support Security Consultant. Now I have assigned to another implemenation Project.
    My client asks to create 2 roles in DEV. system the requirement is:
    1) He asks to create a role for develpoers in dev system fro devepment activities ( report creation, screen creation..etc..) and these people don't modify the HR related tables
    2) He asks to create role for HCM guys in development system to work on HCM Configuration and to work on HCM areas but these people should not involve into develpometn activites
    My questions is what are the tcodes we have to maintain in the roles to reach his requirement.
    I asked the same thing to my Client he doesn' t provide any information
    Please anyone help me on this
    Thanks
    Naresh

    Hi,
    for the first query please check auth object -Authorization Object S_TABU_DIS (Table Maintenance)
    http://help.sap.com/saphelp_nw04s/helpdata/en/1e/e867408cd59b0ae10000000a155106/content.htm
    No Worries
    KG

  • Need help w/ created classes and objects

    I am having a difficult time understanding what is wrong w/ my classes and objects. I've looked in two books and have messed around a bit. Here is what I am -attempting- to do.
    I want to make a class called CLOTHING. In this class i want objects such as shirt and pants (for now).
    these are the errors im getting:
    .\Shirt.java:6: invalid method declaration; return type required
         public Shirt(int size){
                   ^
    .\Shirt.java:3: class Clothing is public, should be declared in a file named Clothing.java
    public class Clothing {
           ^
    MyClassHW.java:10: cannot resolve symbol
    symbol  : constructor Shirt  (int,int)
    location: class Shirt
              myShirt = new Shirt(1,1);
                              ^
    3 errors------------------------------------------------------------
    This is the code for my Clothing class:
    import java.awt.*;
    public class Clothing {
         private int shirtSize;
         private void Shirt(Graphics s, int h, int v){
         Polygon shirts;
              shirts = new Polygon();
              shirts.addPoint(5+h,8+v); // 1
              shirts.addPoint(17+h,12+v); // 2
              shirts.addPoint(19+h,13+v); // 3
              shirts.addPoint(33+h,8+v); // 4
              shirts.addPoint(37+h,13+v); // 5
              shirts.addPoint(25+h,20+v); // 6
              shirts.addPoint(25+h,28+v); // 7
              shirts.addPoint(15+h,28+v); // 8
              shirts.addPoint(15+h,20+v); // 9
              shirts.addPoint(1+h,12+v); //10
              s.fillPolygon(shirts);
    }from what i understand each object is essentially a method...
    Here is the code for the java applet I'm making:
    import java.awt.event.*;
    import java.awt.*;
    import java.applet.*;
    public class MyClassHW extends Applet { // implements ActionListener, AdjustmentListener {
         Shirt myShirt;
         int size;
         public void init(){
              myShirt = new Shirt(1,1);
    // <applet code = "MyClassHW.class" height = 300 width=300> </applet>thank you for your time and help. as always, your efforts are appriciated.

    .\Shirt.java:6: invalid method declaration; return type required     public Shirt(int size){
    I guess, public Shirt(int size) is constructor in class shirt. You have one int in this constructor. Shirt(int size)
    Here you initialize your shirt with two int:
    MyClassHW.java:10: cannot resolve symbolsymbol : constructor Shirt (int,int)location: class Shirt          myShirt = new Shirt(1,1);
    Shirt(int size, int what?)
    It's why it show such message.
    But even if you fix it seems like you have very vague ideas about what you are doing.
    As far as I understood you need three classes.
    First applet Clothing:
    public class Clothing extends Applet{
    Shirt myShirt;
    Pants myPants;
    public void init() {
    myShirt = new Shirt(1); // small shirt
    myPants = new Pants(32, 40); // medium waist and long legs
    Second and third your classes Shirt and Pants:
    public class Shirt extends Object {
    int size;
    public Shirt(int s) {
    size = s;
    public int getSize () {
    return size;
    same for Pants, only you need two parameters for it or whatever you want.
    You could design it diffrently if you want derive your Shirts and Pants from Clothing and then to use them in your applet. But, indeeed, you desperately have to do some serious reading, where authors are accurate in they definitions and stuff, because it's kind of complicated.

  • Need help in creating script for "Task Schedule" in Oracle E-Bussiness Suit

    Hi,
    I need some urgent help regarding the scripting of Oracle E-Business Suite application. I am new towards working on Oracle Applications. I have been using LoadRunner 11.0 and protocol oracle applications 11i for the scripting of the application. The problem is as follows:
    Scenario- Schedule an incident to a resource.
    1) Log in to the application.
    2) Open Oracle Forms Page.
    3) Enter the details of the incident number.
    4) Right click on the incident number and then select “schedule” option.
    5) Check / Select the resource listed in the new form.
    6) Click on “schedule” Button.
    7) Exit the oracle forms.
    8) Logout from the application.
    I have recorded the scenario but when I try to run the script, it fails after completing the 4th step from the scenario mentioned above. I have done all the required co-relations..
    Another issue that I have noticed in the scipt is that it records a lot of requests to the AppsTCFServer.
    When I check the Tree View of the script, I have found that there are around 25 requests to the AppsTCFServer recorded in the script. In the header of these requests a TCF Start/Session number gets generated randomly. This number stays the same in few AppsTCFServer request headers and then a new number gets generated and the cycle continues.
    However LoadRunner does not generate this number by itself during replay. I cannot find this number in any previous responses.
    In the last few days, I have tried my hands on Oracle Openscript tool to record the above scenario, but still I am getting the same problem, i.e instead of getting the correct response from the server for the AppsTCFServer requests, I am getting the message "X-session 7098.... not found - aborting ".
    I get this message whether I use LoadRunner tool or the OpenScript tool.
    Please help me solve this issue.
    Thanks & Regards,
    Soumya Mukherjee

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Need help in creating XSD for a WSDL file to tranform given XML

    Hi,
    Please let me knoe if this is the right forum to post the query below:
    We are trying to transform a XML output from a webservice using a XSD file. But we are facing problem as the XML output has some namespace issue and schema due to which transformation is not working fine. I am pasting the files below:
    WSDL file used is
    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/Projectix20/SOAPAccess" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://tempuri.org/Projectix20/SOAPAccess" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/Projectix20/SOAPAccess">
    <s:element name="ExecuteSQLToXML">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="ExecuteSQLToXMLResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="ExecuteSQLToXMLResult">
    <s:complexType mixed="true">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="NewDataSet">
    <s:complexType>
    <s:choice>
    <s:element minOccurs="0" maxOccurs="unbounded" name="Table1">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="10" name="FName" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:choice>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetDataTablePage">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="1" maxOccurs="1" name="PageNumber" type="s:int" />
    <s:element minOccurs="1" maxOccurs="1" name="RecordsPerPage" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetDataTablePageResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetDataTablePageResult">
    <s:complexType mixed="true">
    <s:sequence>
    <s:any />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRecordCount">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="SQL" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="GetRecordCountResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="GetRecordCountResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="UploadCanAtt">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="CanID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="Filename" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="bytesData" type="s:base64Binary" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="UploadCanAttResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="UploadCanAttResult" type="s:int" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="DownloadCanAtt">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="1" maxOccurs="1" name="CanAttID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="DownloadCanAttResponse">
    <s:complexType>
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="DownloadCanAttResult" type="s:base64Binary" />
    </s:sequence>
    </s:complexType>
    </s:element>
    </s:schema>
    </wsdl:types>
    <wsdl:message name="ExecuteSQLToXMLSoapIn">
    <wsdl:part name="parameters" element="tns:ExecuteSQLToXML" />
    </wsdl:message>
    <wsdl:message name="ExecuteSQLToXMLSoapOut">
    <wsdl:part name="parameters" element="tns:ExecuteSQLToXMLResponse" />
    </wsdl:message>
    <wsdl:message name="GetDataTablePageSoapIn">
    <wsdl:part name="parameters" element="tns:GetDataTablePage" />
    </wsdl:message>
    <wsdl:message name="GetDataTablePageSoapOut">
    <wsdl:part name="parameters" element="tns:GetDataTablePageResponse" />
    </wsdl:message>
    <wsdl:message name="GetRecordCountSoapIn">
    <wsdl:part name="parameters" element="tns:GetRecordCount" />
    </wsdl:message>
    <wsdl:message name="GetRecordCountSoapOut">
    <wsdl:part name="parameters" element="tns:GetRecordCountResponse" />
    </wsdl:message>
    <wsdl:message name="UploadCanAttSoapIn">
    <wsdl:part name="parameters" element="tns:UploadCanAtt" />
    </wsdl:message>
    <wsdl:message name="UploadCanAttSoapOut">
    <wsdl:part name="parameters" element="tns:UploadCanAttResponse" />
    </wsdl:message>
    <wsdl:message name="DownloadCanAttSoapIn">
    <wsdl:part name="parameters" element="tns:DownloadCanAtt" />
    </wsdl:message>
    <wsdl:message name="DownloadCanAttSoapOut">
    <wsdl:part name="parameters" element="tns:DownloadCanAttResponse" />
    </wsdl:message>
    <wsdl:portType name="SOAPAccessSoap">
    <wsdl:operation name="ExecuteSQLToXML">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:ExecuteSQLToXMLSoapIn" />
    <wsdl:output message="tns:ExecuteSQLToXMLSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetDataTablePage">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:GetDataTablePageSoapIn" />
    <wsdl:output message="tns:GetDataTablePageSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetRecordCount">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Executes a SQL statement and returns a generic XML document with results from SQL statement.</documentation>
    <wsdl:input message="tns:GetRecordCountSoapIn" />
    <wsdl:output message="tns:GetRecordCountSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="UploadCanAtt">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Uploads a text or binary attachment file for a Candidate record.</documentation>
    <wsdl:input message="tns:UploadCanAttSoapIn" />
    <wsdl:output message="tns:UploadCanAttSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="DownloadCanAtt">
    <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">Uploads a text or binary attachment file for a Candidate record.</documentation>
    <wsdl:input message="tns:DownloadCanAttSoapIn" />
    <wsdl:output message="tns:DownloadCanAttSoapOut" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SOAPAccessSoap" type="tns:SOAPAccessSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    <wsdl:operation name="ExecuteSQLToXML">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/ExecuteSQLToXML" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetDataTablePage">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/GetDataTablePage" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetRecordCount">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/GetRecordCount" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="UploadCanAtt">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/UploadCanAtt" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="DownloadCanAtt">
    <soap:operation soapAction="http://tempuri.org/Projectix20/SOAPAccess/DownloadCanAtt" style="document" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SOAPAccess">
    <wsdl:port name="SOAPAccessSoap" binding="tns:SOAPAccessSoap">
    <soap:address location="http://sales.projectix.com:81/customer/SOAPAccess.asmx" />
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    XSD file used for transformation is:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
    <xs:element name="ExecuteSQLToXMLResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ExecuteSQLToXMLResult"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="parameters">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="ExecuteSQLToXMLResponse"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="ExecuteSQLToXMLResult">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="NewDataSet"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="FNAME" type="xs:string"/>
    <xs:element name="Table1">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="FNAME"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="NewDataSet">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="unbounded" ref="Table1"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    XML Output from webservice call that we are trying to tranform using above XSD is:
    <parameters >
    <ExecuteSQLToXMLResponse xmlns = "http://tempuri.org/Projectix20/SOAPAccess" >
    <ExecuteSQLToXMLResult >
    <NewDataSet xmlns = "" >
    <xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema" xmlns:msdata = "urn:schemas-microsoft-com:xml-msdata" >
    <xs:element name = "NewDataSet" msdata:IsDataSet = "true" >
    <xs:complexType >
    <xs:choice maxOccurs = "unbounded" >
    <xs:element name = "Table1" >
    <xs:complexType >
    <xs:sequence >
    <xs:element name = "FNAME" type = "xs:string" minOccurs = "0" ></xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    <Table1 >
    <FNAME >
    JOHN
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    JOHN
    </FNAME>
    </Table1>
    <Table1 >
    <FNAME >
    John
    </FNAME>
    </Table1>
    </NewDataSet>
    </ExecuteSQLToXMLResult>
    </ExecuteSQLToXMLResponse>
    </parameters>
    I am not sure what we are missing in XSD file that the XML output is not getting transformed correctly...although we tried transforming the XML output by removing some information in XML output above and it was getting trasformed properly..
    We remove
    1. xmlns = "http://tempuri.org/Projectix20/SOAPAccess" from <ExecuteSQLToXMLResponse xmlns = "http://tempuri.org/Projectix20/SOAPAccess" >
    2. xmlns = "" from <NewDataSet xmlns = "" >
    3 remove <parameters > and </parameters > tags from output and the XML Output is getting tranformed correctly.
    Please let us know if we can transform the XML Output without requiring these removals.
    Thanks,
    Pawan

    Could you clarify some things? You are saying you are trying to transform the xml output of a webservice with an xsd, but an xsd is a schema that describes the allowed format of a xml file. If you want to transform xml from one format to an other (from one xsd to an other) you have to use a xsl file. You can make and test this with JDeveloper. Are you calling the webservice from esb or bpel?
    Kind Regards,
    Andre

  • Need Help to create new screen for RF Sapconsole

    Hi Guru's
    I'm new on RF (but some years in ABAP) since last week.
    I need help to create new screens for RF (SAPLLMOB).
    Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
    I have to develop 2 new screens with really few time.
    And, another subsidiary question :
    how SAP can transfert information between the flash gun and the screen i have developped.
    Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
    It's a new strange world for me today...
    Many thanks to everyone who can explain me
    Alain

    hi,
    I am facing this problem as well. Is there any reference to create the new screen?
    Hope someone can help! Thanks!
    Regards,
    Darren

  • I need help with Creating Key Pairs

    Hello,
    I need help with Creating Key Pairs, I generate key pais with aba provider, but the keys generated are not base 64.
    the class is :
    import java.io.*;
    import java.math.BigInteger;
    import java.security.*;
    import java.security.spec.*;
    import java.security.interfaces.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import au.net.aba.crypto.provider.ABAProvider;
    class CreateKeyPairs {
    private static KeyPair keyPair;
    private static KeyPairGenerator pairGenerator;
    private static PrivateKey privateKey;
    private static PublicKey publicKey;
    public static void main(String[] args) throws Exception {
    if (args.length != 2) {
    System.out.println("Usage: java CreateKeyParis public_key_file_name privete_key_file_name");
    return;
    createKeys();
    saveKey(args[0],publicKey);
    saveKey(args[1],privateKey);
    private static void createKeys() throws Exception {
    Security.addProvider(new ABAProvider());
    pairGenerator = KeyPairGenerator.getInstance("RSA","ABA");
    pairGenerator.initialize(1024, new SecureRandom());
    keyPair = pairGenerator.generateKeyPair();
    privateKey = keyPair.getPrivate();
    publicKey = keyPair.getPublic();
    private synchronized static void saveKey(String filename,PrivateKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream(new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    private synchronized static void saveKey(String filename,PublicKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream( new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    the public key is:
    �� sr com.sun.rsajca.JSA_RSAPublicKeyrC��� xr com.sun.rsajca.JS_PublicKey~5< ~��% L thePublicKeyt Lcom/sun/rsasign/p;xpsr com.sun.rsasign.anm����9�[ [ at [B[ bq ~ xr com.sun.rsasign.p��(!g�� L at Ljava/lang/String;[ bt [Ljava/lang/String;xr com.sun.rsasign.c�"dyU�|  xpt Javaur [Ljava.lang.String;��V��{G  xp   q ~ ur [B���T�  xp   ��ccR}o���[!#I����lo������
    ����^"`8�|���Z>������&
    d ����"B��
    ^5���a����jw9�����D���D�)�*3/h��7�|��I�d�$�4f�8_�|���yuq ~
    How i can generated the key pairs in base 64 or binary????
    Thanxs for help me
    Luis Navarro Nu�ez
    Santiago.
    Chile.
    South America.

    I don't use ABA but BouncyCastle
    this could help you :
    try
    java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    java.security.KeyPairGenerator kg = java.security.KeyPairGenerator.getInstance("RSA","BC");
    java.security.KeyPair kp = kg.generateKeyPair();
    java.security.Key pub = kp.getPublic();
    java.security.Key pri = kp.getPrivate();
    System.out.println("pub: " + pub);
    System.out.println("pri: " + pri);
    byte[] pub_e = pub.getEncoded();
    byte[] pri_e = pri.getEncoded();
    java.io.PrintWriter o;
    java.io.DataInputStream i;
    java.io.File f;
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pub64"));
    o.println(new sun.misc.BASE64Encoder().encode(pub_e));
    o.close();
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pri64"));
    o.println(new sun.misc.BASE64Encoder().encode(pri_e));
    o.close();
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.FileReader("d:/pub64"));
    StringBuffer keyBase64 = new StringBuffer();
    String line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] pubBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    br = new java.io.BufferedReader(new java.io.FileReader("d:/pri64"));
    keyBase64 = new StringBuffer();
    line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] priBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    java.security.KeyFactory kf = java.security.KeyFactory.getInstance("RSA","BC");
    java.security.Key pubKey = kf.generatePublic(new java.security.spec.X509EncodedKeySpec(pubBytes));
    System.out.println("pub: " + pubKey);
    java.security.Key priKey = kf.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(priBytes));
    System.out.println("pri: " + priKey);
    catch(Exception e)
    e.printStackTrace ();
    }

  • Need help in dynamic report for a range of year and period

    Dear all,
    I need help in creating an ALV report with dynamic columns based on the Year and period entered on the selection screen. for example if in the year we enter 2002 and period range from 10 to 12 then we should get the 3 columns display for cost(example) for period 10/2002, 11/2002 and 12/2002.
    Can anyone help me in achieving this dynamically since the user can enter the year also in intervals along with the period and data also needs to be populated in the corresponding columns.
    An example code would be of great help.
    Thanks,
    Amit

    Hi,
    Use field symbols as follows.
    TYPE-POOLS : SLIS.
    TABLES : MARC,T001W.
    DATA : BEGIN OF ITAB OCCURS 0,
           MATNR LIKE MARC-MATNR,
           END OF ITAB.
    DATA : FIELDSTAB TYPE LVC_T_FCAT,
           STAB      TYPE LVC_S_FCAT,
           T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
           S_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
           NEW_LINE TYPE REF TO DATA,
           NEW_TABLE TYPE REF TO DATA,
           INDEX(3) TYPE C,
           STR(70),
           TEXT(6),
           CNT(1),
           TEXT1(16),
           REPID LIKE SY-REPID.
    FIELD-SYMBOLS : <FS> TYPE STANDARD TABLE,
                    <WA> TYPE ANY.
    SELECT-OPTIONS : S_WERKS FOR MARC-WERKS NO INTERVALS,
                     S_MATNR FOR MARC-MATNR NO INTERVALS.
    INITIALIZATION.
      REPID = SY-REPID.
    START-OF-SELECTION.
      SELECT * FROM MARC
               INTO CORRESPONDING FIELDS OF TABLE ITAB
               WHERE MATNR IN S_MATNR
               AND   WERKS IN S_WERKS.
      SORT ITAB BY MATNR.
      DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR.
      STAB-FIELDNAME = 'MATNR'.
      STAB-DATATYPE  = 'CHAR'.
      STAB-INTLEN    = '18'.
      APPEND STAB TO FIELDSTAB.
      CLEAR CNT.
      LOOP AT S_WERKS.
        CLEAR TEXT.
        CNT = CNT + 1.
        CONCATENATE  'EISLO' CNT INTO TEXT.
        STAB-FIELDNAME = TEXT.
        STAB-DATATYPE  = 'CHAR'.
        STAB-INTLEN    = '16'.
        APPEND STAB TO FIELDSTAB.
        CLEAR S_WERKS.
      ENDLOOP.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = FIELDSTAB
        IMPORTING
          EP_TABLE        = NEW_TABLE.
      ASSIGN NEW_TABLE->* TO <FS>.
      CREATE DATA NEW_LINE LIKE LINE OF <FS>.
      ASSIGN NEW_LINE->* TO <WA>.
      PERFORM MOVE_DATA.
      CLEAR S_FIELDCAT.
      S_FIELDCAT-FIELDNAME = 'MATNR'.
      S_FIELDCAT-TABNAME = ITAB.
      S_FIELDCAT-SELTEXT_M = 'Part Number'.
      S_FIELDCAT-NO_ZERO = 'X'.
      S_FIELDCAT-DDICTXT   = 'M'.
      APPEND S_FIELDCAT TO T_FIELDCAT.
      CLEAR CNT.
      LOOP AT S_WERKS.
        CLEAR T001W.
        CNT = CNT + 1.
        SELECT SINGLE * FROM T001W WHERE WERKS = S_WERKS-LOW AND SPRAS = SY-LANGU.
        CLEAR TEXT.
        CONCATENATE 'EISLO' CNT INTO TEXT.
        S_FIELDCAT-FIELDNAME = TEXT.
        S_FIELDCAT-SELTEXT_M = T001W-NAME2.
    S_FIELDCAT-NO_ZERO = 'X'.
        S_FIELDCAT-DDICTXT   = 'M'.
        APPEND S_FIELDCAT TO T_FIELDCAT.
        CLEAR S_WERKS.
      ENDLOOP.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          IT_FIELDCAT = T_FIELDCAT[]
        TABLES
          T_OUTTAB    = <FS>.
    *&      Form  MOVE_DATA
          text
    FORM MOVE_DATA.
      LOOP AT ITAB.
        CLEAR STR.
        CONCATENATE ITAB-MATNR ' ' INTO STR SEPARATED BY SPACE.
        LOOP AT S_WERKS.
          CLEAR MARC.
          SELECT SINGLE * FROM MARC WHERE MATNR = ITAB-MATNR AND WERKS = S_WERKS-LOW.
          IF SY-SUBRC EQ 0.
            CLEAR TEXT1.
            TEXT1 = MARC-EISLO.
            CONCATENATE STR TEXT1 INTO STR SEPARATED BY SPACE.
          ELSE.
            CONCATENATE STR '0' INTO STR SEPARATED BY SPACE.
          ENDIF.
        ENDLOOP.
        <WA> = STR.
        APPEND <WA> TO <FS>.
        CLEAR ITAB.
      ENDLOOP.
    ENDFORM.                    "MOVE_DATA
    Reward points if helpful.
    Regards,
    Sankar..

  • Need help to create report with jpeg/gif image

    Hello,
    I need help with creating a form with a special jpeg/gif seal. I never done this Java. Until now, I created all forms with ansi C++ with HP escape characters to draw lines, boxs, and text. This form will contain boxes which is populated with database information read from a text file.
    Since this form contains a special seal on the upper right, I don't think it can be done with old fashion ansi C++. How can I create a form with Java and create it as a simple exe to just print the form to a specified printer.
    Thanks,
    John

    Hi,
    I am creating a form with boxes (lines and text). What is special about this form is that it has an image jpeg or gif at the top right corner. Is is a state department seal. Up to this form, I had used ansi C++ and print out escape HP character to print out the lines, boxes, and text. I have no idea how to print out the image. I am new to JAVA and only 1 class in it. Is there sample code out there to create this type of form with the image? I need a starting point.
    Thanks,
    John

  • Need help to create SharePoint 2013 Designer workflow

    Hi TechNet Community Team,
    I've one list "Purchase Order" where I'm storing the data for purchase order details below are
    the fields.
    List Name = Purchase Order
    Order No, Order Date, Part No, Part Qty, Delivery Date, Delivery Qty, Balance Qty.
    Now in above list I'm storing the Purchase order details to check Order Qty and Balance Qty for every part
    no and this list is working fine.
    Now my requirement is to create one more list to issue the Part No from available Balance Qty in above List "Purchase Order".
    So I thought to create new list with below details (Please suggest me if you have other idea also I can use
    only SharePoint OutofBox feature or SharePoint Designer 2013):-
    List Name = "Issue Order"
    Issue No, Part No, Balance Qty, Issue Qty, Issue Date, Remaining Balance Qty OR Stock Qty
    So in List Name "Issue Order" once user will select "Part No" the "Balance Qty" will show the available Qty (from Purchase Order
    List). And once he enter Qty in "Issue Qty" column it will show the remaining Qty in "Remaining Balance Qty OR Stock Qty" column. 
    Also "Remaining Balance Qty OR Stock Qty" will get update in "Balance Qty" column in first list "Purchase Order" list so next time
    when user will issue the Qty from "Issue Order" he will get the correct Qty for Part No.
    Need your help to create workflow for List "Issue Order" so user can issue the items from this list
    and balance qty will update accordingly in List Name = Purchase Order. So next time when user will issue the "Part No" he will get correct quantity.

    Hi,
    For the Point# 1, per my understanding, there are two columns in the list2, both columns are getting values from list1. In List2, when user select a value for the
    “Part No”, you want the “Balance Qty” column to be populated automatically.
    As there is no such OOTB feature can meet this requirement, custom code using JavaScript would be required.
    The two similar demos below would be helpful:
    http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPCascadeDropdowns
    http://www.codeproject.com/Tips/758909/Two-Level-Cascading-Drop-Down-in-SharePoint-using
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Need help in creating custom reports

    hello,
    I am using EM 10.2.0.2 on windows 32-bit.
    All EM components are installed on a single machine.
    Have installed AGENT 10.1.0.5 for managing targets which are on LINUX 2.1
    Please help me in getting the solution for the following queries:
    (a)I need to create a custom report regarding the CAPACITY MANAGEMENT .
    (b)I have some UDM defined but I am not able to use these UDM while creating custom report.
    (c)Also is there any possibility that we can use views other than REPOSITORY VIEWS. What I meant was : instead of using REPOSITORY VIEWS can we use the tables of the target instances.
    Thanks in advance.

    Same post
    Need help on repository views for creating custom capacity planning reports

Maybe you are looking for