Table Structure changed in Function Module

Hello All,
How to check the strcuture of the table " yrdb_tp10_map:
got changed in the following FM.
As its not working properly.
function yrdb_tp10_get_mapping.
""Lokale Schnittstelle:
*"  IMPORTING
*"     REFERENCE(VARIANTE) TYPE  YDOMAENE
*"     REFERENCE(DOMAENE) TYPE  YDOMAENE OPTIONAL
*"     REFERENCE(OLD_VALUE) TYPE  YOVALUE OPTIONAL
*"  EXPORTING
*"     REFERENCE(NEUER_WERT) TYPE  YNVALUE
*"  TABLES
*"      YRDB_TP10_MAP TYPE  YRDB_TP10_MAP_TYPE
*"  EXCEPTIONS
*"      NOT_FOUND
*"      WRONG_IMPORT
tp10_map Feld über Zustand der globalen internen Tabelle
g_yrdbtp10_map
Wert X Tabelle gefüllt
  data: import(1) type c,
        tab_in type i.
  if tp10_map eq space.      "interne Tabelle leer.
    select * from yrdb_tp10_map into table g_yrdbtp10_map.
    sort g_yrdbtp10_map.
    tp10_map = 'X'.
  endif.
prüfen der importparameter.
wenn import = 'initial' beide Importparameter sind leer
wenn import = 1 domaene gefüllt
wenn import = 2 domaene und old value gefüllt
wenn import = 3 nur old value gefüllt --> raise Exception wrong_import
  if domaene(1) ne space.
    import = '1'.
  endif.
  if old_value(1) ne space.
    if import = 1.
      import = 2.
    else.
      raise wrong_import.
    endif.
  endif.
Vorbereitung der Rückgabe
wenn import = 'initial' Rückgabetabelle vorbereiten Ebene VARIANTE
wenn import = 1 Rückgabetabelle vorbereiten Ebene Domaene
wenn import = 2 Einzelwert zurückgeben new_value
  case import.
    when space.
      loop at g_yrdbtp10_map into yrdb_tp10_map
                         where variante = variante.
        append yrdb_tp10_map to yrdb_tp10_map.
      endloop.
      describe table yrdb_tp10_map lines tab_in.
      if tab_in le 0.
        raise not_found.
      endif.
    when '1'.
      loop at g_yrdbtp10_map into yrdb_tp10_map
                         where VARIANTE    = VARIANTE
                         and   domaene     = domaene.
        append yrdb_tp10_map to yrdb_tp10_map.
      endloop.
      if tab_in le 0.
        raise not_found.
      endif.
    when '2'.
      read table g_yrdbtp10_map into yrdb_tp10_map
        with key     VARIANTE    = VARIANTE
                     domaene     = domaene
                     old_value   = old_value.
      if sy-subrc eq space.
        neuer_wert = yrdb_tp10_map-new_value.
      else.
        raise not_found.
      endif.
  endcase.
endfunction.

go to tables statements -
> double click on the structure----> it will takes you to that structure

Similar Messages

  • Changes In Function Module

    Hello abap Gurus,
    My Zdevelopment reports shows the runtime errors due to
    changes in this function module :-
    ZCFM_HIDE_INITIALFIELD_ALV
    So anybody pls. suggest me what i can do for this.I m attaching the coding also.
    FUNCTION ZCFM_HIDE_INITIALFIELD_ALV.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(STRUC)
    *"     REFERENCE(FIELDCAT) TYPE  SLIS_T_FIELDCAT_ALV
    *"     REFERENCE(HIDE) OPTIONAL
    *"  EXPORTING
    *"     REFERENCE(FIELDCAT_E) TYPE  SLIS_T_FIELDCAT_ALV
    *"  TABLES
    *"      IT_TAB
    *"      IT_TAB1
    DATA S_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    FIELD-SYMBOLS <F1>.
    FIELD-SYMBOLS <F2>.
    DATA FIELDNAME(30).
    DATA VALUE(100).
    DATA : BEGIN OF DISPLAY OCCURS 0,
    FIELDNAME LIKE DD03L-FIELDNAME,
    END OF DISPLAY.
    LOOP AT IT_TAB.
    DO .
    READ TABLE FIELDCAT INDEX SY-INDEX
    INTO S_FIELDCAT.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF.
    ASSIGN SY-INDEX OF STRUCTURE IT_TAB1 TO <F1>.
    CONCATENATE 'IT_TAB-' S_FIELDCAT-FIELDNAME INTO
    FIELDNAME.
    ASSIGN (FIELDNAME) TO <F1>.
    IF NOT <F1> IS INITIAL.
    DISPLAY-FIELDNAME = S_FIELDCAT-FIELDNAME.
    COLLECT DISPLAY.
    ENDIF.
    ENDDO.
    ENDLOOP.
    FIELDCAT_E = FIELDCAT.
    LOOP AT FIELDCAT_E INTO S_FIELDCAT .
    READ TABLE DISPLAY WITH KEY FIELDNAME = S_FIELDCAT-FIELDNAME.
    IF SY-SUBRC NE 0.
    IF HIDE IS INITIAL.
    DELETE FIELDCAT_E.
    ELSE.
    S_FIELDCAT-NO_OUT = 'X'.
    CLEAR S_FIELDCAT-KEY .
    MODIFY FIELDCAT_E FROM S_FIELDCAT TRANSPORTING NO_OUT
    KEY.
    ENDIF.
    ENDIF.
    ENDLOOP.
    endfunction.

    This is all about the runtime error :-
    Incorrect parameter with CALL FUNCTION
    Error analysis :-
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_MISSING', was
         not caught in
        procedure "HIDE_FIELDS" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        When calling the function module "ZCFM_HIDE_INITIALFIELD_ALV", one of the
         parameters
        needed according to the interface description was not specified.
        This parameter was "IT_TAB1".
    I am not changing the function module, my couligue has change this he leave it & he doesn't tel to me. So pls. give some sol. to me.
    Thanks,
    Sumit.

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Creating a Structure for BAPI Function Module

    Hi,
           I need to create an RFC for a BAPI call. For that I have to create a structure for the function module. Now, do I need to specify both import and export parameters in the same structure or do I need to create two different structures for Import as well as export parameters? If the import and export parameters are specified aleady, Do I need to supply this structures again under "TABLES"?
    Thanks,
    John.

    if u have/get more one records , then u have to use tables ?
    Regards
    Prabhu

  • Regarding a Change Document Function Module ----- VERY VERY Urgent

    I am using a Change Document Function module "CHANGEDOCUMENT_READ". It is taking a long time.
    I am using the parameters:
    Start date is the first date of the current month
    Enddate as last date of the current month
    Object class as 'MATERIAL'
    Table Name as 'MBEW'

    Hi ,
    When you want to read the change documents, please follow the below process.
    1. Read the change documents headers with function modules
    call function 'CHANGEDOCUMENT_READ_HEADERS'
           exporting
                date_of_change             = cdhdr-udate
                objectclass                = cdhdr-objectclas
                objectid                   = cdhdr-objectid
                time_of_change             = '000000'
                username                   = cdhdr-username
           tables
                i_cdhdr                    = gt_cdhdr
           exceptions
                no_position_found          = 1
                wrong_access_to_archive    = 2
                time_zone_conversion_error = 3
                others                     = 4.
    2. From above step you will get data of change documents very quickly into Itab (gt_cdhdr)
    3. Read the details on change documents with functiion module by using Itab in loop for each document.
      loop at gt_cdhdr.
        call function 'CHANGEDOCUMENT_READ_POSITIONS'
             exporting
                  changenumber            = gt_cdhdr-changenr
             importing
                  header                  = cdhdr
             tables
                  editpos                 = gt_cdshw
             exceptions
                  no_position_found       = 1
                  wrong_access_to_archive = 2
                  others                  = 3.
    Above is the best way to read the change documents.
    Rewards please if above info is useful.
    Thanks.

  • GTS tables relations and important function modules

    Hi Friends,
    I am totally new for the developments in GTS.  Wanted some help on the  tables for master data, transactional data in GTS. 
    Also what are the important function modules used in GTS.
    Anybody can give me some inputs on the above..?
    regards
    Nalin

    Well, passing a table thru the interface with no type is easy, just don't assign a structure when defining the interface.  It will then take its structure by what is being passed to it. 
    So if you would pass an internal table to it with the structure like so.
    Data: begin of itab occurs 0,
          line(1000) type c,
          end  of itab.
    Then that is the structure inside the function module. 
    Did this answer your question?   Please explain further if not.
    Regards,
    Rich Heilman

  • Update TVARV table entries using a Function Module or Program

    Hi Gurus,
    My requirement is that I have a entry in TVARV table which has a 'low'. We would like to change this value whenever we desire. We are unable to do it via sm30 and se16 as table maintenance access is not permitted in Production environment.
    Can you please provide any Function module or program code to do it?
    Requirement - User can enter a value into TVARV table by executing a function module or program
    Thank you all, will award points,
    Priyansh

    Hi Priyansh,
    Please refer to SAP Help for more information on variant maintenance and more specifically variable values in variants. You can use t/code STVARV for maintaining the variant variables in table TVARVC (Client-Specific Variant Variables).
    Note: I suggest to use the TVARVC table instead of TVARV.
    If you are looking for Function Modules in the area of Variant Maintenance, then please have a look at Function Group SVAR (t/code SE80).
    If you are looking for Function Modules in the area of User Variables in Variants, then please have a look at Function Group SVUV (t/code SE80).
    Furthermore, if you are looking for a program to update table TVARVC, please have a look at ABAP: Dynamic Variant Processing with STVARV.
    Best eregards,
    Sander

  • Passing selection table as parameter to function modules

    i tried to pass a selection table as a parameter to a function module but there is a problem stating the eror the table length is different.
    *& Report  ZSFSELECT_OPTIONS_PGM
    REPORT  zsfselect_options_pgm.
    TABLES zselect_options.
    SELECT-OPTIONS sop FOR zselect_options-id.
    DATA  : fname(15) TYPE c.
    *CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
       formname                 = fname
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
      FM_NAME                  =
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 2
      OTHERS                   = 3
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    DATA lth(2) TYPE c.
    DATA ty TYPE i.
    DATA o TYPE i.
    DATA l TYPE i.
    DATA k TYPE c.
    DESCRIBE FIELD sop-sign TYPE lth LENGTH ty IN CHARACTER MODE.
    CALL FUNCTION fname
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        sf_sop                     =sop
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    in the smart form i have tried to pass the sp as the table.
    i have created a program line node
    :SELECT * FROM zselect_options INTO TABLE it_tab WHERE id IN sf_sop.

    Hi,
    If i understand ur problem correctly u r trying to pass a select-option to Tables for a smartform function module. It gives an error & it correct.
    If u understand the structure of a select option, it will have 4 fields in it & the structure will be
    SIGN                   CHAR1
    OPTION               CHAR2
    LOW                   Type Zfield
    HIGH                   Type Zfield
    But ur receiving Table paramter of the smnartform FM will be having only 1 field - Type Zfield
    So this mismatch gives u an error.
    Solution:
    Case1:
    Write code outsied th FM in ur program to get all the values & build an internal table & pass that to the FM.
    Case2:
    Define the Structure of table in the smartforms as tols earlier & then try passsig the Select option.
    Thanks & Regards,
    Bhargava

  • Table structure changes from PS HRMS 8.3 & 8.8 to PS 9.1

    Hi,
    Is there any delivered report (or) excel sheet explaining the table structure changes from PS HRMS 8.3 & 8.8 to PS 9.1
    Any help on this highly appreciated.
    Thanks
    Soundappan
    Edited by: Soundappan on Nov 1, 2012 7:04 PM

    I'm not sure to understand what kind of module you're talking about.
    Anyway, there are several docs available in MOS which shows the features differences over the versions, have a look :
    PeopleTools Cumulative Feature Overview Tool ID 793143.1*
    But I didn't find any starting by your (very old) Peopletools version.
    Nicolas.

  • How to declare Dynamic table in Tables Parameters of a Function Module...

    Hi Gurus,
    I would like to Know how to declare a Dynamic table in Tables parameters of a Function Module.
    so that it should be able to hold any table data ....
    I have tried all possible ways of trying to assign fields-symbol like declarations which doesnt allow here ...
    plz Dont reply with the basics of creating dynamic internal tables, coz my case is not an Internal table it is FM table parameter declaration.....

    Hi,
    If you are requirement is to create a function module with tables parameter having a generic line type i.e. no specific line type
    just declare it with a name under Parameter name with out specifying the type.
    A reference function module with such parameter, i would quote is the standard GUI_UPLOAD/ GUI_DOWNLOAD where the parameters specified under TABLES are generic.
    If you want to process the values passed to these parameters in the source code of function module, field symbols would be a preferable option.
    Regards,
    Sharath Panuganti

  • How to get tables used by a Function Module

    Hi,
    How to know the tables used by a function module dynamically.
    Cuurently im using BAPI_MATERIAL_SAVEDATA in my report program.
    I tried FM GET_TABLES to know the tables, but could see only tables used in the report.
    Main issue in my case is when im running this update program, could observe different tables being displayed as updated in SM50(Process Overview).Want to clarify as why these tables which are not being used in my report are being displayed in SM50.
    So was doubtin weather this FM is using these displayed tables.
    Thanks in advance for u r replys.
    Regards,
    Dedeepya

    Hi Dedeepya,
    you could use a SQL Trace (tx. ST05) to list all tables affected and operations that realize. Just active the trace, execute FM, and Deactive trace. Then click in "Display trace" and check it.
    Best regards,
    Pablo

  • CRM Tables , Tables Mappings , T-codes , Function modules

    Hi All,
    I am new to CRM , I want to know the tables , table mappings transaction
    codes , functional modules used . Can any one mention the link / list down all which i have mentioned above .
    I will be very helpful if i get this information.
    cheers,
    Chandra.

    hi,
       CRM tables:
        https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3134573
        https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3128631
        https://forums.sdn.sap.com/click.jspa?searchID=2400935&messageID=3269744
    CRM FM:
       https://forums.sdn.sap.com/click.jspa?searchID=2400963&messageID=3239545
    Reward points if useful..
    Regards
    Nilesh

  • Ho to track table structure changes ?

    Hi
    I need to know how to track the table structure changes ?
    I mean how to know when , which column was added/dropped/altered by which user for a table.
    Is there any DD view for the same in Oracle??

    user572632 wrote:
    Hi
    I need to know how to track the table structure changes ?
    I mean how to know when , which column was added/dropped/altered by which user for a table.
    Is there any DD view for the same in Oracle??refer auditing
    what is your oracle version?
    refer
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c25audit.htm
    http://www.oracle-base.com/articles/10g/Auditing_10gR2.php
    also check trigger,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm

  • "Changing" parameter and "Tables" parameter defintions in function module

    If one defines "Changing" or "tables" parameters, they are treated as reference parameters.
    It becomes obvious for "tables" parameters where one does not have option to check box for "Pass by Value". But for "Changing" parameters, they provide the checkbox for "Pass by Value". Even when you select this option, the function module seems to handle the parameter as a reference parameter (whatever changes you make to it in the function module are retained when you return back to a calling program).
    My question is why then SAP has provided the checkbox of "Pass by Value" for "Changing" parameter?
    Thanks.
    Jitendra Mehta

    Hi Chaiphon:
    Thanks for explanation but I know the theory of "Pass by reference" versus "Pass by Value".
    Let me rephrase my question.
    When I use the importing parameter (say as a table with a dictionary table type) with reference (not "passing by value"), and if I modify the value of the parameter, the calling program (which calls function module) receives the changed value after the call.
    When I use the importing parameter with "Pass by Value" box checked, the modifications made to the table inside the function module is not retained after the code leaves function module and returns to the calling program.
    My question is why not the same behaviour with the "Changing parameter" in function module definition?
    And if Changing parameters are always reference parameters, then why SAP has provided the "Pass by Value" check box?

  • Use of structure ICL_SFC_DI in function module ICL_CLAIM_DI

    Hi.
    We are using function module ICL_CLAIM_DI to create claims and we want to add data to some SFC fields, the function module has a structure called ICL_SFC_DI for creation of the fields.
    In some of our SFC fields the answer is declared as a "Free Text" field, but i cant seem to find a field in the ICL_SFC_DI structure to fill in the free text?
    Regards Liselotte

    Hi,
    I'm more into functional side of claims management, however will attempt to answer this question.
    The Free text of an SFC and a normal options, both share the same field :
    Answer / BSFC_ANSWER / ICL_SFC_DI
    Value Range Table: TBSFC002
    Hope this helps.
    Regards,
    Anish

Maybe you are looking for

  • MRP-REGEN[Reset Procurement Proposal Indicator in Planning File Entry]

    Hi All,          Its'a biggest and hottest issue for me, really I am frustrated with this issue, so any of you please guide me to solve this issue will be grateful. Issue:        We are running a MRP-REGEN job on every sunday after this run I am seei

  • How do i get all of my data back, how do i get all of my data back

    i accidenty deleted all of my data how do i get all of my data back?I was going to jail break my ipod and i put it in DFU mode and it wouldnt turn on for 30 min. so i decided not to jail break it because i dont know how.Then it turned on but itunes a

  • Php form problem and question

    I am a new web designer who is not code savey yet. Anyway during the various sites i have designed i have used 3 different forms that process and email it to me using a seperate php form, 1 in flash, 2 from a standard html form on a windows server. A

  • I want to compile apps schema in oracle applications production.

    Hi, Is there any care that must be taken to compile apps schema using adadmin in production. With Regards GNVMK

  • Why won't downloaded artwork transfer to iPod?

    Hi all! I am having a problem where artwork that I downloaded through iTunes is not transferring to my 80GB iPod. This applies only to artwork that I have downloaded from iTunes. Artwork that I have manually put in transfers and displays just fine. T