Issue with function module HR_INFOTYPE_OPERATION in badi HRPAD00INFTY

Hello All,
I have a business scenario wherein, when user saves data for infotype 0002 from tcode PA30, i have create a new record for infotype 0105 by copying existing record and just changing the date.
For the same I am using funtion module HR_INFOTYPE_OPERATION inside badi HRPAD00INFTY method AFTER_INPUT.
When I am running the same function module in a independent program, its running fine. But when I run it inside the badi method, it runs with sy-subrc = 0 and no error, but later in the standard program MP000200,in pai module PRE_INPUT_CHECK, it tries to execute this statement     MOVE <namst> TO <subty> and gives dump, with runtime error MOVE_TO_LIT_NOTALLOWED_NODATA and saying that "Error at assignment: Overwritten protected field.".
Have tried all the options of function module HR_INFOTYPE_OPERATION, but nothing is helping.
Kindly let me know if any information on the same.
Best Regards,
Rahul Malani

Have you checked what's in the Subtype field of table T777D for infotype 0002?
  IF t777d-namst ne space.                                  "QNOK025939
    MOVE <namst> TO <subty>.
  ENDIF.
Usually this sentence won't be executed unless there is something in that field. Usually we don't have subtypes for IT0002.
Also make sure that the infotype that gives the dump is 0002 and not 0105.
Regards.

Similar Messages

  • Issue with Function Module...

    Hi Frnzs,
    Here is my issue..Plz go thru it..
    I have a function module (YFSF_ICR_GET_EXCHG_RATE_ODS).
    the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
    concultion : Based on flag I_ICR ni , we have to read new exchange rates ( From ODS)
    the fucntion module code is here
    FUNCTION yfsf_icr_get_exchg_rate_ods.
    ""Local interface:
    *" IMPORTING
    *" REFERENCE(I_PLANCYC) TYPE /BIC/OIYPLANCYC OPTIONAL
    *" REFERENCE(I_SALESORG) TYPE /BI0/OISALESORG OPTIONAL
    *" REFERENCE(I_IC) TYPE /BIC/OIYINVCURR
    *" REFERENCE(I_RC) TYPE /BIC/OIYREPCURR
    *" REFERENCE(I_FISCPER) TYPE /BI0/OIFISCPER
    *" EXPORTING
    *" REFERENCE(E_EXG) TYPE /BI0/OIEXCHG_RATE
    *" EXCEPTIONS
    *" NO_RATE_FOUND
    DATA: l_s_exg TYPE /bic/ayfsfexg00,
    l_t_exg TYPE /bic/ayfsfexg00 OCCURS 0,
    l_year TYPE /bi0/oifiscyear.
    IF i_plancyc IS INITIAL.
    Actuals
    FREE l_t_exg.
    SELECT *
    INTO CORRESPONDING FIELDS OF TABLE l_t_exg
    FROM /bic/ayfsfexg00
    WHERE fiscper <= i_fiscper
    AND fiscvarnt = 'JJ'
    AND /bic/yrepcurr = i_rc
    AND /bic/yinvcurr = i_ic
    AND /bic/yplancyc = ''
    AND /bic/yexchtype = 'SPOT'
    ORDER BY fiscper DESCENDING.
    IF sy-subrc <> 0.
    RAISE no_rate_found.
    ELSE.
    READ TABLE l_t_exg INTO l_s_exg INDEX 1.
    e_exg = l_s_exg-exchg_rate.
    ENDIF.
    ELSE.
    Forecasts
    l_year = i_fiscper+0(4).
    SELECT SINGLE *
    INTO l_s_exg
    FROM /bic/ayfsfexg00
    WHERE fiscvarnt = 'JJ'
    AND fiscyear = l_year
    AND salesorg = i_salesorg
    AND /bic/yrepcurr = i_rc
    AND /bic/yinvcurr = i_ic
    AND /bic/yplancyc = i_plancyc
    AND /bic/yplancyc = ''
    AND /bic/yexchtype = 'S'
    AND exchg_rate GE '0.0000001'.
    IF sy-subrc <> 0.
    RAISE no_rate_found.
    ELSE.
    e_exg = l_s_exg-exchg_rate.
    ENDIF.
    ENDIF.
    ENDFUNCTION.
    ok
    now my requirement is that I need to enhance the Function module for reading exchange rates.
    for this i got the following information:
    - It requires an additional flag I_ICR for instance that can be empty or 'X'
    for instance
    - If the flag is empty, the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
    - If the flag is 'X', the function reads a new exchange rate type, let's call
    it "ICR". As stated in the requirements and functional specs, these exchange rates
    are the Reuter rates valid for a complete year. These are fixed rates so no planning
    cycle. The users will enter records in the format (year, reporting currency, invoicing
    currency, exchange rate). If the input flag I_ICR is X, the function determines
    the year based on the input period, then, based on the year it selects on the same
    table as for the other exchange rates with a restriction on exchange rate type "ICR",
    year, from and to currency and return the exchange rate
    Update rules. There are two:
    - To the consolidation ODS. No changes are required there; the function has to
    read either S or SPOT rates (I_ICR flag is empty)
    - From the consolidation ODS to the cube. As stated in my previous email, the
    from currency is the one available in the data package. The to currency is determined by reading the sales organization master data (reporting currency attribute) based on the inter-company sales organization (also available in the incoming record). It then calls the function module above with the parameter I_ICR set to 'X' so it reads the Reuter rates.
    I guess i need to create another function module and can be used.
    Observation
    ODS table fields.
    - FISCPER
    - FISCVARNT JJ
    - FISCYEAR 2006
    - /BIC/YREPCURR EUR
    - /BIC/YINVCURR JPY
    - SALESORG 0010
    - /BIC/YMRC 3090
    - /BIC/YPLANCYC
    - /BIC/YEXCHTYPE S
    - - RECORDMODE
    Thanx in advance..

    Hi Badrinath,
    Welcome to SDN,
    If i guess right then you are asking the question that whether to include the new functionality in existing function module or not.
    You can edit the same function module.
    but prefrably u can create a new function module.
    you have all the details with you u need to check the condition of  I_ICR in calling program and then call the new FM or the old one.
    creating new function module will also keep the modularisation and clean code.
    Hope this helps

  • Issue with function module exits

    Hi,
    execute the T.Code MK01, enter the language 'English' and country 'de'. it's allowing to save the data. I want to raise one pop-up message as 'country and language are not the valid combination please choose right one'. I enhanced in the function module exit. it's raising the message , but it's executing the next screen. how to stop it's first screen and I have to choose the right combination even though  I raised message as Error, it's repeating same thing. Please give me any suggestion on this issue.
    Thanks & Regards,
    Seshu.

    I have executed CMOD T.Code,  we can find the 'include zxf05u01'  program . I wrote the code in this include program.  select statement is like this. check the code here.
    " select single land1
                           spras
                  into wa_t005
                 from t005
                where land1 = i_lfa1-land1
                and     spras = I_lfa1-spras.
    if sy-subrc <>0.
    country &1 and language &2 are not the valid combination.
    message e015(zall) with I_lfa1-land1 I_lfa1-spras.
    endif."

  • Issue with function module updated values

    Hi Experts,
    We have an issue with customized program. In this program function module 'BBP_PD_SC_GETDETAIL' not picking
    the updated values when the UI was opened. But when we were executing the same function module directly by providing the values manually it is picking up the correct data.
    We thought it was a problem with session killing or buffer refresh ? We dont know how to handle this issue.
    If you have any suggestions that would be great help full for me . Please reply asap.
    Regards,
    Chandu

    Hi,
    Thanks for your quick reply.
    I have passed the values to the function module in the program and also used the same values for manually testing of the function module. Getting the correct values when I was testing manually.
    We thought it was a session killing problem as we developed the customized code. So any idea how to refresh the session even
    though the UI(User Interface) was opened.
    This issue was solved when the UI was closed and opened again.
    Any other ideas on this issue ?
    Regards,
    Chandu

  • Flex2.0 issue with function modul

    Hi Experts,
    I have a problem within the Visual Composer. When I enter a value for a variable and we push the button to run the function module rsr_var_pers_var_set the paramter for the variable is not transferred to the DSO Personalisierungs Daten für Variablen Ersetzung. We have compiled our model with the flex2.0. When we compile the model with the flex1.5 it works. Is this a bug. Is there any workaround for the flex 2.0?
    Thanks
    Matthias

    Hi Amiya,
    I have more than 10 variables in the selection screen and I would like to personalize all of them when the user has select or enter his values. Therefore I use the function module RSR_VAR_PERS_VAR_SET. But in the VC model I have to connect for each variable the selection screen with the function module, because I didn`t know if it is possible to call the function module one time for all variables. (When you add the function module to the VC model it`s not possible to enter the parameters for more than one variable.)
    Matthias

  • Issue with function module SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi,
    I am new to web dynpro abap.In my application ,im using  'SO_NEW_DOCUMENT_ATT_SEND_API1 function module to send mail.
    Application is working fine ,but in code inspector im get error like
    Undesirable statement SUBMIT !
    Plz help me to solve
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = lt_mailsubject
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = lt_packing_list
          contents_bin               = lt_attachment
          contents_txt               = lt_mailtxt
          receivers                  = lt_mailrecipients
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
      IF sy-subrc EQ 0.
        SUBMIT rsconn01 WITH MODE = 'INT' AND RETURN.
      ENDIF.
    Edited by: amrutha_prabhu2000 on Mar 29, 2011 6:32 AM

    Hi Amrutha and roopa,
    Please go through this.. it might solve your problem.
    WebDynpro ABAP
    Re: how to send an email with an attachment using webdynpros
    Cheers,
    Kris.

  • Data alignment issue with function module SO_DOCUMENT_SEND_API1

    Hi All,
    I am using function SO_DOCUMENT_SEND_API1 to send email from SAP. What is happening is the internal table which contains the data of the email(Content of the email) is ok. That is data in internal table is in proper format as required. This table is passed to FM SO_DOCUMENT_SEND_API1. After execution of this FM, mail is sent but the format of the email content is not the same as the format of the data in internal table.
    Can anyone guide me regarding this discrepancy in the data alignment or format in the actual email ?
    Thanks in advance.
    Regards,
    Chetan

    Hi,
    Pass the values like the following format,
      CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
        EXPORTING
          document_data  = docdata
          put_in_outbox  = 'X'
          commit_work    = 'X'
        TABLES
          object_content = objcont
          receivers      = intrcvers[].
      CASE int_error.
        WHEN 0.
          MESSAGE s888(sabapdocu) with "Mail Sent Successfully...".
        WHEN OTHERS.
          MESSAGE s888(sabapdocu) with "Mail Not Sent...".
      ENDCASE
    I hope this will solve your problem.
    Gothrough the following link,
    https://forums.sdn.sap.com/click.jspa?searchID=14853082&messageID=5409233
    Regards,
    Harish

  • Issue on Function Module

    Hi Gurus
    I have an issue with function module, i am passing a filepath to the function module which is like this /temp/folder/AFILE.csv.
    to pull the data from application server. When ever it enters to the function module it is changing the file name as /TEMP/FOLDER/AFILE.CSV( it is changing the entire thing to capitol letters), I just want to know that there is any way where i can pass the file path as it is.
    Regards
    Kumar.

    If it is a custom Function module then goto the domain of the file parameter of the FM (if u r using std. domain then change it to a custom domain)  and set the lowercase checkbox under Definition tab.
    Regards,
    Joy.

  • Generic Data Source with Function Module data mismatch in BI

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    the datasource frame work starts the function module several times.
    1. the initialization
    2. the serval times, until you "raise no_more_data".
    check you coding: have you refreshed necessary internal tables.
    Sven

  • Generic Data Source with Function Module data mismatch

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage  in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    HI rkiranbi,
    1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
    Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
    in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
    selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means  you need to
    check coding logic in function module. 
    2. if your  are getting wrong values in BI System then check with
                  1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
                  if you find any mistake you need change the coding in function module according to client requirement.
                  2. compare data with RSA3 and bi report data or data target data.
                                 check it properly above steps, you will get solution.
    thanks and regards,
    malli

  • VirtualProvider with Function module problem !

    I implemented virtualprovider with function module. Unfortunately  when I run query i get message error :
    u201CFunction call of ZT0X failed; the obligatory parameter CHARACTERISTICS
    An exception with the type CX_SY_DYN_CALL_PARAM_MISSING occurred, but was
    I>> Row: 67 Inc: READ_DATA Prog: CL_RSDRV_VPROV_LOC_NOSIDu201D
    Any suggestions ?
    Below source code:
    u201CFUNCTION ZT0X.
    ""Lokalny interfejs:
    *"  IMPORTING
    *"     VALUE(INFOCUBE) LIKE  BAPI6200-INFOCUBE DEFAULT 'ZT03'
    *"     VALUE(KEYDATE) LIKE  BAPI6200-KEYDATE OPTIONAL
    *"  EXPORTING
    *"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
    *"  TABLES
    *"      SELECTION STRUCTURE  BAPI6200SL
    *"      CHARACTERISTICS STRUCTURE  BAPI6200FD
    *"      KEYFIGURES STRUCTURE  BAPI6200FD
    *"      DATA STRUCTURE  BAPI6100DA
    DATA:
        l_r_srv              TYPE ref to CL_RSDRV_REMOTE_IPROV_SRV,
        l_th_mapping         TYPE CL_RSDRV_REMOTE_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
    *  break-point ID ZRSDRV_RC1.
    * break DEVELOPER.
      perform build_mapping_table
        changing l_th_mapping.
      create object l_r_srv
        exporting
          i_tablnm              = '/BIC/PZPRD_ID'
          i_th_iobj_fld_mapping = l_th_mapping.
      l_r_srv->open_cursor(
        i_t_characteristics = characteristics[]
        i_t_keyfigures      = keyfigures[]
        i_t_selection       = selection[] ).
       l_r_srv->fetch_pack_data(
        importing
          e_t_data = data[] ).
      return-type = 'S'.
    ENDFUNCTION.
    &---- <
    *&        Form  build_mapping_table
    &---- <
    Form build_mapping_table
      changing
        c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
      DATA:
        l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
      l_s_map-iobjnm = 'ZPRD_ID'.
      l_s_map-fldnm  = '/BIC/ZPRD_ID'.
      insert l_s_map into table c_th_mapping.
      l_s_map-iobjnm = 'ZWARTOSC'.
      l_s_map-fldnm  = '/BIC/Z_CEN_W'.
      insert l_s_map into table c_th_mapping.
    +endform.u201D

    Hello
    I experienced the same issue. Were u able to solve it? If yes , kindly ask you to make posting here so that others can benefit as well.
    Huge thanks

  • Selected state issue with Menu Module V2

    OK so I am getting an issue with Menu Module V2. I have used this before with success but this time I have hit a wall. I possed this question to BC live chat and they bugged out real quick.
    The site in construction is http://www.urbanista.com.au
    What is happening is that in the top right tools nav with the headings Home, Services, People, Contact Us using Menu Module V2. The Heading Services has a drop down and this is where the issue resides. Roll over any of these nav devices and you will see they will highlight orange. Home is already auto activating its Selcted state. Click on Contact Us and it will do the same.  Roll over and click on Services and it appears to have worked. While in Services roll over the drop down again and you will see all links have activated the Selected state. This is the issue. If you view the code of the Services UL you will see only the Services state has been alocated the Slected state. See below:
    <li id="Services" class="selected">
    <a href="/services.htm">Services</a>
    <ul>
    <li id="tools-panningdev">
    <li id="tools-housing">
    <li id="tools-urban-renewal">
    <li id="tools-project-management">
    <li id="tools-feasibility-tools">
    <li id="tools-governance-systems">
    <li id="tools-communications">
    <li id="tools-projects">
    </ul>
    </li>
    The CSS that runs the nav is as follows:
    ul.dropdown {
        font-weight: normal;
        font-family: Arial, Helvetica, sans-serif;
        font-style: normal;
        text-decoration: none;
        ul.dropdown li {
        background-color: transparent;
        color: #999;
        padding-top: 5px;
        padding-right: 10px;
        padding-bottom: 5px;
        padding-left: 10px;
        font-size: 12px;
        ul.dropdown li.hover,
        ul.dropdown li:hover {
        background-color: transparent;
        color: #FFF;
        ul.dropdown a:link,
        ul.dropdown a:visited    {
        color: #FFF;
        text-decoration: none;
        ul.dropdown a:hover        { color: #ff871f; }
        ul.dropdown a:active    {
        color: #b33b00;
        /* -- level mark -- */
        ul.dropdown ul {
        width: 150px;
        margin-top: 1px;
        background-image: url(/images/nav-transparency.png);
        background-repeat: repeat;
        color: #FFF;
        ul.dropdown ul li {
        font-weight: normal;
    ul.dropdown li.selected a {
        color: #ff871f;
    The last entry 'ul.dropdown li.selected a {color: #ff871f;}' is required in order to allocate a Slected State. Without it not Selected state is active and the links al remian white.
    I have tried all manner of combinations and additonal tags with no success. Any suggestions greatly appreciated. I have not modified the default Javascript provided by BC in the system apart from allocating the required ulTagClass as specified. The Javascript in the supplied 'container.html' is as follows:
    <script type="text/javascript" >
        // ids need to be unique per page, use different ones if you are including multiple menus in the same page
        // id of the nav tag, used above
        var divTagId = "myMenu1";
        // desired id for 1st <ul> tag
        var ulTagId = "myMenu1List";
        // desired class for 1st <ul> tag
        var ulTagClass = "dropdown dropdown-vertical";
        if ((null !== ulTagId) && ("" !== ulTagId)) {
            document.getElementById(divTagId).getElementsByTagName("ul")[0].setAttribute("id",ulTagId );
        if ((null !== ulTagClass) && ("" !== ulTagClass)) {
            document.getElementById(divTagId).getElementsByTagName("ul")[0].className = ulTagClass;
        // this will set the selected state
        if ((null !== ulTagId) && ("" !== ulTagId)) {
            catSetSelectedCSSItem(ulTagId);
    </script>
    Lastly this is one of the recomended navs by BC at the following address: http://lwis.net/free-css-drop-down-menu/
    I have used these before with success but for the life of me this has stumped me big time.

    Hi Matthew,
    Having a super quick look at the code I'd say it's because of:
    ul.dropdown li.selected a {
        color: #ff871f;
    This affects all the child elements.
    To override this down the line you could do something like:
    ul.dropdown li.selected ul li a {
        color: #fff;
    This would override the parent link color when selected.
    You could probably then also add:
    ul.dropdown li.selected ul li.selected a {
        color: #ff871f;
    For the dropdown selected states.
    That's a quick look though so don't quote me too much

  • To update Employee Data with Function module

    Hi
    CRM employee master and HR employee master need to be mapped
    for the labor cost posting function to work.
    In BP transaction (Change in BP role : Employee),
    I could update "Personnel number" and "User Name"
    under Identification Tab
    now I need to do same job with Function module in report program.
    Anybody knows that what Function module should I use ?
    I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
    but I only succesed to update imformations under Adress tab in BP transaction.
    thank you.

    Use FM BAPI_BUPA_CREATE_FROM_DATA.
    Rg,
    Harshit

  • How to copy a generic extractor with function module into a new system?

    Dear Gurus,
    i would like to know how i can copy a gneric datasource with function module from one system to the target system.
    Thank you
    Cheers

    Hi Anesh,
    thank you for replying.
    Since the Datasource will have a new new in the new system, i will create a new one.
    Create a generic datasource base on the table is not the problem.
    My problem is how could i copy the FM in the new system?
    If you can help me on that, it will be fine.
    Thanks

  • VirtualProvider with Function Module

    Hi,Experts
    Can anyone tell me how to create a VirtualProvider with Function Module?
    I have read the How to guide"How to Implement a VirtualProvider with service",but I can't go throw the source code.
    Please give me a sample test code of yours!
    Thanks a lot!
    My Email:[email protected]

    Hi Jin
    This question does not belong to this forum, close it and post it in the appropriate one.
    Also, please remove your email address from the thread as it violates the forum guidelines.

Maybe you are looking for