Need code for the following chess game..plz help me out

Hi,
Problem:Move the chess piece "KNIGHT" from any location on a "3 x 3" Chess Board and make it go to the far right hand bottom corner.Chess Board in the problem is not the usual Chess Board of 8 x 8.KNIGHT starting position may be any position on board.Program should exit when knight moves to 3 x 3 corner.Here is how my Chess board looks.
|.... |.... |.... |
|.... |.... |.... |
|.... |.... |Queen |<<--The Queen should reach this position
Remember: KNIGHT moves in specific way such as 2 steps in one direction and 1 step left/right.If the KNIGHT starts are position (2,2) then it cannot move further and you have to throw exception with some error message.
Run command: "java <some class> x y", where x is x-coordinate and y is y-coordinate(starting position of Knight) on the chess board. For this problem x & y could be 1(min) and 3(max) values and any value(2) in between.
Deliver : 1) Send me the java code for above problem.
2) Java code should compile and run.
3) I will be interested in "Object Oriented Design" thaught process.
4) Your coding style
5) Javadoc
6) Makefile
I would be more interested in your class design, interface design and error handling.
please mail the solution to [email protected]
thanks n regards
Chinu

Hi, Here Knight moves like horse. Queen doesn't
exist. If knight moves to (3,3). Game will be over.
I am facing problem to move knight from one point
to another point. And also i have some confussion on
selecting interfaces and classes.<font size="10000">do your own homework</font>

Similar Messages

  • Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    I want to add that I deleted all the old back-ups and created a new back-up without any issues except sync problem.

  • Provide the java code for the following scenario.

    Hi Experts,
    I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
    so that it becomes easy........
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
    So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
    Kindly provide the java code.
    Thanq very much in advance..

    what i have understood from ur example is that u want to generate an idoc for unique combination of  Order-no and Mat_No
    if yes then chk the below mapping..
    change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
    1)
    Order-no
    ----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
    Mat_No
    2)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
    Mat_No
    3)
    Order-no
    -----------concat[;]---sortbykey----------------------- \
    Mat_No                       /                            \
    Date--------------- /                                       \
    ----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
    Order-no                                                 /
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    4)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
    Mat_No
    5)
    Order-no
    -----------concat[;]---sortbykey
    Mat_No                       /
    Quantity --------------- /
    ----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
    Order-no
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    UDF1:
    String [] temp= a.split(";");
    return temp[0];
    UDF2:
    String [] temp= a.split(";");
    return temp[1];

  • Need driver for the following . . .

    Hi, 
    I have been hunting and can't seem to locate drivers for the following hardware id:
    PCI\VEN_10EC&DEV_5227&SUBSYS_2166103C&REV_01
    Its there in the device manager as an unknown PCI device.
    this seems to be the realtek card reader, and having gone trough other threads, I have tried 3-4 versions of the realtek card reader drivers. None of them have worked. 
    My laptop is a HP Pavillion n210se. The technical support/manual/drivers link on its product page is broken.
    http://www8.hp.com/emea_middle_east/en/products/la​ptops/product-detail.html?oid=6762356#!tab=feature​...
    Can't find the model in the support/drivers download section of the global hp website.
    How do I get the card reader to work? (assuming the unknown device is a card reader)
    This question was solved.
    View Solution.

    Hi
    Please find the link given below select Network and download the driver.
    Driver Link
    Let us know how it goes!
    "I work for HP."
    ****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    Regards
    Manjunath

  • Need solution for the following(Selection Screen)

    Hi all,
    currently iam working with report program,there i need to populate one field in the selection screen based on the another parameter in the same selection screen.
    iam having field called work center as a parameter with the search help.
    This search help is providing the corresponding plant for the particular work center.
    Now what i need to do is,if i select the work center thru F4 help,i need the correseponding plant to get populated in the other textbox.
    Currently iam having that work center field as parameter,
    now i need another textbox for the plant adjacent to this workcenter textbox,in this textbox only i need that corresponding plant.
    Following is the code for that workcenter textbox.
    PARAMETERS:P_ARBPL LIKE CRHD-ARBPL MATCHCODE OBJECT CRAM.
    Note: The Serach help CRAM is having corresponding  plant with the workcenter.

    Hi swaminathan,
    1. If u want to DIRECTLY
       populate other fields
       based upon selection,
      then we have to use our own
      selection function.
    2. just copy paste this code in new program.
      ( it will display help for BUKRS
      and AS SOON AS the user selects some company code,
      the other fields
      get populated AUTOMATICALLY)
    3.
    REPORT abc.
    DATA : dd     LIKE     TABLE OF dselc WITH HEADER LINE. "*--- IMPORTANT
    DATA : ft     LIKE     TABLE OF dfies WITH HEADER LINE.
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    PARAMETERS : bukrs LIKE t001-bukrs .
    PARAMETERS : butxt LIKE t001-butxt.
    PARAMETERS : ort01 LIKE t001-ort01.
    PARAMETERS : waers LIKE t001-waers.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR bukrs.
       SELECT * FROM t001 INTO TABLE t001.
    IMPORTANT
       REFRESH dd.
       dd-fldname = 'BUTXT'.
       dd-dyfldname = 'BUTXT'.
       APPEND dd.
       dd-fldname = 'ORT01'.
       dd-dyfldname = 'ORT01'.
       APPEND dd.
       dd-fldname = 'WAERS'.
       dd-dyfldname = 'WAERS'.
       APPEND dd.
    *------- IMPORTANT
       REFRESH ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'BUTXT'.
       APPEND ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'WAERS'.
       APPEND ft.
       ft-tabname  = 'T001'.
       ft-fieldname = 'ORT01'.
       APPEND ft.
       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
         EXPORTING
          ddic_structure  = 'T001'   "*----- IMPORTANT IF STANDARD STRUCT
           retfield        = 'BUKRS'
           dynpprog        = sy-repid
           dynpnr          = sy-dynnr
           dynprofield     = 'BUKRS'
           value_org       = 'S'
         TABLES
           field_tab       = ft "*---- IMPORTANT
           value_tab       = t001
           dynpfld_mapping = dd   "* IMPORTANT
         EXCEPTIONS
           parameter_error = 1
           no_values_found = 2
           OTHERS          = 3.
    regards,
    amit m.

  • Need sql for the following requirement

    EMP_DT EMP_TYPE emp_id
    01/01/2011               3 546
    01/03/2011 4 546
    01/05/2011 3 546
    01/08/2011 3 546
    01/09/2011 3 546
    01/10/2011 4 546
    01/12/2011 3 546
    01/14/2011 3 546
    01/16/2011 3 546
    01/18/2011 4 546
    01/19/2011 3 546
    Hi All,
    I have a table with two columns(emp date and type where date is mm/dd/yyyy type tied to employee).
    This data is inserted manually through online application. But behind the scenes I would like keep this date in the following fashion by a delete sql. When run the delete sql it should keep the data in following manner with employe type order 3,4,3,4,3,4 and so on. There shouldn't be any 3 empolyee type rows continuosly. Also when delete the data it should keep the smaller date out of three same employee type dates. example 01/12/2011,01/14/2011,01/16/2011 ---> we will keep the row 01/12/2011 and delete two other dates because they are same type of dates(3).
    EMP_DT EMP_TYPE emp_id
    01/01/2011               3 546
    01/03/2011 4 546
    01/05/2011 3 546
    01/10/2011 4 546
    01/12/2011 3 546
    01/18/2011 4 546
    01/19/2011 3 546

    Hi,
    So, on each row, you need to know what the value of emp_type was on the previous row. That sounds like a job for LAG.
    Here's one way to do that:
    WITH     got_prev_emp_type     AS
         SELECT     emp_dt, emp_type, emp_id
         ,     LAG (emp_type, 1, -1) OVER ( PARTITION BY  emp_id     -- Just guessing
                                                   ORDER BY      emp_dt
                                    ) AS prev_emp_type
         FROM    a_table
    --     WHERE     ...     -- If you need any filtering, put it here
    SELECT       emp_dt, emp_type, emp_id
    FROM       got_prev_emp_type
    WHERE       emp_type     != 3
    OR       prev_emp_type     != 3
    ORDER BY  emp_id
    ,            emp_dt
    ;This assumes that emp_dt is a DATE (or a TIMESTAMP). If it has some other dattype, convert it to a DATE.
    "DELETE" means "permanently remove rows from a table." Is that what you want, or do you just want to exclude some rows from a result set? The query above doesn't actually change the table. If that's what you want to do, you can use the query above as a sub-query in hte WHERE clause of a DELETE statement.
    DELETE  FROM  table_a
    WHERE  (emp_dt, ,emp_type, emp_id)   -- Just guessing
            NOT IN  (
                        WITH   got_prev_emp_type    AS
                    );This assumes that emp_dt, demp_type and demp_id are never NULL.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
    If you're asking about a DML statement, such as DELETE, the sample data will be the contents of the table(s) before the DML, and the results will be state of the changed table(s) when everything is finished.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using. All the code I psoted above assumes you have Oracle 9.1 or higher.

  • TS3276 I need feedback for the following issue. When I send email from this 27 inch iMac, the computer adds a string of characters in vertical column that represents the QWERTY key board, all alpha numeric characters are included. Yahoo mail, issue only o

    Restating my issue / question...
    When I send email from this iMac, there is a string of characters assigned. The characters are all the "alpha numeric" characters on the QWERTY key board. This only occurs when email is sent from this iMac. The issue does not manifest when using any other lap top or computer.
    Hence, I have ruled out the issue is a yahoo mail matter.
    Again, I can access the Yahoo mail account form multiple devices and send email without unintended assignment of character strings, but when I send wmail using this iMac, the issue happens everytime.
    Characters are stacked verticaly in a column. It looks as if all characters (except function keys) are included in the string.
    Any ideas?
    GMc

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit 
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • Need code for the problem

    have to create a instance of class if that is the first instance ... successive call to create the instance should return the first instance of the class....i need the code for this pls help me .... even if the code is in C++ its ok

    abhinay.is2006 wrote:
    actually this was the question asked for me in a interview .... i am just a beginner to java and i am not able to get the solution ..My reply actually was a hint: google for "singleton" and you know all.
    kind regards,
    Jos

  • Need details for the following feilds

    Hi Gurus,
    Need mapping feild names ECC vs BI for these feilds..
    1)Journal Header ID and Line Number
    2)Journal Entry Line Description
    3) Journal Entry Header ID and
    4)Journal Entry Name
    I have a requirement to send these details details to the legacy system from the BI system.
    So, I need to get these deatils from the ECC and then I can transfer these details to other system.
    I am unable to find these deatils on the Stanadard GL Extractor :0FI_GL_14 - GL Line Item Details.
    Let me know your inputs...

    Hi lakshmi,
    The following links can help you on getting this information:
    http://help.sap.com/saphelp_nw70/helpdata/EN/49/5700570223413085021a8b4ef1087a/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/45/4f8e8bbf3f4f63a5dd197ef7d53fa2/frameset.htm
    At
    Nadja Xavier

  • I need answers for the following questions

    How many maximum number of fields can be there in a table?
    How many primary keys can be there in a table?
    What are the ways to find out the tables used in the program?
    Can you have two detail lists from the basic list at the same time?
    If yes how and if no why?
    What are the ways to find out the tables used in the program?
    whre you will use dailog programming?
    whre you will use module pool  programming?
    what z custom container?
    whre you will be using ale/idocs?
    n what r the objects u did in ale /idocs?
    how to set title bar?
    can we keep a tab strip in a tab strip?
    how?

    ->>>at most 16 primary keys can b there in a table
    ->>>use SQL trace ST05 transaction to see tables used in a prg
    ->>>to set title bar use set title bar
    SET TITLEBAR f.
    Extras:
    1. ... OF PROGRAM prog
    2. ... WITH g1 g2 ... gn
    Effect
    Sets the title of a window.
    You create these program-specific titles using the Menu Painter. If there is a text for title ID f, this is displayed in the title bar of the window, starting from the next time the screen changes.
    The return value SY-SUBRC shows whether the system found an entry.
    SY-SUBRC = 0:
    Entry found
    SY-SUBRC = 4:
    Entry not found
    If the statement occurs in an external subroutine, the system sets a title for the main program that called it. However, in a function module, the system sets a title for the fucntion group (but see also the addition OF PROGRAM ...).
    Once you have set a title, it remains active within the transaction until the next SET TITLEBAR statement.
    After SET TITLEBAR, the field SY-TITLE contains the current title.
    SY-TITLE is 70 characters long. Longer titles are not permitted.
    Notes
    The contents of field f are converted into a value of type C with length 20 (according to the standard conversion rules). The system uses this value to search for the required title. You should therefore use a field with type C, to avoid unnecessary conversions. For example, the system would derive the key ' 9 ' from a type I field with value '9'.
    You can use a namespace prefix with titles.
    Addition 1
    ... OF PROGRAM prog
    Effect
    The system does not search in the GUI of the main program of the current program group for f, but in the program specified in the field prog.
    Example
    DATA PROG LIKE SY-REPID.
    PROG = 'TESTPROG'.
    SET TITLEBAR 'ABC' OF PROGRAM PROG.
    This example sets the title 'ABC'for program 'TESTPROG'.
    Addition 2
    ... WITH g1 g2 ... gn
    Effect
    The WITH addition allows you to use up to 9 parameters in the title. You address these in the title as variables &1 to &9. Additionally, any single & characters are replaced from left to right with the contents of the corresponding parameter (the first ampersand with the first parameter following WITH, and so on). If you want to put an ampersand as a character in your title, you must double it (&& is output as &).
    If a parameter is missing, its corresponding variable is replaced by a space.
    Given the maximum length of 70 characters (length of SY-TITLE), it is possible that your title can be truncated if you use WITH.
    Example
    DATA: PAR1(4) VALUE 'par1',
          PAR2(4) VALUE 'par2'.
    SET TITLEBAR 'ABC' WITH PAR1 PAR2 'par3'.
    Given a title "ABC" as follows:
    "Title & &1&3 some_text & &2 && & &4",
    the example would produce a title bar like this:
    "Title par1 par1par3 some_text par2 par2 & par3  ".
    Note
    You can combine both of these additions. Note, then, that the ... OF PROGRAM addition must come before WITH.
    ->> module pool program & dialog programs r one & the same
    chk this thread same question was answered
    <b>/thread/157983 [original link is broken]
    ->>>go thru this link to know ALE/IDOCS
    <b>ALE and IDOCs</b>
    ->>>> chkout this link for <b>aLV custom container</b>
    <b>ALV List and Custom Container</b>

  • Need suggestion for the following Design

    Hi All,
    I have the following requirement to be implemented.
    | |
    | < Start Day << Start Week ---- End Week >> End Day > |
    |____________________________________________________________________|
    The above has to be on top of a table.... (i.e a table action region)
    Table action allows us to have either "rowLayout" or "flowLayout" to begin with...
    The "Start Day", "Start Week" and so on are actions...
    Pls suggest me how to align " End Week >> | End Day > " to right (end of the table)....
    PS... I am unable to plot the image properly... the " ---- " in between is just spaces.
    Putting it simple, In a table action I want a button on the left most and right most corner...
    Regards,
    Santhosh.
    Edited by: Santy on Jan 21, 2011 4:09 AM

    Hi All,
    I have the following requirement to be implemented.
    | |
    | < Start Day << Start Week ---- End Week >> End Day > |
    |____________________________________________________________________|
    The above has to be on top of a table.... (i.e a table action region)
    Table action allows us to have either "rowLayout" or "flowLayout" to begin with...
    The "Start Day", "Start Week" and so on are actions...
    Pls suggest me how to align " End Week >> | End Day > " to right (end of the table)....
    PS... I am unable to plot the image properly... the " ---- " in between is just spaces.
    Putting it simple, In a table action I want a button on the left most and right most corner...
    Regards,
    Santhosh.
    Edited by: Santy on Jan 21, 2011 4:09 AM

  • Creating a Report for the following Query u0096 Kindly help

    Hi,
    Using selection options we have to give the name of
    1) Sales Organization  -- VBAK -VKORG
    2) Distribution Channel -- VBAK - VTWEG
    3) Division -- VBAK -- SPART
    4) Created Date -- VBAK -- ERDAT.
    Once we select this the following list should be displayed.
    1) Order no. -- VBAK - VBELN.
    2) Created date -- VBAK - ERDAT
    3) Sold To Party -- VBAK - KUNNR
    4) Shipped to party -- VBPA -- KUNNR.
    5) Item no -- VBAP -- POSNR
    6) Material no. -- VBAP -- MATNR
    7) Material Discription -- VBAP - ARKTX.
    The out put should be like this
    Sales Org  : **********
    Dist chan  : **************
    Division    : *********
    Created Date : ********
    Orderno  credate soltopar shiptopar itemno materiano materdes
    and so.
    Also When we click on the order no we should ge the transaction VA03.
    With Select options i was able to get the sales organization distribution channel and division and the when we give the values it is showing Run time errors.
    Kindly help me to proceed further.
    Even if I am able to generate the order list it will be fine. Going on to VA03 I will manage some how  If possible give the syntax for this also).
    Regard,
    Surjith

    Hi,
    Check the below code :
    REPORT  yvic_test_sales.
    TABLES vbak.
    TYPES:
      BEGIN OF ty_sales_data,
        vbeln  TYPE vbeln_va,
        erdat  TYPE erdat,
        kunnr   TYPE kunag,
        oid_ship TYPE kunwe,
        posnr    TYPE posnr_va,
        matnr    TYPE matnr,
      END   OF ty_sales_data.
    DATA : gt_data TYPE STANDARD TABLE OF ty_sales_data.
          CLASS gcl_handle_events DEFINITION
    CLASS gcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
              on_link_click FOR EVENT link_click OF cl_salv_events_table
                IMPORTING row column.
    ENDCLASS.                    "gcl_handle_events DEFINITION
    SELECTION-SCREEN BEGIN OF BLOCK b1.
    SELECT-OPTIONS:
    s_vkorg  FOR vbak-vkorg,
    s_vtweg  FOR vbak-vtweg,
    s_spart  FOR vbak-spart,
    s_erdat  FOR vbak-erdat.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      SELECT  d1~vbeln
              d1~erdat
              d1~kunnr
              d2~oid_ship
              d2~posnr
              d2~matnr
              INTO TABLE gt_data
             FROM vbak AS d1
              JOIN vbap AS d2
        ON d1vbeln = d2vbeln
            WHERE d1~vkorg IN s_vkorg[]
            AND   d1~vtweg IN s_vtweg[]
            AND   d1~spart IN s_spart[]
            AND   d1~erdat IN s_erdat[].
          CLASS gcl_handle_events IMPLEMENTATION
    Subroutine call_transaction will get called
    when user clicks on BELNR (Acounting document) or EBELN(PO)
    CLASS gcl_handle_events IMPLEMENTATION.
      METHOD on_link_click.
        PERFORM call_transaction USING row column.
      ENDMETHOD.                    "on_link_click
    ENDCLASS.                    "gcl_handle_events IMPLEMENTATION
    END-OF-SELECTION.
      PERFORM display_data.
    *&      Form  DISPLAY_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      DATA:
          lo_table         TYPE REF TO cl_salv_table,"table object
          lo_function      TYPE REF TO cl_salv_functions,
          lo_layout        TYPE REF TO cl_salv_layout,
          lo_columns       TYPE REF TO cl_salv_columns_table,
          lo_hotspot       TYPE REF TO cl_salv_column_table,
          lo_events_name   TYPE REF TO cl_salv_events_table,
        lo_click         TYPE REF TO gcl_handle_events,
          ls_key           TYPE salv_s_layout_key,
          lo_sorts         TYPE REF TO cl_salv_sorts,
          lo_aggregation   TYPE REF TO cl_salv_aggregations,
          lo_exception     TYPE REF TO cx_root,"exception object
          l_text           TYPE string." to hold exception message
    create a table object to display result table
      TRY.
          cl_salv_table=>factory( IMPORTING r_salv_table = lo_table
                                 CHANGING  t_table      = gt_data ).
    catch exception
        CATCH cx_salv_msg INTO lo_exception.
    get exception text and display it in message
          l_text = lo_exception->get_text( ).
    Message: & & & &
          MESSAGE i000(zzz) WITH l_text.
      ENDTRY.
    get column object of the table created
      lo_columns = lo_table->get_columns( ).
    FOR HOTSPOT on Doc no
      TRY.
          lo_hotspot  ?= lo_columns->get_column( 'VBELN' ).
          lo_hotspot->set_cell_type( if_salv_c_cell_type=>hotspot ).
        CATCH cx_salv_not_found INTO lo_exception.
    get exception text and display it in message
          l_text = lo_exception->get_text( ).
    Message: & & & &
          MESSAGE i000(zzz) WITH l_text.
      ENDTRY.
      lo_events_name = lo_table->get_event( ).
      CREATE OBJECT lo_click.
      SET HANDLER lo_click->on_link_click FOR lo_events_name.
      lo_table->display( ).
    ENDFORM.                    " DISPLAY_DATA
    *&      Form  CALL_TRANSACTION
          text
         -->P_ROW  text
         -->P_COLUMN  text
    FORM call_transaction  USING    pa_row
                                    pa_column.
      DATA ls_final_data TYPE ty_sales_data.
      IF pa_column = 'VBELN'.
        CLEAR ls_final_data.
        READ TABLE gt_data INTO ls_final_data INDEX pa_row.
        IF NOT ls_final_data-vbeln IS INITIAL.
          SET PARAMETER ID 'AUN' FIELD ls_final_data-vbeln.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.                    " CALL_TRANSACTION
    Reward if helpful..
    Thanks

  • Hi, i m using mac (version 10.7.4 lion) and has safari (version 6.0). The problem is that the safari is not playing some of the youtube videos for the last few days. plz help

    Hi, i m using mac (version 10.7.4 lion) and has safari (version 6.0). The problem is that the safari is not playing some of the youtube videos for the last few days. kindly help

    http://www.microsoft.com/mac/support
    http://answers.microsoft.com/en-us/mac/forum/macword?auth=1
    http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/microsoft-wor d-for-mac-2011-will-not-open-error/ecc42616-6f49-40bb-b8f5-e21c711ea359

  • Problem posted for the third time! PLZ HELP! Mic not working! :)

    Hey all!
    My Microphone isn't working. Im useing the onboard Live 24-Bit. To this I have at 7.1 Creative Inspire TD7700 with the external decoder, connected. Im useing the Optical cable, if that have anything to do with this.
    When I connect my micrphone, I cant use it at the same time that I play sounds. The difference is when I use the "Digital Output Only" function in the mixer. Here is what it does:
    When DOO is on: I can play and hear all sounds, but my microphone is not working at all.
    When DOO is off: I can record with the micrphone, no problem. I can create and record pretty good wave-files. But I can't hear anything.
    A thin I could do is to turn DOO off, record af wave, turn DOO on, and play the file. -But how cool is that?
    Besides, the primary reason that I got the mic, is that I play alot of World of Warcraft. And I want to use TeamTalk.
    Therefore, isn't there a way to get both things at once, just like "in the good old days"?      Plz help!

    Thana, the mods/admins are on strike...just bump this question if they stop their strike...

  • Would anyone know how to program the Labview code for the following: Recording an analog input signal for 100msec and then repeating this 100 times in order to finally have an averaged signal (waveform)​?

    I have added a vi, but it doesn't quite work. Would be very grateful if someone could help, thanks!
    Attachments:
    Average_0411041_2.vi ‏77 KB

    The attached VI collects 100 ms of data and does a rolling average. Since your sub-VI were not included I created this from scratch. There are comments in the code. I hope this is what you need.
    Dirk
    Attachments:
    rollingaverage110x100.vi ‏47 KB

Maybe you are looking for

  • IPhone ? on messages/charging

    I'm hoping to get an iPhone soon for me and some other family members, and I'm doing a little advanced research. Two questions: 1) Is there any warning that the iPhone gives when it's running low on power and needs recharging? The phone I have now be

  • What bluetooth device is installed on my Omni 200 5380qd?

    I recently performed a clean install of windows 7 64 bit home/premium (I7 2.93 Ghz, 8 gb RAM). Unfortunately I could not copy the original drivers because my OS was entirely inaccessible. My question is, what driver should I install for my bluetooth

  • Maintenance of Service Desk

    Hi all. Do anybody know what effort is necessary to maintain the Service Desk of the Solution Manager? That means, what costs do I have to expect per month/year? And how long does it take to maintain the Service Desk per month/year and how many peopl

  • No Vision on Airplay from ipad2

    Airplay and iPad2 will stream sound but not vision to Apple TV 3, iPhone4 works fine but not ipad and all software is up to date WT?

  • Using Acrobat fonts in other applications like Word?

    I tried to read the EULA for Acrobat XI Standard and got nowhere.  I have a volume license.  My question is, are we allowed to use Acrobat fonts, such as Myriad Pro, in Microsoft Word, for example?  Am I permitted to install this font family in Windo