Creation of record in 2001 using FM - HR_INFOTYPE_OPERATION

Hi fellow ABAP,
I'm new to using HR_INFOTYPE_OPERATION, I want to make this one an alternative way to create record in IT 2001 instead of using Batch Input.. but it returns me error
Runtime Errors:         ASSIGN_BASE_TOO_SHORT
Short text        :        Fehler in ASSIGN-Zuweisung im Programm "SAPLHRMM".
I ran HR_INFOTYPE_OPERATION at SE37 with these parameters:
INFTY                   =    '2001'
NUMBER              =    '00001003'
SUBTYPE             =    '2250'
OBJECTID             =   ' '
LOCKINDICATOR   =   'X'
VALIDITYEND        =   '06/02/2009'
VALIDITYBEGIN     =   '06/02/2009'
RECORDNUMBER =   '000'
RECORD               =   '2001'
OPERATION          =   'CREATE'
TCLAS                   =   'A'
DIALOG_MODE      =   '0'
NOCOMMIT            =   'X'
VIEW_IDENTIFIER  =   ' '
SECONDARY_RECORD =  ' '
is there something I missed? and how can I pass value for the creation of IT2001?
thanks so much in advance...

Hi Dude,
Go through this code for 2002..
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.

Similar Messages

  • Using FM HR_INFOTYPE_OPERATION to update infotype 0001.

    We're using FM HR_INFOTYPE_OPERATION to update the infotype 0001 (Organisation). We basically have the Cost center field grayed out on the entry screen so can not update it via BDC, which the cirrent method that we use to create new employees, based on data passed in from a third party system. When then attempt to update the employee record (using Copy) and the FM mentioned.
    We first get the details of the infotype using FM HR_INFOTYPE_GETDETAIL, and this work perfectly, returning all the information required. We the update the structure returned by the RECORD parameter and then use the FM HR_INFOTYPE_OPERATION, like so:
        call function 'HR_INFOTYPE_OPERATION'      
          exporting                                
             infty         =  '0001'               
             number        =  gs_p0001-pernr  
             SUBTYPE       =                       
             OBJECTID      =                       
             lockindicator = 'X'                   
             validityend   = '99991231'            
             validitybegin = gs_p0001-einda   
             RECORDNUMBER  = '001'                 
             record        = gs_p0001             
             operation     = 'COP'   
             nocommit      = 'X'             
       importing                           
        return        = gt_bapireturn1   
        key           = gs_bapipakey     
    exceptions                          
        others        = 1.            
    However, we receiving an error in the gt_bapireturn1 itab basically giving the error PG 184. When I look up the error it basically says that to update this info type we need an exclusive lock, which I would have thought exists when using the LOCKINDICATOR parameter. The previous FM ( HR_INFOTYPE_GETDETAILS) returns blank against the SPRPS fileld (Lock indicator) when reading the infotype data, so it's not previously locked or anything.
    We're using version 4.0b, which I know is pretty old, but surely this update should work.
    Has anyone encountered this problem before, and, do you think I should be able to update this field even though it's grayed out on the screen ?.
    Jason
    Edited by: Jason Stratham on Mar 16, 2010 11:41 AM

    I read that I should be using the enqueue and dequeue FM's despite the LOCKINDICATOR parameter.
    This I have now done, but am now receiving an error PG 428 'A complex application error has occurred', but I'm none the wiser in knowing why this error has occurred. Has anyone encountered this error before?.
    I'm beginning to feel that despite being told that I can use the HT_INFOTYPE_OPERATION  function module it may well purely imitate the front screen processing, which does not allow us to change the cost center value. Is there any way that this might be done. We're on version 4.0b, and I'm sure that in later version there might be a BAPI that almost directly updates it. I guess there's no such method for 4.0b?.
    Jason
    Edited by: Jason Stratham on Mar 16, 2010 12:06 PM

  • Create Records through OData using Jquery

    Hi All,
    I have created a OData Service in SAP ECC system in format
    http://hostname:portno/sap/opu/odata/sap/Z_PORDER_SRV/PurchaseOrderHeaderCollection
    I am trying to create a record from front end using JQuery.   I am able to retrieve all the records, but creation of records using Method "POST" fails.
    For creating records, using the method "GET", i fetch the token "X-CSRF-Token" and then pass the token to the "POST" method.
    I am getting an Exception "No Handler for Data" error is coming.   I am accessing the OData Service using the datajs framework.
    (datajs-1.1.1.min.js).
    Please help me in resolving this issue.
    Thanks,
    Divya

    Thanks for the reply Jamie.
    Code:
    OData.request({
                   "http://host:port/sap/opu/odata/sap/Z_PORDER_SRV/PurchaseOrderHeaderCollection",     
                    method : "GET",
                    user: Customer_Username, 
                    password: Customer_Password,
                    headers :
                           "X-Requested-With" : "XMLHttpRequest",
                            "Content-Type" : "application/XML",
                           "DataServiceVersion" : "2.0",
                           "X-CSRF-Token" : "Fetch"
              function(data, response)
                            var header_xcsrf_token = response.headers['x-csrf-token'];
                            OData.request(
                                    requestUri :    "http://host:portno/sap/opu/odata/sap/Z_PORDER_SRV/PurchaseOrderHeaderCollection",                     
                                    method : "POST",                 
                                    user: Customer_Username, 
                                    password: Customer_Password, 
                                    headers :
                                           "X-Requested-With" : "XMLHttpRequest",
                                          "Content-Type" : "application/XML",
                                          "DataServiceVersion" : "2.0",                      
                                          "X-CSRF-Token" : header_xcsrf_token
                                  data: 
                                     PONumber:"4500000091",
                                     CompanyCode:"TVSC",
                                     PurchaseDocCategory:"F",
                                     PurchaseDocType:"NB",
                                     PurchaseDocStatus:"9", 
                                     CreatedBy: "", 
                                     VendorAccountNumber:"V1",
                                     PurchaseOrganization:"PO01",
                                     PurchaseOrgGroup:"101",                      
                                     TotalValueAtRelase:"0.00",
                                      POItem: "00010",
                                      Material:"",
                                      MaterialNumber: "000000000000000011",
                                      Plant: "PL01",
                                      MaterialGroup: "01",
                                      TargetQuantity: "0.000",
                                      Quantity: "5.000",
                                      Unit: "ST",
                                      OrderPriceUnit:"ST",
                                      NetPrice: "10.0000",
                                      PriceUnit:1,
                                      GrossValue:"0.0000",
                                      NetValue:"0.0000",
                                      NetWeight:"0.000",
                                      WeightUnit:"",
                                     MaterialType:"",
                                     PurchaseOrderHeaderPONumber:"",
                                     PurchaseOrderHeaderPONumber1:""
                      function(data,response)
                           alert('Success. Created New Record');
                      function(err1)
                          alert('Error in Create Record...'+err1.message);
                     function(err)
                            alert('error....'+err.message);
    Output
    I get an error message "Error in Create Record. "No Handler for Data".
    I tried entering the header  details alone and also by entering the line items. Still the same error is thrown.
    Please Help.
    Thanks,
    Divya

  • How can I use the USRP to record a signal using its two RX port simultaneously?

    Hi.
     I am trying to record a signal using two horn antenna. The reason I need two antenna is to cover the wide frequency range (DC-6GHz). one antenna is covering DC-300MHz and the other one covers 300MHz-6GHz. So I need to use two RX port of USRP at the same time to record the signal. I have two questions:
    1. Does any USRP in the market capable of covering this range of frequency?
    2. Is it possible to use both RX port at the same time to record signals as I described? If not, how can make that happen?
    P.S. I have two NI2920 USRPs and two N210 USRPs in my lab. 
    Thanks in advance for your time.
    Sam.
    Solved!
    Go to Solution.

    Hi Sam,
    To answer your first question the USRPs that you have cannot reach the frequency range that you want. There is not a USRP, to my knowledge, that can reach this range in one device. 
    Also note that you cannot use two RX sessions for two different ports at the same time using LabVIEW and the USRP driver. If you want to use both RX lines you will have to run one session with one line, end the session, and then start a different session for your second RX line.
    Noah | Applications Engineer | National Instruments

  • Standard MDM iView for Creation of Record

    Hi All,
    We have requirement to create a record in MDM through Portal.
    Are there any standard iViews available in Portal content of MDM, which can create or update a record in MDM repository?
    In the Portal content we have found following two SCA
    BPMDMAPPLI04_0.SCA
    BPMDMTECHN04_0.SCA
    We have deployed them on the portal server, we are able to see search and itemdetail iViews for standard repository.
    But we are not able to see iViews for creation of record.
    In one of the document it has been given that SP 04 extended (imporved) functionality offers Data Entry and Maintenance (CURD operations) can also be performed.
    But availability of the iViews not mentioned anywhere.
    Anyone has already implemented such kind of functionality or scenario?
    Thanks and regards,
    Shruti.

    Hi Mandar,
    I have followed the same PDF also.
    But I am not able to find out the SCA's which are mentioned in the above document for GP and CAF.
    I tried searching on service market place also.
    In portal Contenet of SP 04 i have found only two SCA's
    BPMDMAPPLI04_0.SCA
    BPMDMTECHN04_0.SCA
    I am not able to find following SCA files.
    H2G_GuidedProcedures.sda
    H2G_SourceCode.zip
    Can tell me how do i get those SCA's?
    Thanks in Advance
    Shruti.
    Edited by: Shruti Shah on Mar 12, 2008 6:19 AM

  • How to select records in ALV using FM

    Hi guys,
    How to select records in ALV using FM. Not the OO method. Thx in advance!
    Kun

    hI
    by using REUSE_ALV_FIELDCATALOUG_MERGE. Iys fill field catalouge table as per internal table description. Then use REUSE_ALV_GRID_DISPLAY for display ALV REPORT.
    **Please reward suitable points***
    With Regards
    Navin Khedikar

  • When you download iTunes material, does iTunes record the IP used where it is being downloaded to?  I am trying to track a lost/missing IPOD Touch and want to know if they have that data.

    When you download iTunes material, does iTunes record the IP used where it is being downloaded to?  I am trying to track a lost/missing IPOD Touch and want to know if they have that data.   It was left on a small street and someone has found it and has been hacking into my account by resetting my password.  They took about 41+ dollars from my account.   I am hoping the IP it was connecting with to download to it was tracked and that I can get that information to figure out where it is located.

    No. From the second link below.
    "Apple does not have a process to track or flag lost or stolen product
    - If you previously turned on the FIndMyiPod feature and location service is on, and wifi is on and connected go to iCloud, sign in, and go to FindMyiPhone. It the iPod has been restored it will never show up.
    - Report to police and change the passwords for all accounts used on the iPod.
    - Apple will not help
    Reporting a lost or stolen Apple product

  • I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, the cut the recording into songs using one audio file folder. When working on an individual song, I can't access the sampler.  I get the message "nothing to display"

    I'm running logic pro 8.0.2 on Leopard 10.5.8. I've recorded an evening of live music, then cut the recording into songs using one audio file folder ad multiple song files. When working on an individual song, I can't access the sampler.  I get the message "nothing to display" or "no region or audio file selected"  After much research on the web, I believe this is a permanent bug.  Does anyone have a good work-around for this type of work.  We record live 16T band rehearsals constantly and would love to be able to break individual songs out of the large file and be able to use the sampler.  Thanks in advance for your ideas!  Cheers.

    Another thing - if I copy one of the tracks to another track, then the sample editor works on the copied track.  I don't want to have to copy 16 tracks to new tracks to be able to use the sample editor on a project.  Thanks again.

  • Recording from DAT using SB Conn

    Long time ago I have recorded DAT tapes using my Denon DTR 2000. I used digital recording from CD for that.Now I am considering using SB Connect for burning CD's (DAT?is such an old stuff?don't want to loose my recordings). Anyone has tried anything like that? Any problem with SCMS?

    BES,
    Which input on the back of the card did you use? The Line-in is the stereo input. Ensure that you have the cable fully inserted on both ends. Also check with another source such as a CD player or personal radio. This will tell you if the tape player may be sending only the left, or if the input jack is failing.
    Daniel

  • I have a HP610-1150f. not recording sound when using webcam in touchsmart screen.

    I have a HP610-1150f. not recording sound when using webcam in touchsmart screen.  I have looked thru this forum and I don't see anyone else having this problem. (unless I missed it).  The recording works in Notes, but not when I open Webcam and try to record from there. video recording works fine. I have had this computer less than a month and I am having a couple of problems with it. Still loving it though.

    Hello schae731: Welcom to HP Forum and your new Touchsmart. You need to contact HP Direct Support on line your Touchsmart comes  with one year warranty so use it why you can. You can contact them through your HP Support Assistant or on line. They will help you with trouble shoot the web-cam software. Goto your computers model and make support web-site. They will also help you with your other issues as well.
             I am using the older version software so I won't be much help. Please repost if HP direct support is un able to help you resolve your issues. While you are chatting with them have them check out your computer do it before your 1 year warranty expires. Have fun with your new computer.

  • Recording my voice using MacBookAir

    Is there a possibility to record my voice using my MacBookAir as an mp3 and after that listening to it on my Mac or on Ipod over and over (looping)?
    Thanks

    Thank you and..how do I create a podcast using my MacBookAir?..

  • Problem inserting in Infotype 0002 using FM HR_INFOTYPE_OPERATION

    Hello.
    Im having some trouble uploading data to the PA0002 infotype table. In my program , I upload all the information from a txt file. In this file, every line correponds to an entry of the table.
    To do this, I use the SPLIT sentence to insert in a pa0002 structure, all the values that come from the file line. After that, I use the HR_INFOTYPE_OPERATION to insert the data.
    This works for almost all the tests i made, except for one case: when I have to pass the P0002-ANZKD (number of children) field to the FM.
    The problem here is that when I call the function module the value seems to be correct. But when I make a debug  inside the FM, i noticed that this value is not displayed correctly when the FM makes the move operation to insert this value in the corresponding FVAL field for the PROPOSED_VALUES table. Also, all the values going after this field are not represented correctly in the PROPOSED_VALUES table.
    P0002-ANZKD is a DEC type field, so to make it work with SPLIT, i had to specify ANZKD as a type c field in my structure (everything else is as equal as P0002).  And I also tried uploading the data, first to my structure and later I make a MOVE-CORRESPONDING to an exact P0002 structure, but I get the same result in this case too .
    Does anybody now how can solve this issue?
    Thanks in advance,
    Juanma.

    Hi,
    I've managed to solve the problem. Changing the size of the anzkd field of my structure (greather than 3) and then passing all the values to a  p0002 stucture,  gave me the opportunity to upload succesfully the data into pa0002 with the FM.
    Thank you for your help Anil,
    Juanma.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Video Pixelation occurs while recording the video using flash player

    Hello,
    I am recording the video using flash player 9 ( using the
    flash media server 2.0 on the back end). Everything used to work
    fine in the past. The quality of the flv video was good. Now
    suddently, I have started seeing the pixelation in the recorded
    video (very poor video quality). Nothing has been changed in the
    code. However on the server side, I am not very sure if there is
    any windows update has taken place and have caused the problem with
    the codec on server.
    However my understanding is that when we record the video
    then flash player use its own codec not the flash media server.
    Can any one help me on how I can get rid of pixelation
    issues?
    Thanks for your help.
    Best Regards
    Pradeep

    Hello Melissa,
    I might not be understanding the question right, but if you
    are using Flash
    Player 6, and the Flash Player 6 video player component, you
    can resize the
    video by resizing the component on the stage (just drag and
    make it larger).
    Let me know if that works for you.
    Jesse H.
    Adobe Community Expert
    My site:
    http://www.jharding.com
    Free Blog Radio:
    http://www.tornadostream.com
    > I'm streaming video using Flash Player 6. The problem I
    am having is
    > that the
    > video will only play at a super small size, something
    like 180 x 60
    > (that's a
    > guess). Is there a way to play the video at the 320
    width that I
    > redered it as?
    > I'm using Flash Player 6 because some code that came
    with my
    > purchased Flash
    > Template does not work unless it's published to Flash
    Plaey 6.
    > Thanks in advance!

  • [HELP] How to records user who use SQLPlus or SQL editor?

    Dear Gurus,
    Is onyone know how to record user who use SQLplus or any SQL editor?
    for instance...
    user1 using SQLplus on monday august 9.30.21 PM...and I have table which record this for audit user.
    Or..
    Can I block user who connect to oracle using SQLPlus?
    If anyone know how to do this..please inform me...
    Thanks and Regards
    Erie

    You can enable Auditing (AUDIT_TRAIL) and audit at the Session Level to record Logon and Log off of a required user. This can be enabled to be recorded in the audit table or operation system file. You can also audit user statements etc.
    For example, to enable auditing connect for user UGONIC
    SQL>audit connect by UGONIC;
    TO disable it
    SQL>noaudit connect by UGONIC;
    Check in the SQL Reference for the AUDIT statement and requirements.
    If you do not want the user to connect at all via SQL*Plus, you can use PRODUCT_USER_PROFILE to disable a users access to SQL*Plus or at the lower level, disable specified SQL*Plus and SQL commands for the user. You need to run the PUPBLD.SQL script as system user (if not run yet) and add records to it as required.
    Example: After running PUPBLD.SQL. This entry stops the user UGONIC from using the drop command at the backend in SQL*Plus.
    INSERT into product_user_profile (product,userid,attribute,char_value,date_value)
    values('SQL*Plus','UGONIC','DROP','DISABLED',NULL);
    Note that if a user is already connected by the profile entry, it is not activated on that session, but on subsequent logons. Again read the requied security documentations for this.
    For both auditing, you need to set the required database intialisation parameters and know where to get the audit records (in tables, views or OS file). For instance, when using tables, you maintain and query tables like audit$ to view the logs. When using OS type logging, it is recorded on the path specified in the AUDIT_FILE_DEST init parameter (In Windows, it is logged in the Windows Event and you can view it from the event viewer).

Maybe you are looking for

  • How do I save a file in Acrobat Pro 8 so as to edit in Photoshop 7?

    I have several owner manual downloads that were poorly scanned and I have extracted the pages as individual files.  I am pretty sure that I have been able to open them in Photoshop, or change their format in Acrobat so I can open them in Photoshop. I

  • Cannot install windows 8 using usb stick on G400s FreeDOS version

    I'm having some difficulties to get windows 8 installed on this laptop. is there any secrets or tricks on BIOS that I'm not aware of?? I have installed windows 8 on many laptops using same pendrive without having trouble previously. I have tried lega

  • Unwanted boxes in PDF when CMYK is unchecked

    When we generate PDF documents in FrameMaker 10 we uncheck the "Convert CMYK Colors to RGB" check box in order to get our colors to display/print correctly.  However, when this is unchecked half of our staff encounters another issue: Boxes display ar

  • PLEASE HELP!... I need to uncompress my pictures

    We switched from Windows to Macs only a few months ago, and while we love all the things my Macbook Pro has to offer we don't really know how to work it good... Anyway, my problem is my husband compressed and exported all my pictures (thousands of th

  • Security of SharePoint Online

    We are using Sharepoint Online and Sharepoint 2010 on Prem. Can someone tell me if you have sensitive data that is deleted on a site level and then deleted on the top level if it is completed removed from the SharePoint databases?