Custom variable code problem

Hi,
I have a variable called 'Sales Office From Dealer'  so as you guessed, based on the dealer I want to find the sales office.  However, I have 2 seperate queries, in one I have a mandatory input variable so the user can input the dealer (that's for sales managers) and I have a seperate query that the dealers themselves will run where I figure out the dealer from the userid of the person logged on.  So, in order to populate by Sales Office variable, I need to first determine the dealer then use the result for the Sales office.  And I want all that in the same variable to avoid so much more customization and other variables are based on the sales office. 
When I run the query with the input variable for the dealer, it only works if I comment out the 'if i_step=1' part, if I leave both parts, I get the following warning (and I end up getting 'unassigned' in my result: 
'''Initial RANGE-LOW for customer user exit variable 'ZV_SALESOFF_FR_DEALR' corrected to #.'''
When I run the query based on the user variable, it works all the time even with both parts there.
Here's the code:
  WHEN 'ZVC_SALESOFF_FR_DEALR'.
first step is to determine whether to take the dealer
from an input screen (i_step=2) or based on the user id
automatically (i_step=1)
    IF i_step = 1.
       CONCATENATE '000000'
                   sy-uname(4)
       INTO l_dealer.
      SELECT SINGLE sales_off
      FROM /bi0/pcust_sales INTO l_salesoff1
      WHERE cust_sales EQ l_dealer
             AND distr_chan EQ '10'
             AND salesorg EQ '1000'.
      CLEAR l_s_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low = l_salesoff1.
      APPEND l_s_range TO   e_t_range.
      EXIT.
    ENDIF.
    IF i_step = 2.
      LOOP AT i_t_var_range INTO loc_var_range
      WHERE vnam = 'ZV_PDEALER_MANDATORY' .
        l_dealer = loc_var_range-low.
        SELECT SINGLE sales_off
        FROM /bi0/pcust_sales INTO l_salesoff
        WHERE cust_sales EQ l_dealer
              AND distr_chan EQ '10'
              AND salesorg EQ '1000'.
        CLEAR l_s_range.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'EQ'.
        l_s_range-low = l_salesoff.
        APPEND l_s_range TO   e_t_range.
        EXIT.
      ENDLOOP.
    ENDIF.
Thanks
Suzanne

Sorry, when I looked at the code that I pasted it didn't look right - here is the actual final code - does this make more sense?
  WHEN 'ZVC_PDEALER1'.
Assign first Dealer of the Sales Area
Find sales area then the first dealer
    IF i_step = 1.
      CLEAR l_s_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      CONCATENATE '000000'
      sy-uname(4)
      INTO l_dealer.
        SELECT SINGLE /BIC/ZECO_ZONE
        FROM /bi0/pcust_sales INTO l_ecozone
        WHERE cust_sales EQ l_dealer
              AND distr_chan EQ '10'
              AND DIVISION = '10'
              AND salesorg EQ '1000'
              AND CRMSALGRPX = 'Y'
              AND OBJVERS = 'A'.
    ENDIF.
    IF i_step = 2.
      CLEAR l_s_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      LOOP AT i_t_var_range INTO loc_var_range
      WHERE vnam = 'ZV_PDEALER_MANDATORY' .
        l_dealer = loc_var_range-low.
        SELECT SINGLE /BIC/ZECO_ZONE
        FROM /bi0/pcust_sales INTO l_ecozone
        WHERE cust_sales EQ l_dealer
              AND distr_chan EQ '10'
              AND DIVISION = '10'
              AND salesorg EQ '1000'
              AND CRMSALGRPX = 'Y'
              AND OBJVERS = 'A'.
      ENDLOOP.
    ENDIF.
    SELECT cust_sales
    INTO CORRESPONDING FIELDS OF TABLE t_ecozone
    FROM /bi0/pcust_sales
    WHERE /BIC/ZECO_ZONE EQ l_ecozone
          AND DISTR_CHAN = '10'
          AND DIVISION = '10'
          AND CRMSALGRPX = 'Y'
          AND OBJVERS ='A'.
    DELETE t_ecozone WHERE cust_sales EQ l_dealer.
    SORT t_ecozone.
    READ TABLE t_ecozone INTO l_pdealer# INDEX 1.
    IF sy-subrc NE 0.   "if DID NOT FIND something in read stmt. above
      l_pdealer# = SPACE.
    Endif.
      CLEAR l_s_range.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low = l_pdealer#.
      APPEND l_s_range TO   e_t_range.
    EXIT.

Similar Messages

  • How to make BEX Customer Exit Variable inactive through Customer Exit Code

    Hi,
    I had created two variables VAR1 and VAR2 as Customer Exit variables
    If VAR1 is entered then it should automatically make the VAR2 as NO Entry Variable.
    vice versa also required.
    can u help me with any code in CMOD so that we can make it inactive through Customer Exit Code.
    Thanks in Advance.
    Sunil.

    What i want is not commenting the code
    I want to make the BEX Variable as inactive by using the Customer Exit Code
    EX : If value in VAR1 is entered  then VAR2 should become automatically inactive.
           If value in VAR2 is entered  then VAR1 should become automatically inactive.
    how can this be done
    Thanks in advance.
    Sunil

  • Problem with Customer variable

    hi
    from improper installation of coldfusion "Customer variable
    in the registry I changed the configuration to the cookies but I
    have error in event log
    "An I/O operation initiated by the Registry failed
    unrecoverably. The Registry could not read in or write out or flush
    one of the files that contain the system's image of the Registry. "
    and my registry is full, this key
    HKLM/Software/Macromedia/coldfusion/CurrentVersion/clients
    and each time you restart the coldfusion the old entered the
    back regitre
    thank for help
    patrick

    Could it be that the code doesn't find any value in ZCURR_PM_T table for the specified input region?

  • How to write customer exit code to get current user as default in variable

    Hi guys,
           I design a query which has a variable called var_employee , I also set some default values for this variable in query designer. But I would like to set the current user account who logon on (who execute the query) in the dropdownlist as default user when the variable selection screen appear. of course after that he can choose other avaiable value.
          I look up some related threads, all says that this need some customer exit code, and they mention to use CMOD to create the customer exit , but I don't know the detail process, as I am pretty new on this.
         The attribute of the var_employee  variable is :  employee(defined info object by myself) characterstic value, customer exit.
         Can somebody show me the process to create the customer exit, and the apap code in detail if possbile. then I can try.
          Thanks a lot in advance.
    Best Regards,
    Ben

    Hi,
    Please have a look at:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Krzys

  • [Best practice] How to call a service from custom Java code

    Hi all,
    I'm wondering what the best method is to call a standard service from custom Java code?
    In a specific situation iDoc script is extended with custom functions with a custom component. There's Java code mapping to these functions that is executing these functions. The iDoc script functions are called from a workflow entry script.
    In the Java code that runs when the custom iDoc functions are called, I want to call a standard Content Server service. I don't think that the m_service variable is available, so filling the binder and using m_service.executeService() probably isn't possible.
    Also, if it were possible (that is, if I want to call a standard service from my own custom service Java code), what would then be the best method to do so?
    Regards, Stijn

    Hi Sapan,
    Let me explain a bit further.
    I'm an UCM consultant trying to solve a problem that occured at a client when they installed the CS10gR35CoreUpdateBundle.
    Content items are entered into a Workflow when they are checked in. Part of one of the entry scripts of the a workflow step is that related content to the content item in the workflow is (re)submitted for conversion.
    To achive this, a custom component provides an iDoc script extension. This iDoc function (resubmitForConversion) is implemented in Java (the class extends ScriptExtensionsAdaptor).
    In this Java method, first the related content items are fetched. Then the service RESUBMIT_FOR_CONVERSION should be called for all dID's in of the related content.
    Thus, at a certain point in the custom Java code, a native Content Server service must be called. Of course the class of this Java code does not extend the Service class, so the m_service object isn't available.
    The thing is: before installed the 10gR35CoreUpdateBundle everything worked OK. This code was used to execute the service:
            Workspace workspace = CommonUtils.getSystemWorkspace();
            String cmd = binder.getLocal("IdcService");
            if (cmd == null) throw new DataException("!csIdcServiceMissing");
            ServiceData serviceData = ServiceManager.getFullService(cmd);
            if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
            Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
            UserData fullUserData = CommonUtils.getFullUserData(userName, service);
            service.setUserData(fullUserData);
            binder.m_environment.put("REMOTE_USER", userName);
            ServiceException error = null;
            try {
                service.setSendFlags(true, true);
                service.initDelegatedObjects();
                service.globalSecurityCheck();
                service.preActions();
                service.doActions();
                service.postActions();
                service.updateSubjectInformation(true);
                service.updateTopicInformation(binder);
            } catch (ServiceException e) {
                error = e;
            } finally {
                service.cleanUp(true);
                if (!CommonUtils.isWorkspaceConnectionInTransaction(workspace)) {
                     workspace.releaseConnection();
            }the first problem was that the CS began to complain that a transaction was started within another transaction. So I suspect that the 10gR35 update wrapped a transaction around a workflow script entry.
    With some decompiling I figured out how a service is called from iDoc with the <$executeService()$> command. So I replaced the code above with:
                  String cmd = binder.getLocal("IdcService");
                ServiceData serviceData = ServiceManager.getFullService(cmd);
                if (serviceData == null) throw new DataException(LocaleUtils.encodeMessage("!csNoServiceDefined", null, cmd));
                Workspace workspace = CommonUtils.getSystemWorkspace();
                Service service = ServiceManager.createService(serviceData.m_classID, workspace, null, binder, serviceData);
                UserData fullUserData = CommonUtils.getFullUserData(userName, service);
                service.setUserData(fullUserData);
                binder.m_environment.put("REMOTE_USER", userName);
                service.initDelegatedObjects();
                service.executeSafeServiceInNewContext(cmd, true);This solved the transaction problem but introduces another problem: !csUnableToResubmitItem,(null)!csIllegalScriptAccess,RESUBMIT_FOR_CONVERSION
    The Service Reference Guide says that the access level for RESUBMIT_FOR_CONVERION is 33 (Read, Scriptable). However, in shared/config/resources/std_services.htm the access level is specified as 2 (write).
    Thus, my question still is:
    What is the best method to call a standard Content Server service from any Java code (so without extending the Service class, or having the m_service object available)?

  • Error when a TS step has a condition to check for custom variable. Variable is set on the collection.

    SCCM Version = SCCM 2012 R2 CU3
    Background
    I would like to setup some sort of safety check to help prevent accidentally sending and OSD out to all the servers managed by SCCM. The solution I am trying to use is making the TS do a check for a custom variable. If the variable is NOT set to TRUE
    then it should reboot the machine back to the currently installed OS.
    The variable is called "AllowOSD"
    AllowOSD is set correctly on my "Test Servers" collection
    I'm using the built in "Reboot Computer" step in the TS
    The condition on the Reboot Computer step is very basic - "Task Sequence Variable AllowOSD is not equal TRUE".
    I am testing the TS on a VM guest (Hyper-V)
    I'm deploying via PXE for these tests...
    The Issue
    As soon as the TS starts I get the annoyingly generic 0x80004005 error - smsts.log posted on github -
    smsts.log-A
    Possibly related issue:
    I have a vbscript that prompts for, and sets, the computer name. This works fine if placed after the format disk step, but if I place it before the format disk step then I get error 0x800700A1. If I format the internal HD first then I don't get an error
    and it all works fine.
    smsts.log posted on github - smsts.log-B
    Be aware VM_1 and VM_2 have unformatted disks (vhdx). I don't want them to be formatted before checking that the task sequence should really be running in the first place. As already mentioned, I am trying to prevent someone wiping out a bunch of servers
    by accident.
    My Task Sequences are based on the defaults created by the wizard. Here are the step I'm using...
    * Reboot if AllowOSD is not TRUE
    Restart in Windows PE
    * set Computer Name
    Partition DIsk 0 - DIOS
    Partition Disk 0 - UEFI
    Install Operating System
    Apply Windows Settings
    Apply Network Settings
    Setup Windows and Config Manager
    * = steps I have created.
    All other steps are defaults as created by wizard.
    Please note the "Restart in Windows PE" step does a conditional check on "_SMSTSInWinPE" without any errors. it is looking like the use of custom variables is not supported until the local HD is formatted and mounted. Can
    anyone confirm this behaviour, or what I can do to get around this problem.
    I have tried using a vbscript but triggering a reboot from VB does nothing, hence using the Reboot Computer step in the TS.
    Thanks
    "Well I'm all out of ideas." - 85

    As others have stated, your options are limited the moment you rely on PXE and WinPE but I think all you need to do is refine your collection target a bit.
    Why not instead of deploying your TS to All Systems (which is what I'm guess you're doing) and trying to put a condition in, deploy to a collection that is based on a workstation collection then include unknown computers?  Then any "known workstation"
    will have a MAC stored and thus be permitted to use the TS, unknown machines will be as well ... but "known servers" will be blocked?
    COnsidering the PXE looks for permitted MAC addresses this should work (Ill try it in my own lab).
    Tested and verified:
    Simply create a collection with a parent collection of all systems.
    Add a workstation query:
    select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client from SMS_R_System where SMS_R_System.OperatingSystemNameandVersion LIKE "%Workstation%"
    Then "include" unknown computers.
    End result is any machine that has "server" in it's version that has already been deployed will not be able to use the deployment.  If you'd rather base existing computer on an OU or group membership just modify the first query how you see fit.
     This will let known workstations (or whatever) and unknown machines get deployed to ... but known machines NOT in that collection will be skipped.

  • Customer/Vendor Code in Form Settings

    Hello everyone,
    I'm facing a strange problem. When I want to add an extra column (Customer/Vendor Code) using form settings in the list of A/R Invoices, the system is displaying Customer/Vendor name instead of the code. When I use the View System Information, the CardCode is displayed at the bottom of the screen. This is happening in all sales documents. I tested this issue in different versions (2007A, 8.8 and 8.81), but the same problem exists.
    Please any idea? Thank you.

    Hi Nadia.....
    At every Form Setting you find Restore Default Button at the bottom.
    Please press that button and then try to see the same you trying to see.......
    Hope this will solve your problem.........
    Regards,
    Rahul

  • Custom variable of filename, omitting certain characters

    I am interested in creating a custom variable where I can edit the document name.  For example, my document is called "Myfilename_001.indd".  I wish to omit everything except for the "001" because that is the version number of my file, and I want that to be the output.  Is this possible somehow?  Or would I need a script to help do this?  Ideally, it would be nice to do it in a way where only the last three characters of the document, sans extension, are the output (if this makes any sense)
    Thanks in advance
    -Tommy

    Hi Tommy,
    This is currently not possible via the Text Variables in InDesign.
    With scripting you can do it but it won't remain live, i mean it would work for the current name of the document, but if you change the document you might need to run the script again beacuse that way you would be putting plain text in there.
    WIl doing this just once solve your problem?
    -Javed

  • How do I...Mimic Replacement Path with Query using Customer Variable Exits?

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

    My appologies-I posted this message with the wrong subject. I will repost it with appropriate subject.
    dave schuh

  • Variable code in ZXRSRU01 Include

    Hi,
    I created the following code in ZXRSRU01 Include for a custom variable 'YFBV_027':
    WHEN 'YFBV_027'.
    CASE i_step.
      WHEN '2'.
          concatenate sy-datum(6) '01' into datum.
          datum(4) = datum(4) + 1.
          l_s_range-low = datum.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          APPEND l_s_range TO e_t_range.
          CLEAR l_s_range.
    endcase.
    The question is: Why I cannot introduce <b>l_s_range-opt  = 'LT'</b>, but only 'EQ'?
    The error message is:
    00010004    AError for variable  in customer enhancement YFBV_027    
    Thanks for your help.

    Hi Claudia,
    Is your variable single entry?

  • Formatting of Custom Variable (Price Value)

    Hi Guru's,
    I'm using one custom variable to store the Value (Price) .
    The Value is with 9 digits after the Decimal Place, The Domain was created by me.
    The Variable type is 20 Characters with 9 Decimal Places.
    I'm using this variable in displaying the Price Value.My Problem the value is apppearing as
    123456.000000000.
    But i want to display the Value as 123,456.000000000.
    I tried to use the FM Conversion_Exit_Alpha_Input, but i'm getting the Dump(Run time Error).
    How to get the Formatting done????
    Thanks in advance.
    Adi.

    use
    WRITE var CURRENCY <currency key of type waers>
    or WRITE var CURRENCY 'USD' "or any other currency type
    кu03B1ятu03B9к.

  • Bex  Custom variable exit

    Hi BW Folks,
    I need to build a Bex Variable fiscal year/period that when the
    var 1: user enters the value
    var 2: custom exit that will get me the data for current quarter
    Q1[1,2,3]  Q2 [4,5,6]  Q3[7,8,9] Q4 [10,11,12]
    e.g.: User enters 008.2007 then the current quarter will be Q3 (7+8)
    e.g.: User enters 010.2007 then the current quarter will be Q4.(only 10)
    Any suggestions will be reciprocated with lots of points.
    thanks

    1. Create Customer Exit Variable on your Calender Quarter IO with accepting Select Options (not ready for Input).
    2. Create User Exit Variable code in CMOD. 
    IF I_STEP = 2.
    case <u>'VAR 2'</u>
      SORT I_T_VAR_RANGE BY VNAM.
      READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
                              WITH KEY VNAM = <u>'User Enter enabled Variable i.e. VAR1'</u> BINARY SEARCH.
      IF SY-SUBRC = 0.
        if LOC_VAR_RANGE-LOW+4(3) <= 003.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'BT'.
          L_S_RANGE-LOW = '001'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW+4(3).
         APPEND L_S_RANGE TO E_T_RANGE.
      elseif LOC_VAR_RANGE-LOW4(3) > 003 and LOC_VAR_RANGE-LOW4(3) <= 006.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'BT'.
          L_S_RANGE-LOW = '004'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW+4(3).
         APPEND L_S_RANGE TO E_T_RANGE.
      elseif LOC_VAR_RANGE-LOW4(3) > 006 and LOC_VAR_RANGE-LOW4(3) <= 009.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'BT'.
          L_S_RANGE-LOW = '007'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW+4(3).
         APPEND L_S_RANGE TO E_T_RANGE.
      elseif LOC_VAR_RANGE-LOW+4(3) > 009.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'BT'.
          L_S_RANGE-LOW = '009'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW+4(3).
         APPEND L_S_RANGE TO E_T_RANGE.
       endif.
        ENDCASE.
      ENDIF.
    try this and let me know.
    Nagesh Ganisetti.
    Assign points if it helps.

  • OK Codes for Custom T Codes in BDC

    Hi,
    We were trying to post an IDOC through a CUSTOM T-CODE developed as per requrement. For this purpose we are using a BDC recording for posting the IDOC.
    However in case of Sales Order with multiple line item we need to Scroll down and the OKCodes (P+ and /00 as per the recording) for the same is not working.
    Anyone with any experience regarding the OK Codes and BDC, could you please help.
    Thanks

    Hi,
    The problem is that we are not Creating Sales Order through this CUSTOM TCode. We are creating it thought a BAPI only.
    After The sales order has been created, we are doing the Shipment and Delivery through this Custom TCODE and hence need the OKCODE for the Scroll in case of MULTIPLE LINE ITEMS in Sales Order.
    Do the OK Codes vary based on the TCodes(if it is a Custom TCode or a standard)?
    Also have tried running the recording again and the OkCode (/00) recorded does not work when it is rerun in the forground or Background.
    Any help/ opinion on the same is welcome.
    Thanks

  • Customer Exit Code Error

    Hi All,
    i have an issue while executing customer exit code for a query.
    Its giving the following error
    WValue "07.2010" is too long for variable Z_RAPMONTHS
    EValue "07.201" for user-exit variable Z_RAPMONTHS is invalid
    EVariables contain invalid values.
    I>> Row: 82 Inc: LRRMSU13 Prog: SAPLRRMS
    ASystem error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
    Requiremnt is: variable value should corresponds to last six months including current month (six months in total), e.g.  if we execute the report today (December month) the desired value should be 07.2010 - 12.2010.
    code which i have written is:
    when 'abc'.
        DATA: curr_month(2) TYPE n,
              calc_month(2) TYPE n,
              curr_year(4) TYPE n,
              prev_year(4) TYPE n.
        CLEAR:curr_month,curr_year,prev_year.
        if i_step eq 1.
          curr_month = sy-datum+4(2).
          curr_year = sy-datum+0(4).
          if curr_month = '01'.
            calc_month = curr_month + 7.
            prev_year = curr_year - 1.
           CONCATENATE calc_month '.' prev_year INTO l_s_range-low.
          else.
            calc_month = curr_month - 5.
          CONCATENATE calc_month '.' curr_year INTO l_s_range-low.
         else.
         l_s_range-low = lv_zp0003_year.
            ENDIF.
      CONCATENATE curr_month '.' curr_year INTO l_s_range-high.
          IF l_s_range-low = l_s_range-high.
              l_s_range-opt = 'EQ'.
            ELSEIF l_s_range-high IS INITIAL.
              l_s_range-opt = 'EQ'.
            ELSEIF l_s_range-low LT l_s_range-high.
              l_s_range-opt = 'BT'.
            ENDIF.
            l_s_range-sign = 'I'.
            APPEND l_s_range TO e_t_range.
    Can any one please let me where i am doing the mistake.
    Thanks & Regards.
    AKG

    remove the '.' from the below concatenate statements.
    CONCATENATE calc_month '.' curr_year INTO l_s_range-low.
    CONCATENATE curr_month '.' curr_year INTO l_s_range-high.
    use the code as
    CONCATENATE calc_month curr_year INTO l_s_range-low.
    CONCATENATE curr_month curr_year INTO l_s_range-high.

  • Customer Exit Code

    Hello Folkes,
    Could some one explain the below code step by step.
    Is there any documentation explaining about L_S_RANGE-LOW ,L_S_RANGE-HIGH, etc How they are related to the customer variable. Please give your suggestions.
    Lets assume variable ZVAR1 is on fiscal year:
    and Lets assume variable ZVAR2 is on fiscal period:
    WHEN 'ZVAR2'.
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZVAR1'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-LOW+4(2) = '01'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-HIGH+4(2) = '12'.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDIF.
    Regards
    -R

    Hi Rajesh,
    The situation looks for me as following.
    You have a query where the result is shown for the whole fiscal year (fiscal periods from 001 to 012 - most likely with K4 fiscal year variant).
    Since you don't want to manually change the structure of the query (the reporting year) from year to year, you implemented the reporting year variable ZVAR1.
    The user just enters the reporting fiscal year into variable ZVAR1, let's say 200X. The customer exit variable ZVAR2 (of range type) should return the range of fiscal periods to be applied, from 200X01 to 200X12.
    So, the code does the following.
    When the system executes a query containing ZVAR2 (WHEN 'ZVAR2' statement) after the user enters the variable value (IF I_STEP = 2 statement), it searches among the all entered variables values the reference to ZVAR1 variable (LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZVAR1'. statement).
    If the system finds it, it tooks the four digits of the entered date (it's the entered year) and adds to it 01 for the low range limit (L_S_RANGE-LOW4(2) = '01'. statement) and 12 for the higher range limit (L_S_RANGE-HIGH4(2) = '12'. STATEMENT) returning in the customer exit variable a range of fiscal periods from 01 to 12 of the reported year.
    The statement L_S_RANGE-OPT = 'BT'.
    means that low and high values of the returned range should be treated as BeTween option, and
    the statement L_S_RANGE-SIGN = 'I'
    means Inclusive.
    So, the variable ZVAR2  returns its range value: BeTween 01 period of the entered year (through ZVAR1) till 12 period of the same year Inclusively.
    It's simple. There is no need to write any documents or howtos.
    For more details you can execute the SMOD t-code in English choosing:
    enhancement = RSR0001
    object components = Documentation
    and pressing Display button.
    Hope it helps.
    Eugene
    The (your) query has a variable that limits the fiscal periods (most likely in columns).

Maybe you are looking for

  • Unable to Login SQL server management studio:sql server 2005

    Hello All, I am unbale to login SQL server management studio with below scanario: Server Type:Database Engine Server Name:XXX Authntication:Windows Auth After enter "Connect : button below eeror is displaying Error:"Canot connetc to XXX server Additi

  • Which object's monitor does a synchronized method acquire?

    from the Java Tutorial for concurrency programming: " When a thread invokes a synchronized method, it automatically acquires the intrinsic lock _for that method's object_ and releases it when the method returns. The lock release occurs even if the re

  • Pop Up Problems with all browsers and operating systems

    I have a website that uses pop up windows in several areas. They have worked fine for over two years. All of a sudden none of my popups work. I tested on both a mac and a pc and on firefox, explorer and safari. Pop up blocker has nothing to do with t

  • A script is  needed

    hi i need to feel this table with '#' sign at a certain place showing up with a nice tween. than i need to switch each one in a differnt frame into to a number. 100 '#' turn into a 100 numbers in arround 5-7 sec. i was trying to make #_mc symbol than

  • Integration between FI & PP modules

    Hello guru's, can any one of you explain the integration between FI & PP modules? at wht point of time accounting documents would be generated? Please give the t.code for the same? thanks in advance rgds,