Question about using TVARV in an ABAP program

Hello gurus, Im sorry about the silly question.
I have a question about using TVARV in an ABAP program.
A program is presenting a problem and I think that in this code:
SELECT SIGN OPTI LOW HIGH
  FROM TVARV
  INTO TABLE R_1_163431035_VELOCIDADE
  WHERE  NAME = '1_163431035_VELOCIDADE'
  AND    TYPE = 'S'.
  IF ZMM001-VELOCIDADE_B   IN R_1_163431035_VELOCIDADE AND
      ZOPERADORAS-OPERADORA = 'ABCD' AND
      ZMM001-MATERIAL       IN R_1_163431035_PRODUTO.
  ELSE.
  ENDIF.
What happens is that the value "ZMM001-SPEED" B not exist in "R1_163431035_VELOCIDADE" but the program executes commands under the IF and not under the ELSE, as I imagine it would work. Is this correct ?
I am new to ABAP programming, but I have a lot of XP in other programming languages ​​and this makes no sense to me.
Anyone know where I can find some documentation of the use of "TVARV" in ABAP programs?
I search the Internet if other programmers use TVARV this way, but found nothing, which leads me to think that was a quick and dirty solution that used here.
If this is a bad way to program, what would be the best way?
Regards
Ronaldo.

Hi Ronaldo,
But in this case, the range is not empty, there are 17 records, in this way.:
For the column "SING" all values ​​are "E"
It means that the result is false if ZMM001-VELOCIDADE_B has the same value as one of the 17 records (E = exclude).
For instance, if it has value 'C' and one of 17 records matches C, then the result is false.
The "IF" with "IN" using "TVARV" as used in the program of the post above has the same behavior of a selection screen?
Yes, the same behavior as the selection criterion to be exact. You can press the help key in the complex selection dialog for more info.
I know it's a silly and very basic question, but other language that I used, only the SQL has the "IN" operator, but I think they work in different ways, so I would like to understand how it works in ABAP.
Not silly ;-). Yes they work differently.
More info here:
- http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba74635c111d1829f0000e829fbfe/frameset.htm
- http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/frameset.htm
BR
Sandra

Similar Messages

  • Updating liveCache Data using Function Module or ABAP program.

    Is it possible to update APO Live Cache using Function Module or ABAP Program.
    Will the aggregation/disaggreagation remain the same if data is modified using Function Module or ABAP Program.
    Regards,
    Vikas

    ello Vikas,
    -> Please click at
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    & read about 'SAP liveCache'.
    As you know objects stored in liveCache in the class containers can be accessed
    and manipulated only via LCA routines which are methods of LCA objects.
    The registration of the LCA routines is done automatically when
    the liveCache is started by the LC10, check the lcinit.log file.
    The shared procedures in the LiveCache are written in C++ and shipped
    to the customers as binary shared libraries(LCA-Routines) < LCA build >
    together with the LiveCache. The original C++ source code of the
    libraries is not generally available to the customers.
    The LCA routines could be called via "/SAPAPO/OM*" ABAP functions.
    -> For SAP liveCache documentation in English:
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    < -> Database Administration in CCMS: SAP liveCache -> liveCache Assistant ->
    liveCache: Monitoring -> Problem Analysis-> DB Procedures >
    In transaction LC10 for the LCA connection choose liveCache:Monitoring
    then go to Problem Analysis -> DB Procedures=>
    The system displays an overview of all database procedures loaded into
    liveCache, their input and output parameters, and other details.
    -> Tr. /n/SAPAPO/OM16 ( in further releases /n/sapapo/om19 ) is provided by
    SAP to get information about data stored in the LiveCache. If you would
    like to get your own views, you should write a special report in ABAP using
    "/SAPAPO/OM"-development class functionality.
    -> There are standard function modules in ABAP available to extract/change data from/in liveCache.
    -> In addition to the given information => find more information at:
    SCM 4.0 -> http://help.sap.com/saphelp_scm40/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 4.1 ->
    http://help.sap.com/saphelp_scm41/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 5.0 ->
    http://help.sap.com/saphelp_scm50/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    You can go to the Advanced Planner and Optimizer documentation from the above links < Supply Network Planning Run -> Aggregated Planning -> SNP Disaggregation Or SNP aggregation . >.
    If you still have open questions on the posted topic =>
    Could you please give more information on your application scenario.
    Thank you and best regards, Natalia Khlopina

  • Question about using Runtime.getRuntime();

    hi all
    i have a question about using Runtime.getRuntime(). if i use this to get a runtime reference to run an external program, is it considered as starting a new thread inside the thread that starts it?
    is it safe to do it in the Session EJB? if not, what can you recommand to do it? thanks

    hi all
    i have a question about using Runtime.getRuntime().
    if i use this to get a runtime reference to run an
    external program, is it considered as starting a new
    thread inside the thread that starts it? No. Starting a process, starts a process. Threads have nothing to do with it.
    is it safe to do it in the Session EJB? if not, what
    can you recommand to do it? thanksSo what? Run another process? If you want to run another process in java then your choices are to use Runtime.exec() or use JNI. And using JNI will probably end up doing exactly the same thing as Runtime.exec().
    "Safe" is harder. Typically to correctly use Runtime.exec() you must use threads. And as noted threads ideally should not be used. You can use them but if you do you had better understand why they didn't want you using them in the first place. You had also better be sure that you really want to wait for it to complete.
    Other than that Runtime.exec() is safe because it can't crash the VM like other interfaces can (like JNI.)

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher

    I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher #1 iPad to its AppleTV without effecting/projecting onto the adjacent teachers #2 classroom AppleTV?

    Not as such.
    Give the AppleTV units unique names and also enable Airplay password in settings with unique passwords for each teacher.
    AC

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Question about using new battery in old Powerbook

    I have a pre-intel Powerbook G4, and the battery is pretty much toast (lasts about 15 minutes now). I have ordered a new battery for it, and I have this question about using it:
    Am I smarter to keep the new strong battery out of the PB most days (as I usually work with it plugged in at home) and just pop it in when I know I will be out surfing on batteries? Or is it just as good living in my laptop 24/7 and only occasionally being called upon to do its job?
    Current bad Battery Information below:
    Battery Installed: Yes
    First low level warning: No
    Full Charge Capacity (mAh): 1144
    Remaining Capacity (mAh): 1115
    Amperage (mA): 0
    Voltage (mV): 12387
    Cycle Count: 281
    thanks folks, Shereen

    Hi, Shereen. Every Powerbook battery wants to be used — drained and then recharged — at least every couple of weeks. If you've always used your Powerbook on AC power nearly all the time, and not followed that pattern of discharging and recharging the battery every week or two, it's possible that your use habits have shortened the lifespan and prematurely diminished the capacity of your old battery. Of course it's also possible that your battery is merely old, as a battery's capacity also diminishes with age regardless of how it's used. You didn't say how old the battery is in years, so this may or may not be an issue. I mention it only because it can be an issue.
    For general information on handling a battery for the longest possible lifespan, see this article. My advice on the basis of that article and long experience reading these forums is that it would be OK to do as you propose, but I doubt that you'd derive any significant benefit from it. You would still want to be sure of putting the new battery through a charge/discharge cycle every week or two, even if you didn't have a reason to use the Powerbook away from home or your desk, because sitting unused outside the computer is just as bad for a battery as sitting unused inside it. And you should never remove the battery from your computer when it's completely or almost completely discharged and let it sit that way any longer than a day or two.
    Message was edited by: eww

  • Question about using Macbook in Vietnam.

    I have a question about using Macbook in Vietnam. I bought my mac here in the US, and I'm going to visit Vietnam, but I'm wondering if I can plug in the power directly into the wall or I have to need any convert power modem for my mac. The only thing I know that Vietnam use 220V so, can anyone help me?

    You may need a plug adaptor, but you don't need a power converter.
    (43828)

  • I have a question about using adobe CS files in CS6 edition

    I am a graphic artist . I have a question about using adobe CS files in CS6 edition. when I am gonna open thse adobe CS created files in CS6 Edition i get a color variation than i made with the CS version.Please give me an idea about this issue as soon as possible.If you need i can upload my problem as a screenshot to clearity

    donrulz,
    Are your Edit>Color Settings the same?
    Are you using spot colours, such as Pantone (there have been some changes in CMYK values with new colour books)?

  • Where Would be the best category to ask a question about using dashboard?

    Where Would be the best category to ask a question about using dashboard?

    However, don't ask it in this topic. Create a new topic for the question with a title describing that you are looking for Dashboard help.

  • Question about Using PAPI Web Service in PowerBuilder 9

    Hi, all.
    I Have a simple question about using papiws in power builder 9.
    In pb9, I created a new Web Service Proxy Wizard and I input a url for papiws(ex. http://seraphpernote:7001/papiws/PapiWebService) and click next.
    But I couldn't get any Service List.
    In Eclipse, I used this url for using papiws well.
    Does anybody know about this case??
    help me plz.

    IIRC you must activate PAPI-WS for the engine. In Studio you do it by right-clicking on the project, then "engine preferences". In enterprise/standalone you must activate PAPI-WS in the Admin Center.

  • Question about using 10g/11g and APEX ...

    Hi,
    I just recently learned of Oracle's APEX and have a few questions about using it.
    Can I use APEX with express, standard, and enterprise editions of 10g and 11g?
    Are all of these free to use?

    You might want to read about APEX rather than jumping into questions that are reasonably well documented. Info at http://www.oracle.com/technology/products/database/application_express/index.html
    Your specific questions:
    1) Apex is a package that can be installed into any properly licensed database.
    2) The price for the production license of the database varies by edition.
    The price for Express Edition is $0 for use in production. Part of the cost for that edition is 'no Oracle Support based support, no patches, data volume limitation, etc.'

  • Question about using AQ

    Hello, am using 11g. I have some questions about AQ. Thanks a lot for any help.
    I use a periodic job to make around 100 event-based jobs run each time. There are totally 1000 event-based jobs. I choose 100 of them in a round robin way. If I run the periodic job too frequently, that means I will trigger another 100 jobs to run not until the last 100 jobs complete.
    So what will happen? How many messages does the queue can hold? If the queue is full, what will the program which is trying to enqueuing do?
    Because I find that I cannot make the CPU utilization reach 100% no matter how I decrease the period of the triggering job. I think there should be something wrong with the event-based jobs.
    The following codes are what I wrote for sending messages to trigger those 100 jobs. I find out that the time that these codes take to finish (the loop) varies a lot. If the queue is full, will the program wait here?
    select t.start_num INTO l_offset from scheduler_info_tab2 t;
    l_jobnum := 0;
    IF l_issue_num != 0
    THEN
    FOR i IN 1..l_issue_num
    LOOP
    l_jobnum := mod(l_offset + i,1000);
    IF l_jobnum = 0
    THEN
    l_jobnum := 1000;
    END IF;
    -- l_jobnum := i;
    l_queue_msg := t_queue_payload('subscription'||TO_CHAR(l_jobnum));
    DBMS_AQ.enqueue(queue_name => 'schdl_queue',
    enqueue_options => l_enqueue_options,
    message_properties => l_message_properties,
    payload => l_queue_msg,
    msgid => l_message_handle);
    END LOOP;
    END IF;
    UPDATE scheduler_info_tab2 t SET t.start_num = l_jobnum;
    COMMIT;
    The queue is created by
    DBMS_AQADM.create_queue_table(queue_table => 'schdl_queue_tab',
    queue_payload_type => 't_queue_payload',
    multiple_consumers => TRUE);
    -- Create the event queue.
    DBMS_AQADM.create_queue (queue_name => 'schdl_queue',
    queue_table => 'schdl_queue_tab');
    -- Start the event queue.
    DBMS_AQADM.start_queue (queue_name => 'schdl_queue');
    null
    null

    Hi,
    AQ actually has its own forum here
    Advanced Queueing
    and you may get better answers there.
    As far as I know a queue can store an unlimited number of messages. The enqueuing program will enqueue the messages and complete but there may be a delay until the messages are processed.
    As I mentioned before running lots of jobs results in overhead disk activity which will limit the max cpu utilization and each job also has a CPU overhead which may not be accounted for in Oracle cpu totals.
    DBMS_AQ.enqueue should never hang waiting for messages to enqueue (it should just add the message to the queue and continue). I don't know enough about it to know why its time is varying (the AQ forum may give some answers).
    Thanks,
    Ravi.

  • Question about trying to install an old program

    I am trying to install music writing software from a CD. This software has worked well for me on XP and Windows 7. When I tried to run it from the disk, I got an error message. So, I went through the whole "compatibility mode" process, trying it
    in both XP and Windows 7 modes, without success. The installation process would begin, but then it would hang up. The software in question is called "Mozart," and I am attempting to run an early version, Mozart 6. The website for the software is
    mozart dot co dot uk.
    Now, here's the rub: I posted a question about this at the Mozart Software Yahoo Group, and one participant there said that he had installed Mozart 6 on a Windows 8 computer without difficulty. So, the question becomes, what am I doing wrong? Or do I have
    a hardware problem? I have a new Toshiba laptop with 6 gigs of ram. I have Avast anti-virus software as well as Spybot anti-spyware software - could one of those be blocking a program installation from the disk drive?

    Did you try download the latest version or applied the latest service pack?
    This software is not free, you can also contact them for better support
    Also using 2 antivirus is not recommended. You also can try to disable them, disable UAC and disable firewall to check

  • Questions about using the Voice Memos app

    I'm currently an Android user, but will be getting an iPhone 6 soon. My most used app is the voice memos app on my Android phone. I have a couple questions about the iPhone's built-in voice memos app.
    -Am I able to transfer my voice memos from my Android phone to my iPhone, so my recordings from my Android app will show up in the iPhone's voice memos app?
    -When exporting voice memos from the iPhone to computer, are recordings in MP3 format? If not, what format are they in?
    -In your opinion, how is the recording quality of the voice memos app?

    You cannot import your Android voice memos to your iPhone's voice memo app.  You might be able to play the Android memos and have the iPhone pick up the audio and record it.
    Here is the writeup about sending voice memos from the iPhone to your computer (from the iPhone User Guide):
    App quality is excellent.

Maybe you are looking for

  • Authorisation issue in SRM 7.0

    Dear Experts, We are configuring Extended Classic Scenario in SRM 7.0. I have 2 Purchasing groups and each having one Purchaser. Each Purchasing group is responsible for 1 Product category. When I create and approve shoping cart I need to restrict th

  • How do i sync my Iphone5 contacts and calendar with PC Windows 8.1

    how do i sync my Iphone5 contacts and calendar with PC Windows 8.1

  • PDF print borders problem

    Since working with Lion I've been getting a printing problem with PDFs. I'm starting with a document in Word. The layout is fine, and if I print from Word the layout is preserved and I get a printout looking the same as what I'm seeing on the screen.

  • JTextField(Document, string, int)

    Dear friends, Could you just tell me how can I fix the size of the JTextField, such as just accept the maximum number of digits or characters in JTextField... I cant create the Document.... Could anyone give me a tips?

  • Save password prompt drops before I can enter data

    Version 3.6.18 on Win7 Home Premium When entering user/password on bank site, the "save Password" popup comes up but goes away in 1/2 second before I can enter that data. I'm using Avast! 6.0.1203 with "sandbox" turned off. It previously worked but n