User exit for four quaters of a year

Hi All,
I need to write an user exit to fetch the Quater1(3 months) to Quater4 from a Calyear.
If the user enters 2008 then i want to get the sales for the 4 quaters for  an year in separate columns. I think of creating 4 restrcited KFs with the sales KF and restrict it with the four user exit variables which we fetch three months for each quaters.
Please help me to write an user exit.
Thanks,
Pallavi

Hi,
Do you have Fiscal year in cube. If you have year then you can go with the below code.
In that case create a variable for calmonth with select option and type as user exit. Then use the below code.
LOOP AT lt_var_range INTO ls_var_range WHERE vnam = 'YEARVARIABLE'.
Concatenate ls_var_range-low '01' INTO ls_range-low.
Concatenate ls_var_range-low '03' INTO ls_range-high.
ls_range-sign = 'I'.
ls_range-opt = 'BT'.
APPEND ls_range TO et_range.
CLEAR ls_range.
ENDLOOP.
If you have only calmonth in cube get the input any one of the calmonth and using below code.
LOOP AT lt_var_range INTO ls_var_range WHERE vnam = 'CALMONTHUSER ENTRY VARIABLE'.
Concatenate ls_var_range-low+0(4) '01' INTO ls_range-low.
Concatenate ls_var_range-low+0(4) '03' INTO ls_range-high.
ls_range-sign = 'I'.
ls_range-opt = 'BT'.
APPEND ls_range TO et_range.
CLEAR ls_range.
ENDLOOP.
Use this to restrict the calmonth in first key figure. In 2nd,3rd and 4th key figures use offset for low and high value and you can get the output as you expected.
Hope this helps
Regards
Akhan
Edited by: Akhan_BI on Sep 5, 2009 12:30 AM

Similar Messages

  • Abap code of user EXIT for my first post on FISCPER_CALC_MONTH or year

    *ZSIGFISCPER Exercice cumulé jusqu'à la période selectionnée par utilisateur
    TABLES: TVARVC.
    DATA: L_S_RANGE TYPE RSR_S_RANGESID.
    DATA : LOC_VAR_RANGE LIKE RRRANGEEXIT,
    v_year like T009B-BDATJ,
    v_per3 like T009B-POPER,
    v_month(3) type c,
    v_initial(7) type c,
    v_date type d,
    w_progcod like tvarvc-low.
    BREAK-POINT.
    CASE I_VNAM.
      WHEN 'ZSIGFISCPER'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            v_year = LOC_VAR_RANGE-LOW(4).
            concatenate v_year '001' into v_initial.
            L_S_RANGE-LOW = v_initial.
            L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
      WHEN 'ZSIGVFISCYEAR'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            L_S_RANGE-LOW = v_year.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
    *Sélection de la période 1 par rapport à une période sélectionnée via la variable 'ZP_FIL_FISCPER'
      WHEN 'ZVUEPER1'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            concatenate v_year '001' into v_initial.
            L_S_RANGE-LOW = v_initial.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
    *Sélection de la période 1 par rapport à une période sélectionnée via la variable 'ZSIGFISC'
      WHEN 'ZVUEPER2'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZSIGFISC'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            concatenate v_year '001' into v_initial.
            L_S_RANGE-LOW = v_initial.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
    Variables pour la requête ZSIGRQ_ZSIGMCM1_01 (Suivi des investissements)
      WHEN 'ZSIGCDR2'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            CONCATENATE v_year '01' '01' INTO v_date.
            L_S_RANGE-LOW = v_date.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
      WHEN 'ZSIGCDMS'. " Date de mise en service
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            CONCATENATE v_year '01' '01' INTO v_date.
            L_S_RANGE-LOW = v_date.
            CONCATENATE v_year '12' '31' into v_date.
            L_S_RANGE-HIGH = v_date.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
      WHEN 'ZSIGHIM'. " Hierarchie
        IF I_STEP = 1. "before the popup
          Clear v_year.
          SELECT SINGLE * FROM TVARVC WHERE NAME EQ 'ZSIG_REF_0APPR_YEAR'.
          IF sy-subrc EQ 0.
            v_year = TVARVC-low.
          ENDIF.
          CLEAR w_progcod.
          SELECT SINGLE * FROM TVARVC WHERE NAME EQ 'ZSIFVA_REF_0PROG_DEF_S'.
          IF sy-subrc EQ 0.
            w_progcod = TVARVC-low.
          ELSE.
            MESSAGE 'Variable ZSIFVA_REF_0PROG_DEF_S is missing in TVARVC' TYPE 'E'.
          ENDIF.
          CONCATENATE w_progcod v_year INTO L_S_RANGE-LOW.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            CLEAR w_progcod.
            SELECT SINGLE * FROM TVARVC WHERE NAME EQ 'ZSIFVA_REF_0PROG_DEF_S'.
            IF sy-subrc EQ 0.
              w_progcod = TVARVC-low.
            ELSE.
              MESSAGE 'Variable ZSIFVA_REF_0PROG_DEF_S is missing in TVARVC' TYPE 'E'.
            ENDIF.
            CONCATENATE w_progcod v_year INTO L_S_RANGE-LOW.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
      WHEN 'ZSIGCAC'. " version
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_month.
            v_month = LOC_VAR_RANGE-LOW+4(3).
            IF v_month LE '003'.
              L_S_RANGE-LOW = 'PLA'.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
            ELSEIF v_month LE '008'.
              L_S_RANGE-LOW = 'AC1'.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
            ELSE.
              L_S_RANGE-LOW = 'AC2'.
              L_S_RANGE-SIGN = 'I'.
              L_S_RANGE-OPT = 'EQ'.
            ENDIF.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
      WHEN 'ZSIGDDP'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZP_FIL_FISCPER'.
            CLEAR L_S_RANGE.
            CLEAR v_year.
            v_year = LOC_VAR_RANGE-LOW(4).
            v_per3 = LOC_VAR_RANGE-LOW+4(3).
            CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
              EXPORTING
                I_GJAHR              = v_year
      I_MONMIT             = 00
                I_PERIV              = 'K4'
                I_POPER              = v_per3
              IMPORTING
                E_DATE               = v_date
              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.
            L_S_RANGE-LOW = '20101231'."v_date.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
    Variable Z_DATE_REF_INF_FOUR pour caracteristique 0CALDAY
    Intervalle
      WHEN 'Z_DATE_REF_INF_FOUR'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'Z_DATE_REF_SUP_FOUR'.
            CLEAR L_S_RANGE.
            CLEAR v_date.
            v_date = LOC_VAR_RANGE-low.
           break-point.
            CALL FUNCTION 'SALP_CALC_DATE'
              EXPORTING
                IN_RECTYPE          = 'M'
                IN_NBR_DWXMQY       = '6'
                IN_DATE             = v_date
             IMPORTING
               OUT_DATE            = v_date
            EXCEPTIONS
              OTHER_ERROR         = 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.
            CALL FUNCTION 'SALP_CALC_DATE'
              EXPORTING
                IN_RECTYPE          = 'Y'
                IN_NBR_DWXMQY       = '-2'
                IN_DATE             = v_date
             IMPORTING
               OUT_DATE            = v_date
            EXCEPTIONS
              OTHER_ERROR         = 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 = v_date.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
          ENDLOOP.
        ENDIF.
    Variable Z_DATE_REF_INF_FOUR pour caracteristique 0CALDAY
    Intervalle
    Variables pour Production interne
    Intervalle
    Debut - FDUPEYROUX - 11/01/2010
      WHEN 'ZSIGPEROI'.
        IF I_STEP = 2. "after the popup
          CLEAR L_S_RANGE.
          CLEAR v_date.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          L_S_RANGE-LOW  = LOC_VAR_RANGE-HIGH.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
      WHEN 'ZSIGPEROI_ENT'.
        IF I_STEP = 2. "after the popup
          CLEAR L_S_RANGE.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
          L_S_RANGE-LOW  = '1000001'.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'BT'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
      WHEN 'ZSIGPEROI_P1'.
        IF I_STEP = 2. "after the popup
          CLEAR: L_S_RANGE, v_per3.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          IF LOC_VAR_RANGE-LOW+4(3) = '001'.
            LOC_VAR_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4) - 1.
            LOC_VAR_RANGE-LOW+4(3) = '012'.
          ELSE.
            v_per3 = LOC_VAR_RANGE-LOW+4(3) - 1.
            LOC_VAR_RANGE-LOW+4(3) = v_per3.
          ENDIF.
          L_S_RANGE-LOW  = LOC_VAR_RANGE-LOW.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
      WHEN 'ZSIGPEROI_PINF'.
        IF I_STEP = 2. "after the popup
          CLEAR: L_S_RANGE, v_per3.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          IF LOC_VAR_RANGE-LOW+4(3) = '001'.
            LOC_VAR_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4) - 1.
            LOC_VAR_RANGE-LOW+4(3) = '012'.
          ELSE.
            v_per3 = LOC_VAR_RANGE-LOW+4(3) - 1.
            LOC_VAR_RANGE-LOW+4(3) = v_per3.
          ENDIF.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
          L_S_RANGE-LOW  = '1000001'.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'BT'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
      WHEN 'ZSIGPERAN'.
        IF I_STEP = 2. "after the popup
          CLEAR L_S_RANGE.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-HIGH.
          L_S_RANGE-LOW  = '1000001'.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'BT'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
      WHEN 'ZSIGVDRPI'.
        IF I_STEP = 2. "after the popup
          CLEAR: L_S_RANGE,v_date,v_year,v_per3.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          v_year = LOC_VAR_RANGE-HIGH(4).
          v_per3 = LOC_VAR_RANGE-HIGH+4(3).
          CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
            EXPORTING
              I_GJAHR        = v_year
              I_MONMIT       = 00
              I_PERIV        = 'K4'
              I_POPER        = v_per3
            IMPORTING
              E_DATE         = v_date
            EXCEPTIONS
              INPUT_FALSE    = 1
              T009_NOTFOUND  = 2
              T009B_NOTFOUND = 3
              OTHERS         = 4.
          L_S_RANGE-LOW  = v_date.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Variables pour Production interne
    Intervalle
    Variables pour Production interne
    Intervalle
    WHEN 'ZSIGVDRPIM1'.
        IF I_STEP = 2. "after the popup
          CLEAR: L_S_RANGE,v_date,v_year,v_per3.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
           WITH KEY VNAM = 'ZSIGPERPI'.
          IF LOC_VAR_RANGE-LOW+4(3) = '001'.
            LOC_VAR_RANGE-LOW(4) = LOC_VAR_RANGE-LOW(4) - 1.
            LOC_VAR_RANGE-LOW+4(3) = '012'.
          ELSE.
            v_per3 = LOC_VAR_RANGE-LOW+4(3) - 1.
            LOC_VAR_RANGE-LOW+4(3) = v_per3.
          ENDIF.
          v_year = LOC_VAR_RANGE-LOW(4).
          v_per3 = LOC_VAR_RANGE-LOW+4(3).
          CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
            EXPORTING
              I_GJAHR        = v_year
              I_MONMIT       = 00
              I_PERIV        = 'K4'
              I_POPER        = v_per3
            IMPORTING
              E_DATE         = v_date
            EXCEPTIONS
              INPUT_FALSE    = 1
              T009_NOTFOUND  = 2
              T009B_NOTFOUND = 3
              OTHERS         = 4.
          L_S_RANGE-LOW  = v_date.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT  = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    Variables pour Production interne
    Intervalle
    Edited by: Yass79 on Jan 9, 2012 8:55 PM

    Hi ricx,
    hmm, Finally I got you...
    What you are asking is;
    Is it possible to have User exit for Custom Developed ABAP Programs?
    Am i right?
    If this is your question, i can say it is not needed as we can edit Zprograms whenever we need.
    If you have more doubts, revert back....
    Regards
    Karthik D

  • HR-ABAP-want user exit for pa30  for creation 2001 infotype for sick leave

    Hi ALL,
             My requirement like, whenever I try to create a sick leave through PA30 Tcode for infotype 2001 then the has to be trigger like, if the personnel joing date will be from Feb-Dec any date of the year then, the SL will be valid for next year Jan.
    Ex; Todya I am creating SL on 2001 infotype. then the condition will
            If joining date not Jan 2007 then,
             Leave will be valid for next year Jan 2008.
    So, let me know is there any user exit for  this.
    Thanks In advance.
    J.P

    Find myself

  • User-exit for report RPCAIDP0 (tcode: PC00_M19_CAID)

    Dear Gurus,
    Does anyone know user-exits for report RPCAIDP0 (tcode: PC00_M19_CAID) ?
    Thank you in advance,
    PSC

    Depends on what you want to do Priscilla, i have quite an experience with RPCAIDP0 report and it's not the easiest report to change the standard without copying to an customer report. Also, in the previous year, SAP changed the logic of the report quite a bit in order to have the same logic as in RPCIIDP0, so they created a class (CL_HR_PT_EMPLOYEE_TAX_DATA) in which they encapsulated all the data retrieval regarding payroll results, so it's not that dificult to enhance the class itself but it's a bit dificult to get the logic right away. I have done this for several clients, so if you can be more specific maybe i can help you.
    Best regards.

  • USER-EXIT for Appended Structure

    i understand that the appneded fields in the extract structure will not be updated with data unless there is some programming involved with the user exits for the datasource. i appended the sales order schedule line datasource and i am wondering what USER-EXIT needs to be programmed for the appended field to be filled with data ......can some one help please  ???

    Hi Rahul
    You can do that in CMOD, by creating a project and using the enhancement: RSAP0001.
    SAP provides enhancement RSAP0001 that can be used to populate the extract structure.
    This enhancement has four components that are specific to each of the four types of R/3 DataSources:
    Transaction data - EXIT_SAPLRSAP_001
    Master data attributes - EXIT_SAPLRSAP_002
    Master data texts - EXIT_SAPLRSAP_003
    Master data hierarchies - EXIT_SAPLRSAP_004
    Go to enhancement of transaction datasources in CMOD.
    Add a case statement with datasource check and go for the below code.
    This user exit is called for every datasource so be sure to put a CASE statement on the datasource.
    CASE i_datasource:
    WHEN '2lis_11_vascl'.
    loop at c_t_data into <datasource structure>
    modify c_t_data from <datasource structure>
    endloop.
    endcase.

  • Urgent: USER exit for W2 Box 13 of Tax reporter 4.7

    Hi,
        I am working on tax reporter version 4.7 and while printing the W2 forms saw that the Box 13 (selection of Statutory employee or Retirment plan or third party sick pay ) is not ticked. I worked in one of the clients on ECC 6.0 last year whom had a custom user exit for this same box 13 of W2 which used to get ticked on W2 form depending on the logic in that user exit.
    I suggested to this present client that an user exit needs to be written, they asked me to write functional specs for the user exit, can someone help me in writing the functional specs for this W2 form Box 13 selection of Tax reporter on 4.7. what do I need to specify and how do i need to write the functional specs reflecting the logic of this Box 13 of W2 form in tax reporter. Please help me guys, its very urgent.
    I apprecite your answers.
    Thank you so much
    Tony

    Hi Oscar Romero,
    Sorry its an typo error. second range should be 001.2006 to 007.2006.
    1. I want to know how to create Multiple Interval(Range) value variable? - I have used selection option and created variable. Is it correct?
    2. Pls find my coding.
    when 'ZFISCYAC'.
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFYPEROP'.   ---> Value entered is 001.2005 - 012.2006
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-LOW4(3) = LOC_VAR_RANGE-LOW4(3).
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZSCENAR'.  -
    > Value entered 20060804, 20060705.
    *concatenate LOC_VAR_RANGE-LOW(4) '0' LOC_VAR_RANGE-LOW+4(2)
    *into L_S_RANGE-high.
    L_S_RANGE-high = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-high+4(1) = '0'.
    L_S_RANGE-high5(2) = LOC_VAR_RANGE-LOW4(2).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDLOOP.
    ENDIF.
    Final range should be for 20060804, "ZFISCAY" should be from 001.2005 to 008.2006
    For 20060705 range should be 001.2005 to 007.2006.
    *Coding for Filling variable "Fiscal year/Period Plan Multiple values
    when 'ZFISCYPL'.
    IF I_STEP = 2.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZSCENAR'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
    L_S_RANGE-LOW+4(2) = '00'.
    L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW4(2) + 01.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZFYPEROP'.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-high(4).
    L_S_RANGE-HIGH4(3) = LOC_VAR_RANGE-high4(3).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDLOOP.
    ENDIF.
    With same variable values entered as above plan value for variable "ZFISCPL" should be of range 009.2006 to 012.2006 for 20060804
    Range should be 008.2006 to 012.2006 for 20060705.
    Hope this is clear.
    Pls answer very urgent.
    Thanks.
    Bhuvana.

  • GL Account User Exit for all FI transactions

    Hi Experts,
    We  have to create a Ztable and it stores GL bank account principal amount.
    Ex: 130121 (SCB Bank) - Rs.10,00,000.00
    In SAP , for the same GL account closing balances will available in FS10N of each month.
    Ex: 130121 (SCB Bank) for Sep'09 - Rs.8,50,000.00
    Now, the requirement is..
    I want to put an User Exit for this Bank GL Account . It has to perform a check operation whenever this GL accounts comes for posting on any FI transactions, and
    it'll check each time to the GL account principal balances(from Ztable) with the posting amounts and give a popup message regarding about the bank limits exceeded, remainaing amounts and then only they can able to post the transactions.
    Ex: If they are posting in F-02 (general ledger posting) the amount showing in GL account which go for my user exit calculations everytime and the same will be for all other FI GL transactions.
    Hope u understood else pls let me know by your replies.
    Pls advise.
    thanks & regards
    sankar.

    Hi..
    In the tcode where u want to put the user exit, In the menu select System--> Status and double click on the program.
    Then click on search and give the search term as "call-customer function".. and see if there are any available user exits..
    Select one, and double click on the 3 number..if '003' ,double click on it,it will take u to the Fm..where u will find an include starting with Z.
    Here u can write the code u want.
    Regards,
    Vishwa.

  • User Exit For Transaction F150 (Dunning)

    Hi All,
    Can any one help me in finding a User Exit for Transaction <b>F150</b> (Dunning).

    Hello,
    Try this one
    F150D001
    Bye
    gabriel

  • User-Exit for the Me22n

    Hi,
       I am Mohan. I faced on Problem with the User Exit. I write the user exit for the ME21n for PO Creation. While Creation of the PO the Purchase Requition is mandatory. it is working for the ME21n. But PO creation is another two ways is there. Those are ME22N (Purchase order---> Create) and ME23N
    (Purchase order---> Create) for this case also my condition applicable but it is not working for this case. How to write the Code for this. by using Sy-ucomm  also. but it is not working.
    Please help me.
    Regards,
    Mohan

    Following the user exit's related to ME22N transaction.
    AMPL0001 User subscreen for additional data on AMPL
    LMEDR001 Enhancements to print program
    LMELA002 Adopt batch no. from shipping notification when posting a GR
    LMELA010 Inbound shipping notification: Transfer item data from IDOC
    LMEQR001 User exit for source determination
    LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001 Customer-Specific Source Determination in Retail
    M06B0001 Role determination for purchase requisition release
    M06B0002 Changes to comm. structure for purchase requisition release
    M06B0003 Number range and document number
    M06B0004 Number range and document number
    M06B0005 Changes to comm. structure for overall release of requisn.
    M06E0004 Changes to communication structure for release purch. doc.
    M06E0005 Role determination for release of purchasing documents
    ME590001 Grouping of requsitions for PO split in ME59
    MEETA001 Define schedule line type (backlog, immed. req., preview)
    MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
    MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1 Enhancement to Document Overview ME21N/ME51N
    MEVME001 WE default quantity calc. and over/ underdelivery tolerance
    MM06E001 User exits for EDI inbound and outbound purchasing documents
    MM06E003 Number range and document number
    MM06E004 Control import data screens in purchase order
    MM06E005 Customer fields in purchasing document
    MM06E007 Change document for requisitions upon conversion into PO
    MM06E008 Monitoring of contr. target value in case of release orders
    MM06E009 Relevant texts for "Texts exist" indicator
    MM06E010 Field selection for vendor address
    MMAL0001 ALE source list distribution: Outbound processing
    MMAL0002 ALE source list distribution: Inbound processing
    MMAL0003 ALE purcasing info record distribution: Outbound processing
    MMAL0004 ALE purchasing info record distribution: Inbound processing
    MMDA0001 Default delivery addresses
    MMFAB001 User exit for generation of release order
    MRFLB001 Control Items for Contract Release Order
    Regards.

  • User Exit for saving Invoice

    Hi Experts,
    My req, is I have to check billing date with order date/ delivery date while creating the invoice in VF01.
    For that I have done codig in user exit RV60AFZZ, so it gives error ,but the billing date field get disable.
    & this invoice no. alsp get created.
    So can anybody plz tell me in which user exit i have to put my code ???
    I have tried with RV60AFZC.But it is not working.
    My code is
    FORM userexit_pricing_prepare_tkomp.
    *  TKOMP-zzfield = xxxx-zzfield2.
    * structure for vbak
    TYPES:BEGIN OF ty_vbak,
          vbeln TYPE vbak-vbeln,
          audat TYPE vbak-audat,
          END OF ty_vbak.
    *likp structure
    TYPES:BEGIN OF ty_likp,
          vbeln TYPE likp-vbeln,
          lfdat TYPE likp-lfdat,
          END OF ty_likp.
    *vbrp structure
    TYPES:BEGIN OF ty_vbrp,
          vgbel TYPE vbrp-vgbel,
          vgpos TYPE vbrp-vgpos,
          aubel TYPE vbrp-aubel,
          aupos TYPE vbrp-aupos,
          END OF ty_vbrp.
    DATA:it_vbak TYPE STANDARD TABLE OF ty_vbak,
         it_likp TYPE STANDARD TABLE OF ty_likp,
         it_vbrp TYPE STANDARD TABLE OF ty_vbrp.
    DATA:wa_vbak TYPE ty_vbak,
         wa_likp TYPE ty_likp,
         wa_vbrp TYPE ty_vbrp.
    ***** take reference document no & delivery no. *****
    LOOP AT xvbrp.
      wa_vbrp-vgbel = xvbrp-vgbel.
      wa_vbrp-vgpos = xvbrp-vgpos.
      wa_vbrp-aubel = xvbrp-aubel.
      wa_vbrp-aupos = xvbrp-aupos.
      APPEND wa_vbrp TO it_vbrp.
    ENDLOOP.
    IF it_vbrp IS NOT INITIAL.
    SELECT vbeln audat FROM vbak
          INTO TABLE it_vbak
          FOR ALL ENTRIES IN it_vbrp
          WHERE vbeln = it_vbrp-aubel.
    SELECT vbeln lfdat from likp
           INTO TABLE it_likp
           FOR ALL ENTRIES IN it_vbrp
           WHERE vbeln = it_vbrp-vgbel.
    ENDIF.
    **** check for invoice date with order date *****
    LOOP AT it_vbak INTO wa_vbak.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_vbak-audat.
        MESSAGE 'Invoice Date is less than Order Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    **** check for invoice date with delievery date *****
    LOOP AT it_likp INTO wa_likp.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_likp-lfdat.
        MESSAGE 'Invoice Date is less than Delivery Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    "USEREXIT_PRICING_PREPARE_TKOMP
    Thanks & Regards,
    Anagha Deshmukh

    Hello,
    These are the user exits for the tcode.
    J_3RSINV            Export sales
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    Keep the break point and try in the debugging in each and every exit and see which user exit is triggred.

  • HOW TO CREATE A USER-EXIT FOR MB31 GOODS RECEIPT

    Hy,
    <b>HOW TO CREATE A USER-EXIT FOR MB31</b>
    TO COMPARE ORDER QTY CONFIRMED AND GOODS RECEIPT QTY
    ( IF GR QTY GREATER THAN CONFIRMED QTY ERROR MESSAGE SHOULD COME AND NOT ALLOW TRANSCATION TO PROCEED).
    POINTS CONFIRMED.
    REGARDS,
    KARTIKEY.

    Hi Rawat,
       You Don't need to create User Exits,but you need to find user Exits.Below are list of user Exits for MB31.
    Use proper exit as per your requirement.
    Exit Name     Description
    MBCF0002     Customer function exit: Segment text in material doc. item
    MBCF0005     Material document item for goods receipt/issue slip
    MBCF0006     Customer function for WBS element
    MBCF0007     Customer function exit: Updating a reservation
    MBCF0009     Filling the storage location field
    MBCF0010     Customer exit: Create reservation BAPI_RESERVATION_CREATE1
    MBCF0011     Read from RESB and RKPF for print list in  MB26
    MB_CF001     Customer Function Exit in the Case of Updating a Mat. Doc.
    award points if ans is useful.
    Regards,
    Albert

  • How to find the exact user exit for our requirement?

    Dear Mr. keerthi,
    can you please explain me how to find the exact user exit for our requirement?

    Hi sandip
    There is more than one method in which you can check for user-exits.The following method is used very often.
    <b>How to find the exact user-exit for your requirement.</b>
    1.     You can check the user exists using transaction SE85.
    2.     Repository Information System -> Enhancements -> Customer exits
    3.     You can search the user-exits by package name.
    4.     Double click on each exit name to check the function module exits.
    <b>The procedure to find the package name.</b>
    Execute transaction SE93 
    Enter the tcode of the transaction for which you want to check the user exit.
    Example: if you want to find the user-exit for purchase orders while changing, enter ME22n  and press display.
    You will get to see the package name
    But you need to confirm that the user exit will get triggered at the appropriate event.
    ( example: you might want some validations to be done ON SAVE of a purchase order)
    <b>Checking if the user-exit is getting triggered or not.</b>
    1.     Open the user exit function module (that you have got in step 4) in Tcode SE37.
    2.     Click on where used button. In the pop up that immediately appears choose only programs .
    3.     You will get a list of programs. Double click on the program name.
    4.     You will get the list of location where this function module user exit is used.
    5.     Place session break points at each of these location ( at each CALL FUNCTION statement)
    6.     Now go to your transaction ( say change purchase order tcode:Me22n) and check if the user exit is getting triggered on appropriate event.
    regards,
    Prasad

  • How to find the appropriate user exit for invoic02 idoc in idoc_output_invo

    Hi all,
    I am new to this community p
    i have issue regarding  the How to find the appropriate user exit for invoic02 idoc in idoc_output_invoic function module.........
    thanks,

    Hi ,
    welcome to SDN.
    You can select the appropriate Customer exit accrding to the available parameters .
    The list of exits available are 
    EXIT_SAPLVEDF_001
    EXIT_SAPLVEDF_002
    EXIT_SAPLVEDF_003
    EXIT_SAPLVEDF_004
    For Example , if you want  to modify the Idoc data(EDIDD) you have to use the EXIT_SAPLVEDF_002. accodingly you can select the user exit according to the avaialable parametres.Use Table MODSAP fto get the Enhancement name.
    Hope this Helps
    Rgds
    Sree
    Edited by: Sree on Jul 23, 2010 12:11 PM

  • REG:USER EXIT FOR DATA SOURCE 0HR_LSO_1

    Hi ,
    I have to write the enhancement ABAP code for data source 0HR_LSO_1 which is related to module " training and event management "(also known as LMS or LSO) in ECC 6.0 .
    So how can I find out appropriate user exit for the same .I have to concentrate on the field "kostl (cost centre)" in that data source .
    Please provide some suggestions .
    Thanking You ,
    Tarun Brijwani .

    Hi Tarun...
      I this might help you.
      In the HR System:
    1) T-CODE: CMOD
    2) Choose an existing project (vg: Z12345)
    3) Modify
    4) Press Components button
    5) Look for the enhance: RSAP0001  (the BW extracting enhancement)
    6) The you have one of the following option:
    a- If the Data Source is "transaction data": The exit is "EXIT_SAPLRSAP_001"
    b- If the Data Source is "master data": The exit is "EXIT_SAPLRSAP_002"
    7) double-click in the appropriate one
    8) You'll see an INCLUDE sentence. Could be this ZXRSAU01 or this ZXRSAU02 (depending on the previous step). Double-click and you'll be redirected to the SE38
    9)  some code:
    CASE i_datasource
      WHEN '0HR_LSO_1'.
        LOOP i_t_data INTO my_struct
           my_struct-KOSTL           "Here you'll must have your Cost Center
           ...etc...etc...etc
        ENDLOOP.
      WHEN OTHERS.
    ENDCASE
    Hope it helps.
    gdmon

  • User exit for data source 0HR_LSO_1

    Hi ,
    I have to write the enhancement ABAP code for data source 0HR_LSO_1 which is related to module " training and event management "(also known as LMS or LSO) in ECC 6.0 .
    So how can I find out appropriate user exit for the same .I have to concentrate on the field "kostl (cost centre)" in that data source .
    Please provide some suggestions .
    Thanking You ,
    Tarun Brijwani .

    Hi Tarun...
      I this might help you.
      In the HR System:
    1) T-CODE: CMOD
    2) Choose an existing project (vg: Z12345)
    3) Modify
    4) Press Components button
    5) Look for the enhance: RSAP0001  (the BW extracting enhancement)
    6) The you have one of the following option:
    a- If the Data Source is "transaction data": The exit is "EXIT_SAPLRSAP_001"
    b- If the Data Source is "master data": The exit is "EXIT_SAPLRSAP_002"
    7) double-click in the appropriate one
    8) You'll see an INCLUDE sentence. Could be this ZXRSAU01 or this ZXRSAU02 (depending on the previous step). Double-click and you'll be redirected to the SE38
    9)  some code:
    CASE i_datasource
      WHEN '0HR_LSO_1'.
        LOOP i_t_data INTO my_struct
           my_struct-KOSTL           "Here you'll must have your Cost Center
           ...etc...etc...etc
        ENDLOOP.
      WHEN OTHERS.
    ENDCASE
    Hope it helps.
    gdmon

Maybe you are looking for