Condition not right

Hi,
My problem is on this code:--
IF TKN = 'X'.
  SORT ITAB BY PERNR .
ELSE.
  LOOP AT ITAB1.
    IF NTKN EQ 'X'.
      DELETE ITAB1.
      CONTINUE.
    ENDIF.
  ENDLOOP.
ENDIF.
I have 2 radio buttons, 1 for LTA taken values and other is LTA not taken..
LTA taken values come correctly but LTA not taken values not correct..it shows the same values as LTA Taken..
Plz tell..

Hi,
It is asking for NTKN, that no component exist with the name NTKN..
Plz check my code.. for whole information.
REPORT  ZHR_LTA  NO STANDARD PAGE HEADING LINE-SIZE 100                            .
TABLES : PA0015,  "HR Master Record: Infotype 0008 (Basic Pay)
         PA0001 ,   "HR Master Record: Infotype 0001 (Org. Assignment)
         PA0002 ,   "HR Master Record: Infotype 0002 (Personal Data)
         T001P .   "Personnel Area/Subarea
TYPE-POOLS : SLIS .
DATA : BEGIN OF ITAB OCCURS 0 ,
       PERNR LIKE PA0008-PERNR ,                       "Personel no.
       ENAME LIKE PA0001-ENAME ,                       "Employee name
       Z_DESIGNATION LIKE PA0001-Z_DESIGNATION ,       "Designation
       BEGDA LIKE PA0015-BEGDA ,                       "LTA VALID DATE
       ENDDA LIKE PA0015-ENDDA ,                       " LTA VALID DATE
       BETRG LIKE PA0015-BETRG ,                       " LTA Amount
       END OF ITAB .
DATA : BEGIN OF ITAB1 OCCURS 0 ,
       PERNR LIKE PA0008-PERNR ,                       "Personel no.
       ENAME LIKE PA0001-ENAME ,                       "Employee name
       Z_DESIGNATION LIKE PA0001-Z_DESIGNATION ,       "Designation
       END OF ITAB1 .
DATA : BEGIN OF ITAB3 OCCURS 0.
        INCLUDE STRUCTURE ITAB.
DATA : END OF ITAB3.
DATA : X TYPE I.
DATA : W_CONTAINER TYPE SCRFNAME VALUE 'CL_GRID',
       W_CPROG TYPE LVC_S_LAYO,
       G_REPID LIKE SY-REPID,
       W_SAVE TYPE C,
       W_EXIT TYPE C,
       CL_GRID TYPE REF TO CL_GUI_ALV_GRID,
       CL_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
       IT_FLD_CATALOG TYPE SLIS_T_FIELDCAT_ALV,
       WA_FLD_CATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE ,
       LAYOUT TYPE SLIS_LAYOUT_ALV,
       COL_POS  LIKE SY-CUCOL ,
       ALVFC TYPE SLIS_T_FIELDCAT_ALV.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001 .
SELECT-OPTIONS : PERNR FOR PA0001-PERNR .
SELECT-OPTIONS : ENDDA FOR PA0015-ENDDA OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1 .
PARAMETER : TKN RADIOBUTTON GROUP A,
            NTKN RADIOBUTTON GROUP A.
IF TKN = 'X'.
  PERFORM FILL_CATALOG1 USING:
  'PERNR'    'ITAB'    'Personal No.',
  'ENAME'    'ITAB'    'Emp Name',
  'Z_DESIGNATION'    'ITAB'    'Designation',
  'BEGDA'    'ITAB'    'Valid from',
  'ENDDA'    'ITAB'    'End Date',
  'BETRG'    'ITAB'    'Amount'.
ELSE.
  PERFORM FILL_CATALOG1 USING:
  'PERNR'    'ITAB'    'Personal No.',
  'ENAME'    'ITAB'    'Emp Name',
  'Z_DESIGNATION'    'ITAB'    'Designation'.
ENDIF.
SELECT M1PERNR M1ENDDA M1BEGDA M1BETRG M2ENAME M2Z_DESIGNATION INTO CORRESPONDING FIELDS OF TABLE ITAB
                                  FROM PA0015 AS M1 INNER JOIN PA0001 AS M2 ON M1PERNR = M2PERNR
                                  WHERE M1PERNR IN PERNR AND M1SUBTY EQ '4004' AND M2~ENDDA EQ '99991231'
                                  AND M1BEGDA GE ENDDA-LOW AND M1ENDDA LE ENDDA-HIGH .
SELECT PERNR ENAME Z_DESIGNATION INTO CORRESPONDING FIELDS OF TABLE ITAB1
                                  FROM PA0001 WHERE ENDDA EQ '99991231' AND PERSG = '1'.
IF SY-SUBRC <> 0 .
  MESSAGE 'DATA NOT FOUND.' TYPE 'I' .
ENDIF .
SORT ITAB BY PERNR .
IF TKN = 'X'.
  SORT ITAB BY PERNR .
ELSE.
  DELETE ITAB1 WHERE NTKN EQ 'X'.       " // asking question here
ENDIF.
*IF TKN = 'X'.
SORT ITAB BY PERNR .
*ELSE.
LOOP AT ITAB1.
   IF NTKN EQ 'X'.
     DELETE ITAB1.
     CONTINUE.
   ENDIF.
ENDLOOP.
*ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM = 'ZHR_LTA'
    IS_LAYOUT          = LAYOUT
    IT_FIELDCAT        = IT_FLD_CATALOG
    I_DEFAULT          = 'X'
    I_SAVE             = 'A'
  TABLES
    T_OUTTAB           = ITAB
  EXCEPTIONS
    PROGRAM_ERROR      = 1
    OTHERS             = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*ENDFORM.
FORM FILL_CATALOG1  USING   P_FIELDNAME TYPE ANY
                            P_REF_TABLE TYPE ANY
                            P_SCRTEXT   TYPE ANY.
  CLEAR : WA_FLD_CATALOG.
  WA_FLD_CATALOG-FIELDNAME  = P_FIELDNAME.
  WA_FLD_CATALOG-TABNAME    = P_REF_TABLE.
  WA_FLD_CATALOG-SELTEXT_S  = P_SCRTEXT.
  WA_FLD_CATALOG-SELTEXT_M  = P_SCRTEXT.
  WA_FLD_CATALOG-SELTEXT_L  = P_SCRTEXT.
  APPEND WA_FLD_CATALOG TO IT_FLD_CATALOG.
ENDFORM.                    " fill_catalog1
Plz check and tell....what can i do...

Similar Messages

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • ITunes sync to Z10 = not right working / mixed songs in wrong playlists

    Hi
    iam totally frustrated:
    I try several weeks since i have this great device, to sync my itunes music to z10.
    But on syncing thru BB Link, my playlists on z10 are totally mixed with the wrong music files.
    On itunes = all is fine sorted
    Transfered to Z10 = some music is not shown in their playlist or playlists are together in one.
    So syncing is not right working. Horrible
    Combination:
    iTunes + Mac
    Z10 with 64GB card -> fromatted inside Z10 (several times)
    So iam not able to get my music with right playlists to the Z10.
    whats wrong here?
    I never experienced with such problems on iPhone or Android based Phones.
    Blackberry! Please fix that!

    Hey uhscale,
    Welcome to the BlackBerry Support Community Forums.
    Thanks for the question.
    We are going to need to gather some BlackBerry Link logs to find out why the playlists are mismatching.  Please contact your network service provider and ask to be transferred to BlackBerry so we can investigate these logs.
    Thank you.
    -ViciousFerret
    Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
    Be sure to click Like! for those who have helped you.
    Click  Accept as Solution for posts that have solved your issue(s)!

  • Since the os7 update on my iPad, my safari is not right, it only opens one page at a time, crashes when trying to open more, it has no back button. Help

    Since the os7 update on my iPad, my safari is not right, it only opens one page at a time, crashes when trying to open more, it has no back button. Help

    Well, I rebuilt the entire workbook... that was a few months ago and so far, the problem hasn't resurfaced. It really wasn't fun to do, but whatever glitch there was in the file, I eliminated it.
    I think I should mention that I am using Office v.X, NOT Office 2004. I got a new Intel iMac this week and yesterday when I opened up my files, it opened up the test drive (a JOKE of a program if you ask me) Anyway, some of the very minor issues I had with Office v.X were solved in the 2004 version. (When opening up large multi worksheet files without Excel being already opened, the tabs have white text) Anyway, I am still going to wait for the universal version to come out, but it seems that the newer versions may have fewer glitches (as is to be expected)
    At any rate, best of luck to you!

  • I turned on the passcode lock to come on in 1 hour.  It doesn't seem to be working.  I thought that this would make the Ipad 2 IOS 7 require me to type in a code after 1 hour.  Is my thinking not right on this?

    As stated I turned on my passcode lock to come on after 1 hour of operation.  It doesn't work like I thought it would.  My thoughts were that it would go to the lock screen and then require a code.  Is my thinking not right on this?  What am i doing wrong?

    The passcode will be requested after the device has been in sleep mode for one hour.  It does not turn off the device, nor is it a usage timer.

  • HT200197 the colour on my apple tv is not right. itsshowing every thing in a grean and purple colour. i have restarted apple tv and changed the hdmi cable but the problem stiil persists

    the colour on my apple tv is not right. the only colours are black white green and purple. i have retatrted my apple tv and chenged the HDMI cable all with no success.
    any suggestions of what else i can try?

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)
    If this doesn't help, try it on another TV, if the problem persists you possibly have a failed unit.

  • Oops, something is not right... Flash Plug-In Warning Explanation: You do not have the Flash player installed on your browser. How to Fix the Problem: This game requires the Flash plug-in. Download the latest Flash player now.

    When I try to play certain games on pogo, I get this: Oops, something is not right...
    Flash Plug-In Warning
    Explanation:
    You do not have the Flash player installed on your browser.
    How to Fix the Problem:
    This game requires the Flash plug-in.
    Download the latest Flash player now.
    So I download latest still get error message

    It is best to go to the source, Adobe, to get their software and updates. Sometimes malware can infect sites with messages that appear legitimate, but will, instead, install malware/virus/trojan on your system. Read the following carefully to install and/or update Adobe Flash.
    There are 2 versions of Adobe Flash; an '''ActiveX version''' for IE only and a '''Plugin version''' for most other browsers including Firefox. On a Windows system, you should always update both individually. '''''You do not have Adobe Flash (aka "Shockwave Flash" in Add-ons > Plugins) installed.'''''
    #'''Using Firefox''', go to the following direct download link and SAVE the download to your desktop so you can find it later: http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player.exe
    #When the download is finished, close Firefox (File > Exit '''''OR''''' Firefox button > Exit)
    #Click or double-click on the file you just saved to your desktop
    #*In the installation window that appears, click the box to the left of "I have read and...." to place a check mark in the box
    #*The "Install" button in the lower right corner will now be highlighted, click it.
    #*The installation is quick.
    #Start Firefox and test your installation here: https://www.adobe.com/software/flash/about/
    #Direct link ActiveX version for IE '''''only''''': http://fpdownload.adobe.com/get/flashplayer/current/install_flash_player_ax.exe
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • I list books on Amazon when on IE my condition notes were always saved & I could pick any one but when using firefox they not saved how can I fix this?

    I list books on Amazon when on IE my condition notes were always saved & I could pick any one but when using firefox they not saved how can I fix this?

    Clear the cache and the cookies from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Make sure that you aren't blocking cookies.
    *http://kb.mozillazine.org/Cookies
    *https://support.mozilla.org/kb/Deleting+cookies
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I can not right click "open in new tab" nor open in new window, in my bookmark file.the bookmarks are all there, but I have to open a tab first then left click to open an item. Why can't I right click? The options are there, but not highlighted/clickable.

    I can not right click "open in new tab" nor open in new window, in my bookmark file.the bookmarks are all there, but I have to open a tab first then left click to open an item. Why can't I right click? The options are there, but not highlighted/clickable.

    now it is working?! Go figure. Yeah! Thanks anyway......

  • OR condition not working correctly in SQL

    I am adding the folling condition to a sql statement and
    AND (status_code IS NULL or status_code <> 'T'
    or (status_code IN ('A','B','C','D') and TRIM(order_type) NOT LIKE '%9999')
    or (status_code IN ('A','B','C','D') and order_type IS NOT NULL)
    or (status_code NOT IN ('A','B','C','D')))
    but the or condition work...
    if i change it too
    AND ( (status_code IN ('A','B','C','D') and order_type IS NOT NULL) )
    then this portion of the OR condition work but when I use the OR condition something weird is happening that the condition not working... and i dont see a record that meets that condition...

    Hi,
    It's not the "trim" that implies "not null", but rather the fact that:
    - "not like" operator works only on non-null values and
    - "not like" operator disregards null values.
    Consider this:
    test@ORA92>
    test@ORA92>
    test@ORA92> l
      1  with x as (
      2    select null as y from dual union all
      3    select 'a9999' from dual union all
      4    select 'bxx' from dual
      5  )
      6  select * from x
      7* where y not like '%9999'
    test@ORA92>
    test@ORA92> /
    Y
    bxx
    1 row selected.
    test@ORA92>
    test@ORA92>Here, trim function was not used, but still the first row (that had null for y) was not returned. That's because Oracle disregarded the first row for comparison and out of the next two rows, it returned the third row because it satisfied the condition.
    As for your query, do the following conditions hold true:
    1. if status_code is null      - show the row regardless of order_type
    2. if status_code <> 'T'       - show the row regardless of order_type
    3. if status_code in (a,b,c,d) and order_type is not null and order_type ends with something other than 9999 - show the row
    4. if status_code in (a,b,c,d) and order_type is null                           - do not show the row
    5. if status_code in (a,b,c,d) and order_type is not null and it ends with 9999 - do not show the row
    6. if status_code is anything other than (a,b,c,d)                              - do not show the rowpratz

  • This is not right: time limit on iMac G5 Repair Program

    iMac G5 Repair Extension Program for Video and Power Issues
    http://docs.info.apple.com/article.html?artnum=302181
    The program covers affected iMac G5 computers for up
    to three years from the original date of purchase.
    Apple sold iMacs G5 computers that were defective when they left the factory. Apple knows the cause of the defects. In some of the affected iMacs the defects manifested them earlier, in others later.
    That Apple is using a time limit for the free repair is not right because the manifestation of the problem is usage dependant - those who used their iMac little (and the problem appears late) are being penalized. The correct way would have been to recall and repair all of the affected iMacs or put no time limit on the free repair.

    Hello All,
    I agree as well. My iMac G5 would not power up on Saturday morning. I bought it in Feb. 2005. I had the logic board and power supply replaced in May 2006. My apple care ran out in Feb of this year. Still, I called Apple, thinking perhaps something could be done.
    The tech was very, very nice, and talked with his supervisor three times to see if perhaps I could get some kind of discount on a new computer. No go. And he explained that Apple is no longer making the old logic boards, they have to be made special, etc. I do feel a little cheated, since they replaced the logic board with one that had the same problems (opened it up--bulging capacitors with the cross mark on them). Well, it lasted two years after that, but we are not hard on our computers, and now I wish I'd have been less cautious with it. Maybe it would have died two months sooner when I still had Applecare!
    Nevertheless, I still went out and bought a new iMac 24 in. 2.8 with 4 GB ram and a new Airport Extreme Base Station (Apple products are still the best I've ever used). I'm going to wait awhile to get Apple Care--to extend my coverage time as long as possible, since even a couple months would have helped in my situation.
    Good luck to all you G5 owners. And thanks to all the people in the G5 forums that have been so helpful in the past. And Back-up often--you'll be glad you did.
    Dawn

  • Cursor not right-justifying in Oracle Forms 11.1.1.6.0

    Hi All,
    A user notice during testing that 'cursor not right-justifying' in a field on a form. There were not such problem in the old forms enviroment 10.1.2.0.2 and clients running JInitiator 1.3.1.22. The new forms enviroment is Oracle weblogic 10.3.6, Oracle forms and report 11.1.1.6.0, using forms demo pack cursorpos.jar and demo90.jar, have try the 11g demo pack but still the same problem, any ideas?
    Thanks
    Ola

    A user notice during testing that 'cursor not right-justifying' in a field on a form.What exactly do you mean by "cursor not right-justifying"?
    You will find noticable differences between the way the Oracle Jinitiiator and Oracle (Sun) Java work. Remember, the Jinitiator was based on the Sun JRE/JDK 1.3 and Forms 11g will be using either Java 1.6.0 or 1.7.0.
    Craig...

  • Why when I preordered the new Iphone was the tax estimated at plus minus $55 it sould have been about $18. I was told it was based on the full $649 value of the phone, but that's not right. Sales tax is on the purchase price.

    Why when I recently preordered the new $199 I phone was the sales tax estimated at +- $55? It should have been +- $18. The supervisor said the tax was on the $649 value, but that's not right as sales tax is charged on the sales amount. What is this charge for?

    Complain to your elected officials, they're the one's that write the tax code. I know that in CA and RI, sales tax is collected on the unbundled price(full) of not just the iPhone, but any cell phone.

  • Tax Condition not geeting updated

    Hi Friends,
    I have a problem of tax condition not appearing in the contracts. My condition is based on the combination (IN VK11) of Country/Customer/Material/Pricegroup.
    All my masters are maintained, my problem is the field price group in the header level has actually gone blank due to which the condition is not appearing. This field used to get popoulated from the customer master and my customer is up to date. I want to fill in the field with the required data as maintained i the customer master. Can someone please suggest how can I achieve this.
    Currently the only option that I see is go in the contract and fill the price gropu field manually. Is there a way to populate this field automatically as I have more than 5000 contract which have been affected.
    Please help.
    Regards,
    Wasim.

    Hi
    Kindly check the pricing analysis in the order on whoich key combination the tax is coming
    and check the routine maintained against the condition type UTXJ in V/08 t code
    Regards
    Damu

  • Conditional Not Null

    I am trying to create an item level validation on an entry form for a Conditional Not Null. For example ...
    Field 1 = Animal Type
    Field 2 = Dog Type
    If Field 1 = Dog .... Field 2 must be Not Null.
    Can someone help me set this up. Thanks in advance for your assistance.

    Are REQUEST_TYPE and ACCT_EXTERNAL_ONLY page items? Because in that case you have to use the bind variable syntax to access them.
    IF :REQUEST_TYPE = 'External' AND :ACCT_EXTERNAL_ONLY IS NULL THEN
        RAISE_APPLICATION_ERROR (-20001,'Error Message');
    END IF;Patrick
    My APEX Blog: http://www.inside-oracle-apex.com
    The APEX Builder Plugin: http://builderplugin.oracleapex.info/
    The ApexLib Framework: http://apexlib.sourceforge.net/

Maybe you are looking for