Se16n check buffer.

hi experts,
   today i delete a domain ( b ) value, and when i use se16n to change the data for field c with domain b,
but the message invalid message come, and there is no foreign key for this field.  i also use se14 to adjust database and force conversion this table.
it's very strange, i guess the murderer is buffer, but could any body tell me if there is a tcode to refresh this buffer?
btw: when i use another languge to logon sap ,it can change.

For reference, those codes can be found in  26171 - Possible entry values for command field ("OK-code") . Also note that using this code you reseted  the whole table buffers of the application server, so a little (or not) down-performance (as after a server reboot)
You could use transaction AL12 (-> Menu "Statistics" -> Buffers -> Generic Key Buffer -> Single Object -> Tabname = 'DD07V' -> Display) then (from  OSS note 1825838)
AL12 -> Menu "Edit" -> Reset Buffer -> Gen. Key Buffer ... -> In the displayed dialog box in the section "Single Table" specify the table that you want to displace from the buffer and execute the function "Remove".
Afterwards, you can reload the table again and the subsequent SELECT statements can be handled by the buffer.
Regards,
Raymond

Similar Messages

  • Transport request : tp check buffer for already imported requests

    Hi,
    I want to put a transport request on my prod. There was no problem on the quality. But on the prod, i have the message :
    "tp check buffer for already imported requests"
    and nothing appends.
    Do you have any idea how i can unlock this transport request ?
    Tx in advance.

    Hi,
    Use table E070. and display the Transport reqeust and double click on the request row.and in command prompt enter ' /h '. change status as unreleased.
    Regards
    Jana

  • Return vector for points done of check buffer status in onboard program

    Background
    I am trying to develop a trigger application based on the current position of a contour profile.
    I can not use breakpoints as the application is using hydraulic cylinders with analog feedback
    for the primary position. In order to make sure the trigger happens relative to the motion regardless
    of host load I want to run the application as an onboard program.
    My idea is to read the buffer status points done and generate a pulse out as a trigger when the
    points done is greater than the programmed trigger point. For example if I want to trigger on the 42
    point of a 100 point profile, I would read points done of the main contour buffer. When points done
    is greater than or equal to 42, I would generate a short pulse as a trigger.
    Question
    My problem is, I cannot find the order that the check buffer status VI returns the data to an onboard program
    return vector. As I understand it, I need 3 variables to hold the returned data. One each for State, Backlog, and
    Points Done. If I set the return vector to 10, does State get stored in 10, Backlog in 11, and Points done in 12, or
    is there a different order?
    If you could provide the return vector mapping order for all the motion VIs, it would be greatly appreciated.

    Hello,
    This is a very good question. I checked in the help for the LabVIEW VI, and it does not explicitly state the answer. The VI calls the FlexMotion function "flx_check_buffer_rtn". In the "NI-Motion Function Help" (Start>>Programs>>National Instruments>>NI Motion>>Documentation), the information for the functions states that it "...returns data in the following order: backlog, bufferState, and pointsDone." It also tells you the size of each of the elements. I will be filing a report so that the LabVIEW documentation includes this information in the future. I hope this helps. Take care!
    Regards,
    Aaron B.
    National Instruments

  • Buffer Hit Ratio % -- Whats the right query ?

    Whats the right query to track Buffer Hit % ;
    Using this :
    prompt BUFFER HIT RATIO %
    prompt ===============
    select 100 * ((a.value+b.value)-c.value) / (a.value+b.value) "Buffer Hit Ratio"
    from v$sysstat a, v$sysstat b, v$sysstat c
    where
    a.statistic# = 38
    and
    b.statistic# = 39
    and
    c.statistic# = 40;
    Buffer Hit Ratio
    99.9678438
    However, using this :
    Select
    Round((Sum(Decode(name, 'consistent gets',value,0)) +
    Sum(Decode(name, 'db block gets',value,0)) -
    Sum(Decode(name, 'physical reads',value,0))) /
    (Sum(Decode(name, 'consistent gets',value,0)) +
    Sum(Decode(name, 'db block gets',value,0)) ) * 100, 4)
    from V$sysstat;
    Comes up as : 67.7069 %
    So which is the right one ?
    Thanks.

    user4874781 wrote:
    Well, I recently joined this organisation and that was the script that was used since long to check Buffer Hit Ratio%.
    But when I ran a TOAD report, using the other query, the value came up different.
    So am confused .. Whats the difference and which is the right one ?
    Try running the following query:
    select
            statistic#, name
    from
            v$sysstat
    where
            statistic# in (38,39,40)
    or      name in (
                    'consistent gets',
                    'physical reads',
                    'db block gets'
    ;The you will understand the point the previous answer was making. It's a bad idea to rely on things like the statistic# being consistent across different versions of Oracle - names tend to be safer.
    But neither query is correct. If you want any sort of vaguely meaningful "buffer cache hit ratio", you should be quering v$buffer_pool_statistics. See also: Re: Testing of buffer cache reveals these results: and http://jonathanlewis.wordpress.com/2007/09/02/hit-ratios/
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking.

  • Linking axis to saved buffer in ROM after initialization with 7356

    Can you please help?
    I can't seem to re-connect an axis to a saved position buffer in ROM after initialization/reset of board.
    Details:
    When I make a position buffer and save to ROM and then repeatedly run motion command  (after using the conifgure buffer.flx with buffer size 0) the motion works just fine.  If however, after saving this buffer to ROM, I do some setting changes/initialization ect, then I can't seem to reconnect to this existing buffer in the ROM (I checked and it is there via measurement and automation explorer).    So, how do I re-connect to this buffer?
    My system specs: Using windows XP sp2 with Labview 8, and the motion card is the PCI-7356.
    Thanks very much.
    Richard Cisek
    [email protected]
    Attachments:
    Richard's question.vi ‏37 KB

    Hi Richard,
    I have attached my working VI to this reply.  I tested it, and it
    works after a reset and reinitialization of the motion controller board.
    In the Connect to Buffer and Move portion of your VI, you must
    reconfigure the Operation Mode for Absolute Contouring.  After a
    reset, the motion controller board will have a default Operation Mode
    of Absolute Position, so you must change it back to Absolute
    Contouring.  You must also input the correct number of Total
    Points to the Configure Buffer function.  The correct number of
    Total Points is the size of the array in the selected buffer.
    Make sure that the Measurement & Automation Explorer is CLOSED when
    you run this program.  If MAX is open, its Object Memory Manager
    will be making calls to Check Buffer which will conflict with this VI
    and cause errors.
    I also added Motion Error Handler VIs, so you can monitor any motion errors that might occur.
    Sorry for the delay.  Hope this helps!
    Allen H.
    Attachments:
    SaveAndLoadBufferFromROM.vi ‏101 KB

  • SAP system checks

    During system checks, a Baisis administrator will check Buffer swaps under Export/Import Hit ratio, programs etc. What is the importance of checking these?

    Hi,
    Normally in SAP the buffers are used to store the SAP object/data from DB. This is done for easy access of data when the users need them, it helps to increase the performance of the system by decreasing the I/O of system i.e, when the user requests data the work process first checks the buffers for the data requsted by the user, if it finds it there then it returns to the user with the data thereby increasing the speed of the access and in turn the performance. If the data is not found in the buffer a physical access to DB is made thereby increasing the response time and lowering the performance. After the data is fetched and returned to the user a copy of the data is put into the buffer, this helps to increase the access when some other user requests the same data as said above.
    This mechanism is accomplished when you have a better buffer size, if your buffer size is very small the data put into the buffer will be pushed out to accomodate the new data, the red color indicates the no.of objects swaped out from the buffer to accomodate the new object in the buffer.
    In your case the buffers needs to be increased to accomodate more objects in them, keep in mind that performance tuning needs more analysis and skill.
    Changing Buffer parameters involves more calculations and might lead to poor performance if done wrongly or prevent the system to start since you have to restart the system in order to make the profile parameters related to buffers active.
    Please check the below links
    http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a6e98505211d189550000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/02/9625e3538111d1891b0000e8322f96/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/bc/4a813b680c250fe10000000a114084/content.htm
    Regards,
    Ravi

  • Questions on V$BH

    I learnt that V$BH can tell us contents of buffer cache. I looked up 11.2 document b28329. It saysV$BH displays the status and number of pings for every buffer in the SGA. This is a Real Application Clusters view.Questions:
    1) Is v$BH not good for single instance, since it is a Real Application Clusters view? I did see the view in non-RAC and query it returning lots of rows. Are the result meaningful
    2) The phrase in Oracle Doc is hard to understand as usual. Does 'number of pings for every buffer' means those buffer cache blocks that are pinned in SGA, or just every block of buffer cache?
    I used ALTER SYSTEM FLUSH SHARED_POOL to clear buffer cache in a single instance, and check buffer cache before and after the clearing buffer with queryselect o.owner,o.OBJECT_TYPE, substr(o.OBJECT_NAME,1,20) objname , b.objd , b.status,
      count(b.objd) from  v$bh b,dba_objects o where b.objd = o.data_object_id
      where owner='BISTG'   group by o.owner,o.object_type,o.object_name,b.objd, b.status ;The result are identical before and after. have the buffer cache really been cleared?

    user13148231 wrote:
    I learnt that V$BH can tell us contents of buffer cache. I looked up 11.2 document b28329. It saysV$BH displays the status and number of pings for every buffer in the SGA. This is a Real Application Clusters view.
    That's a bit of documenation that is about 10 years out of date - RAC isn't supposed to "ping" (although it does) it's supposed to use "cache fusion". A "ping" is the term Oracle uses to label the action of one instance writing a block to disc for another to read. The modern term is "fusion write".
    1) Is v$BH not good for single instance, since it is a Real Application Clusters view? I did see the view in non-RAC and query it returning lots of rows. Are the result meaningfulv$bh is not relevant to just RAC systems, it is an outer join between x$bh (the buffer headers - which are always relevant) and x$le (the lock elements - which are relevant only to RAC) - being an outer join it supplies information that can be used in single instance.
    2) The phrase in Oracle Doc is hard to understand as usual. Does 'number of pings for every buffer' means those buffer cache blocks that are pinned in SGA, or just every block of buffer cache?
    See above - but I don't think I'd look at v$bh (even in a RAC system) for pings and false pings without first checking whether Oracle has fixed the code that reports them.
    I used ALTER SYSTEM FLUSH SHARED_POOL to clear buffer cache in a single instance, and check buffer cache before and after the clearing buffer with queryselect o.owner,o.OBJECT_TYPE, substr(o.OBJECT_NAME,1,20) objname , b.objd , b.status,
    count(b.objd) from  v$bh b,dba_objects o where b.objd = o.data_object_id
    where owner='BISTG'   group by o.owner,o.object_type,o.object_name,b.objd, b.status ;The result are identical before and after. have the buffer cache really been cleared?I hope you meant: alter system flush buffer_cache; but even if you did the numbers wouldn't change. "Flushing" the bufer cache doesn't really empty out the memory, it simply relinks the buffer headers to a different list, and sets the status to "free". Amongst other things that means it leaves the objd in place.
    Regards
    Jonathan Lewis

  • How to configure multiple buffers and execute them sequentially?

    I would like to build up a path follower using at least two buffers. I wish to write data into the buffers in advance and then execute them sequentially. How can I do?
    I have tried the case for using two buffers, and could only get the two buffers to work "sequentially",
    which means that I could first write data into buffer 1, then execute it, then write data to buffer 2,
    then execute it. Is there any way that I could use multiple buffers and exectue them as the sequence as
    I want?
    The following are the steps that I used for dual buffers:
    buffer 1:
    flex_set_op_mode
    flex_configure_buffer
    flex_write_buffer (check ready)
    flex_start (check complete)
    buffer 2:
    flex_set_op_m
    ode
    flex_configure_buffer
    flex_write_buffer (check ready)
    flex_start (check complete)
    I wish to achieve the following:
    flex_configure_buffer (buffer 1 & 2)
    flex_write_buffer (to buffer 1)
    flex_start (buffer 1)
    while waiting (flex_write_buffer (to buffer 2))
    flex_start (buffer 2)
    The purpose of my using two buffers is to try to prepare data for buffer 2 when we are waiting
    for the execution of buffer 1 and we could execute buffer 2 almost immediately when buffer 1 was
    done. Apparently, I have tried and with no luck to get it to work.

    You can always configure a buffer for indefinite continuous operation by setting the total points value in the configure buffer function to be the maximum value allowed. You can the use the check buffer function inside the while loop to monitor the backlog of your buffer in order for enough positions to be avaliable for the next set of points to be downloaded. As long as your sets of data are of a smaller size than the total buffer size this will have the effect you are desiring. You can always make your precalculations for the next set of points while the previous move is being executed, you just need to allow enough time between the beginning and the end of your first move for the next calculation to be done.

  • Read-Only Access to Specific SAP tables

    Is it possible to grant a user read-only access to a specific table or tables?
    For example, say I wanted to give someone SE16N capability for just EKKO/EKPO/EKBE and NO OTHER tables.  Is this possible?  How?
    Thanks.

    Hi,
    as it was mentioned the transaction SE16N checks for authorization object S_TABU_DIS. The problem in your case is that the tables EKKO, EKPO and EKBE are already assigned to the authorization group MA - MM Appl. table. But there are many more tables assigned to this group. Changing assignment of standard tables is not a good idea.
    Cheers

  • How to load the .cap file in a Smart Card?

    Dear All,
    Hello..!!
    I am using JCDK 2.2 and have used Eclipse JCDK.
    I have written a simple read/write applet and created a .cap file using Eclipse's Converter Java Card tool.
    What is the next step to be done?
    I have a smart card device and have installed its drivers.
    When do the APDU commands come into picture?
    Expecting help.
    Thanks a lot.
    Regards,
    Suril

    Suril Sarvaiya wrote:
    Hi Shane....
    Thnx a lot....
    I have downloaded GP-Shell 1.4.4
    When I open its application and write any command and press enter ; the app window closes immendiately.
    Can you please help me on this?
    One more thing Shane......
    I'm writig a java class using javax.smartcardio
    I have installed drivers of Omnikey 3021
    but the TerminalFactory is not detecting it?
    Any idea on that?
    Thanks again...
    Regards,
    SurilHi all,
    Is Mr. thread starter has solved his problem?
    I profit this thread to post my question. I'm working with new environment and I have problem loading cap file into my smartcard.
    specification come first :-)
    - My smartcard is said to be JC2.2.1 and GP2.1.1 compatible
    - My code (for testing) is written in Java under eclipse Helios service 2 with JavaCard plugin (for JC2.2.2)
    I compile my code with JDK 1.3 (for compatible version) and using the JC plugin to generate cap file (along with exp and jca).
    My problem is exactly the same as one that was posted in this forum about 2 years ago but is not answered :-)
    [Problem Loading Application to Card |http://forums.oracle.com/forums/thread.jspa?threadID=1749334&tstart=420]
    + I successfully authenticate with smartcard
    + APDU command Install for Load is executed successfully
    + BUT the APDU command LOAD file fails with returned status word is 6424
    For details, I post here my javacard applet code and APDU command executed with my tool:
    package mksAuthSys;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    import javacard.framework.ISO7816;
    import javacard.framework.ISOException;
    import javacard.framework.OwnerPIN;
    public class Jcardlet extends Applet {
         private final static byte[] myPIN = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04};
         final static byte Jcardlet_CLA =(byte)0xB0;
         final static byte VERIFY = (byte) 0x20;
         final static byte PIN_TRY_LIMIT =(byte)0x03;
         final static byte MAX_PIN_SIZE =(byte)0x08;
         final static short SW_VERIFICATION_FAILED = 0x6300;
         OwnerPIN pin;
         private Jcardlet() {
              pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
              pin.update(myPIN, (byte) 0, (byte) 4 );
             register();
         public static void install(byte bArray[], short bOffset, byte bLength)
                   throws ISOException {
              new Jcardlet().register();
         public boolean select() {
              if ( pin.getTriesRemaining() == 0 ) return false;
             return true;     
         public void deselect(){
              pin.reset();
         //@Override
         public void process(APDU apdu) throws ISOException {
              // TODO Auto-generated method stub
              byte[] buffer = apdu.getBuffer();
              if ((buffer[ISO7816.OFFSET_CLA] == 0) &&
                      (buffer[ISO7816.OFFSET_INS] == (byte)(0xA4))) return;          
              if (buffer[ISO7816.OFFSET_CLA] != Jcardlet_CLA)
                    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);          
              switch (buffer[ISO7816.OFFSET_INS]) {
               case VERIFY: verify(apdu);
                 return;
               default: ISOException.throwIt (ISO7816.SW_INS_NOT_SUPPORTED);
         private void verify(APDU apdu) {
              // TODO Auto-generated method stub
             byte[] buffer = apdu.getBuffer();
             // retrieve the PIN data for validation.
             byte byteRead = (byte)(apdu.setIncomingAndReceive());
             // check pin
             // the PIN data is read into the APDU buffer
             // at the offset ISO7816.OFFSET_CDATA
             // the PIN data length = byteRead
             if ( pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead) == false )
               ISOException.throwIt(SW_VERIFICATION_FAILED);          
    }And my APDU command:
    Loading "D:\mksAuthSys.cap" ...
    T - 80F28000024F00
    C - 08A000000003000000079E9000
    ISD AID : A000000003000000
    T - 80E602001508F23412345610000008A00000000300000000000000
    C - 009000
    T - 80E80000C8C482018B010012DECAFFED010204000108F23412345610000002001F0012001F000C001500420012009D0011001C0000009F00020001000402010004001502030107A0000000620101000107A000000062000103000C0108F234123456100001002306001200800301000104040000003DFFFF0030004507009D000510188C0003188F00013D0610088C00028700AD007B000403078B0005188B00067A02308F00073D8C00088B00067A0110AD008B00096104037804780110AD008B000A7A0221198B000B2D1A0300
    C - 6424
    Stopped loading due to unexpected status words.Urgently look forward to hearing from you.
    Thanks a bunch in advance
    Best Regards,
    JDL

  • SQL error in the database when accessing a table.

    Hi,
    I got below error at production server. Please suggest how to reslove this error.
    <br>
    <br>
    <br>
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    <br>
    Exception              CX_SY_OPEN_SQL_DB
    <br>
    Date and Time          02.01.2011 15:55:06
    <br>
    <br>
    <br>
    <br>
    <br>
    Short text
    <br>
    SQL error in the database when accessing a table.
    <br>
    <br>
    <br>
    How to correct the error
    <br>
    Database error text........: "[10054] TCP Provider: An existing connection was
    <br>
    forcibly closed by the remote host.
    <br>
    [10054] Communication link failure"
    <br>
    Internal call code.........: "[RSQL/INSR/SWFCNTBUF ]"
    <br>
    Please check the entries in the system log (Transaction SM21).
    <br>
    <br>
    If the error occures in a non-modified SAP program, you may be able to
    <br>
    find an interim solution in an SAP Note.
    <br>
    If you have access to SAP Notes, carry out a search with the following
    <br>
    keywords:
    <br>
    <br>
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    <br>
    "CL_SWF_CNT_FACTORY_SHMEM======CP" or "CL_SWF_CNT_FACTORY_SHMEM======CM001"
    <br>
    |    "ADD_INSTANCE"         
    <br>
    <br>
    <br>
    Information on where terminated
    <br>
    Termination occurred in the ABAP program "CL_SWF_CNT_FACTORY_SHMEM======CP" -
    <br>
    in "ADD_INSTANCE".
    <br>
    The main program was "SAPMSSY1 ".
    <br>
    <br>
    In the source code you have the termination point in line 16
    <br>
    of the (Include) program "CL_SWF_CNT_FACTORY_SHMEM======CM001".
    <br>
    The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
    <br>
    procedure "ADD_INSTANCE" "(METHOD)", but it was neither handled locally nor
    <br>
    declared
    <br>
    in the RAISING clause of its signature.
    <br>
    <br>
    The procedure is in program "CL_SWF_CNT_FACTORY_SHMEM======CP "; its source
    <br>
    code begins in line
    <br>
    1 of the (Include program "CL_SWF_CNT_FACTORY_SHMEM======CM001 ".
    <br>
    <br>
    <br>
    <br>
    Source Code Extract
    <br>
    <br>
    Line
    SourceCde
    <br>
    <br>
    1
    METHOD add_instance .
    <br>
    2
    <br>
    3
    data: ls_id type swfcntbuf.
    <br>
    4
    <br>
    5
    check buffer method - store in local buffer if necessary
    <br>
    6
    retcode = cl_swf_cnt_factory=>add_instance( ibf_por = ibf_por instance = instance ).
    <br>
    7
    <br>
    8
    CHECK m_buffer_method EQ mc_buffer_shared.
    <br>
    9
    <br>
    10
    append key to list of tasks to add stored in database table SWFCNTBUF
    <br>
    11
    will be evaluated by build process for shared memory area (UPDATE_BUFFER method)
    <br>
    12
    <br>
    13
    ls_id-mandt = sy-mandt.
    <br>
    14
    ls_id-id    = ibf_por.
    <br>
    15
    <br>
    >>>>>
    INSERT swfcntbuf CONNECTION r/3*wfcontainer
    <br>
    17
    FROM ls_id.
    <br>
    18
    <br>
    19
    IF sy-subrc EQ 0.
    <br>
    20
    Commit seems to be necessary always, even if INSERT has failed, to get rid of
    <br>
    21
    database locks
    <br>
    22
    COMMIT CONNECTION r/3*wfcontainer.
    <br>
    23
    ENDIF.
    <br>
    24
    <br>
    25
    ENDMETHOD.
    <br>

    duplicate here SQL error in the database when accessing a table.
    Do not post the same question in more than on forum.

  • How to find out who deleted the standard table enteries

    Hi,
    Somebody has deleted entire KNA1 in one of our systems. Is there any way to find out who deleted the entries?
    Thanks & Regards,
    Kumaran Duraiswamy.

    Hi
    Look for help from an ABAPer. Go to SE11 for KNA1, use 'where-used list (ctrlshiftF3) and search for report that begin with Z* or Y* (perhaps LZ* or LY*, ie: function modules). See the ABAP coding if there is any instructions type:
      DELETE kna1 FROM xxx.
    Check too if the option &SAP_EDIT in tcode SE16N works in your system (see SAP Note 1420281 - CO-OM tools: SE16N: Deactivating &SAP_EDIT for instance)
    I hope this helps you
    Regards
    Eduardo
    PD: I forgot it, if option &SAP_EDIT works in SE16N, check the tables SE16N_CD_DATA and SE16N_CD_KEY.
    Edited by: E_Hinojosa on Jun 24, 2011 11:04 AM

  • Install error -look at the code. plz help

    I have the simple applet that I'm able to compile and load on to a JCOP10 cartd. When I try to install the applet so that I can start interacting with it, I get the following error. How do I go beyond this point? I'll appreciate your help.
    JCOP shell
    Load report:
    747 bytes loaded in 0.0 seconds
    effective code size on card:
    + package AID 6
    + applet AIDs 13
    + classes 21
    + methods 470
    + statics 0
    + exports 0
    overall 510 bytes
         end
         /set-var J 0
         while ${J} < ${PKG_${I}_APP_COUNT}
              install -i ${PKG_${I}_APP_${J}_INST_AID} -q C9#(${PKG_${I}_APP_${J}_INST_DATA}) ${PKG_${I}_AID} ${PKG_${I}_APP_${J}_AID}
    => 80 E6 0C 00 24 06 11 11 11 11 11 11 06 22 22 22 ....$........"""
    22 22 22 06 22 22 22 22 22 33 01 00 0B C9 09 23 """."""""3.....#
    42 38 47 36 74 63 76 73 00 00 B8G6tcvs..
    (0 msec)
    <= 6A 80 j.
    Status: Wrong data
    Error code: 6a80 (Wrong data)
    Offending APDU: 6A80
    Here is the code.
    * Package: myWallet
    * Filename: MyWallet.java
    * Class: MyWallet
    * Date: Jan 23, 2004 2:01:58 PM
    package myWallet;
    import javacard.framework.*;
    //import javacardx.framework.*;
    public class MyWallet extends Applet
    /* constants declaration */
    // code of CLA byte in the command APDU header
    final static byte Wallet_CLA =(byte)0x80;
    // codes of INS byte in the command APDU header
    final static byte VERIFY = (byte) 0x20;
    final static byte CREDIT = (byte) 0x30;
    final static byte DEBIT = (byte) 0x40;
    final static byte GET_BALANCE = (byte) 0x50;
    // maximum balance
    final static short MAX_BALANCE = (byte)0x7FFF;
    // maximum transaction amount
    final static byte MAX_TRANSACTION_AMOUNT =(byte)0x007F;
    // maximum number of incorrect tries before the
    // PIN is blocked
    final static byte PIN_TRY_LIMIT =(byte)0x03;
    // maximum size PIN
    final static byte MAX_PIN_SIZE =(byte)0x08;
    // signal that the PIN verification failed
    final static short SW_VERIFICATION_FAILED = 0x6300;
    // signal the the PIN validation is required
    // for a credit or a debit transaction
    final static short SW_PIN_VERIFICATION_REQUIRED =     0x6301;
    // signal invalid transaction amount
    // amount > MAX_TRANSACTION_AMOUNT or amount < 0
    final static short SW_INVALID_TRANSACTION_AMOUNT = 0x6A83;
    // signal that the balance exceed the maximum
    final static short SW_EXCEED_MAXIMUM_BALANCE = 0x6A84;
    // signal the the balance becomes negative
    final static short SW_NEGATIVE_BALANCE = 0x6A85;
    /* instance variables declaration */
    OwnerPIN pin;
    short balance;
    private MyWallet (byte[] bArray,short bOffset,byte bLength)
         // It is good programming practice to allocate
         // all the memory that an applet needs during
         // its lifetime inside the constructor
         pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
         byte iLen = bArray[bOffset]; // aid length
         bOffset = (short) (bOffset+iLen+1);
         byte cLen = bArray[bOffset]; // info length
         bOffset = (short) (bOffset+cLen+1);
         byte aLen = bArray[bOffset]; // applet data length
         // The installation parameters contain the PIN
         // initialization value
         pin.update(bArray, (short)(bOffset+1), aLen);
    register();
    } // end of the constructor
    public static void install(byte[] bArray, short bOffset, byte bLength){
         // create a Wallet applet instance
         MyWallet me = new MyWallet(bArray, bOffset, bLength);
    me.register(bArray, bOffset, bLength);
    } // end of install method
    public boolean select()
         // The applet declines to be selected
         // if the pin is blocked.
         if ( pin.getTriesRemaining() == 0 )
         return false;
         return true;
    }// end of select method
    public void deselect() {
         // reset the pin value
         pin.reset();
    public void process(APDU apdu) {
         // APDU object carries a byte array (buffer) to
         // transfer incoming and outgoing APDU header
         // and data bytes between card and CAD
         // At this point, only the first header bytes
         // [CLA, INS, P1, P2, P3] are available in
         // the APDU buffer.
         // The interface javacard.framework.ISO7816
         // declares constants to denote the offset of
         // these bytes in the APDU buffer
         byte[] buffer = apdu.getBuffer();
         // check SELECT APDU command
         buffer[ISO7816.OFFSET_CLA] = (byte)(buffer[ISO7816.OFFSET_CLA] & (byte)0xFC);
         if ((buffer[ISO7816.OFFSET_CLA] == 0) &&
         (buffer[ISO7816.OFFSET_INS] == (byte)(0xA4)) )
         return;
         // verify the reset of commands have the
         // correct CLA byte, which specifies the
         // command structure
         if (buffer[ISO7816.OFFSET_CLA] != Wallet_CLA)
         ISOException.throwIt
    (ISO7816.SW_CLA_NOT_SUPPORTED);
         switch (buffer[ISO7816.OFFSET_INS]) {
         case GET_BALANCE: getBalance(apdu);
                                  return;
         case DEBIT: debit(apdu);
                                  return;
         case CREDIT: credit(apdu);
                                  return;
         case VERIFY: verify(apdu);
                                  return;
         default: ISOException.throwIt (ISO7816.SW_INS_NOT_SUPPORTED);
    } // end of process method
    private void credit(APDU apdu)
    // access authentication
    if ( ! pin.isValidated() )
    ISOException.throwIt(
              SW_PIN_VERIFICATION_REQUIRED);
         byte[] buffer = apdu.getBuffer();
         // Lc byte denotes the number of bytes in the
         // data field of the command APDU
         byte numBytes = buffer[ISO7816.OFFSET_LC];
         // indicate that this APDU has incoming data
         // and receive data starting from the offset
         // ISO7816.OFFSET_CDATA following the 5 header
         // bytes.
         byte byteRead =
                   (byte)(apdu.setIncomingAndReceive());
         // it is an error if the number of data bytes
         // read does not match the number in Lc byte
         if ( ( numBytes != 1 ) || (byteRead != 1) )
         ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
         // get the credit amount
         byte creditAmount = buffer[ISO7816.OFFSET_CDATA];
         // check the credit amount
         if ( ( creditAmount > MAX_TRANSACTION_AMOUNT)
              || ( creditAmount < 0 ) )
              ISOException.throwIt
                        (SW_INVALID_TRANSACTION_AMOUNT);
         // check the new balance
         if ( (short)( balance + creditAmount) > MAX_BALANCE )
         ISOException.throwIt
                             (SW_EXCEED_MAXIMUM_BALANCE);
         // credit the amount
         balance = (short)(balance + creditAmount);
    } // end of deposit method
    private void debit(APDU apdu)
         // access authentication
         if ( ! pin.isValidated() )
         ISOException.throwIt
    (SW_PIN_VERIFICATION_REQUIRED);
         byte[] buffer = apdu.getBuffer();
         byte numBytes =
                   (byte)(buffer[ISO7816.OFFSET_LC]);
         byte byteRead =
                   (byte)(apdu.setIncomingAndReceive());
         if ( ( numBytes != 1 ) || (byteRead != 1) )
         ISOException.throwIt
                                  (ISO7816.SW_WRONG_LENGTH);
         // get debit amount
         byte debitAmount =
                             buffer[ISO7816.OFFSET_CDATA];
         // check debit amount
         if ( ( debitAmount > MAX_TRANSACTION_AMOUNT)
              || ( debitAmount < 0 ) )
         ISOException.throwIt
                        (SW_INVALID_TRANSACTION_AMOUNT);
         // check the new balance
         if ( (short)( balance - debitAmount ) < (short)0 )
              ISOException.throwIt(SW_NEGATIVE_BALANCE);
         balance = (short) (balance - debitAmount);
    } // end of debit method
    private void getBalance(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
         // inform system that the applet has finished
         // processing the command and the system should
         // now prepare to construct a response APDU
         // which contains data field
         short le = apdu.setOutgoing();
         if ( le < 2 )
         ISOException.throwIt
                             (ISO7816.SW_WRONG_LENGTH);
         //informs the CAD the actual number of bytes
         //returned
         apdu.setOutgoingLength((byte)2);
         // move the balance data into the APDU buffer
         // starting at the offset 0
         buffer[0] = (byte)(balance >> 8);
         buffer[1] = (byte)(balance & 0xFF);
         // send the 2-byte balance at the offset
         // 0 in the apdu buffer
         apdu.sendBytes((short)0, (short)2);
    } // end of getBalance method
    private void verify(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
         // retrieve the PIN data for validation.
    byte byteRead =(byte)(apdu.setIncomingAndReceive());
    // check pin
         // the PIN data is read into the APDU buffer
    // at the offset ISO7816.OFFSET_CDATA
    // the PIN data length = byteRead
    if ( pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead) == false )
         ISOException.throwIt(SW_VERIFICATION_FAILED);
    } // end of validate method
    } // end of class Wallet

    How do I set a breakpoint in my install method in order to identify the error?
    I've tried changing my install method and making it look exactly like the sample wallet applications accompanying the javacard kit, but I'm still getting the same error? here else could be the possible source of the error?
    Thomas

  • Need to fill a new field in table EKKO

    Hi all,
    i created a new field (ZZCODE) in the table EKKO. Well, now i would like to fill this field when the user save his purchase order. Which user-exit or BADI can i use ?
    I tried a lot but either i can't change the parameters values either the FM is not raise.
    Thanks for help.

    HI CECG,
    Yesterday itself i tried this example,
    i will forward u the document to ur mail id,
    plz provide me the mail id so that i will forward u the doc..
    STEP-BY-STEP PROCEDURE FOR SCREEN EXIT IN ME21n TRANSACTION
    Introduction:
                        SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
                        To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
    Requirement:
                         You have to add the custom field in SAP standard table EKKO. Then we have to place the field in ME21N screen. When user enters any input into the field it should get updated in the database.
    Note:
                         EKKO table is meant for Purchasing document header, you should add the field in the header level for ME21n screen. There you are provided with customer sub screens where you can add the field in the screen.
    In EKKO table
    include : cl_ekkodb
    in that u can add the field u want
    Procedure:
    1.     You have to create a field in the Custom Include of standard table, after creating activate it.
    2.     Double click on the include then you can add your custom field here.
    Find out the Required Enhancements:
    1.     Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton ‘Information system’.
    MM06E005 : CUSTOMER FIELDS IN PURCHASING DOCUMENT
    2.     Then mention the particular package name of the transaction you need to      enhance. Then you will be shown the list of Enhancement components for that particular package.
    3.     Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
    MM06E005 is the Enhancement component we are using here.
    Development
    Creating a Project to include the enhancement:
    1.     Go to transaction CMOD and create a project.
    2.     Enter a description for the project.
    3.     Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
    4.     Click on the components in Application Toolbar.
    5.     Here you will be shown the function module exits, screen exits and Include tables.
    6.     Click on the custom screen SAPLXMO6 – 0101 in which it suits the requirement of adding the custom field to the layout.
    7.     Click on layout and go to get from dictionary and select the field you need to add and click ok.
    8.     Place the field in the layout and activate it.
    9.     After that you come back and check the respective function module in which you need to implement the code. So, we need to import the data from sub screen for purchasing document header. Therefore we have chosen  the  EXIT_SAPMM06E_008.
    10. Write code in the Function Exits to synchronize the programs:
                           Now, code has to be written in the function modules EXIT_SAPMM06E_008 so that data flows to and fro between the main SAP program and custom sub screen program. Double clicking on the exit we get the following screen.
    11. Double click on the include and write the required code inside it. Then activate it.
    12. Now come back and activate the entire project.
    13. Now go to ME21n transaction and create a purchase order by giving all the mandatory fields including custom field we have created. Go to SE16n, check whether the field got updated in the database or not.
    Finally it gets updated in the database.
    IF U PROVIDE ME UR MAILID I CAN SEND U THE DOCUMENT WHICH IS VERY CLEAR FOR PURCHASE ORDER
    PLZ REWARDS POINTS IF HELPFUL,
    Ganesh.

  • Number range  for object MDTB does not exist - Message no. 61501

    Hi All ,
      I have done the necessary configurations in PP say
    Order Type
    Order Type Dependent Parameters
    Scheduling parameters for planned & production order
    Confirmation parameters
    Availabilty check etc
    and iam able to create planned & production order and confirma the production order.
    I want to configure for MRP: -
    Settings done are
    Have activeted planning file entry for all plants.
    When i run MRP system throws a error <b>Number range  for object MDTB does not exist - Message no.61501 </b>
    Is there anything to do with plant parameters OPPQ and Mrp Group OPPR.
    I just tried plant parameters,standard 0001 is not available for copying.
    Suggest me how to proceed to set MRP.
    Shankar

    Hi shankar
      it is a good practice while creating the plant copying the plant from the standard plant so that all the standard table enteries will be copied  for the plant as the standard plant is not there youcan think of copying from any other plant similar to your plant which has the required entry. else
    in SE16N  check the NRIV table for the Object MDTB. if enteris found then make the table entry with the help of abaper.
    hope this helps
    regards
    SK

Maybe you are looking for

  • Why is it that I can no longer access all of the people in my address book by typing their names in the address line of an email?

    Until the last month or so I have always been able to type the first few letters of a persons name in the email address bar and his address would be entered. Now this only happens for those people that I have contacted recently. The really big proble

  • How to change the font size of text and case in smartforms

    hi,    could any one explain how to change the font size of text in smartforms. ex. previously i had taken P4 left aligned and C6 but now i want to decrease the font without making it bold. pl......... guide me    secondly the value which are coming

  • Photos slideshow pause/play button not displaying in 3.0

    I've been running 3.0 on my first generation Touch for several months. Throughout, I've noticed that the Photos slideshow lower-center pause/play button no longer displays once I've paused a slideshow. While the left/right arrows show and I am able t

  • Itunes needs a "party mode"

    I am hoping to have a party in the coming weeks and i know from past experience that windows has a party mode, which is great, as it allows guests to put music on without allowing them access to the rest of the computer. Is there any way i can achiev

  • Moving The CC To New Device

    Several months ago I purchased CC for my wife. Given that she didn't quite understand the new concept, when I purchased it I downloaded it to my laptop to get familiar with it and then told her what to do. I knew she could use it as it can be used on