Abap hr for user exit pbas0001

hi Experts,
i have requirement is like  When there is a Separation or Retirement Action processed for an employee, take the begin date of the Action minus 1 day, and use this date as the End Date (ENDDA) for the infotypes that need to be automatically delimited.  the infotypes are 0000,0001,0002,00006,0008,0021,0023 .
please  help me out . please provide soultion that would be great .
can you give technical details where we can write code after triggering .
regards,
bhushan

This can be achieved using Dynamic Actions. Please go through the SAP Help.
~Suresh

Similar Messages

  • Problem with a user exit PBAS0001

    Hi Experts,
    We have a new sand box in ecc6. when I go to any sandbox or production in 4.6c system transaction pa40 runs fine.
    I slected change of pay in new sandbox ecc6 through pa40, but it is throughing with an error stating
    The current ABAP program "SAPFP50M" had to be terminated because it has        
    come across a statement that unfortunately cannot be executed.                                                                               
    The following syntax error occurred in program "SAPLXPAD " in include "ZXPADU02
      " in                                                                          
    line 22:                                                                       
    ""I0028" and "INNNN" are not mutually convertible. In Unicode programs,"       
    " "I0028" must have the same structure layout as "INNNN", independent o"       
    "f the length of a Unicode character."                                         
    The above error is found in user exit PBAS0001 with
    EXIT_SAPFP50M_001
    EXIT_SAPFP50M_002
    can anyone let me know how to handle this to correct in new sand box to run as normal.
    Thanks
    Ravi

    Hi Ravi,
    After release 5 due to unicode the structure innnn and Pnnnn are not compartiable, hence move statement ll not work.
    Use the below methods for conversion. Point if helpful.
      MOVE innnn TO gs_0041.
    PERFORM MOVE_INNNN_TO_STRU USING INNNN gs_0041.
    FORM MOVE_INNNN_TO_STRU  USING    P_INNNN
                                      P_GS_0041.
      CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
        EXPORTING
          PRELP  = P_INNNN
        IMPORTING
          PNNNN  = P_GS_0041.
    ENDFORM.                    " MOVE_INNNN_TO_STRU
          MOVE gs_0041 TO innnn.
    PERFORM MOVE_STRU_TO_INNNN USING gs_0041 INNNN.
    FORM MOVE_INNNN_TO_STRU  USING    P_INNNN
                                      P_GS_0041.
      CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
        EXPORTING
          PRELP  = P_INNNN
        IMPORTING
          PNNNN  = P_GS_0041.
    ENDFORM.                    " MOVE_INNNN_TO_STRU
    Br/Manas

  • Abap code for sap exit variables?

    Hi,
    i) Where can I find the abap code for SAP exit variables
    OP_KEYDT used for the net due date
    OP_KEYD2 used for the posting date
    OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
    Based on the Net Due Date, which  is key date(0NETDUEDATE),  entered by the user at runtime, the posting date and celaring date are populated.
    II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom  Net Due Date(ZNETDUEDATE).And this date is populated to posting date and  clearing date variables.
    How do we acheive that.
    Thanks.

    Please tell how u solved ur issue i have the same scenario to be do.

  • ABAP  Code for SAP exit varaibles?

    Hi,
    i) Where can I find the abap code for SAP exit variables
    OP_KEYDT used for the net due date
    OP_KEYD2 used for the posting date
    OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
    Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
    II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
    How do we acheive that.
    Thanks.

    Hi Kumar,
    Try this below mentioned example where default date is current date.
    Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).
    Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.
    Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.
    Step4: Sample code to populate.
    WHEN 'CUR_DATE'.
    Data : l_p_range_SSS TYPE rrrangesid.
    IF I_STEP = 1.
    l_p_range_SSS-Low = sy-datum.
    l_p_range_SSS-Sign = 'I'.
    l_p_range_SSS-Opt = 'EQ'.
    APPEND l_p_range_SSS TO e_t_range.
    Endif.
    The following values are valid for I_STEP:
    · I_STEP = 1
    Call up takes place directly before variable entry
    · I_STEP = 2
    Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
    · I_STEP = 3
    In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
    · I_STEP = 0
    The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.
    Also, refer this link..
    http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
    Cheers,
    Allen

  • ABAP Help for customer exit

    Hi All, I need help with ABAP code for customer exit for formula variable. I have ZVKDATE as formula var from customer exit. user enters date in ZVKEYDT(this is selection type var). I have the below code, I debugged it the l_var_range-low get the date but when I append it to e_t_range the table doesn't gets the date. The report shows the ZVKDATE has empty demarcation. kindly help.
    data l_var_range like rrrangeexit.
    data: l_s_range type RSR_s_RANGESID.
    data: w_day(2) type c,
          w_mth(2) type c,
          w_year(4) type c.
    define append_range_table.
    l_s_range-low = &1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    end-of-definition.
    *Activities performed before selection screen pop-up window
    if i_step = 2.
    Calculate the current date based on system date
      case i_vnam.
        when 'ZVKDATE'.
          read table i_t_var_range into l_var_range
                            with key vnam = 'ZVKEYDAT'.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          w_day = l_var_range-low+6(2).
          w_mth = l_var_range-low+4(2).
          w_year = l_var_range-low(4).
          concatenate w_year w_mth w_day into l_var_range-low.
          append l_s_range to e_t_range.
      endcase.
    endif.
    puneet

    Hi,
    Check your code again. You are not appending l_var_range but l_s_range. Also I think the concatenate statement should contain l_s_range-low instead of l_var_range-low.
    Hope this will help you.
    Regards,
    Vaibhav

  • Help reqd for USER EXIT - VA01

    Hi all,
    i've the details of lists regarding the VA01 std enhancement assignment....but really i dont know which one'll be applicable for my USER Exit object....
    My client requiremnet is...In VA01 or VA02
    The enduser will be able to create/do the line items upto the line 4th (POSNR -004).means,we shuld restrict the line items as  a maximum of 4 only and it has to throw an error if going for 5th line item and revert back to main .
    which is the std enhancement/exit for this to declare in CMOD....the exact one
    ,i need.
    If anyone has faced the same creiteria,then pls post ur comments here in detail,else if any knows the exit name,pls reply here on urgent basis.
    my mail-id is [email protected]..for post ur comments thru mail.
    thanks & regards
    sankar

    Transaction Code - VA01                     Create Sales Order
    Exit Name           Description
    SDTRM001            Reschedule schedule lines without a new ATP check
    V45A0001            Determine alternative materials for product selection
    V45A0002            Predefine sold-to party in sales document
    V45A0003            Collector for customer function modulpool MV45A
    V45A0004            Copy packing proposal
    V45E0001            Update the purchase order from the sales order
    V45E0002            Data transfer in procurement elements (PRreq., assembly)
    V45L0001            SD component supplier processing (customer enhancements)
    V45P0001            SD customer function for cross-company code sales
    V45S0001            Update sales document from configuration
    V45S0003            MRP-relevance for incomplete configuration
    V45S0004            Effectivity type in sales order
    V45W0001            SD Service Management: Forward Contract Data to Item
    V46H0001            SD Customer functions for resource-related billing
    V60F0001            SD Billing plan (customer enhancement) diff. to billing plan
    No of Exits:         15
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • Precautions for User Exits

    Can anyone tell me what are the precautions to be taken for user exits?
    i mean...what are the ABAP statements that are not used in user exits...
    can anybody plz suggest me?

    Hi,
    Welcome to SDN.
    COMMIT WORK should not be used in a user exit. This reason is that it could/will commit all work done by the entire transaction and could possibily create data inconsistancy.
    Also LEAVE TO TRANSACTION and SUBMIT statements should also be not used. It will terminate the current LUW.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Value for user-exit variable  is invalid

    Hi Gurus,
    My Value for a Fiscal Year Prd returns a invalid value for the 12th month of each year( for Example 12/2004, returns the error "Value 200313 for User-exit variable is invalid.
    This is the code that is being used.
    *Rolling 12 months for entered month
    when 'ZCALM12'.
          clear: v_mth, v_yr.
          REFRESH E_T_RANGE.
          CLEAR L_S_RANGE.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                   WHERE VNAM = 'ZCALMON'.
            exit.
          endloop.
          v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
          v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
          L_S_RANGE-SIGN = 'I'.
          L_S_RANGE-OPT = 'BT'.
          concatenate v_yr v_mth into L_S_RANGE-LOW.
          L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
          APPEND L_S_RANGE TO E_T_RANGE.
    Thanks in Advance.

    Hi Ravi,
    when 'ZCALM12'.
    clear: v_mth, v_yr.
    REFRESH E_T_RANGE.
    CLEAR L_S_RANGE.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZCALMON'.
    exit.
    endloop.
    <b>-->> Here, you are not checking any thing.</b> <i>On which logic you are reducing year by one and increasing month by 1..?</i>
    v_yr = LOC_VAR_RANGE-LOW+0(4) - 1.
    v_mth = LOC_VAR_RANGE-LOW+4(2) + 1.
    -->><i>IF month is 200512 you will get output from above code is :</i> please check.
    v_yr = 2005 - 1 = 2004
    v_mth = 12 +1 = 13.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    concatenate v_yr v_mth into L_S_RANGE-LOW.
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
    APPEND L_S_RANGE TO E_T_RANGE.
    Try to debug the code by keeping break point after When. and execute the report, you will be debugging mode.
    Hope it Helps
    Srini

  • Need help for user exit mereq001

    Hi,
    I need help for user exit mereq001. I think I messed up with include table CI_EBANDB and CI_EBANMEM. And When I tried to check the syntax . It gives me error like : <b>Class IF_PURCHASE_REQUISITION. Inconsistency in the dictionary for the structure mereq_item_s_cust_data.</b> Anyone had experience for this exit? I just need to extract costcenter information of the each item from the requisition and block the requisiton if the costcenter are differents from each other before the requisition is saved. Any one has idea about it?
    Thanks.

    biao,
    Have you checked this struture consistency from SE11. Also check the activation log.
    If there are any errors and you are not able to rectify the same use RSDDCHECK program, give your table name and run the report.
    This will list down the error structures releated this table and also prompts for you to activate it.
    Regds
    Manohar

  • Enhancement for user exit

    hello
      can you please let me the know the enhancement for user exit:exit_sapliqs0_001
    regards
    anik

    Hi,
    these are teh enhancements that r available...u need to check each of them.
    IWO10026  User check on setting status 'Do not perform'
    IWO10027  User exit: Generate user-defined settlement rule
    IWOC0001  Create PM/SM notification: Determine reference object
    IWOC0002  PM/SM notification: Check whether status change is allo
    IWOC0003  PM/SM authorization check of ref. object and planner gr
    IWOC0004  Change single-level list editing PM/QM/SM ALV settings
    Regards,
    nagaraj

  • Hi is there any code for user exits in bw

    can you help me out with user exits in bw reporting pls
    http://abapcode.blogspot.com

    Hi Amit,
      i have good document for user exits in bw. pls send me ur email i will send the document.
    hope that will help you to resolve.
    <b>Reward pts if found usefull:)</b>
    Regards
    Sathish

  • Code for user-exits

    hey guys i want the code for user-exits for  inclusion of Excise Chapter ID mandatory in PO .....
    regards,
    Naveen

    which user exit u are using ?
    check the BADI for the same .
    SE15->Enhancements->BADI--->definations -
    >search on Package = ME.
    and see BADI definition called Process _cust.
    Regards
    Peram

  • Help reqd for user exit

    Hi all,
    the requirement is...
    In MIRO,the Incoimg invoice should not be posted without an empty field of amount(WRBTR) in the Basic Data.Currently as per std,it's not a mandatory field and can be posted by not entering any amount in that.So, either we have to make it as a mandatory field or should restrict not to saving the data if posting of empty field.(Not giving any amount)***seems,it tells the user to give the amount as mandatory.
    How to do this.....if its coming under the USER Exit object...pls post both how to get the std program and enhancement assignment(it asks while creating user exit in CMOD) also for user exit.
    thanks & regards
    sankar.

    hi
    Program name is SAPLMR1M
    For MIRO tcode, you have below user exits.
    LMR1M001            User exits in Logistics Invoice Verification                    
    LMR1M002            Account grouping for GR/IR account maintenance                  
    LMR1M003            Number assignment in Logistics Invoice Verification             
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs    
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting    
    LMR1M006            Logistics Invoice Verification: Process XML Invoice             
    MRMH0001            Logistics Invoice Verification: ERS procedure                   
    MRMH0002            Logistics Invoice Verification: EDI inbound                     
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP                 
    MRMN0001            Message output and creation: Logistics Invoice Verification     
    EXIT_SAPLMR1M_003 may useful to you. Check with this.
    Reward if it dose
    Thanks
    Siva Kumar.

  • 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

  • T code for User exits.

    hai all MM gurus,
    How to find out the user exits for any Tcodes or for any documents?.

    for this there is a user written program called "zuserexit" which will be available. Run the program & give Tcode as input u ll get all exits for that.
    http://www.sap-img.com/ab038.htm
    Finding the user-exits of a SAP transaction code
    Finding the user-exits of a SAP transaction code
    Enter the transaction code in which you are looking for the user-exit
    and it will list you the list of user-exits in the transaction code.
    Also a drill down is possible which will help you to branch to SMOD.
    Written by : SAP Basis, ABAP Programming and Other IMG Stuff
                 http://www.sap-img.com
    report zuserexit no standard page heading.
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
             tables : tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode obligatory.
    select single * from tstc where tcode eq p_tcode.
    if sy-subrc eq 0.
       select single * from tadir where pgmid = 'R3TR'
                        and object = 'PROG'
                        and obj_name = tstc-pgmna.
       move : tadir-devclass to v_devclass.
          if sy-subrc ne 0.
             select single * from trdir where name = tstc-pgmna.
             if trdir-subc eq 'F'.
                select single * from tfdir where pname = tstc-pgmna.
                select single * from enlfdir where funcname =
                tfdir-funcname.
                select single * from tadir where pgmid = 'R3TR'
                                   and object = 'FUGR'
                                   and obj_name eq enlfdir-area.
                move : tadir-devclass to v_devclass.
              endif.
           endif.
           select * from tadir into table jtab
                         where pgmid = 'R3TR'
                           and object = 'SMOD'
                           and devclass = v_devclass.
            select single * from tstct where sprsl eq sy-langu and
                                             tcode eq p_tcode.
            format color col_positive intensified off.
            write:/(19) 'Transaction Code - ',
                 20(20) p_tcode,
                 45(50) tstct-ttext.
                        skip.
            if not jtab[] is initial.
               write:/(95) sy-uline.
               format color col_heading intensified on.
               write:/1 sy-vline,
                      2 'Exit Name',
                     21 sy-vline ,
                     22 'Description',
                     95 sy-vline.
               write:/(95) sy-uline.
               loop at jtab.
                  select single * from modsapt
                         where sprsl = sy-langu and
                                name = jtab-obj_name.
                       format color col_normal intensified off.
                       write:/1 sy-vline,
                              2 jtab-obj_name hotspot on,
                             21 sy-vline ,
                             22 modsapt-modtext,
                             95 sy-vline.
               endloop.
               write:/(95) sy-uline.
               describe table jtab.
               skip.
               format color col_total intensified on.
               write:/ 'No of Exits:' , sy-tfill.
            else.
               format color col_negative intensified on.
               write:/(95) 'No User Exit exists'.
            endif.
          else.
              format color col_negative intensified on.
              write:/(95) 'Transaction Code Does Not Exist'.
          endif.
    at line-selection.
       get cursor field field1.
       check field1(4) eq 'JTAB'.
       set parameter id 'MON' field sy-lisel+1(10).
       call transaction 'SMOD' and skip first   screen.
    *---End of Program

Maybe you are looking for

  • Initial stock load of batch managed materials

    Hi, We are using batch management for FERT materials. The class type 022 is being used for creating batch class. The class has been assigned to six characteristics. We need to load the initial stock of all these FERT items with batches with correspon

  • I realize there is no option for bypassing the save to download, but I think it is time you put one in.

    If one is downloading one or two programs, saving then running is not that big a deal - but when you are trying to download and run 1600 game files, it becomes totally ridiculous. instead of 2 clicks each one takes 4 or 5 - not counting all the time

  • Lost videos in iPhoto when upgraded to OS X Lion

    When I upgraded to OS X Lion, all my videos were removded from iPhoto, and had been moved to iMovie.  At least I think they are all in iMovie, I actually don't know as there were several videos imbedded in different 'events' in iPhoto.  How do I make

  • Report Designer question

    Hi, We have problem creating queries in Report Designer  Our project has BI 7.0, Enterprise Portal, PI and ECC installed on different servers by NetWeaver team. When we open the Report Designer from the START->Business Explorer->Report Designer, we g

  • Forms AS 10.1.2.3 patchset - When?

    Just curious as to when this Forms patchset will come out, as it will be part of the requirement needed to be certified with Windows Vista/IE7 and Sun Java 1.5 plug-in.