User exit for Infotype 0102 - Grevience

Hi all,
I have a requirement where i have to put a check on infotype 0102 - greivence NA through user exit EXIT_SAPFP50M_002 .
The check is that if the user enters a personnel number , grievence number and a stage for which the record alreday exist in the table for the same personnel number , then system should pp up an error message.
I wrote the below code in EXIT_SAPFP50M_002 :-
data : i0102 like p0102 occurs 3 with header line,
begin of fs2,
pernr like p0102-pernr, grnum like p0102-grnum, grstg like p0102-grstg,
end of fs2.
CASE INNNN-INFTY.
WHEN '0102'.
MOVE INNNN TO I0102.
LOOP AT SCREEN.
SELECT PERNR GRNUM GRSTG FROM PA0102 INTO corresponding fields of fs2 WHERE PERNR = I0102-PERNR.
IF fs2-GRNUM = I0102-GRNUM ANd fs2-GRSTG = I0102-GRSTG.
MESSAGE 'A record already exist for selected combination of Grievence Number and Stage' type 'e'.
endif.
ENDLOOP.
ENDCASE.
Here system is throwing an error as " i0102 and innnn are not mutually convertible".
I tried to use a metod :
<b>cl_hr_pnnnn_type_cast=>prelp_to_pnnnn</b>
but still same error :
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = i0102.
MOVE INNNN TO I0102.
LOOP AT SCREEN.
SELECT PERNR GRNUM GRSTG FROM PA0102 INTO corresponding fields of fs2 WHERE PERNR = I0102-PERNR.
IF fs2-GRNUM = I0102-GRNUM ANd fs2-GRSTG = I0102-GRSTG.
MESSAGE 'A record already exist for selected combination of Grievence Number and Stage' type 'e'.
endif.
ENDLOOP.
Please suggest what to do.
Thanks and regards
Ribhu

Hello Ribhu
Perhaps the following coding may be useful:
* define local data
  DATA:
    ls_p0102      TYPE p0102,
    fs2           TYPE pa0102.
  CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
      prelp = innnn
    IMPORTING
      pnnnn = ls_p0102.
  "  LOOP AT SCREEN.  " ???
  SELECT pernr grnum grstg FROM pa0102
    INTO CORRESPONDING FIELDS OF fs2
    WHERE pernr = ls_p0102-pernr.
    EXIT.
  ENDSELECT.
  IF ( fs2-grnum = ls_p0102-grnum    AND
       fs2-grstg = ls_p0102-grstg ).
    MESSAGE e398(00) WITH text-err
      RAISING error_occured.
  ENDIF.
  "  ENDLOOP.  " ???
Regards
  Uwe

Similar Messages

  • Need Fcode in User Exit For Infotype

    Hi,
    I am writing a User exit for Infotype 0002 at Customers Site. I need Fcode to realize a specific logic. I am using the exit PBAS0001 for this purpose. can anyone tell me how to I get Fcode so that I can use it in the code ?
    Regards,
    Suma

    Hi Suma,
    sorry that i posted the false BAdI.
    You have to use HRPAD00INFTY. That is for PA.
    The BAdI HRBAS00INFTY is for PD/OM.
    Regards
    Bernd
    But there is no paramter ok_code
    Message was edited by:
            Bernd Köhn

  • User exit for infotype 21

    i  want o find out user exit for infotype 21   for the time and  Absences  plsea help me out

    >
    SANDEEP JADHAV wrote:
    > Not working   man , when i used  infotype 21  and using subtype     i am getting  "  Creating   Absences "  screen   
    >  now  i am entering time and   Absences  hours when i save the entries  , now on that spot i want to find  out  user exit  but i am unable to get it
    >
    > Please help me out
    You meant infotype 2001, right?  the User exit  EXIT_SAPFP50M_002 works perfect or you could try the AFTER_INPUT method of the BAdI HRPAD00INFTY
    ~Suresh

  • How to find the user exit for infotype 2013 ?

    Hi All,
    How to find the user exit in infotype 2013? i want to change the drop down list default value in infotype 2013.
    Thanks,
    Srikanth P

    reward points if useful
    User exit name is PBAS0001.
    code should be written in ZXPADU01 for PBO
    ZXPADU02 for PAI.

  • User-Exit for Infotype 0045

    Hi,
          In infotype 0045 (loans) there is a field for Intrest rate on the loan..as of now this field is a drop down...is it possible through some user-exit to change the type of the field from drop down to input field so that user can enter the intrest rate manually
          awaiting your reply and thanks in advance
    regards
    Sai easwar

    HRPBAS01               User Exit for HR Master Data
    HRPC0001               HR: PC download authorization
    HRRPAI01               User exit for FB HR_ENTRY_DATE and HR_LE
    PARA0001               Enhancement for Determining the Number o
    PARA0002               Enhancement for Calculating Annual Salar
    PBASRP01               PA: User exit distributed reporting
    PBAS0001               PA: Pers.Admin./Recruitment: Default val
    PBAS0001               PA: Pers.Admin./Recruitment: Default val
    PBAS0002               PA: Enhancements for Personnel Administr
    BADI           BADI_PERSONID_EXT                          SAPMP50A                         Dynamic call
    BADI           EXIT_NAME                                  SAPLHRBAS00UTILITIES/LHRBAS00U   Dynamic call
    these are the available exit here!!
    gunjan

  • Reg User Exit for Infotype 8

    Hi,
    I have created two custom fields on infotype 8, i need populate on fied with base salaryBonus(from infotyp 14) and the other field  should be  the total of all line items on Infotype 8 ( Base salary shift differentials(permiums).
    In order to do this, i searching for user exit , can anyone help me in doing this ..please
    Thanks
    Kisu

    Hi,
    I looks into the exit.It seems it is doesnt get tigger while going through the PA40.I dont know is it possible or not but I need to do while going through the actions. when the user in pa40 goes through some actions and reaches infotype 8 and enters and the values and press enters ,at this moment I need to find the Exit that gets tiggers and calculates the values and populates the custom fields on 0008.
    I would like to know is it possible to do so..?
    Thanks
    Kisu

  • User exit for infotype 2002

    Hi ,
    The requirement is making the WBS Element field mandatory ONLY for infotype 2002 cost assignment pop up in pa30.Is this any user exit check.
    regards,
    srinivas

    Hi srinivasarao,
    1. Enhancement name is PBAS0001.
    2. Inside this FM is
       EXIT_SAPFP50M_002
      (for checking while saving)
    regards,
    amit m.

  • User Exit for Infotype 008

    Hi,
    I want userexit or BADI for Infotype 008. my requirement is i want to throw error if the user enters basic pay more than 15000 based on payscale type.
    Any one send me the solution .
    Regards,
    Srinath

    You can also create an enhancement if there is no BADI or userexit available. Just check the implicit enhancement options of that screen.
    E.g. There is one module CHECK_ANSAL which is executed if there was a change to the salary. In that module routine CHECK_ANSAL is called. In that routine right at the beginning and at the end there are two enhancement points where you could plug in whatever code you need.
    To check if a form has any enhancement points go to menu option PROGRAM - ENHANCE. Then choose menu EDIT - ENHANCEMENT OPERATION - SHOW IMPLICIT ENHANCEMENT OPTIONS.
    Select the main report which is MP00080 and set the cursor on the line where you can see lots of """""""""""""""""""""""""""""""""""""'
    Go to menu EDIT - ENHANCEMENT OPERATION -CREATE and that will allow you to create an enhancement in the code where you can then plug in whatever code you need. This code will always be executed whenever that module is called.
    Note that this is not a modification, just see it as a kind of user exit where you have access to all the variables the standard routine has access to.
    Hope that helps,
    Michael

  • User Exits for Infotype 8

    Hello Experts,
    Please can anybody advise about the available user exits or includes for Infotype 8?
    Many thanks,
    Regards,
    Anjali.

    Hi Anjali,
    User exits in PA30-
    More relevant for IT0008:
    PARA0001
    PARA0002
    PBAS0001
    PBAS0002
    HRPBAS0001
    Less relevant:
    HRPC0001
    HRRPAI01
    PBASRP01
    Regards,
    Dilek

  • User exit for infotype 8

    Hi,
    for specific country employees I want to add new field on basic pay screen to calculate new annnual salary based on some customer rules using uer exit. How shall i go about this?

    Hello
    For that you can access the P0008 structure in the PBO of your Z program generated, based on which you can do the calculation. Or else you can access the P0008 from the call stack of your program run.
    Also, you can use the exit ZXPADU02 which gets triggered for all the infotype. But put a check on IT0008 for your requirement.
    - Ranganath

  • User Exit for  Infotype 2006

    Hi,
    I have the requirement to change the deduction date( from/to date) 3 months ahead
    of the start date and enddate whenever the user enter it.
    pls help me out with the issue .

    Hello,
    Can anybody help me out with the above scenario ?????????/

  • User exit for IT0185

    Hi all,
    Pls kindly help me to find out the user exit for infotype 0185. I want to check the value when saving a record.
    Thanks,
    Quanglv

    Hi,
    1. Go to transaction CMOD
    2. Selct project PBAS0001
    3. View components
    4. Choose an exit
    5. Click EXIT_SAPFP50M_002
    6. This exit contains one include. Double click "ZXPADU02". The program ZXPADU02 runs executed every time PA30 or PA20 is executed.
    7. Add in ZXPADU02 this code for example:
    IF innnn-infty = '0105'.
    add sone useful code specifically for it0105here
    ENDIF.
    good luck

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

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

    Find myself

  • USer-exit for Custom Infotype

    We have a custom Infotype 9001.
    I need to do some validations for this Infotype.How do I find a user-exit for this.
    We are on ECC6.0.
    Thanks
    Kiran

    Hi,
    I have the same requirement. Can you please help me out. How to find user exit or badi or Enhancement Spot for the custom infotype.
    Thanks & Regards,
    Prabu

  • How to maintian user exit for a wage type

    Hello Experts,
         I would like to maintain a user exit for a particular wage type in infotype 14. As the business rules of the client are specific...So, please help me with ur views...
    thanks

    Hi
    Check the LTA , I am not sure but still you can configure for the medical also .
    Now to lapse is again a issue.
    Well i think you can do it .
    Now how is the main thing , suppose i can give you one example you can get the better way your own.
    Now How you are going to put the values from IT 90--- to 15 are you going to put directly ?
    Now there is std prog pc00_mXX_remc  /  remp now check with this program which is suitable for you and add the codings whatever required in the the customized program which you using to put the values to IT15 .
    You got it now.
    It can be done .
    All the best.
    Manoj Shakya.
    <b>Reminder : Points should be given on answers.</b>

Maybe you are looking for

  • Error while extracting the data

    Hi All, i am facing a problem while loading the data from the flat file to the DSO. i am working on BI 7. data is loaded to psa but all columns com under the one column. like this    10, jjj, a10, m10, s10, n. i know that i had made a mistake pls hel

  • SQL query works for Access but not mySQL

    *I'm using the Database Connectivity VIs* Can anyone give me a clue as to why the following query works with an MS Access File DSN but not a mySQL File DSN: SELECT * FROM (SELECT * FROM WP100598 WHERE SerialNum LIKE '311022-05%' OR SerialNum LIKE '31

  • Workorder_update-In_Update is not working

    Greetings, We are using a Badi named workorder_update for maintenace order tracking.Here the problem is ,the methods At_save ,Before_update works coorectly in order.But we are not able to access the method IN_Update.The enhancement is implemented but

  • Moving to SAP BI at 40

    I have a Oracle developer background of 10 years. I want to shift to SAP ABAP, BI and HANA Do you think it is the right move considering my age?

  • RemoteFX Poor Performance

    Hello, I am experiencing poor performance with a virtualized Windows 8.1 Enterprise. When I do not have the "RemoteFX 3D Video Adapter" added to the VM Windows 8.1 is more responsive (with simple things like moving windows around the desktop) but of