Function module in abap hr

Hi friends
i am new to abap.....i was given a funtion module to work on.. here i  am sending the req...can any one plz tell how to write code for the following:
This is recivel of IBG bank account number. only 2 banks hsbc(Bank code = 7232)
lenght 4 and ocbc(bank code = 7339)lenght 3.
Importing parameters criteria:
Field Name      Data element    datatype  type   description
IM_Bankkey       bankl          char(15)    import  bank key
IM_bankactno     bankn          char(18)    import   bank acc no
Exporting Parameters:
Field Name      Data element    datatype  type   description
ex_ibgbankacct   n/a             char(16)  epxort return parameter
e_errormsg       n/a             char(20)  export return parameter
Now the logic:
Extract bank code from im_bankkey
extract 4 characters of im_bankkey into im_bankcd and process the following step
if ocbc bank(bank code = 7339) and hsbc bank (Bank code = 7232)
then truncate the 1st 2nd 3rd digits of im_bankacctno
ex_ibgbankacct = truncated im_bankacctno.
else
ex_ibgbankacct = im_bankactno
end if(end of chk for bank code)
ex_ibgbankact = extract from 1st to 16 character of ex_ibgbankacct.
plz help me to write the code????

Hi Purnima,
Try the code like below.
FUNCTION ztest440.
""Local Interface:
*"  IMPORTING
*"     REFERENCE(IM_BANKKEY) TYPE  BANKL
*"     REFERENCE(IM_BANKACTNO) TYPE  BANKN
*"  EXPORTING
*"     REFERENCE(EX_IBGBANKACCT) TYPE  CHAR16
*"     REFERENCE(E_ERRORMSG) TYPE  CHAR20
  DATA : im_bankcd TYPE char4.
  im_bankcd = im_bankkey+0(4).
  IF im_bankcd EQ '7339' OR
     im_bankcd EQ '7232'.
    ex_ibgbankacct = im_bankactno+3(15).
  ELSE.
    ex_ibgbankacct = im_bankactno+0(16).
  ENDIF.
  ENDFUNCTION.
Hope this will resolve your problem.
Reward if it is helpfull..

Similar Messages

  • How to upload Excel file in BI using function module in abap program

    How to upload Excel file in BI using function module in abap program?

    Hi Anuj,
    To upload the file , you can try a standard program "RSEPSFTP" .
    while you execute the program , a selection screen appears in which the inputs should be give as
    RFC destination - The target server name
    FTP command- PUT
    local file - your file name
    local directory - path of your local file
    remote file - your target file name
    remote directory - where it has to be stored
    Hope this is useful for you
    Thanks & regards
    Anju

  • Using a function module in ABAP Query

    Hi All,
    I want to use a function module in ABAp query in the Record Processing Section.
    In the report program we click on Pattern button to inser the function module so that all the Importing and exporting parameter automatically appears.
    Similarly is there any particular method of inserting a function module in ABAp Query.
    Regards
    Manipal Parkala

    When you are doing the infoset for the query (SQ02) you can add coding by clicking the coding tab. You can chose in wich event you want your coding and there is Pattern Button for  you to easy use.
    If you don't want to put the code in the infoset just in the query then is not posible.
    Nevertheless, I higly descourage the use of coding in queryies. If you need to insert some coding make an ALV its easier, clearer and much easier to mantain.
    Hope it helps.

  • How to use this function module on abap hr GET_PDSNR_RANGE

    how to use this function module on abap hr GET_PDSNR_RANGE
    thankx.

    PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE

  • How to create function module in abap for VirtualProvider in bi

    how to create function module in abap for VirtualProvider in bi ???????????????
    can any one help me with simple example ?????????????????
    Moderator message : Duplicate post locked. Read forum rules before posting.
    Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM

    Hi ,
    Thanks for replies about my question??.
    If i am using the exit in my char relation ship how can i debugg that exit???
    if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
    Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
    Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
    Thanks.

  • Advantages of 'HR_INFOTYPE_OPERATION' Function Module In ABAP-HR

    HI Experts,
    What are the Advantages of 'HR_INFOTYPE_OPERATION' Function Module In ABAP-HR rather than BDC Both methods?
    Thanks in Advance.
    Naveen

    Hi
    The function module  'HR_INFOTYPE_OPERATION' can be used to update,insert,modify,delete and change in the same function module.
    Codings are also very simple there by calling this FM in case of conversion program.
    Performance is also good when compared to session method.
    Speedy performance in conversion programming.
    The sample codings is given.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'    
         EXPORTING                           
              INFTY          = '0009'        
              NUMBER         = EMPLOYEENUMBER
              SUBTYPE        = SUBTYPE       
              OBJECTID       = OBJECTID      
              LOCKINDICATOR  = LOCKINDICATOR 
              VALIDITYEND    = VALIDITYEND   
              VALIDITYBEGIN  = VALIDITYBEGIN 
              RECORDNUMBER   = RECORDNUMBER  
              RECORD         = P0009         
              <b>OPERATION      = CHANGE </b>       
              NOCOMMIT       = NOCOMMIT     
    There by changing the operation field into "INSS","MOD","DEL" alone we can do conversion program easily.
    Then if no commit ='X' then it does't get updated in database so that it will be easy for us to check whther the fields get updated properly in database.
    If no commit = ' ' then the possible fields get updated in database.
    Thanks,
    Sakthi.
    *Rewards if usefull*

  • Function module or ABAP-OO method to start DTP via Coding

    Hello experts,
    is there any function module or ABAP-OO-method, which I can use to start DTP's via ABAP-Coding (e.g. in my own programm)? I know there are FM's to start, change, delete, etc. InfoPackges. Are there any functions like them also available for DTP's?
    Kind regards,
    André

    Hello Andre,
    [Re: CL_RSBK_DTP - How to use...]
    I've tested and it works fine!
    Regards,
    William

  • Function Modules and ABAP programs Where-Used

    Hi,
    Can anyone teach me on how to check where a function module or ABAP programs have been used? When I click the where-used button, there's nothing found but I know the FM/ABAP programs have been used somewhere.
    Thanks.

    Hi,
    This is very basic question, you simply need to go to transaction SE37 for FM and click on the where used list, in the next popup you will have to make proper selections, e.g. ABAP reports, FM's etc. then it will give you the list of objects where the current object is getting used.
    I am not sure whether we will have any where used list for SE38 programs, just check it out.
    Regards,
    Durgesh.

  • Updating liveCache Data using Function Module or ABAP program.

    Is it possible to update APO Live Cache using Function Module or ABAP Program.
    Will the aggregation/disaggreagation remain the same if data is modified using Function Module or ABAP Program.
    Regards,
    Vikas

    ello Vikas,
    -> Please click at
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    & read about 'SAP liveCache'.
    As you know objects stored in liveCache in the class containers can be accessed
    and manipulated only via LCA routines which are methods of LCA objects.
    The registration of the LCA routines is done automatically when
    the liveCache is started by the LC10, check the lcinit.log file.
    The shared procedures in the LiveCache are written in C++ and shipped
    to the customers as binary shared libraries(LCA-Routines) < LCA build >
    together with the LiveCache. The original C++ source code of the
    libraries is not generally available to the customers.
    The LCA routines could be called via "/SAPAPO/OM*" ABAP functions.
    -> For SAP liveCache documentation in English:
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/0271f49770f0498d32844fc0283645/frameset.htm
    < -> Database Administration in CCMS: SAP liveCache -> liveCache Assistant ->
    liveCache: Monitoring -> Problem Analysis-> DB Procedures >
    In transaction LC10 for the LCA connection choose liveCache:Monitoring
    then go to Problem Analysis -> DB Procedures=>
    The system displays an overview of all database procedures loaded into
    liveCache, their input and output parameters, and other details.
    -> Tr. /n/SAPAPO/OM16 ( in further releases /n/sapapo/om19 ) is provided by
    SAP to get information about data stored in the LiveCache. If you would
    like to get your own views, you should write a special report in ABAP using
    "/SAPAPO/OM"-development class functionality.
    -> There are standard function modules in ABAP available to extract/change data from/in liveCache.
    -> In addition to the given information => find more information at:
    SCM 4.0 -> http://help.sap.com/saphelp_scm40/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 4.1 ->
    http://help.sap.com/saphelp_scm41/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    SCM 5.0 ->
    http://help.sap.com/saphelp_scm50/helpdata/en/12/3dfd81126e1c448c870f335f11d016/frameset.htm
    You can go to the Advanced Planner and Optimizer documentation from the above links < Supply Network Planning Run -> Aggregated Planning -> SNP Disaggregation Or SNP aggregation . >.
    If you still have open questions on the posted topic =>
    Could you please give more information on your application scenario.
    Thank you and best regards, Natalia Khlopina

  • Suitable Functional module  for ABAP consultant

    Hi all,
    I am an ABAPer with one and half years of experience.
    Can some body suggest me a functional module which will be easier to learn for me as I have no domain experience.
    Also please tell me the marketwise  hottest module these days such that there are projects as well as demand in the market.
    Also please tell me  about higher end modules in SAP.
    Plaese clarify the role a technofunctional has to play I mean is techno-functional has basically functional but aid to technical person or he has to do both functional as well as technical work.
    Thanks.
    Edited by: sandeep deshpande on Apr 29, 2008 8:15 PM

    Hi Santanu
    I am a SAP ABAP Technical Consultant with 2.5 years of Experience. Now i want to shift to a functional module to become a Techno-Functional. I am B.Tech in IT and i love to do coding. But i also want to know Business Process.
    Please help us here: where in any of that paragraph do you provide any useful information about yourself that would allow any of us to:
    So can you suggest me what would module would be best for me.
    You have SAP experience. You know of SAP Modules. You work in the industry. You are your own person. How is anyone on here qualified to give you advise without any context?
    Step back - what do you enjoy doing? Which module have you learned about that you find interesting? Which one have you done more ABAP in? Which one might your current employer let you get experience in?
    I think you have the answer you just need to think it through a bit.
    Regards
    Colleen

  • Functional module in abap program

    hi guys,
    Do we have any OS specific Functional module  to be used in ABAP program.
    If so how to find this. please suggest me.
    Thanks.
    baasha

    hi,
    There is no such thing.
    Before you use any FM just confirm wheather it exists in that version or not
    in se37.
    If it is there you can always use that.
    regards,
    Guru
    mark if helpful

  • Function module or abap program

    Hello ABAP gurus,
           I need a function module or a program which can read and write into a transactional infocube. We have local currency as CAN and we wanted it to be overwritten as USD in the group currency. Here it is not a currency conversion as we are not changing the currency value but just the unit from CAN to USD. Note: No change with the transfer rules is allowed where USD can be given as a constant value. So the only option is either a function module or a ABAP program. So please any suggestion on this would be greatly appreciated.
    Thanks,
    anjali

    Hello ABAP gurus,
           I need a function module or a program which can read and write into a transactional infocube. We have local currency as CAN and we wanted it to be overwritten as USD in the group currency. Here it is not a currency conversion as we are not changing the currency value but just the unit from CAN to USD. Note: No change with the transfer rules is allowed where USD can be given as a constant value. So the only option is either a function module or a ABAP program. So please any suggestion on this would be greatly appreciated.
    Thanks,
    anjali

  • Ways to call a ABAP Function module or ABAP Program from WAD

    Hi,
      Is there any way to execute an ABAP function module or program from the WAD?
    Thanks

    what you could do is create a bsp application which receives workbook id as url parameter.
    from WAD create a link to this BSP page and pass the wbook id in the url.
    within the BSP you can then read the excel as binary string like below
    select * from rsrwbstore into table wb_tab
          where workbookid = wbid.
    you can then set wb_tab-clustd as the response of the page with mime type to 'application/vnd.ms-excel'. which will open as excel
    Regards
    Raja

  • Function module in ABAP

    I want to create a funcion module which inserts data in a table i created sooner.
    This is how my table looks in se11:
    [pic01|http://kepfeltolto.hu/i/?90028&t=img]
    This is how my import tab looks within the function module:[pic02|http://kepfeltolto.hu/i/?90031&t=img]
    This is my source code in the modul:
    FUNCTION ZPB01FM.
      IMPORTING
         REFERENCE(OUAID) TYPE  INT1
         REFERENCE(COMP) TYPE  SSTRING
         REFERENCE(BUSINESS) TYPE  SSTRING
         REFERENCE(GROUP) TYPE  SSTRING
         REFERENCE(NAMEOF) TYPE  SSTRING
         REFERENCE(MANNAME) TYPE  SSTRING
    DATA: itab TYPE TABLE OF ZPB_FORM_ORG
          wa LIKE LINE OF itab.
    wa-ORG_UAID = OUAID.
    wa-company = comp.
    wa-business_area = business.
    wa-group_zpb = group.
    wa-name_of_nou = nameof.
    wa-manager_name = manname.
    INSERT wa INTO TABLE ZPB_FORM_ORG.
    ENDFUNCTION.
    I did not change anything else in function modul. Will this work? If not how should i do it?
    If it works is it not a problem, that i don't insert all fields in table, only 5 of them?
    I really need the answer, thanks, Peter

    Yes, the other fields will simply be blank,  but your INSERT statement isn't right. I don't think that will pass a syntax check.  You might want to do this instead.
    INSERT ZPB_FORM_ORG from wa.
    Regards,
    Rich Heilman

  • Function Module (sap-abap)

    Hi Friends,
       Can anybody tell me one fuction module which gives the date in particular format for ex :- 26th January 2007  ?
    Thx in Adv.
    Bapi bobby

    Run the below code to convert 01/24/2007 to 24th january 2007
    REPORT ZEX33 .
    parameter : p_date like sy-datum.
    DATA: month(9),
    year(4),
    date(2),
    ch(2).
    data : return_date(20).
    CASE p_date+4(2).
    WHEN '01'.
    month = 'January'.
    WHEN '02'.
    month = 'February'.
    WHEN '03'.
    month = 'March'.
    WHEN '04'.
    month = 'April'.
    WHEN '05'.
    month = 'May'.
    WHEN '06'.
    month = 'June'.
    WHEN '07'.
    month = 'July'.
    WHEN '08'.
    month = 'August'.
    WHEN '09'.
    month = 'September'.
    WHEN '10'.
    month = 'October'.
    WHEN '11'.
    month = 'November'.
    WHEN '12'.
    month = 'December'.
    WHEN OTHERS.
    ENDCASE.
    WRITE p_date+0(4) TO year.
    WRITE p_date+6(2) TO date.
    case date.
    when '01'. ch = 'st'.
    when '21'. ch = 'st'.
    when '31'. ch = 'st'.
    when '02'. ch = 'nd'.
    when '22'. ch = 'nd'.
    when '03'. ch = 'rd'.
    when '23'. ch = 'rd'.
    when others. ch = 'th'.
    endcase.
    CONCATENATE date ch month year INTO return_date.
    SEPARATED BY space.
    CONDENSE return_date.
    write : / return_date.

Maybe you are looking for