Skip to Content
author's profile photo Former Member
Former Member

bdc prog error in emp master

hi ,

i am creating employee master with the help of bdc but in that as i assign personnel no to a position and organisational unit by recording technique in bdc against tcode pa40, the personnel no is shown in pa30 by the system but it can not be shown in ppom_old tcode i.e. in om .

kindly help me out about this problem.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Feb 25, 2009 at 07:14 AM

    Hello Dude,

    Better you can use FM yar..Find the sample code.. for ur informaiton..

    tables: pa0001, pa0171, pa0378.
    
    DATA  BEGIN OF i0378.
            include structure p0378.
    DATA  END   OF i0378.
    
    DATA: START_DATE LIKE SY-DATUM.
    
    DATA  RETURN LIKE  BAPIRETURN1.
    
    selection-screen begin of block p1.
    * This select option allows for testing on limited employees
    * or for splitting the update into multiple runs.
    SELECT-OPTIONS pernr for pa0001-pernr.
    selection-screen end of block p1.
    
    selection-screen skip.
    
    selection-screen begin of block b1.
    * The plan year date is normally the first day of the next year
    PARAMETERS: py_date LIKE SY-DATUM.
    * This date is the beginning of the enrollment period for managers
    PARAMETERS: MGR_DATE LIKE SY-DATUM.
    * This date is the beginning of the enrollment period for hourlys
    PARAMETERS: HRLY_DATE LIKE SY-DATUM.
    selection-screen end of block b1.
    
    INITIALIZATION.
      py_date = sy-datum.
      py_date(4) = py_date(4) + 1.
      py_date+4(4) = '0101'.
    
    START-OF-SELECTION.
    
    select * from pa0171
      where pernr in pernr
        and endda ge py_date
        and begda le py_date.
    
    * skip ineligible employees
      if pa0171-bstat eq 'INEL'.
        continue.
      endif.
    
    * determine start date of enrollment based on benefit group
      if pa0171-bengr eq 'MNGR'.
        start_date = mgr_date.
      elseif pa0171-bengr eq 'HRLY'.
        start_date = hrly_date.
      else.
    *   ERROR HANDLING GOES HERE
        continue.
      endif.
    
    * create IT0378 record for this person    
      clear i0378.
      i0378-pernr = PA0171-pernr.
      i0378-barea = PA0171-barea.
      i0378-event = 'OPEN'.
      i0378-begda = start_date.
      i0378-infty = '0378'.
      i0378-aedtm = sy-datum.
      i0378-uname = sy-uname.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
           EXPORTING
                INFTY         = '0378'
                NUMBER        = i0378-pernr
                SUBTYPE       = 'OPEN'
                VALIDITYBEGIN = i0378-begda
                RECORD        = i0378
                OPERATION     = 'INS'
           IMPORTING
                RETURN        = return
           EXCEPTIONS
                OTHERS        = 1.
    
      if sy-subrc ne 0 or return-type ne ' '.
    *   ERROR HANDLING GOES HERE
      endif.
    ENDSELECT.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 04:56 AM

    HI,

    I am trying to port data for employee in info type 0000, 0001,0002 through BDC recording using T-CODE : SHDB. For this i created excel sheet for all mandatory fields including Positions and organization unit, which exist in OM. But after successfully recording and data saving, it not reflects in OM at appropriate location, but showing in PA30. Plz suggest me, how i can port data under OU of OM.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.