Problem in cl_hr_pnnnn_type_cast= prelp_to_pnnnn ( PRELP )

Hi all,
Iam writing the below code in USER EXIT, FM : ZXPADU02
In the above code iam not able to capture full screen structure data from PRELP ( From PA30 input Record ).
i.e iam getting PERNR,BEGDA,ENDDA and some other fields. But iam not getting AEDTM,UNAME and other fields.
Plz let me know, where the problem was...
Regards,
N.L.Narayana
1. ***************************************
case innnn-infty.
when '9000'.
perform validate_ctc using tclas
                                     psave
                                      ipsyst
                                     i001p
                                     i503
                      changing innnn
                    show_data_again.
endcase.
form validate_ctc using tclas
                          psave structure prelp
                          ipsyst structure psyst
                          i001p structure t001p
                          i503 structure t503
                          changing innnn like prelp
                         show_data_again.
2. And also iam getting following dump for the Code in the User Exit while updating the Standard Table PA9000: 
Iam getting:  message x476 with 'INSERT' dbname <prel_db_char>.
Points will surely rewarded

Hi Nidhi,
these method are used when you get the data from IDOC.
The IDOC data is first converted into infotype format using the first method and again in IDOC format using second method.
Reward points if useful.
Regards,
Atish

Similar Messages

  • Problem in metod

    Hallow
    I use this metod but I have a problem that in some fields that is empty with type hexdecimal I get number like 202.02 in  P(3) DECIMALS 2,and in P(4) DECIMALS 2 I get 20202.02
    How can be the problem?
    it happen just in decimal fields.
    Regards
    FIELD-SYMBOLS: <fs_any> TYPE ANY,
                     <fs_pnnn> TYPE table.
    FIELD-SYMBOLS: <ls_pnnnn> TYPE ANY.
    DATA:ldo_data  TYPE REF TO data,
             ld_tabname TYPE tabname.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
              EXPORTING
                prelp = ls_prelp
              IMPORTING
                pnnnn = <ls_pnnnn>.
            CASE ls_prelp-infty.
              WHEN '0000'.
                APPEND <ls_pnnnn> TO lt_p0000.  " Line type PA0000
              WHEN '0001'.
                APPEND <ls_pnnnn> TO lt_p0001.  " Line type PA0001
              WHEN '0002'.
                APPEND <ls_pnnnn> TO lt_p0002.  " Line type PA0002
              endcase

    Hello antonio try this
    CASE ls_prelp-infty.
    WHEN '0000'.
    Assign p0000 to <ls_pnnnn>
    endcase.
    if <ls_pnnnn> is assigned.
    clear <ls_pnnnn>.
    then your code
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = ls_prelp
    IMPORTING
    pnnnn = <ls_pnnnn>.
    CASE ls_prelp-infty.
    WHEN '0000'.
    APPEND <ls_pnnnn> TO lt_p0000. " Line type PA0000
    WHEN '0001'.
    APPEND <ls_pnnnn> TO lt_p0001. " Line type PA0001
    WHEN '0002'.
    APPEND <ls_pnnnn> TO lt_p0002. " Line type PA0002
    endcase.
    make your interna tables of type Pnnnn instead of PAnnnn.
    reward points if helpful

  • ABAP HR: Exit ZXPADU02 and Method cl_hr_pnnnn_type_cast= pnnnn_to_prelp

    Hi ABAP HR Gurus,
    Good day.
    In Transaction PA20 Infotype 2, there's a field Sexual Orientation (P3346-SEXORIENT) from IT3346.  In change mode, when a value is chosen in the dropdown list for Sexual Orientation and enter is pressed, the chosen Sexual Orientation is cleared.
    I have debugged this and the issue seems to be coming from Exit EXIT_SAPFP50M_002 / ZXPADU02.  In this exit, cl_hr_pnnnn_type_cast=>prelp_to_pnnnn and cl_hr_pnnnn_type_cast=>pnnnn_to_prelp are being used.    Below is the related code:
    WHEN '0002'.
    *    MOVE innnn TO i0002.
         CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
           EXPORTING
             prelp = innnn
           IMPORTING
             pnnnn = i0002.
         IF i0002-rufnm IS INITIAL.
           i0002-rufnm = i0002-vorna.
         ENDIF.
    *   Check suffix of NI number
         IF NOT i0002-perid IS INITIAL.
           IF i0002-perid+8(1) = ' '.
             MESSAGE e513(zhr).
           ENDIF.
         ENDIF.
    *    MOVE i0002 TO innnn.
         CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
           EXPORTING
             pnnnn = i0002
           IMPORTING
             prelp = innnn.
    I noticed that Call cl_hr_pnnnn_type_cast=>pnnnn_to_prelp deletes the data of Sexual Orientation found in INNNN+990(1) in the exit.
    With this, when using cl_hr_pnnnn_type_cast=>pnnnn_to_prelp, can you kindly confirm if there's a way to not lose the value in INNNN+990(1) which corresponds to value of Sexual Orientation (P3346-SEXORIENT) in our Infotype 02 Screen?  If there's none, can you kindly provide the appropriate solution to the issue.
    Additional Note: I'm thinking that maybe I should get the value of INNNN+990(1) and then put it back again to INNNN+990(1)  after calling cl_hr_pnnnn_type_cast=>pnnnn_to_prelp but this might not be the appropriate solution to the issue. 
    Thank you.
    Best regards,
    Brando

    Program ZXPADTOP
    data:   i0002 like p0002.      "Personal data infotype
    Program ZXPADU02
    * Decision on infotype being processed
    case innnn-infty.
    * Default 'known as' field to employee first name is the user has left the
    * field blank
       when '0002'.
    *    MOVE innnn TO i0002.
         call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
           exporting
             prelp = innnn
           importing
             pnnnn = i0002.
         if i0002-rufnm is initial.
           i0002-rufnm = i0002-vorna.
         endif.
    *   Check suffix of NI number
         if not i0002-perid is initial.
           if i0002-perid+8(1) = ' '.
             message e513(zhr).
           endif.
         endif.
    *    MOVE i0002 TO innnn.
         call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
           exporting
             pnnnn = i0002
           importing
             prelp = innnn.
    endcase.
    Additional Note: innnn is declated under Import Parameters of EXIT_SAPFP50M_002:
    INNNN
    LIKE
    PRELP
    Current Infotype Record

  • Problem updating the infotype 1208 subtype ALUM

    Hi,
    My requirement is to update the infotype 1208 subtype ALUM with the Value "YES" when I terminate a employee in PA40. ( immediately).
    I am using the FM - HR_INFOTYPE_OPERATION which doesn't seem to work.
    I tried running a BDC for PA30 , but it is not allowing me to edit the employee and says that i am processing him.
    I feel this is an issue with locks. But not sure about how to go with.
    Are there any standard classes available or any other method to use to update this infotype while terminating.
    Regards,
    Karan.

    Hi,
    try using this method, this will convert the OLD_IMAGE, NEW_IMAGE, parameters into pnnnn table.
    this code is the following class.
    CL_IM_BR_SALARY_INCREASE,
    you need to create your own method, copy the parameters as well.
    method READ_IMAGE .
      FIELD-SYMBOLS: <f> type any.
      DATA: help_prelp TYPE prelp,
            inf_tabname(10).
      data: wa_p0008      type p0008,
            wa_p0734      type p0734.
      concatenate 'WA_P' p_infty into inf_tabname.
      ASSIGN (inf_tabname) TO <f>.
      loop at p_image into  help_prelp
                      where infty eq p_infty and
                            opera eq p_opera and
                            subty eq '0'.
        CLEAR <f>.
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = help_prelp
          IMPORTING
            pnnnn = <f>.
          append <f> to pnnnn.
      endloop.
    endmethod.
    Message was edited by:
            javier  santana

  • 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

  • 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.

  • Iam not getting the data on screen after using the user exit zxpadu01

    Dear Freinds
                As per my requirement when the user enters value Ansal  it should get defaulted to Amount field (bet01 ) based on the wage type
    i have written calculation ( q0008-bet01 = ansal/100) before it getting defaulted to bet01, i found that value is not getting default  on the screen for bet01 once i enter value for Ansal , please any body correct my code
    in   ZXPADU02 i have written the code as  below :
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.   -- HERE I GOT ALL THE DATA EXCEPT BET01
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008  --- HERE I CAN SEE EVEN THE BET01 IS FILLED
    IMPORTING
    prelp = innnn.         --- HERE I CAN SEE LGART BUT NOT AMOUNT VALUE
    endif.
    when others.
    endcase.
    IN ZXPADU01 I HAVE WRITTEN AS BELOW:
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    MOVE-CORRESPONDING  innnn to wa_p0008.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008   --- I CAN SEE ONLY WHEN I COME AGAIN
    IMPORTING
    prelp = innnn.
    endif.
    when others.
    endcase.
    Now my problem is as follows :
                   i have entered the value for Ansal (ex: p0008-Ansal = 1000) ..........and i say enter then i should found the calculated value for the ansal through my coding
    and it should  display in bet01 as 10 ( q0008-bet01 =  p0008-ansal /100)
    but i dont find the value 10 being displayed for the field bet01 on the screen  when
    user enters Ansal  as 1000 .........even then i have saved it to test the scenario......
    now i came in displayed mode (pa20 ) for the infotype 008 for the same personnel no for the same  dates .....where i created the record........i found that the value
    bet01 is there i.e i can see  the value bet01 as 10 ( my requiremnt here matching)
    but when the user say enter during the time of creation of the record the value
    bet01 is not getting defaulted with 10 .........why iam not able to understand
    PLEASE ANY BODY HELP ME IN THIS REGARD 
    regards
    shanti.

    Hi Pranesh,
                   i have used the logic which you hav given as below
    in ZXPADU02
      FIELD-SYMBOLS <fs>  TYPE ANY.
    ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
    if <fs> is assigned.
    <fs> = l_v_amount .  ---  amount as (ansal /100 i.e 1000/100 = 10) 10
    endif.
    still iam not getting the data for the field bet01
    this is the coding i am using
    data : wa_p0008 like p0008,
            i0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
      FIELD-SYMBOLS <fs>  TYPE ANY.
    CASE innnn-infty.
    when '0008'.
    MOVE-CORRESPONDING  innnn to wa_p0008.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    ASSIGN ('(MP000800)Q0008-betrg') TO <fs>.
    if <fs> is assigned.
    <fs> = l_v_amount .
    endif.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008
    IMPORTING
    prelp = innnn.
    endif.
    when others.
    endcase.
    please help me as iam still not getting (value in bet 01) when i press enter once i enter value in ansal feild.
    regards
    shanti.

  • Getting error while updating IT 0105

    Hi,
    I am inserting a record in Communications Infotype when user creates a IT 0006 record. I have written code in the user exit to do the job and I am using HR_INFOTYPE_OPERATION' Insert option (INS) for that. I am doing enqueue and dequeue properly.
    Now, when I try to save the new record in IT 0006, it gives me an error saying that No entry in table T591A for 0105   4.
    4 is subtype of IT0006 record which is not a subtype IT0105, thats why I am getting the error. But in my code before calling the FM I am assigning the correct subtype. here is the code from my user exit:
      IF innnn-infty = '0006' AND innnn-subty = '4' AND
        ( ipsyst-ioper = 'INS' OR ipsyst-ioper = 'MOD' ).
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = innnn
          IMPORTING
            pnnnn = lx_0006.
        CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
          EXPORTING
            number = lx_0006-pernr
          IMPORTING
            return = wa_return.
        IF NOT wa_return IS INITIAL.
          WRITE:/ wa_return-message.
          EXIT.
        ENDIF.
        lx_0105-infty = '0105'.
        lx_0105-pernr = lx_0006-pernr.
        lx_0105-subty = 'CELL'.
        lx_0105-begda = lx_0006-begda.
        lx_0105-endda = lx_0006-endda.
        lx_0105-usrty = 'CELL'.
        lx_0105-usrid = lx_0006-num01.
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
               EXPORTING
                 infty            = '0105'
                 number           = lx_0006-pernr
                 subtype          = 'CELL'
                 validityend      = lx_0006-endda
                 validitybegin    = lx_0006-begda
                 record           = lx_0105
                 operation        = 'INS'
            TCLAS            = 'A'
            DIALOG_MODE      = '0'
            NOCOMMIT         =
            VIEW_IDENTIFIER  =
            SECONDARY_RECORD =
          IMPORTING
               return           = wa_return
               key              = wa_record_key.
        IF wa_return-type = 'E'.
          WRITE:/ wa_return-message.
        ENDIF.
        CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
          EXPORTING
            number = lx_0006-pernr
          IMPORTING
            return = wa_return.
        CLEAR: lx_0006, lx_0105.
      ENDIF.
    Any tips ?

    Thanks Balaji,
    I tried it but it is throwing dump, here is how I tried it in above code:
    Data: MESSAGE_HANDLER TYPE REF TO  IF_HRPA_MESSAGE_HANDLER.
      Data: is_ok TYPE BOOLE_D.
      DATA: wa_return     TYPE bapireturn1,
            wa_record_key TYPE bapipakey.
      DATA :  lx_0006       TYPE p0006,
              lx_0105       TYPE p0105.
    if innnn-infty = '0006' and innnn-subty = '4' and
       ( ipsyst-ioper = 'INS' or ipsyst-ioper = 'MOD' ).
      CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
        EXPORTING
          prelp = innnn
        IMPORTING
          pnnnn = lx_0006.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = lx_0006-pernr
        IMPORTING
          return = wa_return.
      IF NOT wa_return IS INITIAL.
        WRITE:/ wa_return-message.
        EXIT.
      ENDIF.
    CALL FUNCTION 'HR_ECM_INSERT_INFOTYPE'
      EXPORTING
        pnnnn                 = lx_0105
      TEXT_TAB              =
      NO_AUTH_CHECK         = ' '
        message_handler       = MESSAGE_HANDLER
      IMPORTING
      SEQNR                 =
        IS_OK                 = is_ok.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = lx_0006-pernr
        IMPORTING
          return = wa_return.
      break srehman.
      CLEAR: lx_0006, lx_0105.
    ENDIF.
    Now, when I create a new record in IT0006 it throws dump on the FM you suggested. It says Short text: Access via 'NULL' object reference not possible.
    and the problem line is ...
       25   CREATE DATA dref LIKE pnnnn.
       26   ASSIGN pnnnn         TO <pnnnn>.
       27   ASSIGN <pnnnn>       TO <pnnnn_typ>       CASTING.
       28   ASSIGN dref->*       TO <pnnnn_local>.
       29   ASSIGN <pnnnn_local> TO <pnnnn_local_typ> CASTING.
       30   MOVE  <pnnnn_typ>    TO <pnnnn_local_typ>.
       31   text_tab_local[] = text_tab[].
       32 *
       33   CALL METHOD cl_hrpa_masterdata_factory=>get_plain_infotype_access
       34     IMPORTING
       35       plain_infotype_access = infotype_reader.
       36 *
    >>>>>   CALL METHOD infotype_reader->insert
       38     EXPORTING
       39       tclas           = tclas_employee
       40       no_auth_check   = no_auth_check
       41       message_handler = message_handler
       42     IMPORTING
       43       is_ok           = is_ok
       44     CHANGING
       45       pnnnn           = <pnnnn_local_typ>
       46       text_tab        = text_tab_local.
       47   CHECK is_ok = true.
       48   MOVE <pnnnn_local> TO pskey.
       49   seqnr = pskey-seqnr.
       50 *
       51 ENDFUNCTION.
    do you have the code that you have used earlier, I think I am not passing right parameters to the FM. the structure that I am passing to the FM seems lacking something. Please advise.
    Thanks a lot!

  • Doubt s in ABAP HR -Enhancements

    Hi Experts,
            I am working in enhancements, I have  some doughtes in that ,so plz do help to me,
    ””””My enhancement is,
    Whenever we enter data such as Emp Firstname, emp.lastname,empdate of birth, in ‘pb10’  this data should check in PAP database tables and if he is previous employer of the that company it should give his ‘Emp.id’.
    And also it should check ‘how many months back he worked in this company ‘ if that period is less than r equal to 3monthes’
    We have to send the message that he is not eligible for attending interview. if that is greater than 3 months he is eligible for attending interview.
    For this I am trying in ‘cmod’ transaction code in EXIT of ‘pbs0001’.
    CLASS CL_HR_PNNNN_TYPE_CAST DEFINITION LOAD.
    CASE INNNN-INFTY.
    WHEN '4000'.
    data : p0002 like p0002.
    data : p4000 like p4000.
    call method CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    INNNN = p0002.
    if ( IPSYST-IOPER = 'INS' OR IPSYST-IOPER = 'MOD' )
    **and sy-ucomm = 'UPD' .
    CLEAR SY-UCOMM.
    ENDIF.
    BUT WHENEVER I SEE IN DEDUGGING MODE ,I am not getting any  data in that mode ,
    Where I am doing mistake I am not getting so plz do help on this.
    Thank you very much,
    Krishna.

    Hi,
    I am not sure of the exact solution, but think that the problem may be because of the LDB's. Applicant database uses PAP LDB whereas employee database uses PNP LDB. May be after picking up the data from applicant database you can do a select on PA0002 table on the fields first name, last name and date of birth to check whether the employee worked in the company earlier or not. Just check if this helps.
    Regards,
    Jaisish

  • Adding value of one field into another field and should  display it

    Hai Experts,
    i have problem try help me plz,
    my problem is:
    i have some fields like A,B,C,D,E.in my ddic table and i designed a screen with same fields
    so here i want have values on gallons
    ex : think
    E = order value
    C = gallons
    and when i enter each value in order value it should go sum with gallons and should display on screen ,it should not save in table,when i open screen next time it should not show any values

    Hi  ,
    U Can try the   UserEXIT  PBAS0001 component  EXIT_SAPFP50M_001 . The code in the Include Program  ZXPADU01  looks  something  like  this .
    DATA: I0002 TYPE P0002.
      CLASS CL_HR_PNNNN_TYPE_CAST DEFINITION LOAD.
      CASE INNNN-INFTY.
        WHEN '0002'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING
              PRELP = INNNN
            IMPORTING
              PNNNN = I0002.
          MOVE I0002-VORNA  TO I0002-RUFNM.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
            EXPORTING
              PNNNN = I0002
            IMPORTING
              PRELP = INNNN.
      ENDCASE.
    U can also  implement  the  same in the BADI  HRPAD00INFTY   method  BEFORE_OUTPUT . The  same   code  should  work

  • Read screen field in infotype 8

    Hi all,
    I am using exit Exit_SAPFP50M_002 for transaction PA30.In the include, i have to read the basic salary field (Q0008-betrg).
    But, my problem is Q0008 is structure.How to read the screen field. That value does not exists in any table.
    Please help.

    I am using BAdi HRPAD00INFTY (before output) for defaulting some values of the HR infotypes such as Salary.I am accessing those values by using following code.
    data : I0008 TYPE P0008.
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    PNNNN = I0008.
    all the values all populating in I0008 but when i change the value of bet01(I0008-bet01 = 123456.) , it is not displaying on screen.
    any idea??
    Thanks,
    Prashant

  • Check for Greivence

    Hi all,
    I have to put a check on infotype 0102 - Grevience, on fields, Grevience number and stage ( p0102-GRNUM and p0102-GRSTG) as mentioned below .
    1) If a user copies any existing record, and changes any field other than the grevience number and stage, and try to save it, then system should allow to save this value as it will overwrite the previous record for the same grevience number and stage.
    2) If there are no changes in the record after copying,and if user tries to save it , then system should throw an error like" A record already exist for selected combination of Grievence Number and Stage. Please change the values."
    Please advice how can i proceed for the same.
    Thanks & Regards,
    Ribhu

    I am coding it all in user exit PBAS0001 - component - EXIT_SAPFP50M_002.  Though The check is runnin fine but it is creating problems when it comes to change mode. When I am in the change mode, then also it si giving me the error ' 'A record already exist for selected combination of Grievence Number and Stage. Please change the values. Herez what i coded:
    WHEN '0102'.
        CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
          EXPORTING
            PRELP = INNNN
          IMPORTING
            PNNNN = I0102.
        SELECT PERNR GRNUM GRSTG seqnr FROM PA0102 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE PERNR = I0102-PERNR .
        LOOP AT ITAB.
          IF ITAB-GRNUM = I0102-GRNUM .
            IF ITAB-GRSTG = I0102-GRSTG .
              MESSAGE 'A record already exist for selected combination of Grievence Number and Stage. Please change the values.' TYPE 'E'.
            ENDIF.
          ENDIF.
        ENDLOOP.
    ENDCASE.

  • Question using HR_INFOTYPE_LOG_GET_LIST

    Hai all,
    i have a problem using two FM as coded below, how can i link the correct row in lt_infty_tab_before and lt_infty_tab_after to the row in lt_fields, i found out that the order is not corresponding.
    Tried to get the field data out of the data1 field in internal table lt_infty_tab_before and lt_infty_tab_after using  `lw_logging-data = lw_infty_tab_before-data1´ but with this not the complet character field c250 is transfered to my work area.
    Someone know if i do something wrong??
    CALL FUNCTION 'HR_INFOTYPE_LOG_GET_LIST'
        EXPORTING
          tclas              = 'A'
          begda              = so_aedtm-low
          endda              = so_aedtm-high
          auth_check         = 'X'
          use_archive        = ' '
        IMPORTING
          subrc              = lv_subrc
        TABLES
          pernr_tab          = lt_pernr_tab
          infty_tab          = lt_infty_tab
          infty_logg_key_tab = lt_infty_logg_key_tab.
       DATUM_TAB                = lt_datum_tab
       UNAME_TAB                = lt_uname_tab
      LOOP AT lt_infty_logg_key_tab INTO lw_infty_logg_key_tab.
        CALL FUNCTION 'HR_INFOTYPE_LOG_GET_DETAIL'
          EXPORTING
            logged_infotype        = lw_infty_logg_key_tab
      AUTH_CHECK               = 'X'
      USE_ARCHIVE              = ' '
        IMPORTING
         subrc                     = lv_subrc
          TABLES
            infty_tab_before       = lt_infty_tab_before
            infty_tab_after        = lt_infty_tab_after
            fields                 = lt_fields.

    Fixed it with code below:
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = wa_infty_tab_before
    IMPORTING
    pnnnn = p0110.

  • HRPAD00INFTY

    Hi all,
    I wrote a BADI when infotype 171 is created or saved and will update a date field (Z5 date field)  in infotype 41.
    This works fine.
    I wrote another BADI for infotype 41, whenever 41 is created or saved this BADI will create a Z6 date field in the infotype 41.
    This works fine.
    But when both BADI's are activated i am getting an short dump saying rolling back commit,
    Can anybody suggest what is the problem?
    thanks
    Edited by: Chandra S on Sep 14, 2008 2:27 AM
    Edited by: Chandra S on Sep 14, 2008 7:06 AM

    Hi
    Pass the NEW_IMAGE Work area to prelp. Below is the sample code.
      DATA: lxt_prelp               TYPE prelp,
            r_linetype              TYPE REF TO cl_abap_structdescr,
            gr_nnnn                 TYPE REF TO data.
      r_linetype ?= cl_abap_typedescr=>describe_by_name( 'P0105' ).
      CREATE DATA gr_nnnn TYPE HANDLE r_linetype.
      ASSIGN gr_nnnn->* TO <f_nnnn>.
      LOOP AT i_new_image INTO lxt_prelp
                         WHERE infty EQ i_infty.
        CLEAR <f_nnnn>.
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = lxt_prelp
          IMPORTING
            pnnnn = <f_nnnn>.
        MOVE <f_nnnn> TO e_pnnnn.
      ENDLOOP.

  • How to modify OLD_INNNN in a badi ?

    hi,
    could i change some field value in the OLD_INNNN,
    in the"infotype badi HRBAS00INFTY" ?
    regards.
    sorry for my english.
    bye.

    Hi Amit m,
    Firstly thanks you for your help,
    Second i´ll need more help, maybe you know why i having
    this problem with the source code.
    I´m trying to use your code but i type it into a badi made by me
         Name:         ZRPD CARGA ENLACES 9P RA
         With Definition: HRBAS00INFTY
    and when i activate it give me some errors.
      data: p_9938 like P9938.
    Within classes and interfaces, you can only use "type"
    to refer to ABAP Dictionary Types(not "LIKE" or "STRUCUTURE")
    If i change like by type, then the activation give me another error,
      call method CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
      EXPORTING
      PRELP = INNNN 
      IMPORTING
      PNNNN = p_9938.
    The field "INNNN" is unknown, but there is a field with the similar name  "OLD_INNNN". If i change it by OLD_INNNN, the error is "OLD_INNNN" is not            type-compatible with formal parameter "PRELP".
    *--- then change the values in p0001
    Put back 0001
      call method CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
      EXPORTING
      PNNNN = P_9938
      IMPORTING
      PRELP = INNNN.
    Thanks, and sorry for ma english i need to improve it.
    Regards angegon.

Maybe you are looking for

  • Solaris 8 on Toshiba 8200 install problem

    Has anyone tried to install Solaris 8 on a Toshiba 8200? I have set the CDRom drive as a bootable device but the install does not start, just a flashing cursor on the screen. I have tested the CD in another computer and all is ok. I do not have a USB

  • Can I Manually Create an iMovie Event Library

    When we import movies from our digital camcorder, I like the way iMovie automatically creates event libraries for the year in which the movies were filmed. However, when we bring in analog media (using a converter), it simply imports the movies into

  • Using SNMP to monitor DMVPN NHRP

    Are there any SNMP OIDs for monitoring dynamic DMVPN NHRP entries? I'd like to poll my hub router for a list of active DMVPN spokes, and NHRP seems like the best thing to check, but I can't find any MIBs for NHRP outside of the Frame Relay context. T

  • STORAGE_PARAMETERS_WRONG_SET dump

    Hello, I have installed BW 3.5 on MS SQL 2005, Windows 32 bit system and facing lot of performance issues in BO reports execution. System goes in hang state when multiple users log in. Also geting dump STORAGE_PARAMETERS_WRONG_SET DUMP details are :

  • Outlook 2003 & Recurring Calendar Appointments

    I am using Windows XP, Microsoft Exchange Server, with an itouch. If Outlook and itunes were open at the same time, or Outlook was opened after itunes, Outlook would fail to properly operate and would respond: Outlook0.ost is in use and could not be