How to run my program in "test run" mode, programmatically ??

Hi,
Assume I have written a Zprogram and called a BDC to input a batch of data from an CSV file. I could see that in a normal input mode, some of the SAP transactions allow me to select "Test Run" so that SAP first checks if the data I enter is correct and can be saved. It then reports a succes and then I re execute !! U can see that option in transaction KP90, Delete Planned cost.
Can I do the same programmatically so that I ensure that my batch data upload will be successful for this set of data ??
Also, another question related to BDC... what happens when a record fails to confirm the SAP input rules ?? will only that be skipped from the batch input and rest be stored in the DB or will the entire batch of data will be reverted , something like ROLLBACK ??
thanks

hi,
   set one flag in the program for test run.
   if flag = 'X'.
      write success message here.
      dont save ur data
   else.
     save ur data
   endif.
   regarding ur 2nd question if one record is error also the data will not be updated for all the records.
   as u had mentioned it will ROLLBACK

Similar Messages

  • How many times a program has been run?

    Is there a transaction or table or something that tracks how many times a program has been run?   The number of times the program has been run plus using the programs' attributes for last changed would help me a lot.  We need this for an archiving study to determine of the client has set up the configuration correctly since they went live and have been executing the correct programs.  Thanks and mucho rewards if someone has an answer.  FYI - I have done a forum search and could find nothing on this topic.  I have looked at the tables TADIR and no help, as well as transaction STAT.

    I know ST03N transaction can be used extensively to determine how the programs were executed or even to know who all are using a particular transaction...
    I tried to find if we can find the number of executions of a program through this transaction, I could not find myself...
    try if you can find it through this tcode.
    Phani

  • How do i stop programs from automatically running when i start up my macbook?

    how do i stop programs from automatically running when i start up my macbook?
    programs such as.. email and Skype.
    When i go to system preferences, then users & groups, then to my name, log in items ....this box is clear, i have unchecked everything, yet things still start up......

    sometimes these applications will have a setting in the preferences to not open on login of computer. If you see none of that, you can go into:
    system preferences> Users & Groups > Select your user>Login Items.
    unlock the settings by hitting the lock icon on the bottom left of the window then youll be able to uncheck these things from opening when you log in.
    Hope this is helpful or answers the question.

  • My system is asking to run the hard disk test run...What i have to do? can any one guide me????

    model is Hp Pavilion  g6.. windows 7 home basic,
    My system is asking to run the hard disk test run.. i have run , there was no error, but the message is still comming, i do not kow whether i amdoing it in a right way or not.. Please any giude do that test and find the issue.....

    Hi,
    If you receive this message when starting the notebook, try the following.
    Shut down the notebook.  Tap away at f10 as you start the notebook to enter the bios menu.  Under the Advanced or Diagnostic tab you should find the facility to run a test on the Hard Drive.  Post back with the details of any error messages.
    If you receive this message while Windows is running , click the Start Menu, click Computer, left click Local Disc C once to highlight it, right click Local Disc C and select Properties.  Click the Tools tab and then click the button to 'Check the Drive for Errors'.  In the following window make sure both boxes are ticked and then click Start.  Agree to schedule the check at the next system restart and then restart the notebook - this process can take a couple of hours to complete before loading back into Windows.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • How to terminate the program after we run it?

    I am doing Ehernet LabVIEW program.In that program I developed the code for generating message box if the bytes u sent to another system should have to come back again.If the bytes are coming in the result then the message box  should appear as "Ehernet Test Passed".If it is False  then message box should appear as "Ehernet Test Failed".When I run the program the message box was appeared.I put the message box in the Case structure.After running the program the loop was not terminated.How can I overcome the problem.I attached my vi.Pl verify this.
    Attachments:
    new_ethernet.vi ‏45 KB

    Hi
    First of all - you don't have any loop in your vi.
    If you want to exit LV after running the vi, you can use the "Quit LabView" function. The "Stop"-function just stops the vi, which actually does not affect your vi, as it stops automatically, after closing the messagebox.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How can we report off of Test Run Custom Fields in e-Manager?

    I'm trying to create reports within Crystal Reports or via SQL Reporting Services to report on test runs and I want to include data from the test run custom fields I've created. I can not find a correlation to link the test runs and the test run custom fields in the DB. Is this even possible?
    I can see the related custom field data in e-Manager for each run history. I was thinking there should be some sort of table in the DB to link the data but I can not find it.
    Please help
    Thanks

    You cannot get this from the interface. We added SqlServer Management Studio Express and granted read only access to project managers. They found the view dbo.View_Tests useful in that it connected custom fields to the test cases. There are similar views for requirements and test runs.
    Studio Express is found: http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en#QuickInfoContainer
    You'll need to get access from your DBA and set up an ODBC connection.
    Here's a sample query that we've used -- probably doesn't fit your situation but it might get you thinking. Part of it was stolen from another posting to QA zone -- so I figured -- might as well share the wealth:
    -- Overall input parameters:
    declare @project as integer;
    set @project = '20'
    declare @iteration as varchar(500);
    set @iteration = 'Iteration 1';
    declare @team as varchar(500);
    set @team = 'SFS';
    -- Data on a particular iteration
    declare @iteration_tests_run as decimal(10,2);
    set @iteration_tests_run = ( select count(*)
                             from dbo.View_Tests A
                             where A.ProjectID = @project
                             and A.Iteration = @iteration
                             and A.Team_test <> 'NULL'
                             and A.LastResult <> 'Not Run');
    declare @iteration_tests_passed as decimal(10,2);
    set @iteration_tests_passed=( select count(*)
                             from dbo.View_Tests A
                             where A.ProjectID = @project
                             and A.Iteration = @iteration
                             and A.Team_test <> 'NULL'
                             and A.LastResult = 'Passed');
    declare @iteration_any_results as decimal(10,2);
    set @iteration_any_results=( select count(*)
              from dbo.View_Tests A
              where A.ProjectID = @project
              and A.Team_test <> 'NULL');
    -- Data on a particular team's tests for a particular iteration
    declare @team_tests_run_by_iteration as decimal(10,2);
    set @team_tests_run_by_iteration = (
    select count(*)
                             from dbo.View_Tests A
                             where A.ProjectID = @project
                             and A.Team_test = @team
                             and A.Iteration = @iteration
                             and A.LastResult <> 'Not Run');
    declare @team_tests_passed_by_iteration as decimal(10,2);
    set @team_tests_passed_by_iteration = (
                             select count(*)
                             from dbo.View_Tests A
                             where A.ProjectID = @project
                             and A.Iteration = @iteration
                             and A.Team_test = @team
                             and A.LastResult = 'Passed');
    declare @team_tests_any_results_by_iteration as decimal(10,2);
    set @team_tests_any_results_by_iteration = (
    select count(*)
                             from dbo.View_Tests A
                             where A.ProjectID = @project
    and A.iteration = @iteration
                             and A.Team_test = @team );
    -- Progress in completion and success of tests in a particular iteration
    select (@iteration_tests_run / @iteration_any_results ) * 100 as Iteration_1_percent_complete;
    select (@iteration_tests_passed / @iteration_tests_run ) * 100 as Iteration_1_percent_success;
    -- Progress in completion and success of tests for a particular test team in a particular iteration
    select (@team_tests_run_by_iteration / @team_tests_any_results_by_iteration ) * 100 as SFS_percent_complete_Iteration_1;
    select (@team_tests_passed_by_iteration / @team_tests_run_by_iteration ) * 100 as SFS_percent_success_Iteration_1;

  • How to debug a program which is running in background (Job)

    Hi,
    I have a program which can be run only in background. I have to debug that program. Could you please let me know, how can I do that?
    Thanks,
    Sandeep

    basic FAQ, please search before asking.
    Thread locked.
    Thomas

  • How to reach Java program which is run as individual process

    Hi There .
    My question is if I run a java program as individual process using Runtime , can I reach this process and change some variables up there, like set a boolean variable to false , or stopping running thread properly. whatever. till now I figure out two ways , either kill the PID of my program (if I want to stop it ), or touching a new file and when the program sense that the is been created he will take an action ,like exit or do the things that I want to do, I tried and I googled it but I ends up with nothing , what I understand it's like it's irreversible thing when it's run there is no way back. Thanks in Advance

    No you can't interact with a process you start as if it were just other Java code.
    What you can is interact with it in the same ways you can interact with any other process. For example through the process input and output stream. Or perhaps through Sockets.

  • How to make a bapi as test run if there is no testrun parameter?

    Hi,
    I am using BAPI fm 'BAPI_BCA_INDCOND_CHANGE' to update the financial conditions of a loan in banking. This fm doesn't have testrun parameter.
    I am trying to make it testrun (simulation) but not suceeded. I stopped teh execution of the BAPI_COMMIT but it is creating some other issues.
    Please let me know if ther is anyother way to simulate this.
    Thanks in advance.
    Regards
    Shoban

    Hi..
    In order to Test the BAPI... first find the actual function module of the BAPI.. BAPI is nothing but API method of the function module only.. so Test the function maodule..check if it is giving desired results.. then BAPI also will work similer..
    Hope this answer will help you..
    Regards,
    Kiran

  • Running STAR program in Date Effective mode

    Hi All,
    How the date effective mode of Synchronize Territory Assignment rule concurrent will work? Will it sync all the active territories in that date range? For example if I run the STAR program from 01-Mar-2010 to 31-Mar-2010, will it sync all the territories which are all active in this date range? Will it pick up the territory which has start date as 01-Feb-2010 and end date as 30-Apr-2010?
    Please advice..
    Thanks,
    Suresh.

    The only emulator for running Classic apps I know of is SheepShaver, and from what I've read (though not confirmed) it doesn't work under Snow Leopard (not surprising; SheepShaver hasn't been update in over three years, from what I can see). It also requires the ROM image from an older Mac, and if someone had access to an older Mac to get the image, they could just run the app on that older Mac.
    So I think that the ability to run Classic apps is now completely dead as of Snow Leopard.

  • How to use the program "Generate test data for BAI bank statement" ?

    Hi all,
    I use the program RFEBKAT5 to create an Electronic Bank Statement file in BAI format ,but it doesn't generate the file .
    I don't know how to generate the file.
    Please help me !
    Thanks all !

    You need to suitably adjust your GL accounts for "Posting Offset Account" (Whisch is defaulted as ++++++++19" and Checkout/Funds Out/Funds IN GL accounts to your configuration.
    Once you do this try generating the file again.

  • Asset   Depreciation -  In test Run Value got posted

    Hi All ,
    1. I did the test run in 'AFAB'  . SAP throwed the error becasue of some problem in Cost Center.
    2. So i fixed that bug and tried again .  
    3. But when i see the Asset Explorer  for that asset '1234',  Asset value of the Error Doc got posted in 'Test Run'. How can i able to reverse back that asset value which got posted.
    I want to know, why it got posted eventhough i selected the " Test Run ".
    I want to reverse back that posted value . (onlyError Doc got posted). Or I want to do the depreciation without this asset number '1234'. How can i block that asset number for not to perform the depreciation.
    Kindly advice Pls.
    Thanks.
    Vivek.
    Message was edited by:
            vivek mohan

    Hi Vivek,
    In my experience,
    - If you selected "Test Run" then it should be not posted value. So I think there was an accident.
    - You cannot reverse depreciation which has been posted.
    - If depreciation for asset no : "1234" has been posted , let say in period 11, then when you repeat the depreciation for period 11, system will not post duplicate value. So here are what you have to do :
    1. Run AFAB using parameter Reason for Posting Run = "REPEAT RUN". Please tick "TEST RUN"
    2. Check wether asset "1234" will be posted again ( See in Column "Amount to be posted").
    3. If you're okay with the result then execute AFAB again but now, untick the "TEST RUN".
    Hope this helps.

  • Test Run with BAPI_PRICES_CONDITIONS

    Hi,
    I am using BAPI_PRICES_CONDITIONS in my program to create pricing conditions.
    BAPI is working fine and it creates pricing conditions.  I can see them in VK13 and in table A9**.
    The surprising thing is - this BAPI creates pricing conditions in database, even if I am not calling BAPI_TRANSACTION_COMMIT or  COMMIT WORK in my program.
    In fact, I need to have two options as below in my program:
    1) Test Run --> Just to display the return messages from BAPI (no DB update)
    2) Create conditions --> Actual creation in Database
    Now the problem is that condition records are created in both of these cases.
    So, I am not able to achieve functionality of option-1.
    Has anyone faced this problem before or can anyone help me in this?
    Awaiting for your valuable input/suggestions.
    Thanks & Regards,
    Devendra

    Devendra Yadav,
    where yoiu able to resolve your issue number 1?
    I have the same problem.
    Thank you.

  • Directing a program where to run from

    Hey,
    I have a question concerning how to direct a program where to run from...
    If I have for instance two dirs, In one map a file how is needed to run the program and in the other dir the program. So you cannot run the program without the file.
    Does there exist some code... so that you can tell the program to run from the dir where the file is located?
    Runtime.getRuntime().exec(command); .... is not the right one, because this runs from the dir that your program is in.
    can anyone help me?

    I have a question concerning how to direct a program
    where to run from...The process is started by the OS, so the best way would be to start the JVM process from somewhere else. No idea whether setting the "user.home" property really helps.
    Does there exist some code... so that you can tell
    the program to run from the dir where the file is
    located?new File(whateverPathHere)? JFileChooser? Or are you looking for a command-line argument? Or maybe an environmental variable? Where is that location information supposed to come from?

  • Unable to Run C Program using Xcode "Stop Executable"

    Hi All
    Have been using the Terminal to compile programs built through Xcode but now want to use Xcode itself. Everytime I press build and go it builds successfully but won't run. I found a tutorial that mentioned if you are using Xcode 3.0 (I am) you can't use build and run, for output, you have to go to run and then push console.Ok that works. I then found someone with the same issue as mine everytime you want to build and run it appears with another window saying "Stop Executable"They were told to make sure they were building the .c file in a project and not building it from a text editor and then importing. I always build new projects.
    I want to interact with the program not just see its output? so my question is can I interact with programs i.e. User can enter data or strings or, do I have to build an interface to do this through Xcode. I Also forgotten to mention I found information through the forum that said to go to First Aid through utilities and repair file permissions, this has been done but still does not work. Many thanks for your time and as you can probably tell I am new to Xcode.

    To run your command-line program in Xcode, open the debugger console by choosing Run > Console. Run your program by choosing Run > Run or Build > Build and Run. You'll have to build and run if you haven't compiled the program before. Your program will run, and you will see output in the console. You interact with the program from the console.
    If you're not able to enter input in the console, choose Run > Sync with Debugger. If doing that doesn't work, you can run your program in the Terminal application by double-clicking the program from the Finder. It's less convenient than running it in Xcode, but you'll at least be able to run the program and interact with it.

Maybe you are looking for

  • No Archiver Stuck on 11g

    Hello. I am trying to "achieve" a archiver stuck situation on an Oracle 11g installation (running SAP ERP 6.0). However i am unable to make the database hang, something that is straight-forward with 10g. I have browsed some documentation for 11g with

  • Unable to connect 11g database as a sysdba using toad 10

    Please i need an urgent help. First i will let you know about my environment. OS : HP-UX 11.3 Database : 11g R1 Toad : 10.6 I have set the password file with more than 1 entries for sysdba. The below message will shows the entries of user entry in pa

  • Lost iSight - Ethernet - Bluetooth after Leopard install

    Hi, I installed Leopard - erase and install, in an iMac 1.83, 17 early 2006. After installation seemingly no problems with the installation iSight no longer works, built in ethernet doesn't seem to work and Bluetooth is flaky, sometime bluetooth work

  • Table in selection screen...

    Dear Abapers,                Is it possible to get the table in selection screen,I want to give input from table in selection screen itself.Can anyone suggest some ideas pl? Thanks in Advance.

  • 2.0.1 Short Lived Love ... SMS Typing still slow

    So I thought it was fixed, but alas, i just typed a SMS and the lag was back in the keyboard. Blah blah blah.