Variants in abap

hi,
I have a z program that can check for zero record load.
I want to put this program in a process chain after the execute infopackage, so that, when there is a zero record load, mail notofication will be sent.
can i directly use the process type 'abap program in process chain ? I mean, how will this program know which infopackage data load to check ? iam not clear in that part . pls. explain. if anything extra needs to be done to put this code to work in a process chain.
this code was found in durairaj atahavanraja's profile link.

Hi,
well that means you need to add the abap as process right after each loading process and additionally you need to pass some parameters to the abap that identifies the previous request in order to be able to have the abap checking the result of that request. What you can supply definitely is the name of the infopackage and of course the date and time. With that information the abap has to do all checks and throw a email.
regards
Siggi
PS: The other alternative is to run the abap once at the end of a chain having it checking all request and throwing emails for all 0-requests.
But I still don't know what the abap is doing.
Message was edited by:
        Siegfried Szameitat

Similar Messages

  • What is variant in ABAP Program Process Block in Process Chain?

    I wrote an ABAP program:
    REPORT ZTEST,
    PARAMETERS:  PROC(80) TYPE C.
    I can test this PORGRAM from SE38, it shows me a pop-up screen for PROC and I can enter a value and execute.
    Now I want to call this  program ZTEST from a process chain. In Process Chain Selected a Process u201CABAP Programu201D. It asks me program name and Program variant, I entered Program Name as ZTEST and
    Program variant as a character string HELLO.
    When I execute Porcess Chain, ABAP Program errors saying that variant HELLO not found.
    What is Program variant in ABAP Program Process in Process Chain?
    Thanks,

    Dont get confused here.
    Variant name is not which you are pasing to the program.
    You enter some values inside the variant and you specify the program to take the input from the variant.
    Suppose you have to pass 10 parameters to a program.
    user1 creates a variant " hello1" which contains his own selection for the 10 values
    user2 creates another variant "hello2" which contain his own set of selecion values.
    When we use this program in PC, you can use the variant user1 or user2 as per our requirement.
    please check if you are giving variant as input or the proc value.
    Hope this helps,
    Sri....

  • Query with variant from ABAP

    Hello!
    I need to execute a BW-query from an Abap-report.
    I tried it already with function module 'RRW3_GET_QUERY_VIEW_DATA' and with classes / objects 'CL_RSR_REQUEST' resp. 'CL_RSR_DATA', but:
    I want to use the query with a variant, which could be found in table RSRPARAMETRIZA.
    (Btw: even with a variant in table RSRVARIANTDIR  I don't get the results wanted...)
    Is there a direct way to call a BW-query with a variant from Abap?
    Alternatively: How do I get the variant-contents? Is there a 'universal' way to work with both kinds of variants? (RSRVARIANTDIR / RSRPARAMETRIZA) 
    Thanks in advance.

    Thanks for the link.
    Well, I already read that document and I followed the links to the former blogs on this subject.
    But this solution doesn't work for me: CL_RSR_QUERY_VARIABLES is unknown.
    I read the pdf and the function-module-code, but I still don't have an idea how to work with query- variants . The example-coding includes a line
    DATA: wf_variant TYPE variant .
    but that's not used, or is it?
    (I don't have a set of variables and conditions, but just a variant-name. The variant will be created by other people, who would start my report.)
    Greetings

  • Short Dump While selecting Variant for ABAP query

    Hi,
    ABAP query is going to short dump (CONNE_IMPORT_WRONG_COMP_LENG) while selecting a Variant. If i create and use variant then i am able to see Output of Variant.But not able to use Earlier created variants .
    I think some mismatch between variant values and selection screen fields.Can anyone tell me how to rectify this ?
    I am not able to debug the code as dump is coming in a System program(RSDBSPVD).Can anyone tell me which database table i can use to get values of the Variant.
    Thanks in Advance.
    Nirmala K

    Hi nirmala,
    chk the links:
    http://help.sap.com/saphelp_webas620/helpdata/en/c0/980398e58611d194cc00a0c94260a5/content.htm
    http://help.sap.com/saphelp_webas620/helpdata/en/c0/9803a7e58611d194cc00a0c94260a5/content.htm
    regards,
    keerthi.

  • Tricky dynamic date variant in ABAP query

    Hello All,
    In an abap query there is a date field in the selection screen with from & to values.
    I am trying to create a dynamic variant that will fill the following data into those fields:
    From date: will be left blank
    To date: will show today's date - 90 days
    For example, if today's date is 01/12/2006 the variant should fill the following data into the fields:
    From date: <blank>
    To date: 01/09/2006
    I have tried all the methods I know with dynamic dates calculation in the variant definition but did not manage to create such variant.
    Any help will be very appreciated and points would be rewarded generously !
    Thank you very much,
    Ronen

    If the "from" date is meant to be left blank (beginning of time) and the "to" date is some date plus or minus number of days from today, you use the "current +/- days" dynamic date calculation format as was mentioned earlier.  Likewise if the "from" date is some date plus or minus today's date, and the "to" date is infinity -- you only need the one Dynamic Date calculation.
    To do this, first don't think about this as a date range, think of your Dynamic Date calculation as if this were a single parameter and not a select-option.  You are really saying "my date is anything LT/LE this date" or "my date is anything GT/GE this date" -- not a range
    In the Save Variant screen, find the desired date select-option and:
    1. Choose in column "Selection Variable", a "D" (Dynamic date calculation)
    2. Use F4 in the "Name of Variable" column
    3. Find "Current date +/- ??? days" or "Current date +/- ??? work days" in the popup, as appropriate
    4. For "I/E" (include/exclude) column select as appropriate
    5. For "Option" column, choose "LE", "LT", "GE", "GT", "NE" as appropriate
    6. After clicking green check mark, enter your plus or minus days (and factory calendar if using work days).
    7. Finish saving your variant.
    8. You may not see your changes in your variant until you back all the way out of the variant and then redisplay it.  You'll see a greyed out date along with the symbol matching your choice (LT, LE, etc.)
    Unfortunately if you don't have infinity on either end of the date you are limited to 999 days differences as far as I am aware.  If that is the case you can populate TVARVC table with parameter or selection variables, maintain them with STVARV transaction by hand, or use an ABAP program in batch to regularly calculate the values.  Then you can reference the TVARVC values in your variant instead of the Dynamic Date calculation.
    If someone knows a way to bypass the use of TVARVC for date ranges that are more than 999 days apart please let me know.  TVARVC works well but it is extra effort whereas Dynamic Date calculation would be much easier to maintain if the date range could be made larger than 999 days.

  • How to set up standard variant in ABAP report

    Hi,
    I would like to create a standard variant for running ABAP report so that users don't have to select the variant each time.
    I know we can specify the variant name as a standard variant on changing query by SQ01 but is there any way to give the function in ABAP report?
    Does anybody know how to code or set up to do that?
    Thank you very much in advance.
    Best regards,
    Miki
    Edited by: Miki Komatsu on May 20, 2011 9:46 AM

    Use the   RS_VARIANT_CONTENTS FM
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
        EXPORTING
          report                      = sy-repid
          variant                     = 'PRUEBA' "Your Variant
    *     MOVE_OR_WRITE               = 'W'
    *     NO_IMPORT                   = ' '
         EXECUTE_DIRECT              = 'X'
    *   IMPORTING
    *     SP                          =
        tables
    *     L_PARAMS                    =
    *     L_PARAMS_NONV               =
    *     L_SELOP                     =
    *     L_SELOP_NONV                =
          valutab                     = VALUE_TAB
    *     OBJECTS                     =
    *     FREE_SELECTIONS_DESC        =
    *     FREE_SELECTIONS_VALUE       =
       EXCEPTIONS
         VARIANT_NON_EXISTENT        = 1
         VARIANT_OBSOLETE            = 2
         OTHERS                      = 3  .
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    The variant Reports are in VARI Table

  • Create variants through ABAP

    Hi,
    Can an SAP ABAP program be built to create variants for other ABAP programs?
    This is required as we have a regular interface inbound job which will
    provide information on the values of the fields that need to be input
    into the program. This program will then be scheduled to run periodically
    using this new variant.
    Thanks!

    Hello Gordon,
    When you execute your abap program on the first selection screen you have an option from the menu bar to save that layout as a variant .
    That is: from GOTO->VARIANTS ->SAVE AS VARIANTS..
    Hope it helps you.
    Thanks Mansi

  • BEx query with variant from ABAP

    Hello,
    I'm looking for possibility to start BEx query with variant (variant is created with tx RSRT) from ABAP. There are some funktion modules, which start queries (launch excel), for example RSAH_LAUNCH_EXCEL or RSSEM_QUERY_LAUNCH, but they are ending with short dump, when there are variables in the query. Is there any standard FM, which starts the query with variant or accepts parameters?
    regards,
    Krzysztof

    Hi,
    the short dump was my fault, I've passed query name instead of genuniid to the RSAH_LAUNCH_EXCEL.
    What I'm trying to do is to I'll start BEx query with parameters (I don't want to get selection-screen from the query, I need to fill it from ABAP).
    Here is my example, which is not working.
    DATA:
      lv_query(30) TYPE c,
      lv_genuniid  TYPE rsrrepdir-genuniid,
      ls_var       TYPE rrx_var,
      lt_var       TYPE TABLE OF rrx_var.
    lv_query = 'YB_MAKLER_DETAIL'.
    CALL FUNCTION 'CONVERSION_EXIT_GENID_INPUT'
      EXPORTING
        input  = lv_query
      IMPORTING
        output = lv_genuniid.
    IF lv_genuniid = ''.
      WRITE: / 'There is no Query', lv_query.
    ELSE.
      ls_var-vnam = 'YS_MKLE'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '0000005100'.
      APPEND ls_var TO lt_var.
      ls_var-vnam = 'YS_VTGJ'.
      ls_var-sign = 'I'.
      ls_var-opt  = 'EQ'.
      ls_var-low  = '1999'.
      APPEND ls_var TO lt_var.
      CALL FUNCTION 'RSAH_LAUNCH_EXCEL'
        EXPORTING
          i_genuniid                       = lv_genuniid
          I_OBJVERS                        = 'A'
          i_hide_sapgui                    = 'X'
        TABLES
          I_T_VAR                          = lt_var.
    ENDIF.
    If parameter 'i_hide_sapgui' is empty, I'm getting empty selection-screen,
    If parameter 'i_hide_sapgui' equals 'X' I'm getting selection-screen filled with values, which were used last time manualy, not with values from the internal table 'lt_var'.
    Do you have any idea how to pass parameters to the query with this function module?
    Regards,
    Krzysztof

  • Using dynamic variants in ABAP

    Hi,
    I have an issue. I want to use dynamic variants in my program. On the selection screen of my program, I have a parameter called Planning date which takes in the current week of the year as input value, i.e lets say today we are Monday 14th of May 2007, so the current week is 20. I want to make this parameter dynamic, i.e to change automatically so that next week the value is week 21.
    Also is setting dynamic variants version dependent? My version is 5.0 SR1 and I don't have the option of save my variant using the 'D' traffic signal.
    Please help me out.
    Thanks

    Hi,
    you can fill your parameter in the initialization event of your report. In order to get the week you can use the function DATE_GET_WEEK.
    Kostas

  • Use Variant for abap in Sapgui for Java 7.00r2 (Mac)

    Hi,
    When i want to use a, already existing,  Variant for a program i get the error message 'Choose a valid entry'.
    This also happens whith a newly stored variant.
    The Mac version also has problems with the enter key in SE38.
    Seems to me the are new bugs in revision 2.
    John

    Hello,
    both bugs are fixed in rev 2.1, which I made available just few minutes ago. see ANN: SAP GUI for Java 7.00 rev 2.1 available for download
    Best regards
    Rolf-Martin

  • How to Create selection variant in ABAP

    Hi all,
    i want to create variant selection in get data of the variant on my ALV Grid.
    See on the screenshot my problem :
    http://www.casimages.com/img.php?i=101006040413882278.jpg
    Thank you very much for your answers.

    i Want to make new functionnality of my program which permit user to Save a selection variant with the result of the alv (Mark row)
    It is a new variant and this variant is use for the same program.
    In fact this functionnality permit to the user to make a variant selection with a selection of article without knowing the reference of article.
    Thank you very much.

  • Generate BEx Variant with ABAP

    I would like to create lot of BEx Variant automaticlly on a Workbook. But now, I just found the Variant stored in table VARID(ID) , VARIT (Text) , VARI ( ? ) and TRDIR .
    But the data which stored in these tables are not I want.
    How could I do this ?
    Thank you.

    Liang,
    What is the version of BW/BI (3.x or 2004s) you are using?
    In BW 3.x these are stores in VARI & VARID
    In BI 2004s these are in RSRVARIANT & RSRVARIANTDIR
    You can look athe function modules RS_VARIANT_CREATE, RS_VARIANT_DELETE and RS_VARIANT_EXISTS.
    But if you are using 2004s , forget it these functions are not useful anymore.because when you create variants in 2004s they gets stored in RSRVARIANT & RSRVARIANTDIR, but the function modules are looking at VARI & VARID tables.
    Hope this helps.
    Alex (Arthur Samson)

  • Call variant from ABAP program

    Hi all,
    The users have created a variant that they use when they run their report.  When they select the variant it works fine, but they want the program to run the variant for them.  Can anyone give me some ideas as to where I can go to see some sample code, so I can try to figure out how to do this, please?
    Thanks

    Hi,
    you can use function module below to get the values for the variant user has created
    AT SELECTION-SCREEN OUTPUT. 
    CALL FUNCTION 'RS_VARIANT_CONTENTS'
          EXPORTING
            report               = Report Name
            variant              = Variant name
          TABLES
            valutab              = it_valutab
          EXCEPTIONS
            variant_non_existent = 1
            variant_obsolete     = 2
            OTHERS               = 3.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Then LOOP AT IT_VALUTAB INTO WA_VALUTAB WHERE SELNAME = 'YOUR FIRST SELECT OPTION NAME such as S_VBELN'.
               MOVE WA_VALUTAB-SIGN,WA_VALUTAB-OPTION, WA_VALUTAB-LOW, WA_VALUTAB-HIGH to the corresponding fields of your select option i.e. S_VBELN.
        APPEND S_VBLEN.
       ENDLOOP.
    Similarly Loop at IT_VALUTAB for the remaining fields on the selection screen and append the values in the select options.
    Please award points if it solves your problem.
    Cheers
    sharmistha

  • ABAP Query Variant Problem

    Hi,
       I am trying to Execute a query through Program
      I had copied standard querys (ME80FN) Program  RM06EAAW  to my custom program
      In that program , it is caaling a query and assigning one variant
      Any idea from when that variant was assigned or How to create variants for ABAP Queries??
    Thanks
    Chandrasekhar J
    Edited by: Chandrasekhar Jagarlamudi on Feb 20, 2008 1:08 AM

    Hi,
    Check these links...
    http://help.sap.com/saphelp_nw04/helpdata/en/62/bc934814ba11d6999900508b6b8b11/frameset.htm
    Re: ABAP Query variant - Error during SE93
    Hope it helps u...
    Regards,
    KK

  • Program Variant in Process Chain

    Hi All,
    I have to execute a program in a Process Chain. I have included a process variant to execute the program. Now, this program bring us to a screen, where we need to click on the execute button to run that program. I need to add a program variant for this i guess. Can any one give me the procedure how to do this?
    Points will be awarded.
    Thanks in advance,
    Anjum.

    The program that you have written should run in background.
    We use Variants for ABAP programs to be run in the Process Chain
    - Create an ABAP variant
    - Choose call mode "Synchronous", Called from "Local". Thats mostly the default we use. choose according to your requirement.
    - Choose "Program". Choose the program name & the variant n ame. Its better if you create the variant while testing the program in sa38. Later you can use the same variant in the Process Chain ABAp variant OR can create a new one. Set appropriate values.
    Please note that if in SA38, your program ran successfully with the variant, it should run here as well.
    That should do.
    Regards
    Anujit Ghosh
    Edited by: Anujit Ghosh on Jun 17, 2008 12:36 PM
    To create the program variant, first enter a name of your choice in the program variant field. Click Edit.
    - Choose Create New
    - Choose "Values". Click Change. In teh next screen, enter all the required parameters. Choose if its a SAP standard prog, or modified program.
    - Check the attributes as well. It will usually choose selection screen 1000 as default. Let it be.

Maybe you are looking for

  • Adding Lines to a Sales Order

    Hello ! I'm using the following code (pretty much) to add items to existing sales orders : Dim oOrder As SAPbobsCOM.Documents oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders) oOrder.GetByKey(id) oOrder.Lines.Add() oOrder.Lines.It

  • HT201343 The Model Identifier:     MacBookPro9,2 support AirPlay Mirroring?

    I have the MacBookPro9,2. This model support AirPlay Mirroring? If the answer is yes, I could enable it?

  • Questions re: Switching to Premiere Pro

    I have always been so happy to say to anyone:  "I am a Final Cut Pro Editor". I have been, professionally, since verion 1. Since then, I have used every version up until now. I LOVE THE FCP SUITE! However - I recently installed FCP X, and have spent

  • No sound g60-235DX Windows XP only after standby

    Thanks to CherylG and Provost, I was able to convert the above said computer from Vista to XP.  The thing runs great, except for one small annoyance... When I bring the computer back from standby, there is no sound. The Conexant 221 driver is there,

  • Export as pdf from mail fails at times

    Mail Version 8.1 (1993) I often want to preserve an email as a pdf. Often I am able to. Sometimes I am not. I use the File > Export as PDF dialogue. It asks me for the destination, pretends to expert it with the various "processing" dialogue items, a