Populating the output parameter in function module.

Hi Experts,
   I have written a function module,with material number,BEZEI as input and mvgr2 as output from table tvm2t.I am facing a problem in populating the material number as well in outputtable.The material number in input is nothing to do with output.
please help me at the earliest.
Regards,
Sridevi.

Hmmm, you wrote that the output is 'table parameter' but you mention 2 single fields. If you expect a good reply here, it helps to mention how you defined the table and how you select the data for the output. For example: input is matnr and you select the material group of this matnr. Output is all other matnr of this material group. Then we would know what you want to do here.
So please describe what you need and give us the table description.
Regards
Nicola

Similar Messages

  • Storing the output of a function module into a custom table

    Hi Gurus,
    Is it possible to store the output of a function module into a custom table.How can this be done?Is it complex?

    hi,
    After u execute the FM and get values in the internal table ITAB_RESULT. Create a custom table having structure same as ITAB_RESULT call it ZRESULT.
    data :wa type ITAB_RESULT.
    call FM and get result it ITAB_RESULT
    loop at itab_result.
    move-corresponding itab_result to wa.
    insert wa to ZRESULT.
    endloop.
    Regards,
    Mansi.

  • Fetch data from table(ET_) which is exporting parameter of function module

    Hi,
    I m new to ABAP programming.
    I have to develop a smartform that has to be filled in with fields from few tables.
    These tables have the naming convention ET_<XXX> (i.e. exporting parameter of function module).
    I m not able to directly view its contents in se11 or use select query for it.
    I have a report program which i can execute to view these parameter names.
    Now, how do i fetch data from these parameters/tables and pass it from my driver program to smartform??
    Someone pls guide me...
    Thank You.

    Hi,
    I have done that using Field-Symbols.
    Thanks,
    Preetha

  • Add parameter in Function Module

    hi all,
    I'm trying to add a parameter to function module HRGPBS_HER_GET_SURNAME_NINO.
    However, the system is telling me to carry out modification comparison first.
    Can someone guide me on using SPAU or SE95, as I don't understand what to enter in the selection area?
    thanks

    If you go to transaction code: SPAU, you can find the item (program, function module, screen, etc) in question, open the tree to the lower levels. On the lower item, you can choose to save your changes or revert back to original.
    The developers should be able to tell what has been changed. In most cases, we wanted to keep our changes with the exception of when a change was made and later a note was released to produce the same result or if new functionality is released related to the item in question.
    Hope this helps.

  • Passing parameter in function module

    hi friends,
    I have created one function module in which i need to pass PO/SO number from standard EKKO/VBAK tables through the select option parameter S_POSONO. Inside the function module I have a select query which fetches the records from a Z-table which has a field called 'REFERENCE' which is 16-char long. Hence the length mismatches with PO/SO no which is 10-char long. the first 10-char from 'REFERENCE' is PO/SO number, next 3-char is line-item num, and the last three char is schedule item num. It is required to match only first 10-char with the parameter passed i.e, S_POSONO and display only those datas.
    The function module is as follows.....
    Function :
    CALL FUNCTION 'YFIIN_RETRIEVE_SOURCE_DATA'
    EXPORTING
       LT_RANGE_BUKRS          = S_BUKRS[]
       LT_RANGE_DOCNO          = S_POSONO[]
       LT_RANGE_DOCDATE        = S_DATUM[]
       LT_RANGE_CURRENCY       = S_FCURR[]
      TABLES
        IT_TEMEXPOSU            = LT_TEMEXPOSU
    EXCEPTIONS
       INVALID_SELECTION       = 1
       OTHERS                  = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Source code inside function module:
      SELECT * FROM ZFIGL_TEMEXPOSU INTO  TABLE IT_TEMEXPOSU
                                     WHERE   COMPANY_CODE IN LT_RANGE_BUKRS
                                     AND  currency in LT_RANGE_CURRENCY
                                     and  REFERENCE in LT_RANGE_DOCNO
                                     and  doc_date in LT_RANGE_docdate.
    IF SY-SUBRC = 0.
    SELECT COMPANY_CODE ATTRIBUTE_01 REFERENCE CREATION_DATE FOREIGN_CURR                                                               
               FROM TEMT_RAWEXPOS APPENDING CORRESPONDING FIELDS OF
                   TABLE IT_TEMEXPOSU WHERE COMPANY_CODE IN  LT_RANGE_BUKRS
                                     AND REFERENCE in LT_RANGE_DOCNO
                                     AND CREATION_DATE IN  LT_RANGE_DOCDATE
                                     AND FOREIGN_CURR IN LT_RANGE_CURRENCY.
       ENDIF.
    Import Parameter of Function Modules :
    LT_RANGE_BUKRS   - type - BUKRS
    LT_RANGE_DOCNO  - type - EBELN
    LT_RANGE_DOCDATE - type - DOKDATS
    LT_RANGE_CURRENCY - type - WAERS
    please help me to solve this problem..

    Hi Ram Tej,
    Try this.
    First Read all the records without Checking REFERENCE field with LT_RANGE_DOCNO into an internal Tbale.
    Then looping at that internal table delete records from the same internal table where REFERENCE(10) <> LT_RANGE_DOCNO.
    Hope this may help ur requirement.
    Award points if useful.

  • Checkbox as import parameter in function module

    Hi all,
    how to create a checkbox as import parameter in function module,
    thnx in advance

    ?? Function modules don't have screens...they do have import, export parameters.
    If you look at how "checkboxes" are stored in db tables, you'll see that the previous replies are precisely correct.  A check box is a char1 field...it is on when 'X' (ABAP_TRUE) and off when blank (initial)....you would call your FM with an import field of type char1 set to 'X' or set to space, and handle accordingly in your FM code.
    If you have a checkbox on a selection screen, then the value of that parameter is either 'X' or space, depending upon whether or not the user checked the box.

  • What are  the input parameters for Function Module

    Dear Experts,
    I want to generate a Sales Tax returns report,those fields are not available in my existing Datasources.
    For that i want to write a Generic Datasource with Function Module.
    audat
    bukrs
    vkorg
    vtweg
    spart
    aurat
    auart
    netwr
    mwsbp
    kschl zedp(consition type)
    kschl zvat(condition type)
    ksch   zcst(condition type)
    matkl     material group
    Here what are the Input parameters for Function Module.
    Thanks in Advance.
    Srinivasan.

    Srinivasan-
    For creating a Generic extractor based on a FM, you first of all need to know what is going to be your structure.. i.e. what all fields you need to pull from what all tables. A functional consultant may help you identify the exact DB tables.
    Once you know them, hand over the requirement and the pdf mentioned by Krishna to the ABAP guy, he would be able to take this up further.
    Also decide 1st whether you would be using a full load or delta. There is a slight difference in the way they are built.
    Let me know how it goes.
    -Bhushan.

  • Howt 2 delta with the extractor created on Function Module..

    hi there,
    can anybody tell me how to update delta with the extractor created on Function Module..
    rgds,
    amol

    refer to the document at the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Generic Extractor using FM with Delta Logic
    hope it helps,
    rgs,
    Parth.
    Edited by: Partho Mukherjee on Jan 12, 2009 6:00 PM

  • Is it possible to pass TABLE as the output parameter in stored procedure

    Hey Experts,
      Is it possible to pass TABLE as the output parameter in stored procedure.
    eg
    create procedure spGetData
    @tableName as TABLE(intValue INT NOT NUL)
    as 

    You can use OPENQUERY or OPENROWSET, as mentioned above, to make stored procedure results table like. There are
    some limitations with these methods:
    http://technet.microsoft.com/en-us/library/ms188427.aspx
    In OPENQUERY this-sql-server-instance can be used instead of a linked server name. It requires setting data accces server option:
    exec sp_serveroption @server = 'PRODSVR\SQL2012'
    ,@optname = 'DATA ACCESS'
    ,@optvalue = 'TRUE'
    LINK: http://www.sqlusa.com/bestpractices/select-into/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • How to change the status of the system programmatically with Function Module

    I  Was trying to change the status of the notification through STATUS_CHANGE_INTERN function module .  But It is not changing the status of the notification.
    Can any one help to understand what is going wrong ... or any other function module to change status of Customer complaint notification ..

    Hi KK,
    Please can you take clues form the below discussion thread -
    http://scn.sap.com/thread/775169
    Thanks to all original contributors of this thread!!
    NOTE: Please note that the main point explain here is that, if you are willing to change to a status Ex, NOPR, NOCO, etc then you will need to pass on the value 'I0070', 'I0072', etc. I will also go ahead and like to add one more point here to make the language check as well like "EN", 'DE', etc as these statuses are language dependent too.
    Thanks,
    Arijit

  • Delta Problem while extracting the data by using function module

    Hi Experts,
    I have extracted the data by using Function module, for delta loads I have given Calday and additive delta in Generic delta settings, in BW side I have initialized the data after that I have given delta update option in infopackage and I made process chain also, every day process chain is running successfully but it is showing zero records, but there is a data in Data source (RSA3), means delta is not working.
    What is the problem,
    Is there any another settings for delta loads,
    Please help me to do this,
    Helpful answer will be appreciated with points,
    Regards,
    Venkat

    Hi,
    Try this delta type :NEW STATUS FOR CHANGED RECORDS.
    More information from Nagesh, this information may help
    1. New status for changed Records.
    2. Additive delta.
    New status for changed records means
    New Order
    order no quantity
    1000 10
    order changed to quntity 8. then 2 records will posted 2 BW in first case.
    1000 -10
    1000 8
    if you come to Additve delta.
    for the same case it will send the same record as
    1000 10
    changed records
    1000 -2
    this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
    Additive delta we can use for ODS and Cubes with update mode Addition.
    Regards,
    Satya

  • Passing the Dynamic Internal Table as the Output Parameter of the FM...

    Hi,
    How can we pass the internal table as the output from the Function Module TABLES parameter.
        SELECT * FROM TVRO BYPASSING BUFFER INTO TABLE <ltable>.
    Now I need to pass the dynamic internal table <ltable> as the output in the function module.
    Thanks!
    Puneet.

    I can't use TVRO as the table type. The Table name is as the Input. This program will download the contents of the table and create an app server file. It can be for any database table.
    so i want the output of this FM should be the data from that table. So what should be the TABLE type.
    like in  a program i will use:::
      FIELD-SYMBOLS: <ltable> TYPE ANY TABLE,
                     <l_line> TYPE ANY,
                     <l_field> TYPE ANY.
        SELECT * FROM (p_table) BYPASSING BUFFER INTO TABLE <ltable>.
    That is my requirement.

  • The performance of  SELECT_TEXT  function module

    hi all,
    i have customize report program  when i execute it by giving the inputs in selection screen it is taking around 6 minutes to display the output list. iby using se30 and st05 i found out that
    the function module " SELECT_TEXT " is consuming more time
    below is the function module can one help me in miimizing the performance  the sy-subrc = 0 after the FM is called. but the only problem is it is fectiching 576,800 records consuming more time . can any one help me ?
    CALL FUNCTION 'SELECT_TEXT'
           EXPORTING
                client     = sy-mandt
                id         = '0001'
                language   = sy-langu
                name       = f_tdname
                object     = c_tdobject
           TABLES
                selections = tab_rbkp_text.

    If you explain further why you are that function module then we can give other options
    this is what the Function module help lists
    SAPscript: Select text
    +The SELECT_TEXT creates a table with the text headers of all text modules which correspond to the requirements specified in OBJECT, NAME, ID, and LANGUAGE. The entries in the parameters OBJECT, NAME, ID, and LANGUAGE can also be generic.+
    The search area can be limited further via the parameter TEXTMEMORY_ONLY or DATABASE_ONLY.

  • (internal) Tables obsolete as parameter in function modules,

    Hi
    As you probably can see by the question, my ABAP Knowledge isn't exactly overwhelming !
    <i>anyway:</i>
    I'm trying to create a function module in NW2004s, This functionmodule should take an internal table, based on a structure as (import) parameter.
    In the earlier version, I've done this by defining it under the TAB 'Tables' in the function builder - But know its telling me that "<i>Tables Parameters are obsolete</i>", and that I should define it under "Changing" instead.
    I have tried that, but I'm only allowed to pass a single line, and if I try to do a Loop, in the function module, it tells me that ity isn't created as an internal table.
    So please - what is the "best practice" here ?
    Regards
    Morten Nielsen

    Hi All,
    I followed Steps 1 and 2 but when I use the following select statement I get a dump with the error enclosed.
    Step1. Created a structure ZDFKKCOHI which is a replica of DFKKCOHI.
    Step2. Created a table type ZDFKKCOHITABLE with line type as ZDFKKCOHI.
    Step3. In my function module I have a changing parameter ZDFKKCOHIPARAM of type ZDFKKCOHITABLE.
    Step 4. When I use the following select clause I am getting a dump.
    DATA: wa_zdfkkcohi LIKE LINE OF zdfkkcohiparam.
      SELECT *
      FROM dfkkcohi
      INTO  CORRESPONDING FIELDS OF TABLE zdfkkcohiparam
      WHERE cotyp EQ zcotyp
      AND gpart EQ zgpart
      AND corr_status EQ zcorr_status.
      LOOP AT zdfkkcohiparam INTO wa_zdfkkcohi.
    *Move IT_ZDFKKCOHI to ZDFKKCOHIOUT.
    *Append ZDFKKCOHIOUT.
    *Clear IT_ZDFKKCOHI.
      ENDLOOP.
    What could be wrong?
    Thanks for all your help in advance.
    Regards,
    Divya

Maybe you are looking for

  • Two users on the same iMac and the same iTunes library, howto?

    hi to all, i'm trying without success to create a itunes libray on an external drive. I have two users on the iMac, both has different idevices, but i'd like the can access to the same music library, apps, books ecc. How can realize that?

  • Can I exchange my older version iPod for a newer one?

    I have an iPod touch 3rd Gen, 8GB. It's really not that old but it seems that every time I sync it to my computer I'm being told that less and less apps are applicable with my iPod. Over time I know that my iPod is probably going to be obselete which

  • SDK options

    Hi Guys, I have a project requirement where I would create a custom application for financial institute. One of the requirements is, input and output could be in the form of pdf files. So in a way, I have to parse pdf files and use the data and gener

  • App-Import is impossible

    Hi, i have 2 Apex-environments (Version 2.2.1.00.04). First a developer, second a productive environment. Yesterday i have export an application from my developer to import in my productive environment. After i select a new App-ID in the import-wizza

  • Concurrent File naming

    I am having a Java Servlet in which the HTTP body will be saved to a file system (UNIX), each file should have a unique name in the format �MyFile-Seq.txt� where Seq is a number that gets incremented for each request. The problem I am facing (due to