Run program with variant

i want to run my program always with the same variant how????

Hi,
You can set default value using 'default value' in select-options and parameters.
check the links below
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba75335c111d1829f0000e829fbfe/content.htm
you can also set default variant for a report. check the link below
http://www.abapcode.info/2008/09/selecting-variants-for-initial-alv-list.html
regards,
mani

Similar Messages

  • Running Programs with Screen Closed

    I cant figure out how to run programs with my screen closed. For instance, I'm signed on AIM and I close the screen and when I open it back up, I'm no longer signed on AIM. It's very frustrating. Any type of assistance would be greatly appreciated. Also, is there any phone number available that will connect me directly with customer service?

    Unfortunately, unlike PC counterparts, your laptop has 1 function with the laptop on, and screen closed - Sleep.
    Sleep can be reversed with closing the lid as described above, having an EXTERNAL mouse and or keyboard and activating the computer that way.
    It is really designed to run closed when use with a large display - that is what that feature is.
    Unfortunately you either have to keep your lid open, or accept the fact that you won't be on AIM when you close the lid.
    Now please don't get offended with the last part I have to say about AIM:
    I used to hate the fact that when I closed the lid, I was kicked off AIM. I now love it. The reality is that none of us are really all THAT important that signing out of AIM is the end of the world. There's email, and there's the telephone if someone has something emergent, urgent, important, or barely important to tell someone.
    I feel like AIM has dumbed down communication as we know it, creating a world of "acquaintances" and "buddies" instead of "friends".
    Like I said, please take no offense, i just think we all deserve time away from AIM...
    Sorry there aren't any other solutions for you.

  • How to run the program with variant automatically

    Hi experts,
    I want to know how can I run the program with a variant automatically without defining any transactions or jobs. I want my program to run with a variant automatically, when I press F8.

    Try doing this way...
    First Create a Sel Screen varient, 'ZTEST123' in this case
    Report ZTEST.
    parameters:
      w_kunnr type kna1-kunnr,
      w_flag type c no-display.
    start-of-selection.
    if w_flag eq ' '.
      submit ZTEST USING SELECTION-SET 'ZTEST123' with w_flag eq 'X'.
    endif.
    end-of-selection.
      write:  w_kunnr.
    Thanks.

  • How to create a job thru ABAP program for calling a program with variant???

    Hello experts,
    can u give me step wise procedure to create jobs for  a program with a variant name thru ABAP???
    Also, can a transaction can be scheduled as a job to run in background with a variant name???
    Edited by: SAP USER on Jul 22, 2008 6:08 AM

    Hi,
    To create a job through ABAP program you can do the following.
    Go to Menu bar.
    In there, go to   SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
    Then give the JOB NAME and CLASS in the screen that comes up.
    This is how we schedule a program.
    Now, to create a variant for a program -
    First activate your program in SE38. Then execute it .
    Now, click on SAVE button. It will open up  the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
    Hope this helps.
    Regards,
    Hari Kiran

  • Background Report Program with Variants to be Overwritten

    I have an Following Scenario.
    I have an Report program with the Selection Screen displaying an Input Parameter of date type sy-datum.This particular program is scheduled as an Background Job.
    Now when i execute the program  in background  the existing variant date must be overwritten with any new values . So please provide an solution for this.
    Thanks
    K.Nadesh Kumar

    hi nadesh,
    enter date on your selection screen , then save variant.
    tick the selection variable check box i.e L.
    now click on pushbutton SELETION VARIABLE.
    Then select type D and select the criteria current date or whatver of your choice.
    if you are not clear then search for the thread "daily background job". I think you will get the answer from there.
    Regards
    Abhinesh

  • Call or Execute, ABAP program with variant

    REPORT Z_call_ABAP_program  NO STANDARD PAGE HEADING.
    TABLES : BKPF , INDX.
    PARAMETERS : ZBUKRS LIKE BKPF-BUKRS OBLIGATORY DEFAULT '0001',
                                 ZGJAHR LIKE BKPF-GJAHR OBLIGATORY DEFAULT '1995'.
    SELECT-OPTIONS : ZPERIOD FOR BKPF-MONAT OBLIGATORY.
    DATA : BEGIN OF CHECK_TAB OCCURS 100,
                     CLIENT LIKE BSEG-MANDT ,
                     COMPANY LIKE BKPF-BUKRS ,
                     FINYR LIKE BKPF-GJAHR ,
                     MONAT LIKE BKPF-MONAT ,
                     LDDT LIKE BKPF-CPUDT ,
                 END OF CHECK_TAB.
    DATA : BEGIN OF CHECK_TABO OCCURS 100,
                      CLIENT LIKE BSEG-MANDT ,
                      COMPANY LIKE BKPF-BUKRS ,
                      FINYR LIKE BKPF-GJAHR ,
                      MONAT LIKE BKPF-MONAT ,
                      LDDT LIKE BKPF-CPUDT ,
                  END OF CHECK_TABO.
    DATA : BEGIN OF CT_KEY ,
                      CLIENT LIKE BSEG-MANDT ,
                      COMPANY LIKE BKPF-BUKRS ,
                      FINYR LIKE BKPF-GJAHR ,
                      MONAT LIKE BKPF-MONAT ,
                      LDDT LIKE BKPF-CPUDT ,
                   END OF CT_KEY.
    START-OF-SELECTION.
    IMPORT CHECK_TAB FROM DATABASE INDX(VP) ID 'CDSDATE'.
    LOOP AT CHECK_TAB.
          MOVE-CORRESPONDING CHECK_TAB TO CHECK_TABO. APPEND CHECK_TABO.
    ENDLOOP.
    LOOP AT CHECK_TAB.
         IF CHECK_TAB-FINYR = ZGJAHR AND CHECK_TAB-MONAT IN ZPERIOD AND
              CHECK_TAB-COMPANY = ZBUKRS.
              CLEAR CT_KEY.
               MOVE: CHECK_TAB-CLIENT TO CT_KEY-CLIENT ,
               CHECK_TAB-COMPANY TO CT_KEY-COMPANY,
               CHECK_TAB-FINYR TO CT_KEY-FINYR ,
                CHECK_TAB-MONAT TO CT_KEY-MONAT ,
                CHECK_TAB-LDDT TO CT_KEY-LDDT.
                EXPORT : CHECK_TAB CT_KEY TO MEMORY.
                SUBMIT ZCDSDTUP
                          WITH YCLIENT = SY-MANDT
                          WITH YCOMPANY = ZBUKRS
                          WITH YFINYR = ZGJAHR
                          WITH YMONAT = CHECK_TAB-MONAT
                          WITH YLDDT = CHECK_TAB-LDDT
                          VIA SELECTION-SCREEN AND RETURN.
                   IMPORT CHECK_TAB FROM MEMORY .
            ENDIF.
    ENDLOOP. 
    SKIP 2.
    WRITE :/2 'Position Before Update'. ULINE /2(53).
    WRITE :/4 'Client' , 11 'Comp.' , 18 'Fin.Yr.' , 27 'Period' ,
    35 'Data Downloaded upto'. SKIP 1.
    LOOP AT CHECK_TABO.
         IF CHECK_TABO-FINYR = ZGJAHR AND CHECK_TABO-MONAT IN ZPERIOD AND
             CHECK_TABO-COMPANY = ZBUKRS.
             WRITE :/5 CHECK_TABO-CLIENT,11 CHECK_TABO-COMPANY,19 CHECK_TABO-FINYR,
                          29 CHECK_TABO-MONAT, 38 CHECK_TABO-LDDT.
          ENDIF.
    ENDLOOP.
    SKIP 3.
    WRITE :/2 'Position After Update'. ULINE /2(53).
    WRITE :/4 'Client' , 11 'Comp.' , 18 'Fin.Yr.' , 27 'Period' , 35 'Data Downloaded upto'. SKIP 1.
    LOOP AT CHECK_TAB.
         IF CHECK_TAB-FINYR = ZGJAHR AND CHECK_TAB-MONAT IN ZPERIOD AND
              CHECK_TAB-COMPANY = ZBUKRS.
              WRITE :/5 CHECK_TAB-CLIENT ,11 CHECK_TAB-COMPANY , 19 CHECK_TAB-FINYR,
                           29 CHECK_TAB-MONAT , 38 CHECK_TAB-LDDT.
         ENDIF.
    ENDLOOP.
    SKIP 3. ULINE.
    WRITE :/7 'PLEASE CONFIRM CAREFULLY THE ABOVE DATES ' ,
                   /5 'BEFORE RUNNING THE DATA DOWNLOAD PROGRAM FOR CDS.'.
    EXPORT CHECK_TAB TO DATABASE INDX(VP) ID 'CDSDATE'.

    You will haev to add the varaint also in the object entry in the transport request.
    For this
    goto Se38 - > select progfram - > click on radio button for varaints - > Cick on Display - > Utilities -> transport request - >  and execute.
    This wil include the varaint also with the program name in the transport request and allow you to directly execute the program after transport to be executed with a varaint.
    Regards,
    Mansi.

  • Trying to run programs with java 1.4.2_07 after upgrading Eclipse

    Hi All,
    I'm using Eclipse version 3.1.0 and java 5.0 (1.5.0_03). I changed the JRE of a program back to 1.4.2_07, but when i try to run it i get this:
    Exception in thread "main" java.lang.UnsupportedClassVersionError: controller/Controller (Unsupported major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)What the %^#@ ? Will appreciate any help.
    Regards,
    snayit

    Also, another thing people may want to try. A coworker was having a problem where she kept getting the unsupported major minor version error from eclipse after upgrading to the latest version of java.
    All the configuration settings were correct, pointing to the latest vm. I tried starting eclipse with the parameter
    -vm "C:\Program Files\Java\jdk1.5.0_04\jre\bin\javaw.exe"
    and it worked just fine. Without this, it was apparently finding some conflict between jdk1.5 and the older jdk1.4.
    IDE's are nice, but I find configuring them after an upgrade to be exremely painful.

  • Stop Running Programs with Java

    Does anyone know how to stop a non-Java program that is currently running on a PC?

    Hi,
    did you started the programm from your java app with proc = Runtime.getRuntime.exec()?
    If yes, you can kill it with
    proc.destroy()If not, there is no platform-independent way to do it.
    Best regards,
    Martin

  • Run prgram with variants

    Hi Guys,
    I want to run the one programm with different varieants at same time.
    How can i execute one prg with diff varients?.
    thanks,Hakeem

    You must run the variants one per one;
    example (batch)
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname  = 'jobname'
           IMPORTING
                jobcount = jobcount
           EXCEPTIONS
                OTHERS   = 1.
      SUBMIT report USING SELECTION-SET 'variant1'
        USER user VIA JOB jobname NUMBER jobcount
        AND RETURN.
      SUBMIT report USING SELECTION-SET 'variant2'
        USER user VIA JOB jobname NUMBER jobcount
        AND RETURN.
      SUBMIT report USING SELECTION-SET 'variant2'
        USER user VIA JOB jobname NUMBER jobcount
        AND RETURN.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                jobcount  = jobcount
                jobname   = jobname
                strtimmed = 'X'
           EXCEPTIONS
                OTHERS    = 1.
    Regards

  • Opening file to automatica​lly open and run program with input file

    My program has the ability to save and open a text file with a custom extension.  How do I make the system in which the program is being installed to recognize this file to open the program, AND how to I gather the input file in my program and load it.
    Thanks
    Solved!
    Go to Solution.

    Ok I have found on a different thread how to setup/register the file path association in the classes root.  What I don't understand is how my program will know what the input file is.  For example, the reg setting is C:/.../MyProgram.exe %1
    When my program loads, is the %1 in the argc/argv part of the main thread? And if so, how do I debug/test this?
    Thanks

  • I get NoSuchMethodError but cant run program with Static

    Hi, I got this silly problem. My program is meant to display a input dialog an then write to a file. Sounds so simple. But java wanted to make things hard for me and i got a NoSuchMethodError. I know that i am meant to us Public Static Void Main (String arg) but when i do this i get error "this can be referenced as static". Here is the source, do you know how to fix this.(an how can i?)
    Thnx
    My Regards
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.String;
    public class sender implements Runnable {
    int i= 0;
    String mes;
    public void main (String[] arguments) {
    Thread th = new Thread (this);
    th.start ();
    //sender();
    while (true){}
    public void start () {
    Thread th = new Thread (this);
    th.start ();
    public void run() {
    try {
    Thread.sleep(3000);
    } catch (InterruptedException e) {}
    String mesdialog = JOptionPane.showInputDialog(null,
    "Enter your message");
    mes = mesdialog.toString();
    try {
    //FileOutputStream of = new
    //FileOutputStream ("send.txt");
    FileWriter of = new
    FileWriter("send.txt");
    //BufferedReader in = new
    // BufferedReader(fr);
    //while (true) {
    int i = 66;
    boolean eof = false;
    int inChar = 0;
    do {
    inChar = mes.hashCode();
    if (inChar != -1) {
    char outChar = (char)inChar ;
    of.write(outChar);
    //of.write(mes,0,20);
    } else
    eof = true;
    } while (!eof);
    //outfile.write(input);
    } catch (IOException e) {
    System.out.print("AAA ERROR");}
    }

    public static void main (String[] arguments) {
    Thread th = new Thread (new sender());
    th.start ();
    //sender();
    while (true){}
    }You can't reference "this" from a static context. main is required to
    be static.
    matfud

  • How to run programs with older version (windows 98)

    I purchased a software that runs on WINDOWS 98 system..VIRTUAL DJ SOFTWARE..BUT, I cannot run it on my system, which is: WINDOWS 7..HP Notebook G72B54NR..MY QUESTION: "IS THERE A WAY FOR ME TO ALLOW MY HP NOTEBOOK TO ALLOW THIS OLDER VERSION TO OPERATE ON MY WINDOWS 7 SYSTEM"?

    Do you recieve any kind of error message when trying to run it?
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to save varaint in a report program with tabstrip in selection-screen

    Hi Gurus,
    We have a custom report program and selection screen of this program has a tabstrip of 9 tabs. This program will run in background job and we are facing problem to save variant for this report program. 
    We saved one variant with 'TAB2' populated. But when we execute the report and select that variant and we are not navigated to 'TAB2' automatically. So, code for TAB2 is not triggerd and we are not getting desired output.
    When we set this program with variant in Job, program is not navigated to 'TAB2' as per variant setup.
    Is there any way to save variant for this kind of report ?
    Please help with your suggestions
    Thanks & Regards
    Chandan

    Thanks for your help.
    I found during debugging that it is holding the sy-ucomm of the first tab as default value.  So, I declared a new field in selection screen with No-Display option. When user will select a tab, this new field will hold the value of that sy-ucomm. As this field is in selection screen, it is getting stored in variant also.
    In start-of-selection of program I am checking this field value and accordingly set the TABSTRIP.
    Thanks again for your help.....
    Regards,
    Chandan

  • ALV with variant

    HI,
    Pls can anybody send me a sample ALV program with variant .
    Thx in Advance.

    Hi
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    13. Top-of-page in ALV
    selection-screen and top-of-page in ALV
    14.  ALV Group Heading
    http://www.sap-img.com/fu037.htm
    How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Reward points for useful Answers
    Regards
    Anji

  • How to give the Submit along with Variant

    Dear Freinds,
               Iam using the Submit program with variant  in my custom program . When iam exucting my custom program it is directly opening the program with the variant . ie. just like we execute a program and select varaint.
    it is not happening what i want ,it has to schedule the program with the varaint (i.e. what ever fields have been slected in that varaint) and when i go and see in SM37 . The job should get schedule, this was
    happening when iam sending one are two parameters in retrun of the submit without me using VAriant.
    please help me where iam going wrong.
    Not working Scenario (when iam using Variant)
    SUBMIT rptqta00
       WITH pnpbegda =  sy-datum                                 "'20081201'
       WITH pnpendda =   lv_date                                 "'20091130'
       VIA SELECTION-SCREEN USING SELECTION-SET 'NEW'
       VIA JOB lv_job_name NUMBER lv_job_nr
         AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = lv_job_nr
            jobname              = lv_job_name
            strtimmed            = 'X'
          IMPORTING
            job_was_released     = lv_job_released
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF syst-subrc NE 0.
          MESSAGE i162(00) WITH
          'An error occured while closing the background job.'.
          STOP.
        ENDIF.
    working perfectly  with the below scenario
      SUBMIT rptqta00
    WITH pnpbegda =  sy-datum                               "'20081201'
    WITH pnpendda =   lv_date                                 "'20091130'
    with pnppernr = '99002235'
    WITH pnpbukrs  EQ 'C091'
    WITH dis_new = 'X'
       VIA JOB lv_job_name NUMBER lv_job_nr AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = lv_job_nr
            jobname              = lv_job_name
            strtimmed            = 'X'
          IMPORTING
            job_was_released     = lv_job_released
          EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF syst-subrc NE 0.
          MESSAGE i162(00) WITH
          'An error occured while closing the background job.'.
          STOP.
        ENDIF.
    now my question is what i have to do in the case of VAriant so that it acts exactly as the below parameters.
    My problem why iam going to varaint is in the standard program  rptqta00  i have a button Like TESTRUn ,Batchinput,Direct etc.............. this iam not able to pass the OK code along WITH  in the     Submit syntax.... i dont know how to pass in the case of Button's  along with Submit ,,,,,,,,,however iam able to do for radio buttons .
    could any one tell me why the variant when iam using is taking me directly to the program instead it is not returning
    secondly if iam passing each parameters in the submit program how can i pass the BUTTON value ( which is having tick option for either TESTRUN ,Batchinput,Direct )
    Please could any one help.
    regards
    divya

    Dear Freinds,
                  I found the solution , i have used the ok code of the button while passing into submit program it is working . Thanks once agian
    regards
    divay.

Maybe you are looking for

  • DVD Studio Pro

    i recently purchased final cut pro 7 from a store, and it came with Dvd studio pro, wich is what i was mainly needing, cuz i bought final cut pro x already, butwhen i upgraded to Lion,  DVDSP does not work, it says that it does not support PowerPC ap

  • Query taking longtime to run

    Hi Gurus, We have created a query on a InfoCube and when I run it in query designer its taking long time to get the results and final report. How can I optimize the performance ? Please let me know what would be the measures for optimizing query perf

  • Can PDF Fillable Questionnaire be expanded base on answers to questions on form?

    Our users have a fillable Word form that links to other Fillable Word forms.  They want to have the form display or remove questions based on answers given to previous questions. Please let me know if this can be done in Adobe Acrobat Professional 8,

  • RMAN and Dataguard

    We are trying to setup RMAN ( Incremental backup ) for a Dataguard system for Oracle 10G. As I am new to this can anyone help me to start the setup for this?

  • My iPod touc 5th generation Music app crashes every time I start it

    I open my music app and it crashes. I also cant play music from the home screen