Variant Issue in Abap Program

I came across this strange issue with Variants: Please let me know if anyone has come cross this issue.
Issue:   I select a variant for a Zreport which has email address in the selection screen. Now i select another variant in which there is no email address but still i see the email address. basically the first variant value is being passed when i select the second variant.
Code:
SELECTION-SCREEN : BEGIN OF BLOCK em WITH FRAME TITLE text-307.
PARAMETERS:  p_send TYPE char1 AS CHECKBOX DEFAULT ''.
SELECT-OPTIONS   :s_emails FOR somlreci1-receiver NO INTERVALS. 
SELECTION-SCREEN : END OF BLOCK em.

Hi Vasudev,
I have not seen any issue like that before,
Try creating the variant again,
Step1: enter an email address and then save
Step2: name the variant as var1 and then save
Step3: now remove the email address and then save
Step4: name the variant as var2 and then save.
Step5: refresh by /n followed by the T code
Step6: try it out now with both the variants
Revert for further clarification
Thanks
Sri

Similar Messages

  • Import issue for ABAP program in Production Server ?

    Hi Experts,
    I have an ABAP program which gets executed properly in BW Development server but getting the following error when I am trying to execute it in the BW Production while  I could activate the program successfully.
    Kindly help me to resolve this issue.
    Thanks in advance !!!
    Regards,
    Gokulkumar RD

    Hi Golkul,
    Can you debug the program while execute?
    I think there is some hardcoding in the program for checkiing the client and then raised a custom message in the program.
    Can you share the coding of the prorgam if possible?
    Try to check for any messages raised in the program. Also click on the on the message pop up and see the details on the message and let us know.
    Thanks
    Amit

  • Performance issue in abap program

    hi,
    how can we improve the performance of  abap program

    hi,
    read the follwing links
    ABAP provides few tools to analyse the perfomance of the objects, which was developed by us.
    Run time analysis transaction SE30
    This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    SQL Trace transaction ST05
    by using this tool we can analyse the perfomance issues related to DATABASE calls.
    Perfomance Techniques for improve the perfomance of the object.
    1) ABAP/4 programs can take a very long time to execute, and can make other processes have to wait before executing. Here are some tips to speed up your programs and reduce the load your programs put on the system:
    2) Use the GET RUN TIME command to help evaluate performance. It's hard to know whether that optimization technique REALLY helps unless you test it out.
    3) Using this tool can help you know what is effective, under what kinds of conditions. The GET RUN TIME has problems under multiple CPUs, so you should use it to test small pieces of your program, rather than the whole program.
    4) Generally, try to reduce I/O first, then memory, then CPU activity. I/O operations that read/write to hard disk are always the most expensive operations. Memory, if not controlled, may have to be written to swap space on the hard disk, which therefore increases your I/O read/writes to disk. CPU activity can be reduced by careful program design, and by using commands such as SUM (SQL) and COLLECT (ABAP/4).
    5) Avoid 'SELECT *', especially in tables that have a lot of fields. Use SELECT A B C INTO instead, so that fields are only read if they are used. This can make a very big difference.
    6) Field-groups can be useful for multi-level sorting and displaying. However, they write their data to the system's paging space, rather than to memory (internal tables use memory). For this reason, field-groups are only appropriate for processing large lists (e.g. over 50,000 records). If you have large lists, you should work with the systems administrator to decide the maximum amount of RAM your program should use, and from that, calculate how much space your lists will use. Then you can decide whether to write the data to memory or swap space.
    Use as many table keys as possible in the WHERE part of your select statements.
    7)Whenever possible, design the program to access a relatively constant number of records (for instance, if you only access the transactions for one month, then there probably will be a reasonable range, like 1200-1800, for the number of transactions inputted within that month). Then use a SELECT A B C INTO TABLE ITAB statement.
    8) Get a good idea of how many records you will be accessing. Log into your productive system, and use SE80 -> Dictionary Objects (press Edit), enter the table name you want to see, and press Display. Go To Utilities -> Table Contents to query the table contents and see the number of records. This is extremely useful in optimizing a program's memory allocation.
    9) Try to make the user interface such that the program gradually unfolds more information to the user, rather than giving a huge list of information all at once to the user.
    10) Declare your internal tables using OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to be accessing. If the number of records exceeds NUM_RECS, the data will be kept in swap space (not memory).
    11) Use SELECT A B C INTO TABLE ITAB whenever possible. This will read all of the records into the itab in one operation, rather than repeated operations that result from a SELECT A B C INTO ITAB... ENDSELECT statement. Make sure that ITAB is declared with OCCURS NUM_RECS, where NUM_RECS is the number of records you expect to access.
    12) If the number of records you are reading is constantly growing, you may be able to break it into chunks of relatively constant size. For instance, if you have to read all records from 1991 to present, you can break it into quarters, and read all records one quarter at a time. This will reduce I/O operations. Test extensively with GET RUN TIME when using this method.
    13) Know how to use the 'collect' command. It can be very efficient.
    14) Use the SELECT SINGLE command whenever possible.
    15) Many tables contain totals fields (such as monthly expense totals). Use these avoid wasting resources by calculating a total that has already been calculated and stored.
    Some tips:
    1) Use joins where possible as redundant data is not fetched.
    2) Use select single where ever possible.
    3) Calling methods of a global class is faster than calling function modules.
    4) Use constants instead of literals
    5) Use WHILE instead of a DO-EXIT-ENDDO.
    6) Unnecessary MOVEs should be avoided by using the explicit work area operations
    see the follwing links for a brief insifght into performance tuning,
    http://www.thespot4sap.com/Articles/SAPABAPPerformanceTuning_Introduction.asp
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f7c454211d189710000e8322d00/frameset.htm
    regards
    Rohan

  • From which table could i get all the Variants of a ABAP program?

    Hi,
    From which table could i get all the Variants name which belong to a specific ABAP program?
    Thanks.

    Hi Hoo,
    You can get the variants of a ABAB Program from table <b>VARID</b>. Give the report name to the VARID-REPORT field and you will the list of variants for this report under field VARID-VARIANT and VARID-ENAME is the user who created the variant.
    Otherwise, You can use the function module RM_GET_VARIANTS_4_REPORT_USER to get the variants of a report
    Thanks,
    Vinay

  • Add a dinamic variant in an ABAP  program

    Hi all,
    I want to run an ABAP program in a process chain. The problem is that the input parameters should be dynamic. When you run the program you have to put one date.
    When you ran the process chain you have to put one day before today in the record. The problem is that I can’t add a ABAP program in the variant. I would like to use this program several times, so in each case the input parameters is different (not always the days before)
    Can someone help me?
    Thanks in advance.

    Hi Pablo,
       Goto perticular ABAP program and provide varian name and click on Variant Attributes -->> Selection variables -->> and click on tranfic lights for D(Dynamic Date Calculation).
       Here you change values dynamically for Date variables only.
    Hope it Helps
    Srini

  • Issue with ABAP program execution from process chains

    Hi All:
    We have a process chain with 3 steps, each of them executing the same program with three different variants. The program is ftp's the file from APO's dataexchange (mount) to another ftp server. The first variant transfers file A to a directory in the external ftp server (say /X) . The second and the third variants are supposed to transfer different files, B and C to the same directory.
    That is where the problem is. After the process chain is successful, I see two files B and C but the contents are same and that of C. So, if I switch the steps in the PC to bring in A then C and then B, I see files B and C with content of C. I tried C then A then B. I see the file names correct but now the contents are A, A then B.
    Have any of you come across this issue? Do you know that these is an existing problem? IF you have a solution, pl. let me know.
    Thanks
    Narayanan

    Narayanan,
    Instead of doing it in three steps - would it be possible for you to have one UNIX script or equivalent doing the above and calling the same from your process chain ...?
    We do a lot of FTPs but then our file names are standard and we have a UNIX script for the same executed using a system command through a process chain and it has been working without issues for the past 1 year ...
    Maybe I have not got your situation properly ... some more detail on the program details and what you are doing in more detail would help....  also SP levels please..

  • Do varying issue in unicode programs(ECC6.0)

    Hi,
    I am facing the error "Could not specify the range automatically. This means you need a RANGE addition." for the following code.
    DATA : W_STRAT_LANC1 LIKE T16FD-FRGCT,  "stratégie de lancement 1 +DJA
             W_STRAT_LANC2 LIKE T16FD-FRGCT
    DO 3 TIMES
         VARYING T16FS-FRGCX   FROM T16FS-FRGC1   NEXT T16FS-FRGC2 RANGE T16FS
         VARYING W_STRAT_LANCX FROM W_STRAT_LANC1 NEXT W_STRAT_LANC2.
    Please send me a possible solution.
    I have gone through many posts but this is a new issue.

    Hi,
    This is not a correct way of using the varying addition. Your fields should belong to the same structure...
    something like:
    TYPES: BEGIN OF ts_lanc,
             lanc1 TYPE frgct,
             lanc2 TYPE frgct,
            END OF ts_lanc.
    DATA: w_strat_lancx TYPE t16fd-frgct,
          w_t16fs-frgcx TYPE t16fs-frgsx.
    DATA: ws_t16fs TYPE t16fs,
          ws_lanc  TYPE ts_lanc.
    DO 3 TIMES
       VARYING w_t16fs-frgcx FROM ws_t16fs-frgc1 NEXT ws_t16fs-frgc2 RANGE ws_t16fs
       VARYING w_strat_lancx FROM ws_lanc-lanc1  NEXT ws_lanc-lanc2  RANGE ws_lanc.
    ENDDO.
    Kr,
    Manu.

  • Abap program variant error in process chain

    Hi experts,
    I need your help one more time...
    In our process chain, we run the program RSIMPCUST to bring currency and units from the source system to BW. We have created a variant to run this program and call it in the process chain. One of the variant's parameter is the logical system, which was configured as our DEV system.
    When we transport this process chain to QA and run it, the variant continues to refer the DEV logical system, and not the QA logical system as it should.
    any ideas?
    Thanks!
    Thiago Braga

    Values in variants are not converted.  You can use the same variant in your ABAP program, but you need to change the value in the parameter for logical system in each system you transport the change to.  The only alternative is to create a logical system name in SM59 that is the same in all your BW systems but it refers to the local R/3 system.
    In other words, you will have two logical systems in your BWD system pointing to your R/3 Dev.  Let's call them R3DCLNT100 and R3SYSTEM, where R3DCLNT100 is also the source system (in RSA1).  You can use R3SYSTEM in your variant for your ABAP program.  In your BWQ (test system), you will have two logical systems also, R3QCLNT100 and R3SYSTEM, where R3QCLNT100 is also your source system.
    Does this help.

  • Delete ABAP Program Variant

    Hi,
    Is there a way to block users from deleting the variants in an ABAP program?
    The PROTECTED flag only protects against any changes...but allows deletion..strange!!!!

    AT SELECTION-SCREEN.
      CASE sy-ucomm .
      WHEN 'VDEL' .
      MESSAGE 'Variant cannot be deleted' TYPE 'E'.
    ENDCASE.

  • WD Service Call ABAP program generation error in 2004s

    Hi,
    I create a 'service call' by using the wizard and I select my existing 'component controller' as a controller. The service type I use is a (custom) function module. The function module has 1 import parameter, an export structure and 6 tables.
    In the 'adapt context' step I choose all fields and structures to be stored in the context. Then I generate the code.
    After generating the code there is a syntax error in the code of the created method. The method code under comment 'store output to context' binds the rfc structure to the context BUT it seems to think that it is a table instead of a structure.
    the code:
    node_Contract->bind_Structure(Stru_C_Contract[] )
    Of course I can remove the '[]' signs manually but I think it is strange that the wizard produces wrong code.
    Please let me know if this is a bug or something else.

    Values in variants are not converted.  You can use the same variant in your ABAP program, but you need to change the value in the parameter for logical system in each system you transport the change to.  The only alternative is to create a logical system name in SM59 that is the same in all your BW systems but it refers to the local R/3 system.
    In other words, you will have two logical systems in your BWD system pointing to your R/3 Dev.  Let's call them R3DCLNT100 and R3SYSTEM, where R3DCLNT100 is also the source system (in RSA1).  You can use R3SYSTEM in your variant for your ABAP program.  In your BWQ (test system), you will have two logical systems also, R3QCLNT100 and R3SYSTEM, where R3QCLNT100 is also your source system.
    Does this help.

  • How to I insert ABAP Programs in Process Chain ?

    Hi mates,
      I need to know how exactly in a Process Chain can I start a ABAP Program ?
      For Instance, if X happens the go and execute this program it not execute Y program ?
      Kindly advice

    Hi,
    Yes you can definitely insert an ABAP program process in a PC.
    You can include a ABAP Process which is available in the Processes under PC. And it asks for a Variant and ABAP report name.
    You need to create a Variant for the ABAP program.
    This will also have a Output, like if in case the variants are correct and the Program logic is matched then in that case the output is given else not given. Which turns the process GREEN / RED accordingly.
    Hope this helps,
    Pradip Parmar

  • Re: Trigger an ABAP program in R/3 by a process chain in BW

    This is regarding a previous thread of mine. The basic idea is to trigger an ABAP program in R/3 by a process chain in BW.
    1. I created an ABAP program ( lets say P1)  in BW ( using SE38 ), and included the code:
    CALL FUNCTION 'BP_EVENT_RAISE'
    EXPORTING
    eventid = 'Y21608_CCNA3PVAR_START'.
    There is no variant for the ABAP program.
    2. Now, I dragged the process type ABAP code in my process chain, created a variant and gave this program P1 there.
    3. I have already created an event in R/3 with the name 'Y21608_CCNA3PVAR_START' ( using SM62 ) and created a job with schedule 'after event', which starts the ABAP programin R/3.
    Question: In the process chain, the process is going to the ABAP program but nothing is happening. What more do i include in the ABAP program? And how does this program trigger an event in R/3? Can i use BP_EVENT_RAISE or RSSM_EVENT_RAISE??
    Please advise.

    Edwin, are we calling a FM which exists in BW or are we calling an FM which exists in R/3 ?
    I thought, that the FM used should be in BW but it will trigger an event which has been created in R/3. Is this right? And where in the ABAP prgram can i specify the destination? How do i write this?
    Sorry if iam asking u to do the entire job for me:-)

  • Issue regarding [Work Flow] Business Object Event Raise in ABAP Program

    Hi All,
    I have one issue regarding [Work Flow] Business Object Event Raise in ABAP Program.
    Actual TDS is as below:
    If E message type written, raise Business object BUS2005 (Production order) Event PickShortage for production order passing warehouse, transfer request
    (BUS2065 Object key) in event container. Also include table of text version of error
    messages for this set of Transfer
    Request.
    Can anybody tell me how can i write it technically in ABAP Code.
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    Can anybody solve above posted issue!
    Thanks,
    Deep.

  • Issue with the ABAP program to find BI lookups and code Patterns

    Hello dears,
    I'm trying to use the ABAP program LOOKUP_FINDER:
    http://wiki.sdn.sap.com/wiki/display/BI/ABAPprogramtofindBIlookupsandcodePatterns
    But I have the following issue:
    Runtime Errors        
    RAISE_EXCEPTION
    Short text
        Exception condition "NO_FIELDCATALOG_AVAILABLE" raised.
    Error analysis
        A RAISE statement in the program "CL_GUI_ALV_GRID===============CP" raised the
         exception
        condition "NO_FIELDCATALOG_AVAILABLE".
        Since the exception was not intercepted by a superior
        program, processing was terminated.
    Source Code Extract
    Line  SourceCde
        1 method set_sort_criteria.
        2
        3 *... (1) Trace?
        4   if not mr_trace is initial.
        5     call method mr_trace->add_trace_item
        6       exporting
        7         i_trace_item = 'SET_SORT_CRITERIA'
        8         ir_variant   = m_cl_variant
        9         it_data      = mt_data
       10         it_info      = mt_info.
       11   endif.
       12
       13   if m_cl_variant->mt_fieldcatalog is initial.
    >>>>>     raise no_fieldcatalog_available.
       15   endif.
       16
       17   m_cl_variant->mt_sort = it_sort.
       18
       19   call function 'LVC_SORT_COMPLETE'
       20        exporting
       21             it_fieldcat = m_cl_variant->mt_fieldcatalog
       22        changing
       23             ct_sort     = m_cl_variant->mt_sort.
       24
       25 endmethod.
    This issue is located in the FM 'REUSE_ALV_GRID_DISPLAY' called at the end of the program.... maybe because the catalog is empty?
    For your information, I  called the program 'ZLOOKUP_FINDER'.
    Can you help me to fix this issue?
    Regards,
    Vince.

    Hi Vince,
    If a table is empty field catalog usually return no error it just display your field catalog with headers .
    I think the issue is with building of field catalog .
    May be some settings are missing there .
    Please check FM REUSE_ALV_FIELDCATALOG_MERGE where field catalog is getting generated.
    Regards,
    Jaya Tiwari

  • ABAP Program back ground scheduling issue.

    Hi experts,
    I am trying to execute a ABAP program in a process chain but the job log shows me the following message
    "Object XXXXXXX of class RE and language PT not exist"
    XXXXX is the ABAP program name.
    Even i tryed to excute the ABAP program itself in backgroud , but i am getting the same problem.
    What´s the reason and how to solve this issue.
    Message no. SF616
    Best Regards,
    Ramesh

    Hi all,
        following the complete message i was getting.
    Object ZSALES_BACKUP of class RE and language EN does not exist.
    Message no. SF616
    Diagnosis
    The specified documentation element is not in the system.
    Procedure
    Check that your entry is written correctly.
    Regards,
    Ramesh.

Maybe you are looking for

  • Dd unix util producing corrupt ISO images

    This is the first time I've ever had reason to post to Apple Support. I'm going insane with this issue. I am writing an ISO-ripping util that is really just GUI slapped on top of dd, and I can't coax the thing to produce non-corrupt ISOs on Snow Leop

  • Contact names not appearing in group text

    When sending a group text the contact names do not appear but the phone numbers do, is there a way to change this?  Phone is a Z30  STA100-5

  • Central contract functionality in SRM 7.0?

    Dear Experts, I would like to have few clarifications about central contract functionality in SRM 7.0. As per understanding, from SRM 7.0, there is no two separate documents like local contract and GOA (global outline agreement--contract for backend

  • Can't shutdown

    Hello Since installing Mavericks (on the latest Mac Mini) without any issues, I can't seem to shut down anymore. The finder clears the desktop and removes the menu bars then hangs and just sits there. I have to open up a random app to get the Apple m

  • Clarification on some reading: Datasource and Function Module extraction

    Hi, I found a link on Help.sap which explains how to create a function module and I have some questions after my review: It basically uses function module to read some filght data from the table SPFLI 1. I got into this research since one of the meth