Returning string thru a Customer Exit

Hi,
I have a requirement where i need to do a comparison between 2 Fiscalperiod fields and return a string accordingly.
Logic: If( Year/Month < Cur Year/Month) return "Period" else return Year/Month
Is this possible using customer exits? If not, how else can i handle it at the report level?
Thanks,
Arun KK

Hi,
I have a requirement where i need to do a comparison between 2 Fiscalperiod fields and return a string accordingly.
Logic: If( Year/Month < Cur Year/Month) return "Period" else return Year/Month
Is this possible using customer exits? If not, how else can i handle it at the report level?
Thanks,
Arun KK

Similar Messages

  • Need Avg sales for 90 fiscal days - thru customer exit or Offset  ? ? ? ?

    Hi Frns!
    My current report generates daily sales for fiscal period using a customer exit variable A.
    My requirement now is to have one more column having Average sales for 90 prior fiscal days when i enter a fiscal period thru the same variable A.
    As the customer exit variable is of Selection Options, I'm unable to create Offset for the same.
    Guyz do need ur help on this urgently.
    Cheers! Shana

    Any updates !!!!!!!!!!!!!

  • Return Custom Exit Code

    Hello Experts,
    We are using Wise Script Wrappers to run Microsoft Updates (KB). Wise Script has Exit Installation Command through which we can control the Custom Exit codes return by the setup (Wrapper) .
    Case 1
    In our case when we use shutdown.exe at the end  after installation of KB's to reboot the machine the exit code reflected in sccm is 0 though we set Exit code 100 in Wrapper.
    Case 2
    When we dont reboot at the end of installation that is we dont use Shutdown.exe the Exit code return is 100.
    We cannot use Config manager restarts computer due to our business needs
    So Any help will be appreciated on how we can  control the custom exit codes
    Thanks,
    Apppack

    So the real question is why are you using non-standard exit codes?If you do non-standard things, you will get non-standard results.
    As Jérémy pointed out 3010 means "The requested operation is successful. Changes will not be effective until the system is rebooted." There are actually other standard error codes that indicate a pending reboot also but 3010 is the most common. A complete
    list of standard error codes is available at http://msdn.microsoft.com/en-us/library/cc231199.aspx.
    Jason | http://blog.configmgrftw.com

  • Customer Exit Variable - Variable Value Error BRAIN 000

    I created a variable which is processed by 'Customer Exit'. This variable is 'optional' and NOT user input required.
    And i have written my code in customer exit under I_STEP EQ 1.
    I used the variable in my query as a default value for a free characteristic.
    The query runs fine and return me the correct result.
    The problem is when i used the same variable as a default value of a free characteristic in another query which has another user input variable for another characteristic, i got a warning message after input a value for another variable.
    Variable Value Error BRAIN 000 <<i>my variable name</i>>
    How to make it work in the second query?
    Please help as I am new to this.
    Thanks,
    CH

    Hi Fernanda,
    Try this:
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  fst_date LIKE sy-datum.
       CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    fst_date = sy-datum - 1.
    concatenate fst_date(6) '01' into ls_ra_sid-low.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.
    Just post here for any queries..
    Regards,
    Loed

  • Customer exit for calweek is not working

    Hi,
    I have written a customer exit to derive calweek from a calday. But its not displaying the correct value.
    Can u please let me know if there is any error in the code.  The return value for calweek is a single value.
    CASE I_VNAM.
    WHEN 'zfclweek'.
    DATA : zday like sy-datum.
    IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO L_S_VAR
          WHERE VNAM = 'ZFCLDAY'. ((ZFCLDAY  is also a customer exit to derive date and its working fine )
    ENDLOOP.
            zday = L_S_VAR-LOW .
            zday = zday + 1.  ( i need week of the next day of ZFCLDAY )
    CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
              DATE               = zday
           IMPORTING
              WEEK               = xweek
          EXCEPTIONS
           DATE_INVALID       = 1
    OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low  = xweek.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          append l_s_range to e_t_range.
    exit.
        endif.
        clear l_s_range.
        clear zday.
        clear xweek.
    endcase.

    Hi,
      I have changed my code as follows. But when i run the report its showing, "variable contains invalid values :
    please do me the needful.
    CASE I_VNAM.
    WHEN 'zfcweek'.   " it is a customer exit variable on calweek
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO L_S_VAR
    WHERE VNAM = '0fper'.    " curent fiscal period
    endloop.
    YEAR = L_S_VAR-LOW+0(4) .
            PER = L_S_VAR-LOW+4(3).
            IF per = 01.
                 per = 12.
                 year = year - 1.
             else.
            PER = PER - 1.
            endif.
            CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'   " need to calculate first day of last fiscal period
              EXPORTING
                I_GJAHR              =  YEAR
                I_PERIV              = 'Z1'
                I_POPER              = PER
      I_MONMIT             = 00
             IMPORTING
               E_DATE               =   FDAY.
    EXCEPTIONS
      INPUT_FALSE          = 1
      T009_NOTFOUND        = 2
      T009B_NOTFOUND       = 3
      OTHERS               = 4
            IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
            ENDIF.
            CALL FUNCTION 'DATE_GET_WEEK'                  " to calculate the calweek of the first day of last fiscal period
            EXPORTING
              DATE               = FDAY
           IMPORTING
              WEEK               = xweek
           EXCEPTIONS
             DATE_INVALID       = 1
    OTHERS             = 2
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          l_s_range-low  = xweek .
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          append l_s_range to e_t_range.
        endif.
        clear l_s_range.
        clear year.
        clear fday.
        clear per.
    endcase.

  • Changes to Variable in Customer exit

    Hi Experts,
    We have two variables in the ready for input query.
    First  Variable : Customer exit variable which gets populated based on user login details.
    Second Variable: Input ready variable. The values  will be populated depending on the first variable.
    Suppose the  user belongs to Sales Org India, the first variable will be populated in the back ground  with value IND.
    So the second variable(input ready) on  sales hierarchy   shows the available values only for INDIA in the format   Region->State->city etc  .
    Now the problem is, even the user selects city  in the second variable, the  result set is being locked at the INDIA level  . As a result the other  users are not allowed to lock the data  even if they select any other city.
    Is it possible to delete value of the First variable  in the customer exit after the user input the value for the second variable ?
    I mean the  Sales org should be set to  empty after the user input to the second variable, so that the lock will apply at the region /city level .
    Please let me know If I can provide any more information.
    Thanks and regards,
    Babu v

    Hello,
    Pl see if you can use first variable as authorisation variable
    and second variable as i_step =2 as follows
    INCLUDE ZXRSRU01 *
    Enhancement: MultiProvider using InfoProvider Variable
    include YBW_INFOPROVIDER_VARIABLE.
    *& Include YBW_INFOPROVIDER_VARIABLE *
    DATA:
    ls_var TYPE rrs0_s_var_range,
    ls_range TYPE rsr_s_rangesid,
    l_contained TYPE c,
    ls_mapping TYPE ybw_mapping,
    lt_mapping TYPE TABLE OF ybw_mapping.
    Called after variable popup
    IF i_step = 2 AND i_vnam = 'INFOPROV'.
    - 13 -
    Read mapping table
    REFRESH lt_mapping.
    SELECT * FROM ybw_mapping INTO TABLE lt_mapping.
    Process all selection for country variable
    REFRESH e_t_range.
    LOOP AT i_t_var_range INTO ls_var WHERE vnam = 'S_COUNT'.
    Process all mapping rules
    LOOP AT lt_mapping INTO ls_mapping.
    Always fill LOW and HIGH, Otherwise logic below will not work
    IF ls_mapping-high IS INITIAL.
    ls_mapping-high = ls_mapping-low.
    ENDIF.
    Check if selection is contained in the defined InfoProvider
    CLEAR l_contained.
    CASE ls_var-opt.
    WHEN 'EQ'.
    IF ls_var-low BETWEEN ls_mapping-low AND ls_mapping-high.
    l_contained = 'X'.
    ENDIF.
    WHEN 'BT'.
    IF ls_var-low <= ls_mapping-high AND
    ls_var-high => ls_mapping-low.
    l_contained = 'X'.
    ENDIF.
    ENDCASE.
    Add InfoProvider to return table
    Note: Use COLLECT to avoid duplicates
    IF l_contained = 'X'.
    CLEAR ls_range.
    ls_range-sign = 'I'.
    ls_range-opt = 'EQ'.
    ls_range-low = ls_mapping-infoprov.
    COLLECT ls_range INTO e_t_range.
    ENDIF.
    ENDLOOP. " lt_mapping
    ENDLOOP. " i_t_var_range
    EXIT.
    ENDIF.
    Thanks and regards

  • SAP BEx Customer Exit

    Hi Gurus,
    I've implemented the code below for my report to display Required Start Date (MM/DD/YYYY) by searching and processing either a single Fiscal Year/Period (PPP/YYYY to PPP/YYYY) input or a range/interval Fiscal Year/Period (PPP/YYY) input. The details are,
    1) Created 1 User Entry Interval Mandatory Variable under Fiscal Year/Period InfoObject (Display) - ZFYP_IN
    2) Created 1 Customer Exit Interval Mandatory Variable under Required Start Date InfoObject (Output) - ZRSD_CX
    *&  Include           ZXRSRU01
    DATA: L_S_RANGE1 TYPE RSR_S_RANGESID,
          L_S_RANGE TYPE RSR_S_RANGESID,
          LOC_VAR_RANGE TYPE RRS0_S_VAR_RANGE,
          ZYEAR TYPE T009B-BDATJ,
          ZMM TYPE T009B-POPER,
          ZMM1 TYPE T009B-POPER,
          ZYEAR1 TYPE T009B-BDATJ,
          ZSTARTDATE TYPE SY-DATUM,
          ZENDDATE TYPE SY-DATUM.
    IF I_STEP = 2.
    CASE I_VNAM.
    **To populate ZCURDAY with current system date**
       WHEN 'ZCURDAY'.
        CLEAR: L_S_RANGE1.
        L_S_RANGE1-LOW    = SY-DATUM.
        L_S_RANGE1-SIGN   = 'I'.
        L_S_RANGE1-OPT    = 'EQ'.
        APPEND L_S_RANGE1 TO E_T_RANGE.
    **To Lookup ZREQSTDAT with 0FISCPER*************
    **This loop will capture the Fiscal Year/Period range input by the user**
       WHEN 'ZRSD_CX'.
        READ TABLE i_t_var_range WITH KEY VNAM = 'ZFYP_IN'
          INTO LOC_VAR_RANGE.
        IF SY-SUBRC = 0.
           CLEAR L_S_RANGE.
    **This 2 call functions are used to convert the Fiscal Year/Period range into**
    **Calendar Day range for use on further lookup in Required Start Date**
           ZYEAR = LOC_VAR_RANGE-LOW(4).
           ZMM = LOC_VAR_RANGE-LOW+4(3).
           CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
             EXPORTING
               I_GJAHR              = ZYEAR
             I_MONMIT             = 00
               I_PERIV              = 'SC'
               I_POPER              = ZMM
             IMPORTING
               E_DATE               = ZSTARTDATE.
           IF ZMM EQ 012.
              ZMM1 = '001'.
              ZYEAR1 = ZYEAR + 1.
           ELSE.
              ZMM1 = ZMM + 1.
              ZYEAR1 = ZYEAR.
           ENDIF.
           CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
             EXPORTING
               I_GJAHR              = ZYEAR1
             I_MONMIT             = 00
               I_PERIV              = 'SC'
               I_POPER              = ZMM1
             IMPORTING
               E_DATE               = ZENDDATE.
           ZENDDATE = ZENDDATE - 1.
    **A third and final function to use the calendar day range provided to lookup on matching**
    **dates in Required Start Date (ZREQSTDAT)*************************************************
           L_S_RANGE-SIGN  = 'I'.
           L_S_RANGE-OPT   = 'BT'.
           L_S_RANGE-LOW   = ZSTARTDATE.
           L_S_RANGE-HIGH  = ZENDDATE.
           APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    ENDCASE.
    ENDIF.
    However, after doing extensive testing I discovered that the code is only able to process 1 period at a time versus an interval of periods as required.
    For example,
    Input Fiscal Year/Period Interval - 001/2011 to 004/2011
    Expected returned dates - 02/27/2010 to 07/02/2010 (4 periods)
    Actual returned dates - 02/27/2010 to 04/02/2010 (only 1 period, the 1st period and not the balance 3 periods)
    Only the first period is returned versus the periods entered. I'm not sure what is missing from the code to process the entered interval.
    Appreciate any help provided.
    Warm regards,
    Eric

    Hi,
    After looking your code, I think the problem is at the below mentioend part.
    WHEN 'ZRSD_CX'.
    READ TABLE i_t_var_range WITH KEY VNAM = 'ZFYP_IN'
    INTO LOC_VAR_RANGE.
    IF SY-SUBRC = 0.
    CLEAR L_S_RANGE.
    **This 2 call functions are used to convert the Fiscal Year/Period range into**
    **Calendar Day range for use on further lookup in Required Start Date**
    ZYEAR = LOC_VAR_RANGE-LOW(4).
    ZMM = LOC_VAR_RANGE-LOW+4(3).
    Here, you should put validation like this.
    If not LOC_VAR_RANGE-LOW is initial.
          If not LOC_VAR_RANGE-HIGH is initial
              ZYEAR = LOC_VAR_RANGE-HIGH(4).
              ZMM = LOC_VAR_RANGE-HIGH+4(3).
             else.
              ZYEAR = LOC_VAR_RANGE-LOW(4).
              ZMM = LOC_VAR_RANGE-LOW+4(3).
    endif.*
    else.
    put a validation to see that some input is given for fiscal year
    endif.
    only after these lines go for your function modules. This way, if your variable has range given, it would calculate till the higher range given for fiscal period.
    Edited by: Rahul K Rai on Jul 15, 2010 11:17 AM
    Edited by: Rahul K Rai on Jul 15, 2010 11:18 AM

  • Query variable type Customer Exit problem

    Hi All,
    I need to set a Profit Center variable value by Customer Exit. My Exit has to results a Profit Center Hierarachy NODE value. The problem is that the Query handles my return value as a single Profit Center (10 char long) but my Profit Center Nodes are longer than 10 characters and they are truncated to 10 chars. Therefore I get an error message, namely 'XYZ... PC is not exists in PC Hierarchy ABC...'
    How can I set that the Query or the code to get my result value not as a Profit Center but a Profit Center Hierarchy NODE?
    Thanks in Advance,
    Dezso

    Hello,
    Yes, I have set the right Hierarchy. If I change the PC variable to 'Characteristic variable' and set it on the selection screen everything is OK so the Hierarchy is good.
    Thanks,
    Dezso

  • Customer Exit IMRC0001 for condition based preventive maintenance

    Dear Experts,
    I am using customer Exit IMRC0001 for creating maintenance order if my measuring point reading exeeds the thresold value or it is  out of the upper and lower limit range , which i have set for that particular Measuring point.
    This scenario is working fine if i am creating measuring point with unit *C (Degree centigrade-Temp).
    But it is not working fine for measuring point having unit other then *C
    Like : Kg/Cmsq, Bar, Run Hr, Vaccum, voltage, current, consumption etc
    The Reason for this i have found out.The logic return in the program only considers the *C unit
    Say if i set 50c as my target value in Measuring point*
    In Table IMPTT the value is getting stored as 50 + 273.15 = 323.15
    But if i enter 5 Ohm as my target value in Measring point
    In Table IMPTT the value is getting stored as 5 only.
    Target Value field name is DESIR
    So i want to know why for some units the same value is getting stored and why for some units value with some formula getting stored.
    Regards,
    Amar Jadhav

    does your characteristic allow decimals??
    also why not use deg K instead of deg C
    ignore above
    see note 525948
    Symptom
    When you change the target value of a measuring point, it seems as if the system updates incorrect values for the 'Target value' field in the change documents.
    Other terms
    IK02, IK03, IMPT
    Solution
    The internal display of field 'Measuring Point Target Value' has the SI unit belonging to the unit of measurement.
    Example:
    For temperatures, the target value can be displayed in the user interface (RIMR0-DESIC) in the units of measurement Celsius, Fahrenheit or Kelvin. However, the database display in field IMPTT-DESIR always refers to the respective SI unit Kelvin.
    As the change documents always refer to the database display, they also refer to the SI unit.
    Edited by: Virendra Pal on Oct 1, 2008 2:34 PM

  • User or customer exit for ME21N

    Hi all,
    I have to make a check before saving the Purchase order thru ME21N. Is there any user exit or customer exit available to do this check? Plz clarify.
    Regards,
    Steve

    Hi
    Use the BADI ME_PROCESS_PO_CUST
    see the sample code and the doc for BADI
    BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment
    Definition Name: ME_PROCESS_PO_CUST
    Interface Name : IF_EX_ME_PROCESS_PO_CUST
    Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN
    Method :            PROCESS_HEADER
    METHOD if_ex_me_process_po_cust~process_header .
      DATA : re_data TYPE mepoheader.
    *get the item data
      CALL METHOD im_header->get_data
        RECEIVING
          re_data = re_data.
      re_header = re_data.
      IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).
        IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).
          IF re_data-bukrs NE '1001'.
            MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'
                                            'Code for External Procurement'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    Method :            PROCESS_ITEM
    METHOD if_ex_me_process_po_cust~process_item .
      DATA: v_menge TYPE bamng,   " PR Quantity
            v_statu.              " PR Status
      DATA : re_data TYPE  mepoitem,
           re_data1 TYPE mepoaccounting,
    re_accountings TYPE purchase_order_accountings ,
    header TYPE purchase_order_accounting.
    *get the item data
      CALL METHOD im_item->get_data
        RECEIVING
          re_data = re_data.
      IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).
        IF re_header-bsart EQ 'ZRL'.
          IF re_data-konnr EQ space.
        MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'
                                              'without a reference to Outline Agreeement'.
          ENDIF.
        ENDIF.
        IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'
                                                         'only with reference to a PR or RFQ'.
        ENDIF.
        IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .
          IF syst-cprog EQ 'RM_MEPO_GUI'.
            IF re_data-uebto IS NOT INITIAL OR
               re_data-uebtk IS NOT INITIAL OR
               re_data-untto IS NOT INITIAL.
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Search instring value of Variable in customer exit of bex report

    Hello experts-
    I have a situation where I need to search the records based on value  of a variable input in selection screen of bex report and according to that i need to show the results in report.
    Ex- if we have a material characteristics on selection screen,or material number has 10 digits(eg 1234567809). so the user will only type 2-3 digit(i.e 12) on selection screen, In this case I want only those records to be displyed, for which material has these 2 digits in it .
    Eg would be:
    1234567809,
    3451267809,
    9807654312.
    Could you please suggest ABAP logic for the above. Properties of variable and how many variable we have to create.
    Regards,
    Yatendra

    Hello Vineet,
    we have tried putting  ' * ' i n place of '=' in drop down screen.
    we have also tried customer exit code, please check below.
       WHEN 'ZSEARCH'.
         data: lv_string type string.
         data: wa_test type ZTEST_TOOLING.
    if I_STEP = 2.
         LOOP AT i_t_var_range INTO loc_var_range
                   WHERE vnam = 'ZTSEARCH'.
              CONCATENATE '' loc_var_range-low '' INTO L_S_RANGE-LOW.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'CP'.
              APPEND L_S_RANGE TO E_T_RANGE.
         ENDLOOP.
      endif.
    In  this code we have created two variables 1st 'ZSEARCH' which is type of 'customer exit' , and the second one 'ZTSEARCH' type of "user entry/ default value" .
    As we need the value provided by user in  ZTSEARCH (user entry), we loop at  i_t_var_range where vnam = 'ZTSEARCH'.
    But i_t_var_range doesn't contain  ZTSEARCH variable.
    Can you please suggest in customer exit code as well as in selection option.
    Thanks
    yatendra

  • Formula Variable with customer exit

    Hi,
    can we use Formula variables with customer exit based  on characteristics(ex Bill date)? if yes, can you guys help me on this.
    Thanks
    kri

    Yes , you can use a formula variable with customer exit based on characteristics .
    Depends on the requirement what you want to show in the formula variable ,
    Eg : if you want to show the max fiscal year period , in that case :
    create a new formula in the keyfigure section of your query , go to edit , you can see formula variable below the keyfigures ,
    right click on the same and create new formula variable :
    Write the code for the formula varible in the backend as we do for normal customer exit varaible :
    for this e.g the code will be :
    FORM get_variable_value
          tables E_T_RANGE      type RSR_T_RANGESID
          using I_VNAM          type RSZGLOBV-VNAM
                I_VARTYP        type RSZGLOBV-VARTYP
                I_IOBJNM        type RSZGLOBV-IOBJNM
                I_S_COB_PRO     type RSD_S_COB_PRO
                I_S_RKB1D       type RSR_S_RKB1D
                I_PERIV         type RRO01_S_RKB1F-PERIV
                I_T_VAR_RANGE   type RRS0_T_VAR_RANGE
                I_STEP          type I.
      DATA L_S_RANGE LIKE LINE OF E_T_RANGE.
      DATA loc_var_range LIKE rrrangeexit.
    Data  : l_inPer TYPE string.
    IF i_step = 1.
    Select min( distinct FISCPER )
            from /BIC/A(DSO name)
            into l_minper  .
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        l_s_range-low = l_minper  .
        APPEND l_s_range TO e_t_range.
    endif.
    drag the formula variable in the new formula created and exexcute the query , you will be able to see the output .
    This is just an example , your code will differ as per your requirement .

  • Customer Exit Variable - Sunday of Last Week

    Hi experts,
    I have written the following code for a customer exit variable. I created a formula variable in BEx called ZV_SUNLASTWEEK. I am then returning the result of this formula variable as a calculated key figure. The expected behaviour is that based on the current date (system date) I will return the date of the sunday of the previous. For example, if I run the report today (19th Jan) I would get the 16.01.2011. However, I get 00/00/0000. Any ideas please?!
    WHEN 'ZV_SUNLASTWEEK'.
    Data: zfdcw TYPE datum.
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        date_in         = sy-datum
      IMPORTING
        date_out        = zfdcw
      EXCEPTIONS
        date_invalid    = 1
        others          = 2.
    IF sy-subrc <> 0.
    ENDIF.
    CLEAR l_s_range.
    l_s_range-low  = zfdcw - 1.
    *l_s_range-high = sy-datum.
    l_s_range-sign = 'I'.
    l_s_range-opt  = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDCASE.

    Try using the below code...
    WHEN 'ZV_SUNLASTWEEK'.
    Data: zfdcw TYPE dats,
    l_currentdate type dats,
    l_date type sy-datum.
    l_currentdate = sy-datum.
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        date_in         = l_currentdate
      IMPORTING
        date_out        = zfdcw
      EXCEPTIONS
        date_invalid    = 1
        others          = 2.
    IF sy-subrc  0.
    ENDIF.
    CLEAR l_s_range.
    l_date = zfdcw.
    l_date = l_date - 1.
    l_s_range-low  = l_date.
    l_s_range-sign = 'I'.
    l_s_range-opt  = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDCASE.
    rgds, Ghuru

  • Customer Exit implementation

    Hi I need to implement one customer exit EXIT_SAPLWRPL_001 for replenishment program with t-code wrp1.Pls can any one tell me the step by step procedure how i need to implement and activate the exit.Is it mandatory to create project in cmod? If yes how can i fing the enhancement to where this exit belongs?I required detailed description.Pls help me
    Moderator message: please don't ask for step by step guidance, do your own research for available information before asking.
    Edited by: Thomas Zloch on Nov 17, 2010 1:00 PM

    Yes, you need to create a project in CMOD.
    To find the enhancement, go to transaction SMOD, and do a search (CtrlF). Open up All Selections (ShiftF9), paste EXIT_SAPLWRPL_001 into Component Name, which then returns WRPL0001, which is the exit/enhancement that you must implement.
    When you create the project in CMOD, you must assign this enhancement to your project. In the function module, double-click on the include name to create it. Inside, you can include your code with references to the parameters of the function.

  • How to send a string thru UDP

    How can I send a string like this thru UDP:
    0x01 0x40 0x43 0x51
    Can I write it like this:
    data= 0x01, 0x40, 0x43, 0x51;
    Any help, please?

         InputStream in = null;
         HttpURLConnection urlConn =  null;
         int returnCode = 0;   
         try {
               URL url = new URL(URLEncoder.encode(urlStr));
               //Where urlStr is in the form "http://localhost/servlet/myServlet?param1=STRING TO BE PASSED"
              //Create the connection to the servlet url
               urlConn = (HttpURLConnection)url.openConnection();
               urlConn.setDoInput(true);
               urlConn.setDoOutput(true);
               urlConn.setUseCaches(false);
               urlConn.setRequestMethod("GET");
               urlConn.setRequestProperty("Accept-Language", "en");
               urlConn.setRequestProperty("content-type", "text/xml");
               in = urlConn.getInputStream();
               //Put code to read return string here
              } catch (Exception e) { System.out.println("Error : " + e); }
              urlConn.disconnect();

Maybe you are looking for

  • Mapping Error: /ns0:Messages/ns0:Message1/ns1

    Dear All, I am using N:1 Mapping in BPM Collect pattern payload dependant. System: SAP PI 7.0 SR2, SP 10. Error is as follows: "com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce targe

  • Process IDOC stuck up in TRFC

    Hi,   I have an IDOC that is still being stuck in TRFC Queue. The status shows as '03', but I can see that IDOC in the TRFC queue. It is lying there for a month. I need to process that IDOC manually so that it goes to the other system. Which transact

  • Data type and Data object

    Hi Friends,         What is the difference between Data type and Data object? Best Regards, VRV Singh

  • Zoom in frame by frame is this possible?

    trying to zoom in on a massive scale frame by frame really - is there any way of doing this? I'm trying to animate and object frame by frame - or two frames at a time

  • Disc utility not burning since latest upgrade

    The latest daylight OS 10.4.8 upgrade has somehow disabled my DVD drive to recognize a blank disc when trying to burn a .dmg from the disc utility. I've ran disk repair permission and restart, turned off OS 9 nothing seems to work. It seems that each