ABAP HR ROUTINE OR EXIT

I want to fetch the data from Infotype 581 from field of Rent paid  --- ( Field : RTAMT Table : Q0581 )
and want to calcualte as per the eligibility criteria and the result should be displayed in the Infotype 585 ---
( Field : PCNTR Table : Q0585 ) in Proposed contribution field .
         I think now the requirement is clear. I am new to ABAP - HR. Please let me know how this is done.
H R Routine or Exitsap abap
Reply to all
Forward
Reply by chat
Filter messages like this
Print
Add to Contacts list
Delete this message
Report phishing
Report not phishing
Show original
Message text garbled?
Why is this spam/nonspam?
KB shivakumar     
Hi satyesh, Can you please tell me where do I write a routine for H R Module....
Nov 26 (1 day ago)
talari satyesh     
Hi Shiva, Do one thing...as i mentioned in my previous mail. After u execute ...
10:45 AM (10 hours ago)
KB shivakumar     
Hi Sir, I will try with that option thanks very much. Shivakumar K B 91988692...
10:59 AM (10 hours ago)
KB shivakumar to talari
show details 8:35 PM (1 hour ago)
Reply
Hi Satish,
One of my friend told me that problem can be solved using dynamic actions
Goto Tcode SM30
and table V_t588Z Go that Table and code it.
I have to fetch the field based on some conditions and .
The conditions are
1. Actual Rent Paid   For Ex 5000*12 = 60000
2. Actual Rent Paid  - 10% of Basic Salary
for ex 5000*12 = 96000
60000 - 10% of Salary
If salary is 10000/ month
10000*12  = 120000
10% of it (10/ 100)*120000
= 12000
So 60000 - 12000 = 84000
3. 40% of Salary
For ex 40*10000 = 40000
4. 50% of Salary = 60000
5. Maximum Limit is 24000
       The value which is the lowest of these values have ro be displayed will be the Propriter's Contribution.
      I dont know what to code there in SM30.
Or is the approach Right.I dont know anything about it. Please let me know how it is done.
Shivakumar K B
919886920258

Hi,
You can do this by implementing User Exit PBAS0002. You need to write code in FM EXIT_SAPFPS0M_002.
you can write something like:
  IF innnn-infty = '0581' AND ( ipsyst-ioper = c_ins OR
        ipsyst-ioper = c_mod OR ipsyst-ioper = c_cop ).
do calculation...
upload data in 585 by HR_INFOTYPE_OPERATION.
Endif.
regards,
Dharitree

Similar Messages

  • Severe error(s) occurred in phase PREP_INSTALL/SHDINST_OS Last error code set: Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1

    Hi Experts ,
    Currently performing EHP7 upgrade I have faced error during the configuration phase , below attached was the error screenshot .
    error logs shows the below :
    Executing module 'PREP_INSTALL'.
    Execution of PREPARE module "Installation" begins at 20140302202456
    # Starting phase execution with maxpar = 6, scheduled: 14x'-'
    CURRENTPHASE PREP_INSTALL/SHDINST_OS
    ...started at 20140302202456
    # Using phase log file 'SHDINST_OS.LOG'.
    ..finished at 20140302202457 with status ABORTED.
    # Error message set: 'Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1, see 'H:\SUM\abap\log\SAPup.ECO' for details'
    .begin dialog at 20140302202459
    SHDINST_OS log :
    1 ETQ399 Possibly the password for user ISNET\SAPServiceDEC entered in phase
    1 ETQ399 INITPUT was wrong. You can reset it by calling 'SAPup set stdpar'.
    1 ETQ399 Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    1 ETQ399 H:\SUM\abap\exe\sapstartsrv.exe -r
    1 ETQ399 -p H:\SUM\abap\DEC\SYS\profile\START_DVEBMGS01_SAPECCDV -s DEC -n 01
    1 ETQ399 -U ISNET\SAPServiceDEC -P <PASSWORD> -e ISNET\decadm
    1 ETQ399 and check if the service SAPDEC_01 can be stopped and restarted.
    1EETQ399 Last error code set is: Process H:\SUM\abap\exe/sapstartsrv.exe exited with -1, see 'H:\SUM\abap\log\SAPup.ECO' for details
    1EETQ204 Upgrade phase "SHDINST_OS" aborted with severe errors ("20140302202457")
    Kindly advice to fix

    Hi Mohan,
    Solution of your issue is already present in SHDINST_OS.LOG
    Possibly the password for user ISNET\SAPServiceDEC entered in phase
    1 ETQ399 INITPUT was wrong. You can reset it by calling 'SAPup set stdpar'.
    1 ETQ399 Try to execute SAPSTARTSRV.EXE manually using the following syntax:
    1 ETQ399 H:\SUM\abap\exe\sapstartsrv.exe -r
    1 ETQ399 -p H:\SUM\abap\DEC\SYS\profile\START_DVEBMGS01_SAPECCDV -s DEC -n 01
    1 ETQ399 -U ISNET\SAPServiceDEC -P <PASSWORD> -e ISNET\decadm
    1 ETQ399 and check if the service SAPDEC_01 can be stopped and restarted.
    Read the log carefully.Have you performed the above mentioned steps from SHDINST_OS.LOG file at your end.
    Also just give a full restart your server,up all the required services & confirm the execution of the phase.
    Thanks,
    Gaurav

  • How to Debug  ABAP/4 routine in Dynamic Selection?

    Problem:
            I am not able to debug the ABAP/4 routine in data dynamic selection.
    Analysis:
            I typed /H on  transaction command prompt. I entered to ABAP/4 debug mode.
    Then I am not  able to debug my routine. Give me solution for this problem?

    Hi Surya,
    If you want to debug the routines in transformation
    GOTO Transformation you need to debug -- seelct the tranformation id
    To debug these routines we need to go to the generated program of the Transformations in two ways:
    We can get the Program ID for the Transformation ID (6HkDSDsHJNQO0VTU3HK01MH7) from table RSTRAN.
    You can get the program id from the table... append GP to the program id you will get the report program for transformations.
    Now goto Tcode : se38 enter the program name and set the break points.
    On going with display we will be to the ABAP editor of the Report Program.
    The other way of getting to this program is from the Transformations itself.
    Go to Extras -->Display Generated Program. It directly takes us to the ABAP editor of the Report Program.
    Set a break point at the code you want to debug, i.e. at your selections at start routine and at your update
    routine.
    Now after setting the Break points run the DTP in the debug mode.(Select the Processing Mode Serially in the Dialog process (for Debugging)).
    If you are on BW 3.x
    /people/pavan.bayyapu/blog/2006/09/06/debugging-data-upload-in-bw
    Regards
    KP
    Edited by: prashanthk on Jul 25, 2010 10:05 AM

  • 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

  • How to see the ABAP Code behind SAP Exit Variables.

    Hi Everyone.
    I was wondering if anyone could help me with the steps to see the ABAP Code behind a SAP Exit Variable.
    Sometime back I remember of going to Transaction SE37 - Function Module and give the Variable name,
    Eg: 0F_ADAY, Hit F4 or something like that and was able to see the ABAP Code/Function Module/Exit written for that Variable.same
    But today I tried to do the same thing to see the code for Variable 0P_FVAEX but I was NOT able to see it.
    I think I am missing something.
    Can someone help me recollect what I am missing.
    Thank You for your time
    NOVICE

    Hi bi novice,
    big sorry for the late reply!
    The following variables are defined in function module RREX_VARIABLE_EXIT as case statement:
    '0CMONTH', '0CWEEK', '0CYEAR', '0CQUART', '0DAT', '0CWD', '0FYEAR', '0FPER', '0FYTCFP',
    '0FYTLFP', '0FYTCD', '0CYTCM', '0CYTLM', '0CYTCD', '0LYTCLD', '0CMONTHT', '0CWEEKT', '0CYEART', '0CQUARTT', '0DATT', '0FYEART', '0FPERT'
    Best regards,
    Andreas

  • Routine / User exit in SD to create an Accounting Document

    Hi Everybody,
    Anybody please tell me the Routine / User exit in SD to create Accounting Document from an SD billing document.
    Also need the user exit that will split the accounting document into as many documents as required.
    The problem I am facing is like the splitter program fails to copy the document header text into all the accounting documents produced as a result of the splitter program. Appreciate your help.
    Thanks,
    Neethu.

    Hi Neethu,
    Sorry, I don't understand very well your requirements.
    Do you have problems with splitting in billing? If yes, see SAP Note 11162 - Invoice split criteria in billing document and search posts with the string ZUKRI.
    To change data in the interface to FI from billing, see Note 301077 - User exits for the interface to accounting, but I think that you cannot create new FI documents with these enhancements.
    Other question, see SAP Note 36353 - AC interface: Summarizing FI documents, perhaps your problem can be solved with the advices of this note.
    I hope this helps you
    Regards
    Eduardo

  • ABAP Update Routine

    Hi All,
    I am new in SAP BW and I am trying to learn more on the ABAP Routine in the Update Rule.
    Questions:
    1. The program name is always UPDATE_ROUTINE?
    2. There will always be a default subroutine "compute_data_field"?
    3. What do you mean by MONITOR STRUCTURE RSMONITOR?
    4. Is COMM_STRUCTURE a keyword in ABAP?
    5. Is it possible to give me a details of each MONITOR STRUCTURE part of the code?
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS8ZD2C_O05
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/VZD2C_C05T-/BIC/ZABLSTCST
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    result value of the routine
      RESULT = .
    if the returncode is not equal zero, the result will not be updated
      RETURNCODE = 0.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.

    Found out through self-study

  • Error in the ABAP Code for Customer Exit Variable

    Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
    i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
    In CMOD i had written the below Code:
    When 'ZVWKNO'.
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    But when i execute the query the default value is not populated with Week-1 No in the variable screen
    Please update me what went wrong
    Thanks

    Case ZVWKNO.                "write this with out comments
    When '1'.              "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.                                    "check this Week Minimum is '01' and Maximum '52'
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    Prabhudas

  • Web Dynpro ABAP: Assigning of Conversion Exits in ALV

    Hi,
    We are currently developing a generic data display application using ALV technology in Web Dynpro ABAP. "Generic" means that the structure of the data is created dynamically during runtime (using RTTS) and that even the contained data elements are created dynamically without any relation to DDIC. The generation is based on metadata like field name, data type, length, decimals, conversion exit.
    Our problem is that we were not able to find a way to assign the conversion exit of a data element ("column") in Web Dynpro ALV. Without this feature, no output conversions will take place since the data elements have no relation to DDIC. In the "classical" ALV, this could be easily done using method SET_EDIT_MASK of class CL_SALV_COLUMN.
    Is there a similar method in WebDynpro ALV or at least an alternative approach to assign a conversion exit to a column or cell?
    Thanks for your help in advance.
    Best Regards,
    Sven

    Hello Sven Hader,
    As you said you are generatiing the metadata like field name, data type, length, decimals, conversion exit dynamically.
    Can you please let me know how you are diong this?
    Meanwhile, you can try this approach to assign a Conversion exit to ALV Table column attribute dynamically.
    DATA:     lv_data                         TYPE  dd04v,
                  lv_mode_ext2int          type   ESEBOOLE. "Conversion mode that you are in
      read the data from the database
        CALL FUNCTION 'DDIF_DTEL_GET'
          EXPORTING
            name                = lv_ddobjname
            state               =   iv_object_state
            langu               =   iv_langu
          IMPORTING
            dd04v_wa         =   lv_data
          EXCEPTIONS
            illegal_input       = 1
            OTHERS           = 2.
        CHECK NOT lv_data-convexit IS INITIAL.
        CONCATENATE 'CONVERSION_EXIT_' lv_data-convexit '_INPUT'
          INTO cl_im_imp_ehs_material_erp=>mv_conversion_exit_input.
        CONCATENATE 'CONVERSION_EXIT_' lv_data-convexit '_OUTPUT'
          INTO cl_im_imp_ehs_material_erp=>mv_conversion_exit_output.
      IF lv_mode_ext2int = 'X'.
        ASSIGN cl_im_imp_ehs_material_erp=>mv_conversion_exit_input
            TO <lv_funcname>.
      ELSE.
        ASSIGN cl_im_imp_ehs_material_erp=>mv_conversion_exit_output
            TO <lv_funcname>.
      ENDIF.
    (3) call the conversion exit
      CHECK <lv_funcname> IS ASSIGNED.
      TRY.
          CALL FUNCTION <lv_funcname>
            EXPORTING
              input  = iv_value
            IMPORTING
              output = ev_value.
          IF sy-subrc <> 0.
          ENDIF.
        CATCH cx_sy_dyn_call_illegal_func
              cx_sy_dyn_call_illegal_type
              cx_sy_dyn_call_param_missing
              cx_sy_dyn_call_param_not_found.               "#EC NO_HANDLER
      ENDTRY.
    Endif.
    I hope it should work.
    Thanks,
    Bharath.K
    Edited by: Bharath Komarapalem on Dec 16, 2008 2:47 PM

  • BW ABAP in routines

    Dear All,
    I would need some ABAP help in a BW transformation routine. My ABAP knowledge is limited.
    I have a source field called YQM_MASCHINE with various values, for example: CONE114-M014S002 and TUBE-M015S001. There can be many other different values, of course. The requirement is to fill 2  target fields (let us call them ABC and XYZ) from the source field YQM_MASCHINE field using the following 2 rules:
    1) FIELD ABC = YQM_MASCHINE up to dash " - ", so in our example it would be CONE114 and TUBE. The dash and the strings after the dash need to be deleted.
    The difficulty for me is that we do know where the dash falls in the character string so I cannot use RESULT = SOURCE_FIELDS-YQM_MASCHINE(n), because "n" can be take various values.
    2) FIELD XYZ = YQM_MASCHINE without the last 4 characters, that means CONE114-M014 and TUBE-M015. So the values S002 and S001 need to be deleted from the original YQM_MASCHINE value. Again, I do not know how long the character string is.
    A workaround for the first issue would be to use IF, ELSEIF, n times, until I find the dash...it is not a really nice solution, I guess.
    l_mach = SOURCE_FIELDS-YQM_MASCHINE.
        IF l_mach(4) = '-'.
          RESULT = l_mach(3).
        ELSEIF l_mach(5) = '-'.
          RESULT = l_mach(4).
        ELSEIF l_mach(6) = '-'.
          RESULT = l_mach(5).
        ELSEIF l_mach(7) = '-'.
          RESULT = l_mach(6).
        ELSEIF l_mach(8) = '-'.
          RESULT = l_mach(7).
        ELSEIF l_mach(9) = '-'.
          RESULT = l_mach(8).
        ELSE.
              ENDIF.
    As mentioned, my ABAP is quite poor. There must be a way to find a dash in a string without doing many IF, ELSE...
    For the rule number 2 I have no solution in my "dictionary".
    Many thanks for your help.
    Kind regards,
    Csaba

    Hi Amandeep,
    thanks for your idea. The split works fine for the first rule, indeed. I had to include a check on the dash, since there are values with no dash, as well.
    How would you do the 2nd rule where the last 4 characters need to be deleted? That is slightly different because the split is not done after the dash.
    Many thanks,
    Csaba
    Rule 1 - okay
    l_mach = SOURCE_FIELDS-YQM_MASCHINE.
        SEARCH l_mach FOR '-'.
        WRITE: / SY-SUBRC UNDER 'SY-SUBRC'.
        IF SY-SUBRC = 0.
          SPLIT SOURCE_FIELDS-YQM_MASCHINE AT '-' INTO s1 s2.
          RESULT = s1.

  • ABAP Trans routine help

    Hi
    I'm writing below abap routine in transrules to bring the plant from ZODS_01 active table :
      SELECT SINGLE PLANT INTO ZPLANT
      FROM /BIC/AZODS_01
      WHERE DOC_NUMBER = TRAN_STRUCTURE-VBELN
      AND /bic/ZCODE = 'SE'.
    Code is working if there is only one record exist in /BIC/AZODS_01 with ZCODE = SE. But if there is more records exist with different codes including SE, its not brining the SE value. Do I need to remove the Single from SELECT statement or do I need to loop this in start rotuine to loop through every record until it finds SE ?
    Please advice.

    Hello
          Writing a SELECT SINGLE is not good if we want a better Code Performance , as for each record it hits the data base , which inturn will increase the load time . rather its suggested that Do one select with For all entries of data package & subsequently at INfo Object level have READ statement . some time like below
          SELECT
         PLANT
            FROM /bic/a<DSO Name>
            INTO TABLE Internal table
             FOR ALL ENTRIES IN source_package
           WHERE doc_number = source_packagedoc_number
    & read would like below
        READ TABLE Internal table  INTO wa_doc
             WITH TABLE KEY doc_number = SOURCE_FIELDS-doc_number
    If this suggestion looks good , & need more code help do let me know
    Thanks
    Vivek

  • ABAP Start Routine

    Hello,
    I am writing a Start Routine in my update rules from an ODS into another ODS.  My start routine is basically just restricting some data from being updated into my data target.  I am restricting based on 0VYPTE = 20.  That is, if a records has 0VTYPE = 20 I am deleting it from the data_package.  If I debug through the program, it works correctly with one record but when I throw in about 120K records it doesn't work. Can someone please have a look and tell me what is wrong here?
    LOOP AT DATA_PACKAGE.
         <b>IF DATA_PACKAGE-VTYPE NE 10.</b>
           DELETE DATA_PACKAGE.
             CONTINUE.
         ELSE.
           IF DATA_PACKAGE-/BIC/CASES NE 'CS'.
                 PERFORM load_mrscube_tables USING DATA_PACKAGE-SOURSYSTEM.
                 PERFORM BASEUNIT_CONVERT tables
                                              MONITOR
                                     using    DATA_PACKAGE-MATERIAL
                                              DATA_PACKAGE-SOURSYSTEM
                                              DATA_PACKAGE-/BIC/CASES
                                              'CS'
                                              DATA_PACKAGE-/BIC/CASES_REV
                                     changing
                                              quant_out.
                     EXIT.
                 EXIT.
         modify DATA_PACKAGE.
           ENDIF.
         ENDIF.
    ENDLOOP.

    Hi Nyrvole,
       Try to change the code this way and check(debug).
    DELETE DATA_PACKAGE WHERE VTYPE NE 10.
    LOOP AT DATA_PACKAGE.
    IF DATA_PACKAGE-/BIC/CASES NE 'CS'.
    PERFORM load_mrscube_tables USING DATA_PACKAGE-SOURSYSTEM.
    PERFORM BASEUNIT_CONVERT tables
    MONITOR
    using DATA_PACKAGE-MATERIAL
    DATA_PACKAGE-SOURSYSTEM
    DATA_PACKAGE-/BIC/CASES
    'CS'
    DATA_PACKAGE-/BIC/CASES_REV
    changing
    quant_out.
    EXIT. -- WHY THIS EXIT FOR...??
    EXIT. -- WHY THIS EXIT FOR...??
    modify DATA_PACKAGE. -- ARE YOU CHANGING ANY RECORDS..??
    ENDIF.
    ENDLOOP.
    Put break-point after end loop and dugug and see the no of records.
    Hope it Helps
    Srini

  • 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

Maybe you are looking for