Mapping of Special Information Type function to SSHR HR professional menu

Hi ,
Can we add the Special Information Type (SIT) or Extra Information Type (EIT) function to HR Professional menu.
Thanks
Siva

Create a different functions for various SIT Functionality.
like
OA.jsp?akRegionCode=HR_CREATE_PROCESS_TOP_SS&akRegionApplicationId=800&OAFunc=TEST_HOLIDAY_SIT_SS (URL)
pAMETranType=SSHRMS&pAMEAppId=800&pProcessName=HR_SIT_JSP_PRC&pItemType=HRSSA&pCalledFrom=TEST_HOLIDAY_SIT_SS&pPersonID=&pFromMenu=Y (Parameter)
Personlize the page on Function level for various SIT Functionality.

Similar Messages

  • Extending SSHR Special Information Types validation

    Hi,
    I have a requirement to validate new entry or update on specific type of SIT after clicking Apply button.
    Other than validating values, i also required to set specific attribute value based on user input
    The problem occurs cos I can't find where they put the inputted value in the ViewObject, except from oapagecontext.getParameter("HrKeyFlex1").
    The navigations are Employee Self Service -> Special Information Types -> Click Add on one detail table. when examined, it show values from a Key FlexField (KFF) and (if rendered) Desc FlexField (DFF).
    Based on "About this Page" information, the KFF and DFF stored in SpecialInformationUpdateVO, but there is only a set of Attribute1 to Attribute20 which hold values for DFF, where are field Segment1 to Segment20 which hold values for KFF ??

    Hi,
    thanks for replying,
    I'm afraid I don't understand the solution you gave since I'm still a newbie, only a week ago assigned to learn extending OA Framework.
    I only can find corresponding VO which is
    oracle.apps.per.selfservice.specialinformation.server.SpecialInformationUpdateVO.xml
    oracle.apps.per.selfservice.specialinformation.server.SpecialInformationUpdateVORowImpl.class
    oracle.apps.per.selfservice.specialinformation.server.SpecialInformationUpdateVOImpl.class
    So far I come with a work around to validate each field individually, but this method can't set or change user inputted value
    Step I've done :
    1. extend oracle.apps.per.selfservice.specialinformation.webui.SitUpdateCO controller class to at.oracle.apps.per.selfservice.specialinformation.webui.ATSITUpdateCO
    2. Override processFormRequest method, retrieve values from form request parameter
    String cost_center = (String) oapagecontext.getParameter("HrSitKeyFlex2");
    String nature = (String) oapagecontext.getParameter("HrSitKeyFlex3");
    String activity = (String) oapagecontext.getParameter("HrSitKeyFlex4");
    String item = (String) oapagecontext.getParameter("HrSitKeyFlex1");
    String unit_price = (String) oapagecontext.getParameter("HrSitKeyFlex12");
    make a call to PL/SQL stored procedure to validate these values, if the result is error, then raise an OAException
    3. personalize the page so it will use extended controller
    I need to set Segment7 (HrSitKeyFlex7) which hold total_price
    to HrSitKeyFlex1 * HrSitKeyFlex12
    Could you give further explanation on :
    1. find corresponding (KFF) classes, looking at the SpecialInformationAM, no VO or AM query fields from hr.per_analysis_criteria table
    2. what is VRule KFF bean ? and how to add
    3. Cross Validation Rules to KFF metadata (do you mean TABLE with metadata ?, am i suppose to create a trigger on insert ?)

  • Special information types

    how can we restrict the No. of SITs available through a specific hr responsibility..pls advise

    Here are the steps on how to restrict SITs
    1.Create a custom form
    Go to US HRMS Manager -> Security -> Custom form
    Select Enter Person Special Information in the 'form to be customized' field
    Give a name to custom form and save
    In the restrictions, select 'Restrict by Special Information type' and select the SIT name in the value field.
    Check exclude or include depending on whether you want to include or exclude that SIT
    Save the record
    2.Create a taskflow node
    Go to US HRMS Manager -> Security -> taskflow node
    Enter a name for the node
    Select 'Enter Person Special Information' in the form field
    In the customization field, select the custom form that you have created in step1
    Save the record
    3. Assign the node to taskflow
    Go to US HRMS Manager -> Security -> taskflow definitions
    Query for your taskflow (e.g. US HRMS Person Taskflow)
    In the node name field, select the node that you have created in step 2 and save the record
    Requery the taskflow
    Put the cursor in the navigation options
    delete 'Special' node, save the record and add the node that you have created
    Now you can only see those specific SITs that you have included in the custom SIT form
    Note: Do not use seeded taskflow, create a copy of it and then once the node is added, add the taskflow to the function in function definition form.
    Let me know if you have any questions..
    -Jay

  • (HR) SPECIAL INFORMATION TYPE 등록화면의 CATEGORY 기능에 대해서

    제품 : HR_PER
    작성날짜 : 2006-05-15
    (HR) SPECIAL INFORMATION TYPE 등록화면의 CATEGORY 기능에 대해서
    ===============================================
    PURPOSE
    11.5.10 version에서는 Category가 추가 되었는데, Job, Position, Other, OSHA, ADA, OTA, Enabled의 Check시 기능에 대한 정보
    Explanation
    아래의 내용은 Windows Help 내용에서 발췌한 것입니다.
    Enabling Special Information Types
    Use the Special Information Types window to enable special information types for the Business Group, and to select how you want to use them.
    To enable Special Information Types:
    1. Select the special information types you want to use in your Business Group.
    2. Enable each type by checking the Enabled check box.
    3. Check the other boxes to specify how you plan to use the special information type. This makes it available in the list of values in other windows as follows:
    Job: in the Job Requirements window
    ==> Job 정의화면에서 Requirements 버튼
    Position: in the Position Requirements window
    ==> Position정의화면에서 Others버튼을 눌러나오는 List중 Requirements
    Other: in the Special Information window
    Skill(OTA): in the Skill Provisions and Search for Event windows in Oracle Training Administration
    The OSHA and ADA check boxes are for US users only.
    ==> OSHA과 ADA는 US user만을 위한 기능으로,
    OSHA는 Occupational Safety and Health Administration (미)직업 안전 위생 관리국,
    ADA는 American Disabilities Act (미) 장애인법 의 약자입니다.
    각각의 check option은 특정 화면에서만 available하도록 하는 기능입니다.
    그렇기 때문에, Note : 257241.1 처럼
    fact: Oracle Human Resources
    fact: PERWSPDC - Enter Person Special Information
    fact: PERWSDCL - Define Special Information Types
    symptom: Cannot see Special Information Types (SIT) under Special
    Information form
    symptom: Created Special Information Type
    change: NOTE ROLE: Navigation: People > Enter and Maintain > Special
    Info button
    cause: Check boxes "Other" and "Enable" under the
    Special Information Types(SIT) form (PERWSDCL) were not checked.
    fix:
    Check the "Other" and "Enable" boxes under Special
    Information Types(SIT) form (PERWSDCL)
    Navigation path to Special Information Types(SIT) form (PERWSDCL):
    Resp:US HRMS Manager
    Other Definition>Special Information Types
    등록된 SIT 구조가 SIT화면에서 조회되지 않는 경우에는
    Other와 Enabled에 check가 되어 있지 않기 때문입니다.

    Hello,
    thank you for your answer,
    i solved my problem with changing
    p_scl_segment to ,p_pgp_segment
    thank you and regards

  • Special Information Type (SIT)

    Hi All,
    e-business suite version:11.5.10. One of the project in our company is a completely customized module using Special Information Types. In total there are 9 different SIT used in the module. They are accessed by the user using HTML based page and also through forms with full access i.e. Insert, update and delete. Now the users want to have full access in HTML based pages whereas for forms they want only read-only access. Is this possible using forms personalization? If so, how?
    NOTE: Both HTML based pages and forms access are given using the same responsibilities
    Please let me know if my question is not clear. Any help is appreciated

    Hi All,
    Any help is appreciated. Please let me know if my question is not clear

  • ATTACHING WEB URL'S AS NOTIFICATIONS IN CHANGE SPECIAL INFORMATION TYPES.

    Hi,
    I want to add URLas notification in Change Special Information Types process in HRSSA workflow.How to proceed?

    The URL should appear in employee review page V4.0

  • Special Information type

    Hi ,
    I am trying to update on checkbox []beside ADA disabilities. It gives me error
    FRM-40200: Field is protected against update.
    Can you please guide me thesteps to enable the update?
    Thanks in advance for all the help.

    Please post the details of the application release, along with the navigation path (responsibility name, and the form navigation path).
    Thanks,
    Hussein

  • Add Special Information Types

    Hello All,
    I have a requirement to upload data for SIT which is created under HRMS responsibility using PLSQL code in such a way that it will generate Notification which will ask for Approval/Rejection. I have studied SIT and found that data goes into "per_analysis_criteria" and "per_person_analyses". Is there any API available to insert data into these tables?
    Can anyone suggest me the steps i should peform in order to add SIT details into base tables and generate notifications as well using PLSQL package?

    The URL should appear in employee review page V4.0

  • Function module related to procurement type and special procurement type

    Hi Gurus,
    Is there any function module related to procurement type and special procurement type?
    Regards
    Rajib

    Dear Rajib,
    What is your exact requirment?do you want to find out the list of materials based on procurement type
    and special procurement type?
    You can get the details from the table MARC.
    Regards
    Mangalraj.S

  • Special procurement type in Matrl Master?

    Hello All,
    Could someone please explain the significance of the field pecial procurement type in the material master?
    We are working on a subcontracting scenario wherein the parent matrl is sometimes manufactured inhouse and sometimes sent to a subcontractor. I maintained the procurement type as X for this reason. Now should I maintain the special procurement type as 30 (Subcontracting)?
    What exactly is the functionality of this field?What purpose does it serve? I have read the F1 help but have not understood it properly.Would really appreciate if someone could explain with a live example.
    Regards,
    V S

    Hi,
    Through Procurement type you define whether the procurement will be in-house production or extranal or both.
    Sometimes this information isn't enough to describe the process,  generally in the following cases :
    Special Procurement for In-House Production
    +  For a phantom assembly+
    +  Production in alternative plant+
    +  Withdrawal from an alternative plant+
    Direct production
    Special Procurement for External Procurement
    +  Consignment+
    +  Subcontracting+
    +  Stock transfer+
    +  Direct Procurement+
    for the above cases, to carry out this information into system we use the "special procurement type field"
    the most commun situation are:  phantom assembly   :  we use in general indicator  50
                                                    Subcontracting  : we use in general indicator 30
    regards

  • Path Finder in a 2D Grid Map With Different Terrain Types

         I have been thinking for a while on path finding game algoritms and I can up with one idea witch I want to publish. The goal of my project is when I have a 2 dimensional grid map where squares can have different movement cost, like in Civilization II, to find the shortest way from one point in the map to another. I've used the Breathed First Search Engine. If you are not familiar to this search engine it is better to read about it first because I am not fcusing on it and I assume that you now how it works. You can read about it at the book "Practical Artificial Intelligence Programming in Java" writen by Mark Watson, witch is freely distributed at www.markwatson.com.
         Actually the idea of this 2D grid path finder is to use a third dimension witch have a size equal to the highest movement cost among all terrain types. This helps solving the problem with the different movement cost of the squates. By adding this abstract third dimension it is posible to use the Breadth First Search Engine.
         I this example the movementcost of a terrain type is always the same, no matter from witch square to with are you going (like in Civilization II but I haven't included roads or railroads). For example if you want to go from one square A to another square B with movement cost X (A and B are attached) you must go "up stairs" in the third dimension X - 1 times and then move to square B. But when you step on square B you are again at the lowest floor. So if you want to come back to the previous square A and it have movement cost Y first you must go floor Y and then jump in square A. And now you are again at the lowest floor at square A. When you move from one square to another you go always at the lowest floor. This is the way I handle with different movement costs.
         When you find the path to the goal point it is in 3 dimensions. So you must just project it in the 2D map and that's all you have the shortest path.
         I am sure this is not the best way to code this search engine but this is just the first scratch with no optimisation and so on. If I make a 100x100 randomly generated map it takes on my configuration(400Mhz Pentium II CPU with ASUS P2B MotherBoard on 100 MHz and 256 MB SD RAM on 133 MHz but because of my MB on 100MHz) around 1000 miliseconds (1000 miliseconds = 1 second) to find the shortest path from (1, 1) to (100, 100) witch is pretty good compare to the goTo function in Civilization II witch does not finds the shortest path at all and have made hundrets of gamers angry. This is amazing that nowadays there are so many games with bad path finding.
         This project includes:
    1. The PathFinder class witch does the jub.
    2. The Map class witch has a generator for a random map in it.
    3. The class TerrainType, every square on the map is based on this class.
    4. The class TerrainTypes witch is the set of all terrain types used in the map.
    5. The class PathFinderTest witch just test the path finder.
    To test this project put all files in one directory and run PathFinderTest.java.
    Map.java:
    import java.util.Vector;
    import java.util.Random;
    //This class just creates a random map and keeps it. I will not comment on this.
    class Map {
      //here is kept the information about the terrain types placed in the map. Where
      //every terrain type has a specific movement cost.
      private int[][] terrain;
      public TerrainTypes terrainTypes;
      private int landMass;
      private int width;
      private int height;
      private int highestMovementCost;
      public Map(int aWidth, int aHeight) {
        width = aWidth;
        height = aHeight;
        terrainTypes = new TerrainTypes();
        highestMovementCost = terrainTypes.getHighestMovementCost();
        terrain = new int[width][height];
        landMass = 0;
        generateRandomMap();
      public void clearGoalAndStartLocFromWater(int sx, int sy, int gx, int gy) {
        terrain[gx][gy] = 0;
        terrain[sx][sy] = 0;
      private void expandWater() {
        int waterConstant = 40;
        int waterExpansion = 2;
        int[][] moreWater = new int[width][height];
        Random randomizer = new Random();
        for (int t = 0; waterExpansion > t; t++) {
          for (int i = 0; i < width; i++) {
            for (int j = 0; j < height; j++) {
              if (i + 1 >= 0 && j >= 0 && i + 1 < width && j < height) {
                if (terrain[i + 1][j] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j] = 1;
              if (i + 1 >= 0 && j - 1 >= 0 && i + 1 < width && j - 1 < height) {
                if (terrain[i + 1][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j - 1] = 1;
              if (i >= 0 && j - 1 >= 0 && i < width && j - 1 < height) {
                if (terrain[i][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i][j - 1] = 1;
              if (i - 1 >= 0 && j - 1 >= 0 && i - 1 < width && j - 1 < height) {
                if (terrain[i - 1][j - 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j - 1] = 1;
              if (i - 1 >= 0 && j >= 0 && i - 1 < width && j < height) {
                if (terrain[i - 1][j] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j] = 1;
              if (i - 1 >= 0 && j + 1 >= 0 && i - 1 < width && j + 1 < height) {
                if (terrain[i - 1][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i - 1][j + 1] = 1;
              if (i >= 0 && j + 1 >= 0 && i < width && j + 1 < height) {
                if (terrain[i][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i][j + 1] = 1;
              if (i + 1 >= 0 && j + 1 >= 0 && i + 1 < width && j + 1 < height) {
                if (terrain[i + 1][j + 1] != 4) {
                  if (randomizer.nextInt(waterConstant) == 0)
                    moreWater[i + 1][j + 1] = 1;
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (moreWater[i][j] == 1) {
              terrain[i][j] = 4;
      private void generateRandomMap() {
        Random randomizer = new Random();
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (randomizer.nextInt(3) == 1)
              terrain[i][j] = 0;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 1;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 3;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 2;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 2;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 1;
            else if (randomizer.nextInt(2) == 1)
              terrain[i][j] = 3;
            else
              terrain[i][j] = randomizer.nextInt(5);
        expandWater();
        for (int i = 0; i < width; i++) {
          for (int j = 0; j < height; j++) {
            if (terrain[i][j] != 0)
              landMass++;
      public int getMapHeight() {
        return height;
      public int getMapWidth() {
        return width;
      public int getSquareID(int x, int y) {
        return terrain[x][y];
      public int getSquareMovementCost(int x, int y) {
        return terrainTypes.getMovementCost(terrain[x][y]);
    }PathFinder.java:
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.util.Vector;
    public class PathFinder {
      private BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in));
      //The array t3D[][] represents the 2D square map where t3D.leght = map width
      //and t3D[x].lenght = map width (-1 < x < t3D.leght). The third dimension
      //is refered to the square's movement cost, witch is definite by terrain.
      //The fourth dimension will be with lenght = 3. When running the search engine
      //(expanding the explored squares) this 3 values will keep the position of
      //the previous square in 3 dimension, witch are width, height and the maximum
      //movement cost among all squares.
      private int[][][][] squares3DReference;
      //Keeps information witch squares are visited.
      private boolean[][][] visitedSquares;
      private Map map;
      //this is the queue used in the Breathed First Seatch.
      private Vector queue3D;
      //Here is saved the shortest path
      private Vector path2D;
      private int highestMovementCost;
      public PathFinder(Map aMap) {
        map = aMap;
        queue3D = new Vector();
        path2D = new Vector();
        squares3DReference = new int[map.getMapWidth()][map.getMapHeight()][][];
        visitedSquares = new boolean[map.getMapWidth()][map.getMapHeight()][];
        highestMovementCost = map.terrainTypes.getHighestMovementCost();
        buildAbstract3DTerrain();
      private void buildAbstract3DTerrain() {
        for (int x = 0; x < map.getMapWidth(); x++) {
          for (int y = 0; y <map.getMapHeight(); y++) {
            int movementCost = map.terrainTypes.getMovementCost(map.getSquareID(x, y));
            if ( movementCost > 0) {
              visitedSquares[x][y] = new boolean[highestMovementCost];
              squares3DReference[x][y] = new int[highestMovementCost][3];
              for (int z = 0; z < highestMovementCost; z++) {
                for (int t = 0; t < 3; t++) {
                  squares3DReference[x][y][z][t] = -1;
      private boolean isMoveValid(int x, int y, int z, int x2, int y2, int z2) {
        if ( x < 0 || y < 0 || z < 0 || x2 < 0 || y2 < 0 || z2 < 0 || x >= map.getMapWidth() || y >= map.getMapHeight() || z >= highestMovementCost ||  x2 >= map.getMapWidth() || y2 >= map.getMapHeight() || z2 >= highestMovementCost)
          return false;
        if (map.terrainTypes.getMovementCost(map.getSquareID(x2, y2)) < 1)
          return false;
        if (visitedSquares[x2][y2][z2])
          return false;
        if (x == x2 && y == y2)
          return true;
        else {
          if (z == map.terrainTypes.getMovementCost(map.getSquareID(x2, y2)) - 1)
            return true;
          else
            return false;
      private void clearPreviousSearchData() {
        queue3D.clear();
        path2D.clear();
        for (int x = 0; x < map.getMapWidth(); x++) {
          for (int y = 0; y < map.getMapHeight(); y++) {
            if (squares3DReference[x][y] != null) {
              for (int z = 0; z < highestMovementCost; z++) {
                visitedSquares[x][y][z] = false;
                for (int t = 0; t < 3; t++) {
                  squares3DReference[x][y][z][t] = -1;
      private Vector copyPath2D() {
        Vector path = new Vector();
        for (int i = 0; i < path2D.size(); i++) {
          path.add(path2D.get(i));
        return path;
      public Vector findPath(int sX, int sY, int gX, int gY) {
        int head = 0;
        int tail = 0;
        int x = sX;
        int y = sY;
        int z = 0;
        visitedSquares[x][y][z] = true;
        mainLoop: {
          while (tail <= head) {
            int[][] moves = getPosibleMoves(x, y, z);
            for (int i = 0; i < 9; i++) {
              if (moves[i] != null) {
                squares3DReference[moves[0]][moves[i][1]][moves[i][2]][0] = x;
    squares3DReference[moves[i][0]][moves[i][1]][moves[i][2]][1] = y;
    squares3DReference[moves[i][0]][moves[i][1]][moves[i][2]][2] = z;
    queue3D.add(moves[i]);
    if (moves[i][0] == gX && moves[i][1] == gY) {
    break mainLoop;
    visitedSquares[moves[i][0]][moves[i][1]][moves[i][2]] = true;
    head++;
    if (queue3D.size() == 0 || queue3D.size() == tail)
    break mainLoop;
    int[] nextInQueue = ((int[]) queue3D.get(tail));
    x = nextInQueue[0];
    y = nextInQueue[1];
    z = nextInQueue[2];
    tail++;
    if (squares3DReference[gX][gY][0][0] == -1) {
    clearPreviousSearchData();
    return path2D;
    fillpath2D(sX, sY, gX, gY);
    Vector path = copyPath2D();
    clearPreviousSearchData();
    return path;
    private int[][] getPosibleMoves(int x, int y, int z) {
    int[][] moves = new int[9][3];
    if (isMoveValid(x, y, z, x + 1, y, 0)) {
    moves[0][0] = x + 1;
    moves[0][1] = y;
    moves[0][2] = 0;
    else
    moves[0] = null;
    if (isMoveValid(x, y, z, x + 1, y - 1, 0)) {
    moves[1][0] = x + 1;
    moves[1][1] = y - 1;
    moves[1][2] = 0;
    else
    moves[1] = null;
    if (isMoveValid(x, y, z, x, y - 1, 0)) {
    moves[2][0] = x;
    moves[2][1] = y - 1;
    moves[2][2] = 0;
    else
    moves[2] = null;
    if (isMoveValid(x, y, z, x - 1, y - 1, 0)) {
    moves[3][0] = x - 1;
    moves[3][1] = y - 1;
    moves[3][2] = 0;
    else
    moves[3] = null;
    if (isMoveValid(x, y, z, x - 1, y, 0)) {
    moves[4][0] = x - 1;
    moves[4][1] = y;
    moves[4][2] = 0;
    else
    moves[4] = null;
    if (isMoveValid(x, y, z, x - 1, y + 1, 0)) {
    moves[5][0] = x - 1;
    moves[5][1] = y + 1;
    moves[5][2] = 0;
    else
    moves[5] = null;
    if (isMoveValid(x, y, z, x, y + 1, 0)) {
    moves[6][0] = x;
    moves[6][1] = y + 1;
    moves[6][2] = 0;
    else
    moves[6] = null;
    if (isMoveValid(x, y, z, x + 1, y + 1, 0)) {
    moves[7][0] = x + 1;
    moves[7][1] = y + 1;
    moves[7][2] = 0;
    else
    moves[7] = null;
    if (isMoveValid(x, y, z, x, y, z + 1)) {
    moves[8][0] = x;
    moves[8][1] = y;
    moves[8][2] = z + 1;
    else
    moves[8] = null;
    return moves;
    private void fillpath2D(int sX, int sY, int gX, int gY) {
    int[] gLoc = {gX, gY};
    path2D.add(gLoc);
    int x = gX;
    int y = gY;
    int z = 0;
    while (x != sX || y != sY) {
    int x2 = squares3DReference[x][y][z][0];
    int y2 = squares3DReference[x][y][z][1];
    int z2 = squares3DReference[x][y][z][2];
    x = x2;
    y = y2;
    z = z2;
    if (z == 0) {
    int[] loc = {x, y};
    path2D.insertElementAt(loc, 0);
    PathFinderTest.java
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.util.Vector;
    public class PathFinderTest {
      static BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in));
      static Map map;
      static int startX;
      static int startY;
      static int goalX;
      static int goalY;
      public static void main(String[] args) throws Exception {
        System.out.print("Enter map size.\nx = ");
        int width = Integer.parseInt(consoleReader.readLine());
        System.out.print("y = ");
        int height = Integer.parseInt(consoleReader.readLine());
        System.out.print("Enter strting location.\nx = ");
        startX = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("y = ");
        startY = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("Enter goal location.\nx = ");
        goalX = Integer.parseInt(consoleReader.readLine()) - 1;
        System.out.print("y = ");
        goalY = Integer.parseInt(consoleReader.readLine()) - 1;
        if (goalX < 0 || goalY < 0 || startX < 0 || startY < 0 || goalX >= width || goalY >= height || startX >= width || startY >= height) {
          System.out.println("Invalid parameters found. Program will exit");
          System.exit(0);
        map = new Map(width, height);
        map.clearGoalAndStartLocFromWater(startX, startY, goalX, goalY);
        printSolution(new Vector());
        PathFinder pathFinder = new PathFinder(map);
        long before = System.currentTimeMillis();
        Vector path = pathFinder.findPath(startX, startY, goalX, goalY);
        long after = System.currentTimeMillis();
        long time = after - before;
        printSolution(path);
        if (path.size() == 0)
          System.out.println("No path found.");
        else
          System.out.println("Path found.");
        System.out.println("Finding the path took " + time + " milliseconds");
      static void printSolution(Vector path) {
        boolean[][] pathOnMap = new boolean[map.getMapWidth()][map.getMapHeight()];
        for (int i = 0; path.size() > i; i++) {
          int[] move = (int[]) path.get(i);
          pathOnMap[move[0]][move[1]] = true;
        for (int y = 0; y < map.getMapHeight(); y++) {
          for (int x = 0; x < map.getMapWidth(); x++) {
            System.out.print(" ");
            if (pathOnMap[x][y] == false)
              System.out.print(" ");
            else
              System.out.print("0");
            if (x == startX && y == startY)
              System.out.print("S");
            else if (x == goalX && y == goalY)
              System.out.print("G");
            else
              System.out.print(map.terrainTypes.getNameFirstLetter(map.getSquareID(x, y)));
          System.out.println();
        System.out.println();
    }TerrainType.java:
    public class TerrainType {
      private int movementCost;
      private String name;
      TerrainType(int aMovementCost, String aName) {
        movementCost = aMovementCost;
        name = aName;
      public int getMovementCost() {
        return movementCost;
      public String getName() {
        return name;
      public String getNameFirstLetter() {
        return name.substring(0, 1).toUpperCase();
    }TerrainTypes.java:
    import java.util.Vector;
    public class TerrainTypes {
      //Here are saved the terrain types with the map has. ElementAt 'i' in
      //setOfTypes is represented by the number in Map.terrain[x][y] witch is
      //equal to i, were x, y are random integer as soon as they do not
      //throw ArrayIndexOutOfBoundsException. Actually this is a coding to know
      //a specific square in the map to witch terrain type is refered in setOfTypes.
      private Vector setOfTypes;
      public TerrainTypes() {
        setOfTypes = new Vector();
        setOfTypes.add(new TerrainType(1, "Plains"));
        setOfTypes.add(new TerrainType(2, "Forst"));
        setOfTypes.add(new TerrainType(3, "Jungle"));
        setOfTypes.add(new TerrainType(4, "Mountain"));
        setOfTypes.add(new TerrainType(-1, "X"));
      public int getMovementCost(int i) {
        return ((TerrainType) setOfTypes.get(i)).getMovementCost();
      public String getName(int i) {
        return ((TerrainType) setOfTypes.get(i)).getName();
      public String getNameFirstLetter(int i) {
        return ((TerrainType) setOfTypes.get(i)).getNameFirstLetter();
      public int getHighestMovementCost() {
        int max = 1;
        for (int i = 0; setOfTypes.size() > i; i++) {
          int movementCost = ((TerrainType) setOfTypes.get(i)).getMovementCost();
          if ( movementCost > 0) {
            if (max < movementCost)
              max = movementCost;
        return max;
    }I hope this program will be helpful.
    Sogartar

    Why is such a smart guy like you not using A*
    It is a general known algorithm which will find the
    optimal solution in a finite search-space (within a minimal time).
    The calculation time for the A* algorithm is influenced by two parameters:
    1 - cumulative cost
    2 - minimal expected additional cost
    The calculation of these two costs has a great influence on the
    solution.
    I think the actual problems most games experience with shortest path calculatoin are
    1 - very little time to spent calculating the shortest path
    The quickest solution might be the best for the game
    If your solution takes 1 second for the calculation of a path for one element on the board (100x100)
    What would it take for the game to calculate the path for all elements controlled by the computer ??
    If the computer controls two players which each have 50 elements to control, it would take forever...
    Don't even consider the usage of a larger board (200x200 would take 4 seconds/element when
    algorithm has complexity O(n))
    2 - low priority.
    Users tend to forgive a bad shortest path-algorithm most of the time,
    but not a bad display, bad pictures,...
    This is why most shortest-path algorithms within games were
    developed as a depth first search,
    within some earlier games this was even developed as
    a rule which went straight to the endlocation and
    takes a right/left turn when blocked by water/wall/...
    So the actual steps you should take are:
    1 - develop a normal breath-first search (to get going)
    2 - develop a normal depth-first search (to compare speed and solution with)
    3 - develop a normal dijkstra algorithm (sometimes called A)
    4 - develop a best first algorithm (called A*)
    5 - develop other AI-algorithms building upon A* (tabu-search, limited memory A*,...)
    6 - develop some other AI-algorithms (Genetic Algorithms, Simulated Annealing,...)
    7 - compare and tweak/change all search-algorithms for
    7 - a - size of maps (small versus huge)
    7 - b - optimality of the solution
    7 - c - actual usage for your game
    8 - !!! very important !!!
    Share the developed path algorithms along with remarks about speed, map-size,...
    with the rest of us. I would be very interested in such library.
    kind regards,

  • Table for Special Stock Types

    Hi All,
    I am creating a report to display the stock information of a material. In that i need to include all the special stocks also.
    Can anyone please tell me the table containing the data for special stock type E,K,M,O,P,Q,V,W,Y

    Check these tables.
    MSCA     Sales Orders on Hand with Vendor
    MSCD     Customer stock with vendor
    MSCS     Customer stock with vendor - Total
    MSFD     Sales Order Stock with Vendor
    MSFS     Sales Order Stock with Vendor - Total
    MSID     Vendor Stock with Vendor
    MSIS     Vendor Stock with Vendor - Total
    MSKA     Sales Order Stock
    MSKU     Special Stocks with Customer
    MSLB     Special Stocks with Vendor
    MSOA     Total Sales Orders on Hand with Vendor
    MSPR     Project Stock
    MSRD     Project Stock with Vendor
    MSRS     Project Stock with Vendor - Total
    MSSA     Total Customer Orders on Hand
    MSSL     Total Special Stocks with Vendor
    MSSQ     Project Stock Total

  • Procurement Type 'X' and Special Procurement Type

    Hello all,
    Need some advice over this topic.
    Material with procurement type 'X' can either be procured externally or manufactured in-house. The problem is :
    #1. If a special procurement type that corresponds to external procurement say for example '30' is set in Material master. I don't find an option to have this converted into a process/production order.
    #2. Whereas If a special procurement type that corresponds to in-house production say for example '52' is set in the Material Master. I have almost every possible function's visible.
    How do i get to the view process/production order for case 1 in the 'Additional Data for MRP Element' screen of MD04 ?
    Please do help out.
    Regards,
    Rahul

    Rahul,
    Please re-read the SAP help related to special procurement key.
    I know for sure the answer lies in there!
    Here is what the F1 help says:
    Use
    You use special procurement when you want to be able to override the procurement type in the material master or define the procurement type more precisely.
    If the procurement type is in-house, you can nevertheless force the system to ignore the BOM and routing, and process the material as if it were externally procured, by specifying the special procurement as external.
    Now please check OMD9 configuration for the SP Keys that you are testing, it will be clear.
    Good luck!
    Rajen

  • Special procurement type 40

    Hai PP Gurus,
                 What is the function of SP type 40? Where it is used ?
                 Please put your valuable answers........
    Thanks & regards,
    S.ganeshraja

    Ganesh,
    If a material is always procured from another Plant, then we use Special Procurement Key "40" to do automatic planning so that after MRP run system creates requirement for the supplying plant and PR for the requried plant, when ever there is a demand at required plant.
    You need to configure the special procurement key in transaction OMD9 for the required plant and here you assign the supplying plant with special procurment type as "U". This key you need to assign to the material master in MRP2 view in the required plant.
    You can go through help for details<b>....<a href="http://help.sap.com/saphelp_47x200/helpdata/en/f4/7d2d5a44af11d182b40000e829fbfe/content.htm">SPK-40</a></b>
    Regards,
    Prasobh

  • Invalid or no mapping to system data types found.

    Hello Netweaver gurus.
    One of my client faces this issue. Has anybody come across similar error types ?
    Regards,
    Nitin Koushik

    Hello Nitin,
    In my opinion the error is because you would not be using an appropriate Entity to perform respective operation and can also be due to invalid mapping e.g. NUMC to Edm.Decimal
    Lets say you have an Entity 'A' to Update a media content to BE. You can use the same Entity 'A' to Read the updated media content as well.
    Leta say now you want to Read set of data from BE ( Not a Media content )
    You cannot use the Entity 'A' to perform this. You need to have a different Entity which will get the info needed from BE.
    Even if you forcefully try to map the response in code level, you will get the error ' Invalid or no mapping to system data types found '. This is because Entity 'A' would have got the special semantics to Read the media content not the set of data.
    Kindly check this and also the Types , Type Lengths , No of Decimal Places etc...used in Model
    Regards,
    Ashwin

Maybe you are looking for

  • Problem with starting the Web Dynpro Application

    Hello, I have a problem with my web dynpro application, which is in our SAP Portal. We have three different systems (development, test, production). In production always the follewing error message occurs: The URL https://zsil2401.servers.wacker.corp

  • How to create spool when running a report in background

    hi folks, i am running a bdc report in bkgrnd... and i want all the success and eror messages to be displayed in a spool... plz explain with example as to how this can be achieved .

  • USB Audio problem

    Good day, folks: Specifics: - PowerBook G4 Aluminum (2003) - About a month beyond extended Apple Care warrant - Mac OS X 10.4.7 - 1.25 GB RAM - Logitech 250 USB headset - MacAlly IceCam (Please forgive if this is repetitive; I did not see this specif

  • Special characters in subtitles

    Hi there, I've been looking everywhere, but can't find an answer. So here goes: When importing a subtitles, I've noticed my Adobe Encore DVD (Version 1!!) cannot cope with special characters in non-English subtitles for e.g. Spanish, German or Dutch.

  • Widgets: review clutters

    Hey there, I'm working on an german book with some review-widgets. They looks like this in iBooks Author: But they looks like this in iBooks on my iPad: Any ideas? --Alex