HR Table Update

Hi SAP Gurus,
Should we update PA00.. tables directly using 'Update table...' directly..or we need to use Logical database for it.
Is there any harm in updating dirctly....?
Thanks in advance,
Gaurav

Hi Gaurav
As Malgorzata stated, you should use the FM 'HR_INFOTYPE_OPERATION' to do personnel (PA) infotype operations. For organization part (PD), you can use 'RH_INSERT_INFTY' and other relevant FMs for deleting and updating.
Here is an example and some information that I wrote before about the subject:
DATA ls_data LIKE p0015 .
DATA ls_return LIKE bapireturn1 .
*--Fill "ls_data" as required here
*- Be careful about the checks that will be done during
* execution of the function module. The checks it will
*do, will be more or less like when you insert the
*record using the tcode "PA30". e.g. you must fill
*obligatory fields
CALL FUNCTION 'ENQUEUE_EPPRELE'
  EXPORTING mode_prel = 'E'
            mandt = sy-mandt
            pernr = ls_data-pernr
            infty = '0015'
            subty = '1650'
            endda = ls_data-endda
            begda = ls_data-begda
            _scope = '1'
  EXCEPTIONS
            foreign_lock = 1
            system_failure = 2
            OTHERS = 3.
IF sy-subrc NE 0 .
EXIT.
ENDIF.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
  EXPORTING infty = '0015'
            number = ls_data-pernr
            subtype = ls_data-subty
            validityend = ls_data-endda
            validitybegin = ls_data-begda
            record = ls_data
            operation = 'INS'
            tclas = 'A'
            nocommit = space
  IMPORTING
            return = ls_return .
CALL FUNCTION 'DEQUEUE_EPPRELE'
  EXPORTING mode_prel = 'E'
            mandt = sy-mandt
            pernr = ls_data-pernr
            infty = '0015'
            subty = '1650'
            endda = ls_data-endda
            begda = ls_data-begda.
<u><b>Some Basics:</b></u>
i. You may wonder why I locked the personel but as far as I remember, there is a problem in the FM "HR_INFOTYPE_OPERATION" about this. Locking the personel overcomes the problem. But it may have been solved. So, if you want first try without locking explicitly.
ii. The FM calls the dialog module for the program MPXXXX00 (XXXX: Infotype number, here MP001500) of the infotype.
iii. "ls_data" which is passed to the parameter "record" should be type "PXXXX" (here P0015).
iv. If the infotype has subtypes, pass the subtype you want ( in our case 1650) to the parameter "subtype" .
v. You must give the validity period to the parameters "validityend" and "validitybegin".
vi. The operation type you need is "INS" if you want to insert an infotype record. You can see other values from the fixed values of the domain of the parameter "operation".
vii. Since some infotypes are common for both employee an applicants data, you should pass 'A' to the parameter "tclas". This way the record is inserted to the table PAXXXX. In case of 'B', it behaves your record as to be an applicant data.
viii. You have the option to force the FM not to commit at the end.
ix. The exporting parameter "return" of the FM is of type "BAPIRETURN1". That is, it can be used like other BAPI returns. You can analyze the result of the execution from this table.
Best Regards...
*--Serdar

Similar Messages

  • Auto update of Ztable when ever BSID or BSAD tables updated

    Auto update of Ztable when ever DB table updated     
    Hi experts
    I want my Ztable get updated automatically when ever a record is created or updated in BSID or BSAD tables.
    Here clear requirement
    Generally using Company code & Allocation number  ( 18 char ) my programs access BSID & BSAD tables it is taking very long time for execution almost more than 30 minutes ( data in millions ).
    Step 1.
    I created a new Ztable with limited fields Company Code, Customer, Document, Allocation Number and Posting date.
    Step 2.
    Before look into BSID or BSAD my program searches Ztable for Customer number & Document number using Allocation field and Company code.
    Step 3.
    Once get the Customer & Document numbers accessing BSID & BSAD table is very easy (now just taking less than 1 minute).
    Created a new program to update Ztable every day but BSID and BSAD are live table so I want my Ztable get updated immediately when any entry posted in BSID or BSAD
    Please help me
    Satya
    Singapore

    You need to check what is the procedure (T-Code) from which the data gets updated into these tables.
    For example
    when we craete a material from MM01 the data gets updated in the corresponding table i.e. EKPO.
    In same way you need to find the process and then you can use BTE (Busineess transaction events) for that process. BTE are only for FI module and these tables are also related to FI .

  • Problem in MSEG Table updation

    Hello All,
    The problem is related to MSEG table updation after Stock Transport Order  (STO) is done between Manufacturing plant & Depot. The problem is described below with an example.
    In case of STO the Supplying Plant or vendor is SP02 and the Receiving Plant or the customer is RP15.in the STO under the shipping tab for Customer the system is showing RP15 and under the Delivery address tab for Vendor the system is showing SP02.
    While during PGI when the material document is generated when we check the MSEG table two line items have been generated where  we found that the field WERKS contained SP02 & RP15 against which the feld XAUTO is showing blank space & X symbol respectively.But in case of both LIFNR & KUNNR fields it is showing blank space, which indicates that both the vendor & customer  fields are not getting updated in the MSEG table.
    Now I want the system to pick up the data for KUNNR field (in case of XAUTO is X) also in the MSEG table i.e. RP15 should also be displayed in the MSEG table.
    Is there any configuration to attain my requirement?
    Looking forward to some valuable suggestions.
    Thanks & Regards
    Priyanka Mitra

    the ADRx tables are central tables that are used from various transactions in SAP.
    e.g. from customizing, master data maintenance, transactional data, such as purchase orders and sales orders.
    use the ADRNR from ADR6 table and then lookup an entry in table ADRC to find and hint to its origin  field ADDR_GROUP

  • Calling Batch input from Web Dynpro - any alternatives for table updates?

    Hi!
    I am asked to create a screen in Web Dynpro for the GJ30 transaction (JV Cutback mapping of WBS' elements). I created a remote enabled function module which call batch input for GJ30 . Testing the Function modules direclty goes fine, but not calling the function module from WD. then I get the same error message as when I once tried to call SAP GUI from Web Dynpro ( Call transaction /submit program).
    My next step is to try to create a batch input session (instead of call transaction) and run it using rsbdcsub, and then check the result of the run. But maybe this will fail of the same reason as well, and I suppose this will make the user waiting longer for the response .
    I read somewhere that Web Dynpro does not support batch Input. But what can you do when there are no standard BAPI's for the update you want to do in SAP ?  We are not supposed to do direct table updates.  
    Anyone who have struggled with the same issues and found a solution??
    regards, Tine

    Hi,
    as BDC is calling screens and in Webdynpro ABAP you cannot use SAP GUI sceeen, you are getting short dump.
    Refer CNTL_SYSTEM_ERROR in webservices from r/3 system
    Thanks,
    Chandra

  • How to capture the table update

    How to capture the table update.Suppose I delete a enrtry from the table or mofying any entry in a table is there way to capture that update in SAP?

    hi ,
    follow these steps:
    1. After you selecte the search help for New Responislbe person, domodify gets triggered.
    2. In the wddomodify, get the value of New Responsible person by reading the attribute binded to it.
    3. Now if Value entered is not initial, write a selecte query to fetch the name based on pernr no.
    4. Finally bind the name fetched with the attribute binded to New Responsible person name.
    Wdomodify :
    ************* *Read the New REsponsible person Pernr* ***********
      DATA lo_nd_cn_sflight TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_sflight TYPE REF TO if_wd_context_element.
      DATA ls_cn_sflight TYPE wd_this->element_cn_sflight.
      DATA lv_carrid LIKE ls_cn_sflight-carrid.
    * navigate from <CONTEXT> to <CN_SFLIGHT> via lead selection
      lo_nd_cn_sflight = wd_context->get_child_node( name = wd_this->wdctx_cn_sflight ).
    * get element via lead selection
      lo_el_cn_sflight = lo_nd_cn_sflight->get_element(  ).
    * get single attribute
      lo_el_cn_sflight->get_attribute(
        EXPORTING
          name =  `PERNR`
        IMPORTING
          value = lv_carrid ).
    ****** *Check whethre a value has been entered in PERNR* *************
    if lv_carrid is not initial.
    *************Select Name based on pernr entered* ***********
    select ename from pa001 into lv_ename where pernr = lv_carrid.
    *******Set the Name atttribute with the ename value fetched* *****
      lo_el_cn_sflight->set_attribute(
          name =  `NAME`
          value = lv_cename ).
    endif.

  • Tables updating for atransaction

    Hi All,
       i wnat to know is there any transaction code or program to know the tables updated for a transaction.
    we have a transaction called PPOM and FS00 ,i want to know which tables are updated when i create new records for these transaction codes.
    With regards,
    kiran I

    Hi,
      You can check tables CDHDR and CDPOS tables.
    You can check the modified tables, values, by which transaction does this modification has been done.
    Give current date to check. As these are cluster tables, it may take some time for retrieving data.
    CDHDR - header details
    CDPOS - item details
    Regards,
    Sailaja.
    Dont forget to reward points, if answer helps you.
    Message was edited by: Sailaja N.L.

  • Tables updated while creating order, before saving

    hi friends,
    Please provide list of tables updated while creating the order, before saving it.
    regards,
    vandana arora

    Hi
    The following tables get updated
    VBBE - Sales Requirement
    VBLB - Release Order Data
    VBAK - Sales Document Header
    VBPA - Partner Table
    VEPVG - Delivery Due Index
    VBAP - Sales Document Item Data
    VKDFS - SD Index: Billing initiator
    VAPMA - SD Index: Order Item by Material
    VAKPA - SD Index: Order Item by Partner Function
    VBEP - Schedule Line
    VBKD - Sales Doc: Business Data
    VBEH - Schedule Line History

  • How downtime can be reduced for setup table update.

    Hi;
    Can anyone tell me various ways to reduced system downtime for setup table updates.
    thanks
    Warm Regards
    Sharebw

    Hi,
    You will need to fill the set up tables in 'no postings period'. In other words when no trasnactions are posted for that area in R/3 otherwise those records will not come to BW. Discuss this with end user and decide. Weekends are a general choice for this activity.
    try Early Delta Initialization
    With early delta initialization, you have the option of writing the data into the delta queue or into the delta tables for the application during the initialization request in the source system. This means that you are able to execute the initialization of the delta process (the init request), without having to stop the posting of data in the source system. The option of executing an early delta initialization is only available if the DataSource extractor called in the source system with this data request supports this.
    Extractors that support early delta initialization are delivered with Plug-Ins as of Plug-In (-A) 2002.1.
    You cannot run an initialization simulation together with an early delta initialization.
    hope this link may make you clear about early delta init
    http://help.sap.com/saphelp_nw04s/helpdata/en/80/1a65dce07211d2acb80000e829fbfe/frameset.htm
    thanks,
    JituK

  • Which are the tables updated in SRM and R/3 System for SC created?

    Hi,
    I want to know which are the tables updated in SRM system and also in R/3 system, when a Shopping Cart is created. Also how do i get the PO number for the Shopping Cart created.
    Thanks.
    Regards.
    Rahul

    Hello Rahul,
    All list of tables for eg. SC You can find in transaction BBP_PD on SRM side.
    These tables are (SRM):
    - CRMD_ORDERADM_H - for Header (Business Transactions Header)
    - BBP_PDHGP - Business Transaction Purchasing Information
    - CRMD_ORDERADM_I - for Item - Business Transaction Item
    - BBP_PDIGP - Business transaction item-Purchasing information
    - BBP_PDBEI - Backend Specific Item Data
    On R/3 side:
    EBAN - purchase requisition
    EBKN - purch. req. account assignment
    Regards,
    Marcin Gajewski
    please reward points for helpful answer

  • RAISING AN EVENT WHEN DATABASE TABLE UPDATES

    hi all,
             i want to raise an event when database table updates.For eg : if a price of a material has been changed then i have to raise an event and run the abap program in back ground.i know transaction SM62 to create event, i dont know about transaction SM64. please give me the procedure how to solve this problem. i dont know work flow. please give me a sample code how to raise event.
    thanka and regards
    suresh

    Hi Suresh
    It is important to understand that the SAP architecture abstracts the database from the application.
    I think that you should look for ways that the application triggers an event when an update has taken place, rather than the DB.
    Two ways of doing this that spring to mind are change pointers (for the ALE interface, see menu SALE) and Business Transaction Events (various things including CRM integration, see menu FIBF).
    The latter works very well for sending prices to CRM when they change. I am more familiar with this than ALE so I will discuss it.
    If you go to menu FIBF and then follow menu path Environment -> Info System (P/S), and then run the report for event 00503301, you can find documentation and a sample function module that you can copy.
    Once you register your new function module in the event tables then it will be called when prices are changed.
    Cheers
    Dom

  • Wrong VBAP table updation

    Hi
    Facing a problem with wrong VBAP table updation.
    Sales order shows Business Area" A " at both header and Item Level but in VBAP table the business area updated is " B ". can't understand why it is happening.
    Changelog doesn't indicate anything
    Thanks and regards
    Nikhil

    Hi,
    Can you check how the business rule that is assigned at SPRO-> Sales and distribution -> basic functions -> Account assignment/Costing -> Business area account assignment?
    Regards

  • Table Updation through Workflow

    Hi All,
              I have a scenario in my project in which a workflow is to be triggered when an entry is made in a table.
    Now this workflow has to read some data from some tables and then update some other tables.
    My doubt is it possible through workflows to update the tables? If yes is it advisable.Also how will the
    updation happen? Should methods for updation will be written in BO methods? Or should a task be called
    which does the same.
    Please suggest,
    Saket.

    Hi Saket,
    Yes it is possible!
    To trigger workflow from table updates you can use table level events. Refer to
    Re: WorkFlow when Data is changed in Table or program
    Also you can update a table from a workflow. To do this, create an Activity step in workflow. In this, you can call a BO method. This BO method would store the code to update the database table required.
    Just take care of the bindings between the method -> task -> workflow container.
    Hope this helps!
    Regards,
    Saumya

  • Table updation through Visual Basic

    We are not able to update employee master table which has 73 columns. The problem is it is not allowing to update after certain number of columns say 50 columns. This is occuring only thru VB and not in SQL (i.e thru instert syntax).
    Can anyone tell what is the solution?

    Hi Saket,
    Yes it is possible!
    To trigger workflow from table updates you can use table level events. Refer to
    Re: WorkFlow when Data is changed in Table or program
    Also you can update a table from a workflow. To do this, create an Activity step in workflow. In this, you can call a BO method. This BO method would store the code to update the database table required.
    Just take care of the bindings between the method -> task -> workflow container.
    Hope this helps!
    Regards,
    Saumya

  • BCALV_EDIT_03 - Need the table update function

    I am fairly new to OO programming and have worked through the various sample programs. I am currently using BCALV_EDIT_03 and _04 to write a table maintenance program.
    I kind of have figured out how the delete and insert function works but unfortunately in sample program _03 the final table update function is missing.
    What I am after is that I get all the changed records from the grid and update the external table just with those records.
    Could somebody post some sample update code that I could check out?
    Thanks in advance.
    Gerd

    Table update as in, database table update or ALV table update ?
    ALV Table update will be done automatically, in case you have used the method : set_table_for_first_display
    As you also quote that you are checking out BCALV_<b>EDIT</b>_03, I will just clarify this point, all changes made to the table are triggered by the EVENT DATA_CHANGED and this event has the necessary fields, from which you can come to know which rows and what values have changed. You need to use this DATA_CHANGED event and update your internal table. This is then shown in SET_TABLE_FOR_FIRST_DISPLAY in PBO.
    In case you are talking about database update and if it is a custom table, then you have to use the direct update.
    In case it is a SAP table, you might let us know which table it is, and probably some of the experts here can let you know the Function Module, BAPI or any method of a class to use.
    In case you need a good tutorial help, you can find it in Serdar Simsekler's
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/an easy reference for alv grid control.pdf
    Let me know if I am way tangent here or I could be of help to you.
    Regards,
    Subramanian V.

  • How to send the PDF file to FAX will the nast table updates

    Hi all,
    How to send the PDF file to FAX. Will the nast table updates ( which fields updates ).
    Need is once fax is send for that delivery, again it should not fax again. Will the nast table helps to check the sent fax.
    Please give me sutable suggessions....

    Have you checked Forums » Community Discussions » Code Snippets 
    I believe there were some examples on converting/sending PDF.
    Or check FM 'SO_DOCUMENT_SEND_API1' and documentation for it.

  • How check table update program, FM etc..

    Hi ,
    I need to prepare a document for table the KNB5, the table contain 11 fields, need to prepare a document for all the fields how they are updating and what Programs, Fucntion Module, Module Pool/enhancement etc.. involved for table updating .
    I will use where used list for each field and get list programs, Fucntion Module, Module Pool/enhancement etc. involved but in what basis, I will confirm weather this program or FM really using table updates or not.
    Shall I search with update command or with table? is any other way?
    Thanks in advance.
    Mahhe

    This is kind of tricky. KNB5 is customer dunning data table which (as far as i know) is updated by transaction XD01/XD02.
    So, you might want to run a SQL trace and modify/update the data. Then you need to analyze the trace to see how it is being updated. Then again, you need to put break points and see what is going by running the same again.
    Just an fYI..... Check out customer master XD02 and company code data - Correspondence tab for dunning info and fields.
    good luck

Maybe you are looking for

  • IOS 8.02 Memory Challenge  & Photos

    I have an I-phone 5 that I loaded 8.0 on it and have had problems accessing my photo's with a number of Apps and my camera roll disappeared with over 4,000 photos.  It's now impossible to find a specific photo unless I go into each photo roll (day, o

  • Photoshop CC, the program, shutdown directley

    photoshop CC, the program, shutdown directley. How can I run photoshop cc without shutingdown?

  • Data won't hotsync

    I've been trying to set up Oracle Lite and Satellite Forms database application on a Palm with no results. I've got as far as getting "sane" error messages in the hotsync log. This is what I get: "SFT-EE_EMP skipped because scott was not subscribed t

  • Problem during generating cap file

    hello u all when i am tried to generate a cap file using class file by Converter exception is thown name as java.util.Zip.ZipException ------------please help me solve it.

  • Technical difference between SAP enjoy transaction and Old transaction

    Can some one detail out technical differences betwwen SAP enjoy transaction ( like ME21N) and normal old transaction( like ME21). Specially I want to know the difference between user exits for two transaction .