Regarding custom Function Module

Hi Group,
Could anyone please guide me on a custom Function Module.
Scenario:
I have to use this function module to get either active records or inactive records.
This function module which has yet to be created should have to code to fetch both active records and inactive records. It depends on what user has selected in a report.
The report has 2 radio buttons in the selection screen. If rb_1 is selected then we have to call this function module and pass all the inactive records.
And if rb_2 is selected then all the active records should be selected.
Now I have to code the function module depending on the selection of the radio button. I can keep a flag in the function module and assign it 1 or 2 depending of the selection of the radio button.
Guys could you guide me on how do I set a flag in such scenario in the function module?
Like:
In the Source code of function module.
If flag = 1.
select all invalid records
endif.
If flag = 2.
select all valid records.
endif.
where should I keep this flag in my function module.
After setting this how do I call it in the report, depending on the radio button selected and how do I code in my report.
Hope you will understand this.
A million thanks in advance.
Kumar.

hi,
in the function module u have to declare "FLAG" as an import parameter. n then while calling this functon module from the report, u should paas a value to this "FLAG" based on the radio button selected.
tell me if this information was helpful.

Similar Messages

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • Error in Custom Function Module

    Hi,
    I am working on implementing General Ledger Business content in financial Accounting.
    We had a requirement of creating a Custom Virtual cube similar to 0FIGL_V10. Hence, we had copied the standard function module RS_BCT_FIGL_DATA_GET_VC10 and created a custom function module. Before doing that, we had copied the function group RS_BCT_FIGL and created a custom function group for the custom function module.Both were activated subsequently. Then, we had created a custom virtual cube (ZFIGL_V10) using the custom function module.
    The queries on the Standard virtual cube were migrated to ZFIGL_V10 using the RSZC transaction code. when the queries are executed in RSRT, we get an error message "**An exception with the type CX_SY_DYN_CALL_ILLEGAL_FUNC occurred" and the ABAP debugger is started post that error.
    Has anyone faced this problem before?could any of you provide some pointers to it.
    Regards,
    Sainath

    You cannot use the standard function module which is used for standard cube for another cube.
    You should not change the function module.
    Instead you can make a copy of the function module you are using aand use this copy in ur virtual cube which will work in the same way the actual Fm used to work and it will make you perfrom the changes.
    Follow the below steps:
    1) Goto SE37 and In the top tool bar click on the copy button which is on right side of delete button.
    2) in fr FM give the name of the actual FM and in to Fm give the name of the function module you want to copy.
    3) Then click on copy.
    4) Now open this new function in edit mode and goto the import/export parameters and check. it will have all the same parameters as the actual FM. Here you can make the changes you want.
    5) Now use this FM in your virtual cube and it will be working as per your requirement
    https://forums.sdn.sap.com/click.jspa?searchID=9605118&messageID=4999763
    Hope it Helps
    Chetan
    @CP..

  • Export tables in custom function module

    I am creating a custom function module and want to return a table of contacts i_contacts.
    In the global data area I created a structure
    TYPES: BEGIN OF t_contacts,
              prsnr       TYPE knvk-prsnr,
              contactinfo TYPE adr6-smtp_addr,
           END OF t_contacts.
    And then in my interface I am trying to include as a table
    i_contacts like t_contacts
    But it keeps saying t_contacts not defined. Does that mean I have to define t_contacts as a global structure in SE11. Isnt there another way to define an internal table in the interface. Please advice.

    Hi..
    Declare like this..
    Data: i_contacts type standard table of t_contacts.
    i_contacts like t_contacts does not work because t_contacts is not an internal table with header line.
    Hope this helps.
    regards,
    chaithanya.

  • Update the custom table by using Custom Function module.

    Hi Experts,
            My requirement is ,
    1) To create the Custom Z table with fields
               vbak-vbeln
               likp-vbeln
               vbuk-vbeln
      After creating this Z table.
    2) I have to create one custom function module.
        Based on this function module i have to update that Z table.
    3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
        But I developed the ALV report with custom button and check box successfully.
      My doubt is how to write the function module and based on that function module how to update the table.
          Please suggest me on this requirement.
        Thanks in Advance.
    Thanks and Regards
    Srihari.

    HI ,
         Can any one help me out on my above requiremnet..
    Thanks and Regards
    Srihari.

  • Export, Import and Table declaration in custom function module

    I am creating a custom function module. Parameters needed are export internal table and one data field from the internal table.
    What do i need to fill for 'associated type' for these export parameters since size of the internal table and type for the data field from the internal table vary.

    Hello Albert
    If the function module need not be RFC-enabled then you have many ways to define such dynamic parameters, e.g.:
    FUNCTION ZUS_SDN_DYNAMIC_PARAMS.
    *"*"Local Interface:
    *"  EXPORTING
    *"     REFERENCE(ET_ITAB) TYPE  TABLE
    *"     REFERENCE(ET_ITAB_1) TYPE  ANY
    *"     REFERENCE(ET_ITAB_2)
    *"     REFERENCE(ED_DATA) TYPE  CLIKE
    *"     REFERENCE(ED_DATA_1) TYPE  ANY
    *"     REFERENCE(ED_DATA_2)
    ENDFUNCTION.
    See also: How to return back a structure of dynamic tables in a Function Module
    Regards
      Uwe

  • Regarding Remote function module ARCHIV_CONNECTION_INSERT

    Hi All,
    Can any give me more detial about remote function  module ARCHIV_CONNECTION_INSERT . So i have requirement that our client is archiving document from Commonstore. So want to create custom function module for TOA01 ( ZTOA01 ) and add a maintanance field. if data is archived maitaianance field should be flagged and next time when he is archivig document he dont want to give date. so only unflagged document should be archived.
    so can any one help me how to overcome this requirement as this is urgent.
    Thanks in advance.
    Best Regards,
    zubera

    Go to SAP Service Marketplace (service.sap.com) and SAP Notes Search. Put in the note number 758278 and hit display.
    However to be able to access service marketplace you need a s-user registered for the company you are working for. Please contact your basis team to find out what user is available to you.
    Regards,
    Michael

  • ALE custom function module for IDOC_INPUT_COSTCENTER

    We are setting up an ALE to update cost centers in our HCM system from our ECC system.  In conjunction with the cost center update I need to convert the company code (it's not straight-forward enough to use a conversion rule) so I have created a custom copy of IDOC_INPUT_COSTCENTER and included my conversion logic there. 
    I have done all of the necessary configuration steps associated with the custom function module; created message type ZCOSMAS, process code ZCOSM, etc.  When I execute BD16 it is passing the correct message type and process code to the HCM system but I am getting a status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
    I must be missing some piece of configuration in my HCM system that should trigger Z_IDOC_INPUT_COSTCENTER rather than IDOC_INPUT_COSTCENTER.  Can anyone tell me what I have missed?
    Thanks in advance for any assistance you can provide.
    Regards,
    Pat
    Edited by: Patricia Holland on Dec 22, 2011 2:38 PM

    I thought that I had found found my problem in the model view but I was mistaken.  I am still getting status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
    It should be using Z_IDOC_INPUT_COSTCENTER.
    Edited by: Patricia Holland on Dec 22, 2011 3:00 PM

  • How to trigger inbound custom function module?

    Hello Experts,
    Could someone help me with my dilemma?
    I have created a custom process code which is linked to a custom function module for processing inbound IDocs. I have tested the function module successfully and I have set up the partner profile accordingly. The IDocs are coming in but get stuck at status "64". My function module never gets triggered even though in the partner profile it is set up to be triggered immediately. Any idea what I am missing?
    Thanks,
    Marlin

    Hi marlin ,
    just go for these checks and let us know the status ..
    1.Check here .
    Bd51 – assignment of Inbound function module. Present or not
    Check here .
    2.Bd67 –assignment of process code to inbound function module /present or not.
    3.
    Check here.
    In the object for the message type u need to give the BUS object as the application object.
    like bus2032
    4.
    Now place a break-point in ur function module and run it in debugging mode ..
    Now check whether this one is getting  into ur function module , next check the status record of the document number .
    regards,
    vijay.
    take an idoc , populate it from we19 and then there call the function module in debugging mode in back ground ..
    we'll see if this is actually picking the Fm or not.
    Message was edited by: Vijay

  • Custom function module raises exception CX_SY_NO_HANDLER

    Hi there!
    Does any one here know what this exception is?
    CX_SY_NO_HANDLER
    It is raised when I try to call a custom function module within a rule routine in a transformation.
    I've checked the input and output parameters and they're consistent.
    Thanks in advance for any help!
    Best Regards,
    Luís Andrade.

    Siggi!!
    First of all, let me tell you that I am a great fan of yours! I have learned a great deal from your posts about function modules and extractors.
    The note you referred is not applicable in my case, since we're running sp14.
    One thing I forgot to mention was that this FM is a copy of another FM, with minor modifications. I'm going to try to create a brand-new FM and paste the code in it.
    Best Regards,
    Luís Andrade.

  • Testing custom function modules

    Hi Friends ....
      As I am new to ABAP testing , I need help in knowing how to test custom function modules .
    Below is how I am trying :
      Step : 1 -- >  Open Tcode SE37
      Step : 2 -->  Display the function module
       Step : 3 --> Do its syntax check.....activate it..... execute it
       What if no test data is available???
    I am trying to execute directly where it gives a return parameter for some function modules saying No Entry \ No data available for this ID etc.,
    I am in a confusion whether its correct or not
    I want some ideas regarding this
                                 - Swapna

    >
    Swapna Vadlamani wrote:
    > Hi Anupama...
    >
    >   Thank u a ton for the quick reply...but I have another doubt..if I execute without giving any selection parameter data...it says
    >
    >   No data stored for in the selected period
    >
    >                                 -Swapna
    Ok, so that is what it does if you don't pass it any selection parameter data - I doubt very much if that is how it will be used in Production.  Any function module is just a bit of code that does what it has been programmed to do; to test it you just need to find out what it is supposed to do from whoever has asked for it to be built and then check that it does it.  If there is no test data set up, then you'll need to find out from your functional consultant how to set some up or get them to set it up for you.

  • Run time error due to custom function module in a program

    Hi,
    I  have created one program using custom function module ZIN_COMEV_CUSTDETAILNOTIF_OUT .The program is showing runtime error
    "Incorrect parameter with CALL FUNCTION."
    I have tested the FM using same set of parameter as in program it is working.It is throwing error while executing in program help.
    Regards
    Datta

    Hello Nagraj or harish
    I think you may be right.There is date  field in my function module ,when I am testing function module I am giving it as
    Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.
    CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'
      EXPORTING
        Y_SENDER              = gv_g_sender
        Y_RECEIVER            = gv_g_reciever
        Y_PARTNER             = GV_V_PARTNER
        Y_BASIC_PROCESS       = GC_BASIC_PROCESS
      Y_SWITCHNUM           =
      Y_SEN_LOAD            =
        Y_INTUI               = GV_V_INTUI
      Y_TRANSACTIONID       =
        Y_DATE                = GV_V_DATE

  • How to write the custom Function Module to trigger the Alert.

    Hi all,
    I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
    Arul Jothi

    hi arul,
    try this program.
    RSALERTTEST.
    check out this link...
    <a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    regs,
    jaga

  • How to bring the custom function module in WE42?

    Hi,
    I have created a custom function module to post a custom idoc.
    Process code has been created thro WE42 and WE57 is done.
    Still I am not able to see the custom function module in the list (WE42) in order to assign it to process code.
    May i know the reason for this?
    Thanks.
    Thiyagu

    What makes you think that it should be visible in WE42? There is no F4-value help for this and you haven't added it manually yet, right.
    In WE42 you can manually add entries, so that's what I would do.

  • How to develope custom function modules in SAP R/3 system to maintain c...

    How to develope custom function modules in SAP R/3 system to maintain cross
    referencing tables for sales order number.

    Hi Raja,
    Steps to crate FM..
    Follow these steps..
    Go to the T: code SE37
    First You Create Function Group
    On That u specify
    Function Group Name..............
    Short Text..............................
    save...
    Go to SE 37
    Specify the Function Module Name: Eg: Z_Bapi_Materialmaster
    Short Text.......
    Save...
    Next Go to Attributes..
    Select Radio button : Remote enabled model
    Go to Parameters..
    Click Import...
    Give Parameter Type Associate type S.t
    next Click Export...
    Give Parameter Type Associate type S.t
    Next Click Tables Button..
    Specify tables..
    Next click source code button..
    Write Source code here..
    Eg : Select statements Etc..
    Finally we should be select the Radio button Enable remorely
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/bapi%2bstep%2bby%2bstep
    Hope this information is useful to you..
    Reward points if it is usefulll....
    Thanks ,
    Satya Kumar..

Maybe you are looking for

  • Creative zen micro in the c

    is there anyway i can hook my zen micro up in the car so it plays through my speakers and radio deck? . i see they have a belkin zen thing, but is that just a holder for it for going in your cup holder? if i cant listen to my zen in the car im tossin

  • How do I Sync iPod/T to iTunes when iPhone is 'Master'?

    The Situation... I have a new iPhone 4S synced to iTunes on my Mac. I have an old iPod Touch which was synced to a PC on its own iTunes some years ago but I have not synced it for years to anything. The iPhone is synced under one identity, the old iP

  • How can i find numberedList in a text frame?

    Hi, I need to find the numberedList in a text frame. so that i have written a script. Syntax is given below. app.findTextPreferences = NothingEnum.nothing app.findTextPreferences.bulletsAndNumberingListType = app.findTextPreferences.bulletsAndNumberi

  • Difference between part number WS-CAC-6000W & WS-CAC-6000W=

    Hi, I would appreciate if someone can advise the following: 1. What is the difference between the part number, e.g. WS-CAC-6000W & WS-CAC-6000W=? Any Cisco links that explains? 2. Which IOS features requires us to purchase the license, which IOS come

  • HT5395 iMessage will only open by clicking "New Message"

    The app works fine. I am able to send and receive messages through iMessage. Before, I was able to click on my iMessage icon and it would open the app, and I would be able to see unread or even read messages. Now, I have to click on "New Message" for