Standard programs to upload / update infotypes

Please provide updates for this question:
What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
before going ahead with BDC .
Thanks
Rohan

Please provide updates for this question:
What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
before going ahead with BDC .
Thanks
Rohan
Hi Rohan ,
     you can update you infotype using 'HR_INFOTYPE_OPERATION' function module .
1)   transfer all your excel data  into internal table .
2)   loop at internal table
3)  fill all the required field of that infotype .
4) lock table
5) call that functuion module .
6) unlock table
for this fallow the below code...
DATA: it_p0169 TYPE STANDARD TABLE OF pa0169 WITH HEADER LINE.  (make internal table according to your requirment)
DATA: wa_p0169  TYPE p0169.
LOOP AT it_file
      v_eeamt = it_file-pct_gross.
*Pre-Tax Contribution Percentage
      v_eepct = v_eeamt / 10.
      v_begda = it_file-datchngd .
*Appending into header (these all are the required filed in my case )
     it_p0169-eeamt =  v_eeamt.
      it_p0169-begda =  v_begda.
      it_p0169-eepct =  v_eepct.
      it_p0169-bplan =  v_bplan .
      CLEAR wa_p0169.
      MOVE-CORRESPONDING it_p0169 TO wa_p0169.
      wa_p0169-INFTY = '0169'.    (not forget to pass infotype no in the header )
CONSTANTS: c_action_ins  TYPE pspar-actio VALUE 'MOD',   (it can be also COP for Copy , DEL for Delete , DIS for Display , MOD to Change , LIS9 to  Delimit , INS to Create )
           c_infty_0169  TYPE prelp-infty VALUE '0169'.
DATA: it_return  TYPE bapireturn1. (as it is )
DATA: it_return  TYPE bapireturn1.
  CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
      number = p_pernr
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
     RAISE enqueue_FAILED.
  ENDIF.
  CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING
    infty                  = c_infty_0169
    number                 = p_wa_0169-pernr
    SUBTYPE                = '401K'
    OBJECTID               =
    LOCKINDICATOR          =
    validityend            = p_wa_0169-endda
    validitybegin          = v_begda1
    RECORDNUMBER           =
    record                 = p_wa_0169
    operation              = c_action_ins
    TCLAS                  = 'A'
    DIALOG_MODE            = '0'
    NOCOMMIT               =
    VIEW_IDENTIFIER        =
    SECONDARY_RECORD       =
  IMPORTING
    return                 = it_return.
   if it_return-MESSAGE is not initial .
     delete it_file .
   endif.
commit work .
  CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
    EXPORTING
      number = p_pernr
    EXCEPTIONS
      OTHERS = 1.
  IF sy-subrc <> 0.
     RAISE DEQUEUE_FAILED.
  ENDIF.
Enjoy
Priyank

Similar Messages

  • Standard  program for leave updation

    HI all,
    Is there any standard program for auto updation of leave quota.
    Regards
    janhavi

    see
    after udateing infotypes 2001 and 2006
    u need to run the above programmes to leave updatation
    the response was given by snatosh and vinod

  • Any Standard Program to upload the financial data

    Hi Team,
                 Any standard program which will upload the financial data(trail balance) into sap fi.
    The scenario is  that there are few company codes which is not in sap and we need to upload their financial data in sap like trail balance, I need to upload this company code data in sap fi, please suggest some standard program which uploads this data.
    Thanks in advance
    Kind Regards
    sridhar

    Hi,
    Standard programs are there, but those dont fit to your requirement.
    e.g. Based on the account type(D, K, S) there are different different fields should be filled up.
    If it is Vendor invoice, you have to capture Inv.no., text, leacy subledger number if required.
    All these fields are not required for GL data upload.
    Better create 3 LSMW'S for GL, Vedor & Customers.
    Rgds
    Murali. N

  • Standard program for uploading budget values in expenses

    Hi Experts,
    can u please tell me the standard program to upload budget values in Expenses
    thanks & regards..
    Narendra

    Hi,
    This is a sample program to upload through excel sheet.
    Check this code to upload vendor master through SHDB transaction.
    report ZVEND_MST no standard page heading line-size
    255.
    *include bdcrecx1.
    *parameters: dataset(132) lower case default
    'c:\vend.mst'.
       DO NOT CHANGE - the generated data section - DO
    NOT CHANGE    ***
      If it is nessesary to change the data section use
    the rules:
      1.) Each definition of a field exists of two lines
      2.) The first line shows exactly the comment
          '* data element: ' followed with the data
    element
          which describes the field.
          If you don't have a data element use the
          comment without a data element name
      3.) The second line shows the fieldname of the
          structure, the fieldname must consist of
          a fieldname and optional the character '_' and
          three numbers and the field length in brackets
      4.) Each field must be type C.
    Generated data section with specific formatting -
    DO NOT CHANGE  ***
    data: begin of record,
    data element: LIF16
            LIFNR_001(016),
    data element: BUKRS
            BUKRS_002(004),
    data element: EKORG
            EKORG_003(004),
    data element: KTOKK
            KTOKK_004(004),
    data element: NAME1_GP
            NAME1_005(035),
    data element: SORTL
            SORTL_006(010),
    data element: LAND1_GP
            LAND1_007(003),
    data element: SPRAS
            SPRAS_008(002),
    data element: BSTWA
            WAERS_009(005),
          end of record.
    End generated data section ***
    DATA : ITAB TABLE OF RECORD WITH HEADER LINE.
    start-of-selection.
    *perform open_dataset using dataset.
    *perform open_group.
    *do.
    *read dataset dataset into record.
    *if sy-subrc <> 0. exit. endif.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\VENDOR.TXT'  
    "TEXT FILE
       FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT ITAB.
    *In Loop Change Record With ITAB
    like record-lifnr_001 with itab-lifnr_001 
      perform bdc_dynpro      using 'SAPMF02K' '0100'.
      perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
      perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
      perform bdc_field       using 'RF02K-LIFNR'
                                  record-LIFNR_001.
      perform bdc_field       using 'RF02K-BUKRS'
                                  record-BUKRS_002.
      perform bdc_field       using 'RF02K-EKORG'
                                  record-EKORG_003.
      perform bdc_field       using 'RF02K-KTOKK'
                                  record-KTOKK_004.
      perform bdc_dynpro      using 'SAPMF02K' '0110'.
      perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-SPRAS'.
      perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
      perform bdc_field       using 'LFA1-NAME1'
                                  record-NAME1_005.
      perform bdc_field       using 'LFA1-SORTL'
                                  record-SORTL_006.
      perform bdc_field       using 'LFA1-LAND1'
                                  record-LAND1_007.
      perform bdc_field       using 'LFA1-SPRAS'
                                  record-SPRAS_008.
      perform bdc_dynpro      using 'SAPMF02K' '0120'.
      perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-KUNNR'.
      perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
      perform bdc_dynpro      using 'SAPMF02K' '0130'.
      perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
      perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
      perform bdc_dynpro      using 'SAPMF02K' '0210'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'LFB1-AKONT'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_dynpro      using 'SAPMF02K' '0215'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'LFB1-ZTERM'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_dynpro      using 'SAPMF02K' '0220'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'LFB5-MAHNA'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_dynpro      using 'SAPMF02K' '0310'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'LFM1-WAERS'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'LFM1-WAERS'
                                    record-WAERS_009.
      perform bdc_dynpro      using 'SAPMF02K' '0320'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'RF02K-LIFNR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=ENTR'.
      perform bdc_dynpro      using 'SAPLSPO1' '0300'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=YES'.
      perform bdc_transaction using 'XK01'.
    endLOOP..
    Check It, Activate it and process in SM35.

  • Standard program for uploading of IDOCs - CREMAS

    Dear SAP gurus,
    I would like to ask you if there exists some standard program for uploading IDOCs messages - type CREMAS (Vendor master data).
    Thank you in advance.
    Alena

    Has not been solved.

  • Standard Program Name for updating the System-Variables everyday in BACKGRO

    Hi All,
    Can anybody tell me the Standard Program Name for updating the System-Variables everyday in BACKGROUND job?

    Hello matt,
    I have a program with variant.
    This VARIANT input values will store in TVARVC table every day night background job.
    i want the program name

  • Upload data into SAP through standard program

    hi!
    why don't we prefer to upload data into sap through standard program like RFBIKR00 to upload for vendor master or other standard programs to upload durectly without using BDC or LSMW and how do we upload data into SAP through BAPI.
    pls help me with a sample program.
    regards
    Amit

    It totally depends upon the requierment which fields your want to update in transaction if it works with program then use program else go for bdc .
    If there is some any screen enhancement with z fields then program will not solve the problem.
    For BAPI you check these links:
    http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm
    http://sap-img.com/bapi.htm
    Edited by: shilpi agarwal on Aug 22, 2008 7:28 AM

  • Program to upload contract price changes to inforecord

    Hi Friends,
    Is there any standard program available to update changes in contract price to info record
    I know if you put info update indicator in contract system will update provided you have EVO parameter set in id
    But i would like to know if we can do it as batch job through program
    Points will be rewarded
    Thanks and Best Regards
    Diwakar

    You have to create the LSMW or use custom p[rogram to do this.. there is transaction available but will not be used for many records.
    Tcode is MEKP

  • Standard programs to update infotypes

    Please provide updates for this question:
    What are the standard SAP programs to update infotypes ( Ex: 001 / 002 / 003 ) .
    I will be uploading data from legacy system ( Excel / Text file ) and would like to use standard programs
    before going ahead with BDC .
    Thanks
    Rohan

    Hi,
    I checked out the program you stating.......
    In that program itself if you check the documentation its given how to add in fields.......
    You can use report RPUSTD00 to transfer master data from your old HR system.
    The dataset to be transferred must be stored in a sequential file. The file is stored under the name specified in the "logical file name" field (for more information on logical file names, read the IMG section entitled Additional client-dependent file name maintenance).
    The report reads this dataset and creates a batch input session for transaction PA30.
    The data description of your old record is defined according to the structure HRDATASET. If this structure does not meet your requirements, create the structure CI_HRDATAS in the ABAP Dictionary. In this structure, you can store the infotype fields to which data should be transferred. Make the necessary changes in RPUSTD00.
    Example
    If the include CI_HRADATAS contains the field F1 which is to be assigned to the infotype nnnn, add the following ABAP statements to FORM Dnnnn:
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'Pnnnn-F1'.
      BDCDATA-FVAL =   SATZ-F1.
      APPEND BDCDATA.
    If the FORM Dnnnn does not exist for your infotype nnnn, copy FORM D0008 to FORM Dnnnn. Replace the 0008 by your infotype number:
    FORM Dnnnn.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = 'MPnnnn00'.
      BDCDATA-DYNPRO   = '2000'.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'Pnnnn-F1'
      BDCDATA-FVAL = SATZ-F1
      APPEND BDCDATA.
      CLEAR BDCDATA.
      BDCDATA-FNAM = 'BDC_OKCODE'.
      BDCDATA-FVAL = '=UPD'.
      APPEND BDCDATA.
    ENDFORM.
    The FORM Dnnnn is called directly after FORM D0008; see the ABAP statement indicated as "<------ INSERT in the following (starting at line 1730 in the standard system):
      LOOP AT INFTAB.
        CASE INFTAB.
    Include all infotypes in your action *
         WHEN '0002'. PERFORM D0002.
         WHEN '0001'. PERFORM D0001.
         WHEN '0006'. PERFORM D0006.
         WHEN '0007'. PERFORM D0007.
         WHEN '0008'. PERFORM D0008.
         WHEN 'nnnn'. PERFORM Dnnnn.         "<------ INSERT
         WHEN OTHERS. WRITE: / 'Infotype not included:' (008), INFTAB.
                       STOP.
       ENDCASE.
    ENDLOOP.
    Parameter DSLOGNAM
    Logical file name
    Parameter MAPNAME
    Session name
    Definition
    Enter any name for the session to be created.

  • HT1567 I bought an ipad recently and now it won't hook up to the itune and let me update and repair some of the programs or upload my photos on it? It is like it don't know it is connected to the usb port

    I am wondering why my recently purchased ipad will not hook up to itunes or let me update or repair some of the programs or upload photos into my computor?

    Try deleting and reinstalling iTunes. Sometimes the driver gets corrupted and needs to be reinstalled.
    You can also go into the control panel, add/remove programs and delete the 'apple mobile device driver', then plug your iPad back in and see if that triggers the reinstall of the driver.
    also if you're using a hub or extender, stop and plug the iPad directly into the computer.

  • Assets upload: Deactivation Date is not available in the Standard Program

    Hi,
    I am trying to use the standard program for Assets upload,RAALTD01. But, the field de-activation date (ANLA-DEAKT) is not available for mapping. This is the only field am missing out of more than 200 fields involved in the upload. What would be the best approach inorder that I can use LSMW and at the same time map this deactivation date field ; provided we are not using the Recording method.
    Looking forward to your replies.
    Regards,
    Sophia Xavier

    you can use ABAP program with BAPI 
    call function 'BAPI_FIXEDASSET_OVRTAKE_CREATE'

  • Asset upload: Deactivation Date not available in the standard program(LSMW)

    Hi,
    I am trying to use the standard program for Assets upload,RAALTD01. But, the field de-activation date (ANLA-DEAKT) is not available for mapping. This is the only field am missing out of more than 200 fields involved in the upload. What would be the best approach inorder that I can use LSMW and at the same time map this deactivation date field ; provided we are not using the Recording method.
    Looking forward to your replies.
    Regards,
    Sophia Xavier

    It is not possible to do this in the transaction AS91. When you are doing the take over during a fiscal year you have to go from the tab Asset values to Transactions and fill in there the ttype for deactivation.
    Other wise you have to create a LSMW that is doing this deactivation after the upload

  • How  and where does SAP standard programs update the master tables...

    Hello there,
    How  and where does SAP standard programs update the master tables...
    to be precise.. if a (any) transaction occurs  the programs behind it holds the data in temporary structures.
    where and when does it get updated in the master table.
    can anyone tell me how it happens?
    I Know that from the where used list one can find the corresponding table but most of the time it wont suffice
    I am expecting a proper answer.
    Santosh B

    Hello Santosh,
    you need to do some self-reading on the following topic
    Updates in the SAP System (BC-CST-UP)
    http://help.sap.com/saphelp_47x200/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/frameset.htm
    Regards,
    Siddhesh

  • SAP standard program  to delimits infotypes

    Hi folks,
           Is there any SAP standard program to <u><b>delimits</b></u> the records in HR? I mean for PA/PD infotype. Or I need to write one? I have to delimits some of the IT`s Like 194 and 185...
    I found the following program to <b>delimit</b> …
    RPU204M0                       IT 204: delimit report for FA customers                     
    RPU510J1                       Utility program to delimit P0008 after pay sclae re-creation
    Thanks

    Hi Saquib
    There is one standard report called RHGRENZ2 which will delimt PD infotypes...
    The report only delimits infotypes with time constraint 2 and 3. Infotypes with time constraint 0 and 1 must be delimited using the report Delimit Objects (RHGRENZ0).
    Hi I don't see any Standard SAP program to delimit the infotypes that were specified in your message. I believe you may need to write small BDC program to delimit....
    Thanks
    Thanks
    Suresh B Mannem
    Message was edited by: Suresh Babu  Mannem

  • Standard program that update bsis

    Hi Experts,
    How would i know which standard program update bsis table. i had hard time linking zuonr in bsis table.
    Thanks and regards,
    Aashta

    hi astha,
      standard program for bsis table is  SAPLSETB .
      reply back for further queries
    Thanks
    Gaurav

Maybe you are looking for