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.

Similar Messages

  • Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format

    Can any one tell me Function module to convert date form yyyy/mm/dd to dd/mm/yyyy format?

    have a look at the WIKI FAQs...they are very useful
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abapDevelopmentand+Programming&
    For this it says:
    <i>How to convert a date to internal or external format?
    Use the functions modules CONVERT_DATE_TO_EXTERNAL or CONVERT_DATE_TO_INTERNAL
    to convert the date. When converting to external format, the date format from the user's user profile will be used. When converting to internal format, the result will be in YYYYMMDD format.</i>

  • Function modules supported by seal system used to print drawing documents

    Hi,
    As per my current requirement, while create purchase order (ME21N), the drawing document (which are linked with materials of the PO) should print along with the PO form (smartform). The drawing are stored in the Auto CAD system. Seal software has already installed to print drawing documents.
    But I would like to know the function modules supported by seal system used to print drawing documents.
    Thank you.
    Tulasi

    Tulasi,
    May be you can approach it this way
    create a ztable with fields matnr and graphic object(check STXBITMAPS table for the attributes of this field) and upload the drawings against every material.Now you will have a table containing the matnr and the corresponding drawing in the table which can be used for further  processing.
    Hope  any of the SDN experts here will suggest a better solution.
    Kiran.

  • Function module to read data form customer tabels

    hi,
    can anyone suggest function module to read data form customer tabels?
    Please give me reply.
    TKS,
    Dharani.P

    Hi,
    this thread is hvaing your answer.
    Is there a Function module to get customer hierarchy data?
    Regards,
    Pravin

  • Function module reqd for fiscal period using current date

    Hi,
    Is there any function module which gives fiscal period using current date.
    Thnaks,
    Maheedhar

    Hi Maheedhar,
    Try the code below.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        BUKRS         = '1000'     " Company Code
        DATE          = SY-DATUM   " Date to find fiscal year for
      IMPORTING
        CURRM         = w_currm    " Current Fiscal Month
        CURRY         = w_curry    " Current Fiscal Year
        PREVM         = w_prevm    " Previous Fiscal Month
        PREVY         = w_prevy.   " Previous Fiscal Year
    Regards,
    Amit.

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Function module to read the expired useful life of asset

    Hi,
    Is there a function module to read the expired useful life of asset. We are using the depriciation start date to calculate the expired useful life of asset, but the fiscal year shift and matching the calendar year with fiscal is causing the logic to give a month difference between the calculated value and the value in the asset.
    Please let me know if there is a Function module or BAPI for getting the values. Kindly provide example for the function module call too.
    Regards,
    Prabaharan.G

    Hi,
      Check the following function modules.
    AISC_CALC_EXPIRED_USEFUL_LIFE.
    Check the following link it might be of some help to you.
    Re: asset useful life
    Regards,
    Ram.

  • Function module or BAPI that is used to update the records in RBKP table.

    Hello All,
    Can anybody please give me the name of any Function module or BAPI that is used to update the records in RBKP table.
    Please help me
      I need to change the fiscal year in RBKP table
    Thanks in Advance,
    Regards,
    LIJO

    Hi,
    You can use the BAPIs,
    BAPI_ACC_INVOICE_RECEIPT_CHECK Accounting: Check Invoice Receipt (OAG: LOAD PAYABLE)
    BAPI_ACC_INVOICE_RECEIPT_POST  Accounting: Post Invoice Receipt (OAG: LOAD PAYABLE)
    Hope this helps.
    Regards,
    Renjith Michael.

  • Can we build a new custom form using self service web applications in 11i?

    I have been using Template.fmb to build new custom forms in Oracle Applications 11i. We wanted to know If we can build new forms using self service web applications to get the web form feel in 11i.
    Please let me know the reason.
    Thanks in advance
    Nel

    I have been using Template.fmb to build new custom forms in Oracle Applications 11i. We wanted to know If we can build new forms using self service web applications to get the web form feel in 11i.
    Please let me know the reason.
    Thanks in advance
    Nel

  • Function module to read Mail Form contents with Usage Type SMS

    Hello there,
    I have created a Mail Form with Usage Type as Internet Mail (HTML). I can successfully read the Mail Form by using Function Module CRM_ERMS_MAIL_COMPOSE_NEW. This is working fine to send an email.
    I have created another Mail Form with  Usage Type as SMS. Since the usage type is a plain text, function module CRM_ERMS_MAIL_COMPOSE_NEW does not return the mail form contents. The requirement is to send the SMS with mail form contents. Appreciate if you can suggest a Function module or Class - Method to retrieve Mail form contents when usage type is SMS.
    Thanks,
    Shaun

    Hello there,
    I have created a Mail Form with Usage Type as Internet Mail (HTML). I can successfully read the Mail Form by using Function Module CRM_ERMS_MAIL_COMPOSE_NEW. This is working fine to send an email.
    I have created another Mail Form with  Usage Type as SMS. Since the usage type is a plain text, function module CRM_ERMS_MAIL_COMPOSE_NEW does not return the mail form contents. The requirement is to send the SMS with mail form contents. Appreciate if you can suggest a Function module or Class - Method to retrieve Mail form contents when usage type is SMS.
    Thanks,
    Shaun

  • Function module PTRA_WEB_EXPENSE_REPORT_GET_2 not working when used in loop

    Hi All,
    I have used a function module PTRA_WEB_EXPENSE_REPORT_GET_2  in a custom fumction module which i am developing fetch the travel expense data . The function module PTRA_WEB_EXPENSE_REPORT_GET_2  returns the travel expense data based on the employee and the trip number. I want to fetch the travel expense data for a given set of employees and trip number and hence i have used this function module inside a loop statement.
    The function module returns the travel expense data for the employee and trip in the first loop pass. From the second loop passs it doesn't return the value. I have also checked this in se37 and the same thing happens. Value is returned for the fist employee but for the next employee we have to go to initial screen of se37 and execute the Func. module again.
    I debugged this function module and found that the value of the employee and the trip number is stored in the global variable. The value passed for the employee and trip is compared with the correspomding value in the global variable and if they are not same an error message is returned. Since we are using in a loop , each time a different value is passed for the employee and trip and the check fails .
    Is there any way to clear the value in the global parameters or is there any other function module which can be used to clear the values of the global variables?
    Thanks!
    Regards
    Manipal Parkala

    Hello Archana,
    May be we can try several ways...
    1) can you try calling function module BUFFER_REFRESH_ALL ??
       after each call...
    2) May be u can call Function module "PTRA_WEB_EXPENSE_REPORT_GET_2 " in background task or seperate task , it will load the function group everytime when u call it in loop.
    ***DO let us know if it does not work.
    thanks
    ~Raj

  • Obsolete function module in ECC6 - what to use instead of that

    I have to upgrade from SAP 4.7 to ECC6 .
    Some obsolete function module are as follows:
    ADDRESS_MAINTAIN
    ADDRESS_UPDATE_OLD
    DD_PR_REDEFINE
    GRAPH_DIALOG
    HELPSCREEN_NA_CREATE
    Can anybody assist me which function module to use in place of this function module or which class methods to be used instead of these function modules ?
    Thanks...

    Hi Deepak,
    For ADDRESS_MAINTAIN you can go this way for now.
    DATA : func_name TYPE rs38l_fnam.
    func_name = 'ADDRESS_MAINTAIN'. "To escape the EPC Check
        DO.
          CALL FUNCTION func_name
            EXPORTING
              adrswa_in         = sadr
              processing_status = mode
              kennzeichen       = kz
              save_intern       = 'X'
              title             = am_title
            IMPORTING
              adrswa_out        = sadr
              returncode        = return
              update_flag       = am_save
            EXCEPTIONS
              not_found         = 4.
    we haven't found any replacement for this. so doing it this way.
    ADDRESS_UPDATE_OLD - No Replacement for this.
    DD_PR_REDEFINE - No Replacement for this.
    GRAPH_DIALOG - No Replacement for this.
    All the Above 3 FMs are still being used in ECC standard programs.
    Thanks,
    Sai
    Edited by: Sai Krishna Kowluri on Dec 5, 2008 7:34 AM
    Edited by: Sai Krishna Kowluri on Dec 5, 2008 7:37 AM

  • Function module to get error message, using MSGNR, MSG ID, MSGV1...etc...

    Hi There,
         I have BDC, in return it gives me message number, message ID, msgv1,...... etc. I want to get the original message using these values.
    Please can you tell me which function module should I use.

    Hii
    Call the FM
    <b>FORMAT_MESSAGE</b>
    <b>Reward if Helpful</b>

  • Function Module (Spell_words)  ??? Used in smartforms

    Hi  Folks,
                 I got a urgent requirement.. I have developed a smart form for Excise invoice ....
    I want to display amount Of Excise Duty in Words...
    Will it possible to call function module (SPELL_WORDS) in smartforms,pl let me know if it is possible.. plz give me steps...
    Full Points will be rewarded.
    Thanx and regards,
    Shashank

    You can look at footer window
    Keep the cursor on footer window -> right click  -> create -> program lines
    in general attributes column ,write the perform routine,in conditions tab you can use input parameters as well output parameter.
    now you need to call form routine.
    goto global definition,click on form routines tab,here you can use form routine.
    you can call spell_word fm in form routine.
    Thanks
    seshu

  • When i use function module to create additive costs using KKPI_BDC_ADD_ON_C

    Hi,
    When i use function module KKPI_BDC_ADD_ON_COSTS_CREATE to create additive costs it shows an error. The error is 'THE OBJECT IS LOCKED BY THE USER SARKARD'  the transaction it uses is CK74 for creating.
    I have also read about KKP4_ADD_ON_COSTS_CREATE. But i dont know the usage of it.. 
    I think it will be helpful if u can clarify with first FM.
    Kindly suggest.
    Thank you.
    Harsha

    Hi Harsha,
    I have a similar requirement, but the issue that I am facing is that I can not find any parameter in the FM - KKPI_BDC_ADD_ON_COSTS_CREATE for Valuation Date which is a mandatory field in CK74. How did you overcome that issue, can you please share ?

Maybe you are looking for

  • Error While executing a procedure

    Hello FOlks, When i try to execute this procedure below i get the error saying "Compiled with errors" ORA--00942-Table or View does not exist SQL Statement ignored at Line 17. I tried querying the table and it returns no data. How do i debug this err

  • 5.0.1 Crash on Windows 7 x64

    Anyone else besides the Closes on Windows 7 topic have this issue? I deleted all of the safari pref folders and plist files in application data and my local profile but it crashes every time I launch. Problem Event Name: BEX Application Name: Safari.

  • How to make the text of the field to mixed case of the transaction COMMPR01

    Hi, There is a text description field in the COMMPR01 for a product. Now when i entered any text into the field, it is changed to UPPER CASE.But i want that when i enter any text , it will save the text as it is that means in both upper case and lowe

  • Validate XML against  one DTD

    Hello I have several XML files and into this XML files there is not th DTD call. i have another file, the DTD. There is any method or code example for, without modify the XML files for including the DTD call, validate the XML againts one DTD? thanks

  • After instllation firefox won't open

    I tried to upgrade to firefox 4. When checking for plug in compatability the installation crashed. I restarted the computer and tried to start firefox. There was a short period when the computer was busy but firefox never opened. I tried to remove fi