HCM forms Advanced Generic service

Hi,
I am using HCM FPM forms Advanced Generic service to update Action infotype (0000). In the flush method i call the funciton module 'HR_CONTROL_INFTY_OPERATION'.
while executing update application throws error 'Precondition violated'.
I have pasted the code lines below. Please let me know if anything is missed out.
METHOD if_hrasr00gen_service_advanced~flush.
   DATA: ls_pa0000 TYPE p0000.
   DATA: ret TYPE bapireturn1.
   ls_pa0000-pernr = gv_empno.
   ls_pa0000-endda = '99991231'.
   ls_pa0000-begda = sy-datum.
   ls_pa0000-massn = 'K2'.
   ls_pa0000-massg = '01'.
   ls_pa0000-STAT2 = '3'.
CALL FUNCTION 'HR_CONTROL_INFTY_OPERATION'
   EXPORTING
     infty                  = '0000'
     number                 = ls_pa0000-pernr
     record                 = ls_pa0000
     operation              = 'INS'
  IMPORTING
    RETURN                 = ret.
ENDMETHOD.
Below is the error message.
The following error occurred in system XXX : Precondition Violated
The error occurred on application server XXXXXX_00 and in work process. 5
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: SET_CONTEXT of program CL_HRPA_INFOTYPE_FACTORY======CP
Form: INITIALIZE_PS_ADAPTER of program SAPFP50P
LOAD-OF-PROGRAM of program SAPFP50P
Form: INITIALIZE_PS of program SAPFP50P
Function: HR_MAINTAIN_MASTERDATA of program SAPLHRMM
Function: HR_INFOTYPE_OPERATION of program SAPLHRMM
Function: HR_CONTROL_INFTY_OPERATION of program SAPLHRMM
Method: IF_HRASR00GEN_SERVICE_ADVANCED~FLUSH of program ZHRHCMCL002_PROB_AGM_FORM=====CP
Method: IF_HRASR00_MAPPER~FLUSH of program CL_HRASR00_GENSERV_MAPPER=====CP
Method: FLUSH of program CL_HRASR00_DISPATCHER=========CP
Thanks,
Ramanan

You have to be a bit careful using that function. If you look, the first thing it does is to check WHICH framework to use (old or new)...and oddly, for for infotypes 0000,0001,0003,0031 and 200n, it ALWAYS forces it to use the old framework. (ugg!)
As said above, for HCM P&F, you should be using the DCIF, so make sure you know which infotypes you need to "touch" before using the function over the decoupled IT/buffer container class handling.
Lastly, why are you trying to do this for IT0000 anyways? The framework does this for you automatically when you assign MASSN and MASSG (SAP_PA picks those up as "special fields" and creates the IT0000 for you). If you need to manipulate the values for action and action reason, use a simple generic service to set/assign the fields and still let the framework handle it automatically for you in SAP_PA.
oh! ....and TCLAS and DIALOG_MODE are not optional parameters of the function.

Similar Messages

  • Return function module result to HCM form using backend service

    Hi
    I'm trying todo something very simple.
    I would like to call a FM using a backend service and return the result of the FM to the HCM form.
    I'm using USER_EVENT_CHECK on button to initiate the call.
    Here is my dooperations, I have omitted the calling of the FM.  I just want to return the changed text to the form in this example.
    I have stepped through code using external breakpoint and the field gets changed succesfully in the service_dataset
    method IF_HRASR00GEN_SERVICE~DO_OPERATIONS.
      DATA service_operation_wa TYPE hrasr00genserv_operation.
      DATA service_dataset_wa TYPE hrasr00gensrv_dataset.
      DATA dummy TYPE string.
      DATA message TYPE symsg.
      FIELD-SYMBOLS <service_dataset_wa> TYPE hrasr00gensrv_dataset.
      DATA inputText TYPE string.
      LOOP AT service_operations INTO service_operation_wa.
        CASE service_operation_wa-operation.
          WHEN C_CVRT_OPERATION_NAME.
            LOOP AT service_datasets INTO service_dataset_wa WHERE fieldname = c_oldText_fieldname.
              inputText = service_dataset_wa-fieldvalue.
             MODIFY service_datasets INDEX sy-tabix  FROM service_dataset_wa TRANSPORTING fieldvalue.
              exit.
            ENDLOOP.
            LOOP AT service_datasets ASSIGNING <service_dataset_wa> WHERE fieldname = c_newText_fieldname.
              EXIT.
            ENDLOOP.
            IF sy-subrc = 0. "entry found; must not necessarily exist
              CONCATENATE inputText '-TEST-' inputText INTO <service_dataset_wa>-fieldvalue.
            ENDIF.
        ENDCASE.
      ENDLOOP.
    endmethod.
    Any help will be appreciated.

    You could use 'CU_READ_RGDIR_NEW' to get payroll directory RGDIR, 'PYXX_READ_PAYROLL_RESULT' to read results (RT, CRT, ...) from specific entry in payroll drectory.
    Rgds.

  • HCM forms - Use of Advanced Generic serivce

    Hi,
    I am using Advanced Generic Service to update data. I am using the flush method. but the data is not getting updated. Please let me know what should be writtenin OPEN and CLOSE_LUW methods.
    Thanks,
    Nikhil

    hi Chris,
    Did you find a way for this. if yes please share it with me.

  • How to create Generic Service in HCM Processes and Forms

    Hi Friend's,
      Can you tell me what are the steps to create Generic Service in HCM Processes and Forms and also tell me how to link Generic service with BADI.
       In SPRO, I defined one customized generic service, but i cant able to implement the generic service to BADI. Moreover it's asking for Composite Badi Implementation name.
       So tell me the steps which guide me to create that.. Waiting for your replies....

    hi ramesh,
                      use HRASR00GEN_SERVICE_BASIC  create ur own.
    Madhukar

  • Generic service to populate fields in HCM Processes and Forms

    Dear Friends,
      I am developing generic service to populate some fields in HCM Processes and Forms. Please let me know whether i need to develop a single service for each field in the form or is better to write one generic service for all the form fields.
    Thanks in Advance

    Hi Sapient,
    By right, generic service means to be generic so that it can be re-used in any HCM forms thats needed the field/validation from the generic service.
    Unfortunately in real situation, generic service are not reusable for some reasons:
    - for the same field same field might have different validation in different form.
    - there is dependency, example, to read special field
    The key thing here is all about the design and planing before development. Whereby if you have all the info and requirement HCM form to be implemented(which you wont get it for most of the cases), and you have the overall view of all HCM to be implemented and you are able to plan ahead before coding, then you can design the generic service for each/related field.
    If it is not the case, i would encourage to use 1 generic service for all the field in the HCM form. It would ease the team during support/maintenance phrase as well. For sample, please refer to HRMSSRCF_REQUISITION_ADVANCED for Create Requisition form.
    This is my humble opinion based on my experience working on HCM forms. Please do comments and discuss.
    regards,
    Xiang Li

  • HCM Process and Forms Generic Service Error

    I tried creating a generic service for HCM Process and Forms using enhancement spot HRASR00GENERIC_SERVICES. After I created a custom implementation I then added the filter value = ZH_FORM_HEADER (my generic service name/definition). When I try to go into the configuration and add the generic service and do the binding of the fields I get an error stating "Generic Service ZH_FORM_HEADER has more than one implementation." I have double checked and only one implementation is using that filter value and there are no implementations with a blank filter value that belong to this enhancement spot. Any suggestions on what could be wrong? I can create generic services and the implementations of the BADIs just fine in our sandbox just not in the development instance. Also, I have tried searching on OSS and SDN and couldn't find any messages associated with this problem.

    Hi :
    We are having a similar problem. Our generic service works OK in development system. But after we transport the service to Test system, the service haveing the error " Generic service XXXXXX has more than one implementation".
    Have you solved your problem? Can you tell us the solution?
    Best regards!
    Wayne

  • Doubts with generic service in "HCM processes and forms"

    Hello friends:
        Im having troubles trying to figure out how to use generic services. I implemented a badi with generic services and this have the following methods:
    IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS
    IF_HRASR00GEN_SERVICE~GET_FIELD_INFO
    IF_HRASR00GEN_SERVICE~GET_OPERATIONS
    IF_HRASR00GEN_SERVICE~INITIALIZE
    IF_HRASR00GEN_SERVICE~DO_OPERATIONS
    IF_HRASR00GEN_SERVICE~GET_HELP_VALUES
       I could initialize values of my form using only INITIALIZE method, and I could perform some validation using  and then DO_OPERATIONS.
       I cant understand what is the usage of methods like GET_FIELD_INFO and GET_OPERATIONS?? according to the badis help, get_field_info must be implemented, but i didnt do so and it worked anyway?
    I will be grateful with all your help,
    Best regards,

    GET_FIELD_INFO is for adding fields. Suppose you are using the generic service for IT0008 data. The IT0008 fields
    which need to be used on the adobe form has to be added in this method. You need to add field name and data element
    to the field_infos table. GET_OPERATIONS is used to define operations associated with the fields. Suppose you have a
    scenario when user selects personnel area all personnel subareas associated with the selected value should come.
    Then you need to group together personnel area and sub area together into an operation. Also even if a field is not aasociated
    with any operation, to add a field to form scenario you need group them into operations in GET_OPERATIONS.
    Check the class CL_IM_HRRCF_REQUI_REQUEST to determine how this can be used.
    Thanks,
    Aravind

  • Generic Service error in HCM Processes and Forms

    Hi ,
    I have created generic services and they are working fine in the Development system .But when it is moved to testing system , all the services are active. But it still reports that the none of the generic services including the standard SAP delivered generic services are inactive.
    Did anyone face this problem ? How to resolve this issue , any help in this regard would really be helpful.
    Thanks,
    Saujanya

    I have resolved the issue by regenerating the generic services.

  • Issue with SAP_PD Service in HCM Forms

    Hi Experts,
    I am facing this issue when trying to create/update a Position using HCM Forms.
    We have the HCM_ASR_CL_2 Business Function Activated
    We are on EHP4.
    I am trying to create/update a position using forms - SAP_PD Service and facing the below mentioned issue -
    When I am trying to add the Object Type S in the LEAD_OBJECT_ID, I get the error - Object type S not supported.
    As a workaround that I got from a help.sap - 3.In the navigation pane, go toValidity Period.Enter Start Object Type as S = Job, enter Application Type as PD. - Even this workaround doesnt work!
    Am  I missing some config here?
    Also, once we activate the Business Function - do we get the node for SAP_PD in IMG just as we have for SAP_PA and SAP_PT service?
    Please help!!!
    Thanks

    Any reponses?

  • Standard backend service data vanishes on click of a button in HCM Forms

    Hi,
    I have a form which displays data from standard backend service SAP_PA and also from custom generic service.
    When I click on a button in the form, the data from SAP_PA is disappearing.
    Error message 'Please enter Personnel Number' is displaying.
    Please help me to resolve the issue.

    Hi Aravind,
    Thanks for your reply...
    Data is from standard backend service which is independent of user events..
    Data is displaying for the first time when form is dispalyed on the portal but when user clicks on any button, data is disappearing...
    Can you tell us the patch level of the system required for ESS MSS ??
    As of now our system patch level is 11,,
    This might be a  problem for data vanishing?

  • Implementation for generic service emp_wagetype is missing while using HCM

    Hi all,
    For a Badi y_essmss_wagetype_03 i have created  a filter named y_emp_wagetype.. When i am using this filter in the back-end services and  try  to see the services fields for this filter it is throwing the error..
    Implementation for generic service y_emp_wagetype is missing
    Please suggest.
    Thanks
    Pradeep
    Edited by: Pradeep on Oct 6, 2008 10:25 AM

    Still pending

  • Raising custom error message in generic service initialize method of Pr&for

    Dear all,
    I am developing the HCM process form.
    Is it possible to raise an error if any condition is not met in initialize method in generic service of HCM process & forms?
    If possible could you please provide me the steps/process.
    Thanks & Regards,
    Krishna K

    Change for a BADI more suited (not in the update of after-save process) like ME_PROCESS_PO_CUST (Method PROCESS_ITEM, CHECK).
    ME_PURCHDOC_POSTED  is too late.
    Regards

  • HCM forms and Processes - Adobe

    Hi,
    I am working on HCM forms and processes( not QISRs ). I want to populate a drop down list based on the selection of another dropdown list, how can we acheive this in Adobe forms. Should I go about configuring some back end generic service? if so how will the backend service get triggered based on my selection.. Any idea on this is highly appreciated
    Thanks.

    Hi
    To archive  above functionality we can use  below simple method, if u r expectig same functionality through operations and custom event give me some time i need to recall some functioality(At present i am unable to acces MY SAP)
    Let my BADI name is   Z_Positions .
    Letu2019s define two attributes in my BADI like E_DATE and DD1.
    For to understand better create one methods as same as input and out parameters of Get_Help_Values method.
    So my methods is F4_Vac_Pos
    Method:- F4_Vac_Pos
                Read the entered  value of the Effective date (by reading service datasets with passing key as filename =E_Date)
    Once if we able to read the Effective date, cheek is initialize are not(value is there or not).
         If it is not initialize go ahead else return.
         If it is not initialize fill all vacant positions in DD1  based on by passing key as readied 
                       Effective date.
    Call this methods in get_help_values  method.
    From Configuration side:-
    Created Effective_date  and  F4_DD1attributes.
    Add your custom generic service to form (let assume  service no is 200 ).
    Go to the assignment of custom generic service; map the F4_DD1 form attributes to the BADI attribute DD1 and cheek default value and value help.
    The same way map form Effective_date attribute to BADI E_date (donu2019t select value help option)
    Now adobe java script:-
    Write the below piece of code on click method of button
    xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";
    ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");
    Data Flow:-
    Once the date is selected, click on the Button. As we know already for every round trip get_help_values method will call. Now it will call.
    As already effective date value is mapped to one of the custom badi attribute, so we are able to read this value through service data set.
    While filling DD1 values we are filtering data based on effective date. Now at badi level we are filtered vacant position based on effective date.
    As this one is mapped to F4_DD1 form attribute, once round trip is completed u will see filtered vacant position based on effective date.

  • HCM Forms and Process

    Hi all,
       Is it even possible to change the Effective date of SAP_PA action? I have 4 backend service,
    SAP_PA
    Serv_1
    Serv_2
    SAP_PA
    I changed EFFECTIVE_DATE ( Field is available as input field in the form) in my Serv_1 also to ensure I changed it in Serv_2 with the same value (Code written in both Intialization and Do_operations). But whenever the form opens the effective_date shows current system date. Because of which, when we click 'Check' button it throws an error saying 'Future action exists, check status'.
    Actually, here we are trying to create future dated action.
    Thanks in advance.
    Sri

    1. Check with SAP if the they allow defaulting of effective date using a generic service.
    2. Even if you are not defaulting the effective date, it should be possible for the form user to change the effective date and the action should get executed for the date selected on form.
    Debug and find out from where the error message is thrown to find if correct date is being referenced.
    Further if you have mapped effective date field to you generic service check if the effective date selected on form is passed to the generic service do_operations method ( look in both SPECIAL_FIELDS and SERVICE_DATASETS )
    Hope this helps.
    Regards,
    Sahir.

  • Issue with HCM Forms

    Hi
    We are implementing HCM Forms and Process. We have landscape EP7 SP18 and ECC6 with HR600.
    We have done all the Adobe configuration, credential. All the test are successful on portal and R/3.
    But we are not able to see adobe form on portal,when we select process (standard/custom) it ends with dump ie
    'Connection Time out' / pdfobjectruntimeexception: Failed to updatedatainpdf
    Please give your inputs if you have faced this issue. Also can I use upgraded packages in portal (WD Abap applications);let me know the versions for both HRAdmin and ECC HR.
    Thanks in advance.

    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/02/560f41ca73d349e10000
    000a1550b0/frameset.htm
    You can find information how to restart pdfobject application.
    do these steps
    To generate interactive forms the Adobe document services require a so
    called readerrights credential.
    Following steps are required.
    1. Order a credential
    2. Install the credential
    3. Configure the credential.
    -> 1. If you have already a credential, you can skip this step
          See SAP Note 736902 to see, how to receive a credential.
    -> 2. To install the credential, see the Configuration Guide, please.
    http://help.sap.com/saphelp_nw70/helpdata/en/fe/e8cc48abee49f082dfbd5b45
    d98dd4/frameset.htm
    -> 3. To configure the credential using the Visual Administrator, see
    http://help.sap.com/saphelp_nw70/helpdata/en/2d/223cac65804e03b9044059c4
    f59201/frameset.htm
          Please note, that instead of restarting the J2EE engine after
          configuring, you can restart the following services:
               Restart Trust Manager Service
               Restart PDFManipulation Module
    Please note if you are using Enhacement package 4 then you

Maybe you are looking for

  • Comping isn't working occasionally on some of my audio tracks.

    So I'm still a little bit of a noob--hoping this is an easy fix between the computer and the chair and not a bug.  For some reason in some of my sessions I'm unable to comp audio in particular tracks.  Other audio tracks in the same session can do it

  • Need a Help to Run the EJB client

    Hello Friends, I'm using EJB3.0. while running my client side bean I got a Exception like this " javax.naming.NameNotFoundException: maheshwaran.count not bound." I'm new to EJB so i couldn't find specifically what is the mistake in my files. I creat

  • Manager name didn't provision in AD

    Hello Folks, I am working on OIM. we have PeopleSoft is our source of truth and Active directoy and eDirectory is Target system. Our requirements is like whenever employee created in PeopleSoft. PeopleSoft automatically assign Manager to that user an

  • Mini Bridge NOT installed in PS CS6

    Holy Cr@p - THis is the third time I am entering this question trying to get help!!! Running PS CS6 with Win Vista. Cannot access Mini Bridge because the error message says "Mini Bridge Extension is not installed" QUESTIONS: 1: How do I install Mini

  • PSE 13 organizer crash down on MAC OS X Yosemite.

    Any updates or ideas? Editor is working fine..... Message: Process: Adobe Elements 13 Organizer [604] Path: /Applications/Adobe Elements 13 Organizer.app/Contents/MacOS/Adobe Elements 13 Organizer Identifier: com.adobe.ElementsOrganizer13 Version: 13