Rolling Period User-Exit

Hi All,
    I have a requirement where I have to populate 11 prior months based on user entered Period and Year. I've created declared 24 customer exit variables ( 12 for month and 12 for year ), upon debugging the user-exit I found that the user-exit populates the values in the variables correctly. But when data is displayed I only get values in my first column ( 1 of 12 ) and all others remain blank. Here is the code snippet for your review. Kindly advice.:
The following code is only for the periods.
DATA:P1(3),  " type /BI0/SFISCPER3-FISCPER3
P(3) TYPE N.
when 'ZCPOST1' or 'ZCPOST2' or 'ZCPOST3' or
       'ZCPOST4' or 'ZCPOST5' or 'ZCPOST6' or
       'ZCPOST7' or 'ZCPOST8' or 'ZCPOST9' or
       'ZCPOST10' or 'ZCPOST11' or 'ZCPOST12'.
    temp = i_vnam.
    IF I_STEP = 2.
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
               WHERE VNAM = 'ZCPOST'.
        p1 = LOC_VAR_RANGE-low.
      endloop.
      case temp.
        when 'ZCPOST1'.
          p1 = p1.
        when 'ZCPOST2'.
          p1 = p1 - 1.
        when 'ZCPOST3'.
          p1 = p1 - 2.
        when 'ZCPOST4'.
          p1 = p1 - 3.
        when 'ZCPOST5'.
          p1 = p1 - 4.
        when 'ZCPOST6'.
          p1 = p1 - 5.
        when 'ZCPOST7'.
          p1 = p1 - 6.
        when 'ZCPOST8'.
          p1 = p1 - 7.
        when 'ZCPOST9'.
          p1 = p1 - 8.
        when 'ZCPOST10'.
          p1 = p1 - 9.
        when 'ZCPOST11'.
          p1 = p1 - 10.
        when 'ZCPOST12'.
          p1 = p1 - 11.
      endcase.
      IF p1 <= 0.
         y = y - 1.
        IF p1 = 0.
          p1 = 12.
        ELSE.
          p1 = 12 - ABS( p1 ).
        ENDIF.
      ENDIF.
      MOVE P1 TO P.
      l_s_range-low = p.
      l_s_range-sign = 'I'.
      l_s_range-opt = 'EQ'.
      APPEND l_s_range TO e_t_range.
    endif.
Regards,
Srini D

Thanks for your advice. But here is my problem: I have two selection screen exit variables one for year and one for Period. If the user enters
005 and 2006, I should be able to calculate the following:
5,4,3,2,1,12,11,10,9,8,7,6 for periods and the year should roll from 2006 to 2005. That's why I had the user-exit, It calculates fine for the first column but all other columns remain blank.
Also, I tried your solution:
When I use fiscalyear/period variable, and use use offsets ( 0, -1, -2 and so on ), only the first column is getting populated and the others are coming out as blank.
Kindly advice.
Regards,
Srini D

Similar Messages

  • Scheduling agreement : BADI/User Exit

    Hi All,
    I need BADI's or User Exit's for Sheduling Agreement (ME31L) during Creation or Change.
    I have tried seraching the Forum, the other Help avaliable, the package, the cl_exithandler debugging method & all. I resulted in writing this thread Question. -- Plz help
    In scheduling agreement functionality, Certain validations and checks using user exit or BADI during creation of scheduling agreement should be done.
    For Ex: a)No two scheduling agreements should exists in system with combination of
    (Material & Vendor document type delivery address for the same validity period)
    User Exit should check
    b)Items with multiple Tax code should not be allowed in the same SA ,i.e. all SA items should have same tax code
    c)Items with multiple Material Number should not be allowed in the same SA     
    Please Help me with providing the User Exit's or BADI's for above similar validations. I can Proceed further with Coding.
    Thanks& Regards,
    Chaitanya L

    Please check these & find the appropriate one.
    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
    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
    MM06E011            Activate PReq Block
    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
    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

  • Zero values in Periodic Valuation User Exit (EXIT_SAPLKEAB_001)

    Dear All,
    Can anyone give a perspective on the following issue:
    We are using periodic valuation (ke27) and user exit EXIT_SAPLKEAB_001 in order to valuate COGS. There are instances where we have to zero our specific value field COGS for a material for all previous months of the year.The issue is that although we initialize the specific line items in the exit properly, no revaluation postings are made. When, instead of initializing, we give a specific value ( i.e. '0.01' ) the posting is made.
    Kind Regards,
    Orestis

    Hi Dalip !
    Welcome on board !
    "Has anyone figured out how/where step 3 is used ?"
    SURE !!!
    Take a look to https://websmp101.sap-ag.de/bi -> Services & Implementation -> HOW TO... Guides -> Guide List SAP BW 2.x -> How to... Verify the Variable Input
    Hope it helps!
    Bye,
    Roberto
    (and please don't forget to assign points to the answers...it's THE way to say thanks here!)

  • User exit to calculate Same period Last Year

    Dear gurus,
    can some help me to code the user exit to calculate the same period last year for bex variable
    i.e
    System date :18.05.2010
    Same period last tear : 18.05.2009
    Your help  highly appreciated
    Thank you
    BR

    Hi,
    The above code creates problem only when date is 29th of Feb.
    To find whether year -1 is leap yr or not include following code also:
    l_year = sy-datum(4)-1 .
    l_mod4 = l_year mod 4.
    l_mod100 = l_year mod 100.
    l_mod400 = l_year mod 400.
    if ( l_mod4 = 0 and l_mod100 ne 0 ) or l_mod400 eq 0.
    if( l_date = 29)
    l_date= l_date -1.
    endif.
    endif.
    Modify your code according to youe need. Hope this helps you.
    Thanks,
    Jitender.

  • User exit to Change Accrual period in revenue  recognition

    Hi All ,
    I have requirement to change the accrual period while revenue posting from VF44 in collective processing from 365 days to static 12 months .
    Need help finding the rigth user exit and approach .
    Thanks in advance
    vinay

    Hi Amuktha ,
    Look s like I have to implement a Bussiness transaction event OUTBOUND_CALL_00503103_E
    the program LVFRR069 , I found below lines
        If accrual period start date and/or end date has been changed
        through userexit 'OUTBOUND_CALL_00503102_E' forecarst lines are
        created in single step mode
          if pif_accpd_start ne lvf_fplt_start or
             pif_accpd_end   ne lvf_fplt_end.
    Need help in implemeting this .
    thanks
    Vinay

  • PDATE User Exit & Updation of Offset in Dataview

    Hi Experts,
    How Does the User Exit PDATE works.?As i tried with the ABAPER with this regard to PDATE , as he suggested that for back ground processing the PDATE User Exit works but in our planning Users foregroundly runs the forecast.
    Ours is the Yearly Planning.
    We expect that each year the user enters the  dataview (independent of the time the user enters) it should start from the 01st of January of the following year.
    If i give the planning start date then Data View would be Static.
    We want to keep planning start date as empty to keep it rolling . However when we keep it empty the planning horizon starts from the system date. If the user enter it in October the planning horizon will start in October instead of 01st of following year. We could solve this problem with the field "offset" if the user enters each year in the same month. However they can enter this dataview one year in October the other in November so fixed offset figure will not solve the problem. If we set "3" for offset field and he enters the dataview in November then our planning horizon will start in February following year.
    How does the "PDATE" user exit can solve this problem?
    Is there any other Method to solve this Issue.
    The logic to Update the Offset is as follows:
    Current Month= X
    Total Months in a year = Y
    Offset = A
    Variable Offset Start From = Z
    Z= X-1
    Assume Current Month X = 3
    Z= 3-1=2
    Offset A = Y - Z
    A= 12 - 3 = 10
    So Offset is 10.
    I dont know where to put this logic.
    How to update Offset automatically in Data View?
    Regards
    Mani
    Edited by: Mani4690 on Mar 14, 2009 4:31 PM

    1) If i write the logic in enhancement spot will the Offset value will automatically update?
       No this logic doesnot really update the offset value. The offset value continues to remain blank
    2)I have seen your thread in which you have mentioned the following:
    I have never done this earlier. However i know that planning start date is stored in table /SAPAPO/PBDVWHDR-TBID_START. I tried changing this entry in the table and it correctly updated the dataview plannig start date.
    So you may write a small program to update this field and it shall update the dataview.
    Will this works me in my case.
    My case was as folows:- I had to have the planning start date as 1st jan 2009.Assume that the current week is 50th week.By default SAP would default the first week of display as 50th week.And the reqt for me was to display current week - 4 as the first week. So in my case when i open the plannig book, the first week would be 46th week whereas the weeks between planning start date and 46th week would be still available for display but i would have to scroll to the left.So in your case if you wish to see the weeks betwen the plannig start and your first week, you may go for the enhancement spot approach. But if you are not intrested in the earlier weeks then you could go for the planning start date update by a small program approach
    3)Planning start remians the same...i had kept offset blank
    So if your planning start date is April 2008, and you set Jan 2009 as the first period..then Jan 2009 will be the first period defaulted in the dataview and the periods from April 2008 to jab 2009 will be available on the left hand side ..so you have to scroll to left to see this data.
    In the above scenario, if i put planning start date , will the macros and time bucket scrolls?
    If you set the planning start date, the macro's and time bucket willl not scroll

  • User exit ZXPADU02 - evaluating SY-UCOMM

    Hello everyone,
    I am trying to display an error message whenever someone tries to create a new work schedule rule (P0007-SCHKZ) in infotype 7. However, the error message should just come up when the user is trying to save his data.
    I am using user exit ZXPADU02 for this purpose. My problem is that SY-UCOMM does not seem to hold reliable data in this user exit, and SSCRFIELDS does not seem to be supported at all.
    My code looks like this (only the relevant code snippet in ZXPADU02):
    CASE INNNN-INFTY.
            WHEN '0007'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = INNNN
            IMPORTING PNNNN = P0007.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = PSAVE
            IMPORTING PNNNN = P0007_ALT.
          IF P0007_ALT-SCHKZ <> P0007-SCHKZ
          AND IPSYST-MASSN IS INITIAL " do not warn within an info group of a personnel action
          AND SY-UCOMM = 'UPD'. " only warn when saving the data -> problem here <-
            MESSAGE 'Do not change IT7 directly or else.' TYPE 'I' DISPLAY LIKE 'E'.
            SHOW_DATA_AGAIN = 'X'.
          ENDIF.
    At first glance, the above works nicely.  But this is what happens when I test more thoroughly:
    I create a new period in IT 7, enter a P0007-SCHKZ other than the one that was previously valid, press F11. Some warnings appear (for different reasons), which I dismiss using the Enter key. Afterwards, the above code fires, the error message is being displayed, and I am thrown back into the data screen. So far, so good.
    Now I simply alter the value in the field "Weekly hours" (P0007-WOSTD) and press Enter (!). Again a series of warnings appear, including one that a dataset is going to be deleted (seeing that an IT 7-period with just the same date range already exists). I confirm that with Enter, and the data is being saved. The above code does not fire because I have only pressed Enter - but the data is being saved anyway!
    Looks like a pretty erroneous behavior on the side of the SAP system. The question is whether I have a chance to do something about it in the code.

    Mihir Nagar wrote:
    Dear Petersen,
    Your IF condition seems ok. I doubt on the message statement. Can you replace your message statement with type E.
    MESSAGE 'Do not change IT7 directly or else.' TYPE 'E'.
          ENDIF.
    Hope this works.
    Regards,
    Mihir.
    I did not expect this to work, because normally you use type 'E'-messages only in certain PAI-environments, but it does the job, thank you!
    make use of  field IOPER of the structure  PSYST to check on the infotype actions INS, MOD, COP, DEL...
    In this particular case I did not care, so I did not check that. IT 7 should only be maintained through personnel actions in our case.
    Next you can check with sy-ucomm field the different between "enter" and "save". With "save" sy-ucomm will be 'UPD'.
    That is what I did, but as I described, there was a situation when SY-UCOMM is SPACE, but the system saved anyway due to a prior save attempt.

  • User exit in CATS_APPR_LITE

    When transaction CATS_APPR_LITE is executed, the selection is done on the whole population.
    We want however to restrict the used population: when executing CATS_APPR_LITE, a Time Approver should only see the employees for whom he is allowed to approve time.
    Our implementation proposal is to use a user exit in CATS_APPR_LITE that calls a custom z-table (maintained in a custom transaction) containing for every employee (PERNR) who are his time approvers (one time approver and two back-ups) for a certain period in time.
    Our questions are:
    - which user exit is there available in CATS_APPR_LITE to call this custom z-table?
    - do you suggest a different method?
    Thanks in advance!
    Best regards,
    Vincent Mahy

    Hi Vincent
    There seems to no user exits to the transaction mentioned. But there is a BADI CATS_REPORTING which is getting triggered while executing the tcode mentioned. Below are some of the methods which could be implemented, please sit with a ABAPer and check which one best suits your requirement,
    APPROVE_CATS_CLASSIC                     Automatic Approval of a CAT2 Data Record?: Yes/No
    APPROVE_CATS_SERVICE_PROVIDER     Automatic Approval of a CATSXT Data Record?: Yes/No
    APPROVE_TRIP                                     Automatic Approval of a Trip?: Yes/No
    AT_SELECTION_SCREEN                     PAI for Selection Screen
    AT_SELECTION_SCREEN_OUTPUT     PBO for Selection Screen
    AUTH_CHECK_CATS_CLASSIC                      Authorization Check for Working Time Data (CAT2)
    AUTH_CHECK_CATS_SERVICE_PROV     Authorization Check for Working Time Data (CATSXT)
    AUTH_CHECK_TRIP                                     Authorization Check for Trip Data
    BEFORE_CATS_DATA_SELECTION     Before Selection of CATS Data from Database
    BEFORE_DISPLAY                                     Working Time Data before Display on Screen
    BEFORE_DISPLAY_APPR                     Working Time & Trip Approval Before Display on Screen
    BEFORE_DISPLAY_DTL                      Working Time Details Before Data Display
    BEFORE_TRIP_DATA_SELECTION     Before Selection of Trip Data from the Database
    CATS_DATA_SELECTED                      Process Selected CATS Data
    DOCUMENT_FLOW_SELECTED     Provide Selected Document Flow Data
    INITIALIZATION                                      Report Initialization
    LOAD_OF_PROGRAM                      Constructor for BADI
    START_OF_SELECTION                      Start of Report Processing
    TRIP_DATA_SELECTED                     Process Selected Trips
    Regards
    Ranganath

  • User Exit and BDC for ME22N

    Hello All,
    A code has been written in the User exit for Tcode ME22N, Which sets the indicator on PO line item. This has been done by modifying the standard itab POT by using field symbols, because the fields to be modified are shown in display mode in the tcode ME22N and cannot be done in BDC. See the below code in user exit ZXM06U43.
    DATA char(50) VALUE '(SAPLMEPO)POT[]'.
    CLEAR wa_ind.
        FIELD-SYMBOLS <f1> TYPE ANY.
    Move memory of internal table POT to field symbol f1.
        ASSIGN (char) TO <f1>.
    Move content of f1 to internal table i_ind
        i_ind[] = <f1> .
        LOOP AT i_ind INTO wa_ind.
          IF wa_ind-pstyp = '9'.            " Service PO - item category
    IF PO Line item has History per Purchasing Document as 'D'
    Set indicators on, for the line item.
            CLEAR v_cnt.
            SELECT COUNT( * ) INTO v_cnt FROM ent5100
                                         WHERE ebeln = wa_ind-ebeln
                                           AND ebelp = wa_ind-ebelp
                                           AND bewtp = 'D'.
            IF sy-subrc = 0.
              wa_ind-wepos = 'X'.            " Set Goods Receipt Indicator
              wa_ind-webre = 'X'.            " Set GR-based IV Indicator
              wa_ind-lebre = 'X'.            " Set Srv-based IV Indicator
            ELSE.
    *End of addition SAP-20070910104025 - SL36 - D01K963369
              wa_ind-wepos = ' '.            " Clear Goods Receipt Indicator
              wa_ind-webre = ' '.            " Clear GR-based IV Indicator
              wa_ind-lebre = ' '.            " Clear Srv-based IV Indicator
              wa_ind-xersy = ' '.            " Clear ERS Indicator
            ENDIF.                                           
            MODIFY i_ind FROM wa_ind INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
        <f1> = i_ind[].
      ENDIF.          
    ENDIF.
    This code is in production and has been working fine.
    The requirnment is now to make this indicator work for all the Purchase order before this code has been written in the Exit. For this my functional suggests that to write a separate program using BDC for PO change and jus add a period/dot  in the short text and save it. The code has been written, the user exit and the above code is getting triggrred values are updated in internal table correctly.
    However the flags was not set or cleared when seen in the tcode ME22N . This works fine if the tcode me22n is run directly and not working in BDC.
    I have tried with ME22 without enjoy transaction in BDC changing the POT Program to SAPMM06E. It does not work.
    Please help me as why it is not uodating in the table when using BDC.
    Thanks in Advance.
    Senthil Kumar

    Hi All,
    Any luck on this??
    Thanks

  • 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

  • User exit or BADI for recruitment

    Hi,
    I am new to HCM, can you give me user exit or badi for recruitment.
    Requirement - i have developed an infotype which i am updating through BSP, while the custom infotype is updated it should simultaneously update some of my Z tables. Hoping for positve replies earliest.
    Thanks in advance:-
    Santosh

    Hi,
    <b>Infotype</b>The data fields of HR master data, time management and recruitment are grouped logically into information types or infotypes for short.
    Examples of infotypes are "Family/Related Person", "Organizational Assignment, "Basic Pay".
    The following naming conventions apply to infotypes:
    Infotypes 0000 to 0999 are used for HR master data
    and sometimes for applicant data
    Infotypes 1000 - 1999 for organizational management
    Infotypes 2000 - 2999 for time data
    Infotypes 4000 - 4999 for applicant data
    Infotypes 9000 - 9999 for customers
    <b>Function character of step</b>
    This controls for which types of processing (create, change and/or delete a data record) a dynamic action should be carried out.
    The processing type is indicated by a two-digit numeric value. These values can be added up; in other words, you can enter several processing types for each infotype, subtype or field. A dynamic action can also be carried out independent of the current processing type.
    00 for Independent of the current function carried out
    02 for Change
    04 for Create
    06 for Change and create
    08 for Delete
    10 for Change and delete
    12 for Create and delete
    Examples
    If you enter 06, an action is carried out if the specified infotype was created or changed.
    If you enter 00, an action is carried out irrespective of whether the specified infotype was created, changed or deleted.
    <b>Variable function part</b>
    The variable function part, which depends on the indicator for step, can have the following meaning:
    <b>P - Plausibility checks</b>
    You can enter values for specific infotype fields. Field names must be entered in full. Literals and constants can serve as comparison values. These must be enclosed by inverted commas. Variables can also be used.
    The old value of a field can be used for comparison; the field name must be preceded by PSAVE-.
    If fields of other infotypes are used for comparison, these must be stored in the module pool of the current infotype.
    The following comparison operators are supported:
    = equal to,
    < less than,
    <= less than or equal to,
    > greater than
    >= greater than or equal to and
    <> not equal to.
    Consecutive checks must be linked by a logical AND. Logical OR links must also be indicated by a /X.
    Note:
    Note that all checks with OR links must have a /X.
    If the result of the comparison operation is not "true", then the following commands (I, F, W etc.) are skipped over until a field is reached or a new comparison operation takes place.
    Examples
    Infotype  Field ..... Ind.   Variable function part
    0007      STAT3       P      P0007-STAT3='0'
    0007      STAT3       P      PSAVE-STAT3='1'
    The step is taken if the value in the P0007-STAT3 field changes from 1 to 0.
    0007                     P      P0013-KLKZ1<>'0'/X
    0007                     P      P0013-ALVKZ<>'0'/X
    0007                     P      P0013-RVKZ1<>'0'/X
    0007                    P      P0013-RVNUM=SPACE
    The first three conditions are linked by an OR; at least one of these conditions must be met. Condition 4 must always be met.
    The step is taken if the following holds true:
    P0013-KVKZ1 not equal to 0 or P0013-ALVKZ not equal to 0 or P0013-RVKZ1 not equal to 0, and P0013-RVNUM empty.
    <b>I - Maintain infotype record</b>
    Enter the step, infotype, subtype, object ID, start and end dates of the record and an indicator which defines whether the step is to be run in the background. The possible actions are INS, COP, MOD, and DEL.
    Use commas to separate selection criteria just like the separator in the matchcode. If an entry is missing, the system inserts a comma.
    Separate the indicator for suppressing dialog from other entries by a slash D (/D).
    Constants, such as those for subtypes, are not enclosed in inverted commas.
    Variable entries are also permitted. Fields containing such values must be put in brackets.
    Examples:
    Infotype  Field ....  Ind.  Variable function part
          ....             I    INS,19,01/D
    Step: Create a Dates record, subtype 01, run in the background
          ....             I    DEL,14,M559
    Step: Delete Rec. Payments/Deds. record with subtype (wage type) M559.
    0007 ....                I    INS,8,,,(P0007-BEGDA),(P0007-ENDDA)
    Step: Create a Basic Pay record (0008) without subtype and object ID. The start and end dates are the same as those in the current Planned Working Time record (0007); specify these two fields only if they are filled because the dynamic action was triggered by this infotype.
    <b>W - Default values for new record</b>
    Literals or variables are used as default values.
    Set the defaults for the infotype, subtype, object ID, start and end dates using an I step and not a W step.
    Do not set defaults for Q fields of an infotype because the values for these fields are derived from the corresponding P fields.
    Examples
    Infotype  Subtype  ..... FC  Ind.  Variable function part
    0021       2              04  I     INS,0015,M430
    0021        2              04  W     P0015-BETRG='10000'
    When a Family/Related Person record (0021) record with subtype 2 (child) is created, an Additional Payments record (0015) with a default amount of 100.00 is created.
    <b>V - Cross-reference to another step</b>
    Here, you can combine fields to groups. The variable function part contains the value in the field which follows the "field" column. Steps which are specified only for the following field are also triggered for each of the other fields.
    Examples
    Infotype  Field  ..... FC  Ind.  Variable function part
    0016       PRBZH        06  V     PRBZT
    0016       PRBZT        06  I     DEL,0019,01/D
    Infotype 0019, subtype 01 is deleted in the background when the field PRBZT or PRBZH in infotype 0016 is changed or created (function code 06).
    The following entries are equivalent:
    0016       PRBZH        06  I     DEL,0019,01/D
    0016       PRBZT        06  I     DEL,0019,01/D
    <b>F - Call a routine</b>
    You can call internal (module pool) as well as external routines.
    If you call external routines, type the program name in brackets after the routine name. Do not specify 'using' parameters. When calling an external routine, all data must be declared in a common part. You can use the fields of structure RP50D to return values from the routine. These are not used in the standard system and can only be populated via the routine and then can be used for defaults (W-Commands).
    This allows customer-specific routines to be formulated with all the above steps.
    Example 1:
    Infotype  Field  .....  Ind.   Var.function part
    0016      PRBZT         F      PROBATION
    0016      PRBZT         I      INS,19,01
    0016      PRBZT         W      P0019-VTRMN=PRBEND
    Module pool MP001600 contains the PROBATION routine. This routine uses the entries in the fields P0016-PRBZT and P0016-PRBEH to determine the end of the probation period which it stores in the field PRBEND.
    The system creates a new 'Dates' record with the reminder date = PRBEND.
    Example 2:
    Infotyp ..... Ind. Var. function part
    0001           F      GET_DATE(ZPUDYN01)
    0001          I      INS,19,01
    0001           W      P0019-VTRMN=RP50D-DATE1
    The GET_DATE routine in program ZPUDYN01 calculates a date and enters this date in the RP50D-DATE1 field via "TABLES RP50D" in ZPUDYN01. This date can be user-defined in GET_DATE: if necessary, user-defined infotypes can be read afterwards.
    <b>M - Send a mail</b>
    Enter the name of the feature which defines the characteristics of the mail.
    Example
    Infotype  Field  .....  Ind.    Var.function part
    0001     SACHP         M       M0001
    A mail is sent when the field SACHP is changed. The characteristics of the mail are defined in feature M0001.
    In the standard system, feature M0001 is provided as a model. The documentation on feature M0001 explains how to define the characteristics of a mail.
    <b>ADDITIONAL HINTS</b>
    If you use a date as a constant, enter it as YYYYMMDD (YYYY=year, MM=month, DD=day).
    The table strings T001P, T503 and PSPAR are filled with the values which are valid on the record start date.
    The old values of the infotype are stored in the field string PSAVE. The structure of this string is the same as the Pnnnn structure (nnnn=infotype). The structure is filled with (valid) values only when the delete, change and create functions are used.
    Please read Create dynamic actions in the Implementation Guide.
    Regards
    Bernd

  • BADI / USER EXIT for MB01 - after posting GR.

    Hi,
    We have some requirement, where we need to create the Goods Issue using bdc after posting the GR in MB01. can anybody give the user exit / BADI for this.
    i have used BADI - MB_DOCUMENT_BADI : It is triggering while click on the Save button in the MB01, but it is calling before post the GR. the customization part should trigger after the GR post.
    Regards,
    Sree

    Hi Sree,
    Do it the other manner. Store the GR in a Z-table and do the BDC or use the BAPI as suggest Keshav in a periodic job, or call it with a job (OPEN_JOB, CLOSE_JOB,...) in a function module, always with the option IN UPDATE TASK. Think that you have the number of document in this BADI and you must wait some time (1, 2 or 5 seconds) until the database save all data.
    Be careful with this badi (MB_DOCUMENT_BADI), see Note 92550 - Stock inconsistency due to customer enhancement (exit, BAdI) to understand the reasons.
    Regards,
    Eduardo
    Edited by: E_Hinojosa on Feb 2, 2011 2:20 PM

  • User Exit to call program to create IDocs.

    Hi All,
    For any creation/changes of material master using MM01/MM02 (after save ) one of the user exit will trigger.
    From the user exit, I have to call the custom program to create MATMAS IDOCs.
    if any failures in changes/creation of material master. It has to roll back eveything created by program.
    Please let me know how to achieve this with out calling an event.
    Thanks - Vinay

    There are a number of standard methods to automatically create the IDOC.  You can activate the change pointers and depending on need, use BD64 to create a distribution model, and create the necessary WE20 setups to create the outbound IDOC.
    If you have to process the IDOC using custom logic, you can define that as well - although it's not clear why you need a custom generating program.  You can insert code into one of the IDOC user-exits to manipulate the content if needed.  Also, don't overlook the pre-delivered stuff from SAP that provides filtering out of segments and the like.
    There are a few good SAP PRess books about doing ALE distribution -- if this is an unfamiliar area, it's worth the cost to buy one -- if you spend any time around IDOCS, you'll appreciate it.

  • Need selection screen values in Search help user exit in same report

    Hi Experts,
    I am using Logical Data Base PNP.
    Created a custom search help to validate the records for IT000 based on the selection screen dates.
    Enter the DATEs for Data Selection Period and Person selection period in the selection screen.
    When I for search help for PERNR field in the same report, I need the selectin screen DATE values to be in user-exit of search help.
    This will help me in validating the records for specific employees within the date range of given DATE in selectin period.
    As of now it's picking the employees based on the DATE selection of selection screen,
    Regards,
    Prasad

    Hi,
    Go Ahead as mentioned by Satyesh T - (Option two).
    Reading Select Options from DYNP_VALUES_READ
    reffer the above link for getting more clarity for using  'DYNP_VALUES_READ'
    Regards.
    Arun

  • Coding in user exit in program rffous_t

    The ACH file generated has to be updated with company specific information required by the NACHA file format standards. SAP functionality will be used to generate the interface file. 
    The ACH file will contain all employees who have pay for the current pay period being processed and have direct deposit set up for the current pay period.  The ACH file will run during the biweekly and monthly payroll runs.&#61485;This file will be generated upon completion of the current payroll processing.
    The user-exits are invoked when the RFFOUS_T program is executed.For each record type, use the mentioned user-exit below:
    •     1 (File Header Record)
    o     EXIT_100
    o     Function Module EXIT_RFFOEXIT_100
    •     5 (Batch Header Record)
    o     EXIT_101
    o     Function Module EXIT_RFFOEXIT_101
    •     8 (Batch Control Record)
    o     EXIT_105
    o     Function Module EXIT_RFFOEXIT_105
    Based on the account id (REGUH table-HKTID field), the other fields have been identified.
    Record Type "1"          
    File ID (Immediate Origin) - Structure DTAMUSFH, Component FH4     
    Origination Bank (immediate destination name) - Structure DTAMUSFH,Component FH11
    Company Name (immediate origin name) - Structure DTAMUSFH, Component FH12
    Record Type "5"                         
    Company Name - Structure DTAMUSBH, Component BH3     
    Company Discretionary Date - Structure DTAMUSBH, Component BH4
    Company ID - Structure DTAMUSBH, Component BH5     
    Company Entry Description - Structure DTAMUSBH, Component BH7
    Company Descriptive Date - Structure DTAMUSBH, Component BH8
    Effective entry date - Structure DTAMUSBH, Component BH9
    Record Type "8"     
    Company ID - Structure DTAMUSBC, Component BC7     
    Message Authentication Code - Structure DTAMUSBC, Component BC8
    Can somebody please advice me after reading the above information that how should i proceed for the coding to be done inside the user exit!!

    Hi Bhaskar,
    1. Go to CMOD(transaction) create an enchancement project .
    2. enter the project name ZName and click create and enter the short description of the project.
    3.now click on the enhancement assigment button on the application tool bar and enter the enhancement number: RFFOX100 (File Header Record),RFFOX101(Batch Header Record), RFFOX105(Batch Control Record).
    4.now select the first enhancement number i'e RFFOX10 and click on the components it will show you the fuction module exit EXIT_RFFOEXIT_100.
    5.double click on it it will take you to the fuction builder screen now click on the include it will show you the warrining 'Program names ZX... are reserved for includes of exit function groups' just ignore the warning and press enter after placing your coursour on the include, system asks to create the include press yes.
    6..and now in the include code your logic to update The ACH file generated has to be updated with company specific information required by the NACHA file format standards as per your needs.
    follow the procedure from 4 to 6 to populate Batch Header Record and Batch control record in the exits EXIT_RFFOEXIT_101and
    EXIT_RFFOEXIT_105 respectively.
    thanks and Regards,
    pavankumar

Maybe you are looking for

  • Safari crashing on Wifi networks

    safari crashes every time I open it when using a wifi network. It works fine when I am using a mobile USB stick for internet though. Can anyone help?

  • ISEMPTY Syntax in DAX

    My DAX query was taking a long time to run when I added NOT ISBLANK() condition in CALCULATE statement. After researching for workaround, I found an article that suggested replacing ISBLANK() with ISEMPTY() function in the new SP of SQL Server. I did

  • Change name-server order

    Hi, I have some local name-servers configured on a router using the ip name-server command. The router also knows about some external DNS servers that were supplied via DHCP - the WAN interface uses DHCP to obtain its IP address and gets some DNS ser

  • Any idea how to test wether the cropBox actually contains art?

    I'm  exporting large drawings as tiles for a google maps project. I do so by moving the cropBox and exporting the covered area as PNGs. Works great so far but ... since the drawing is kind of organic and does not fill the whole area i'm exporting i h

  • After reinstalling Photoshop PS6 I cannot any longer save smart collections in Bridge

    Hi, after reinstalling Photoshop PS6 I cannot any longer save smart collections in Bridge. I create a smart collection by entering criteria, but when I click on SAVE, it is not saved. In my old installation (before I had to install a new hard disk),