Suggestions to find the current active fields in debugging mode

Hi All,
I need to validate a particular entry in the screen in a particular subroutine(inside a user exit). I know the field gets populated but do not know which field is that, is there a way to know the current active fields in the debugging mode.
Regards,
Karthik

Hi,
  You can create dynamic types and data for those types are run time.
  lets assume that you have structure of some type and you have work area of that type.
DATA: lv_data type SPFLI.
DATA: lr_rtti_struc TYPE REF TO cl_abap_structdescr.
DATA: lt_comp       TYPE cl_abap_structdescr=>component_table.
DATA: ls_comp       LIKE LINE OF lt_comp.
DATA: lr_data       TYPE REF TO data.
FIELD-SYMBOLS: <fs_data> TYPE ANY.
    lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( lv_data ).
    lt_comp = lr_rtti_struc->get_components( ).
"Now  lets remove two fileds from the table as follows.
LOOP AT lt_comp into ls_comp.
DELETE lt_comp INDEX sy-tabix.
IF sy-tabix = 2.
EXIT. " Delete two components of the structure now lt_comp as two components less from SPFLI
ENDIF.
ENDLOOP.
    CALL METHOD cl_abap_structdescr=>create
      EXPORTING
        p_components = lt_comp
        p_strict     = abap_false
      RECEIVING
        p_result     = lr_rtti_struc.
CREATE DATA lr_data TYPE HANDLE lr_rtti_struc. "Now you have data of the new type
    ASSIGN lr_data->* TO <fs_data>.
    CREATE DATA lr_table LIKE STANDARD TABLE OF <fs_data>.
    ASSIGN lr_table->* TO <fs_table>.
Regards,
Sesh

Similar Messages

  • Script to find the currently active sql

    hey,
    Can somebody post me a script to find the currently active sql in the database ???

    Hi,
    You can try these below:
    select s.username
           c1,t.sql_text
    from v$session s, v$sqltext t
    where
    s.sql_address = t.address and
    s.sql_hash_value = t.hash_value and
    s.username is not null
    order by s.username,s.prev_sql_addr,s.prev_hash_value,t.piece;
    or
    select sesion.sid,
           sesion.serial#,
           sesion.username,
           sesion.sql_id,
           sesion.sql_child_number,
           optimizer_mode,
           hash_value,
           address,
           sql_text
      from v$sqlarea sqlarea, v$session sesion
    where sesion.sql_hash_value = sqlarea.hash_value
       and sesion.sql_address    = sqlarea.address
       and sesion.username is not nullCheers

  • Cannot find the Revision Level field in the item details

    Hi All,
    1) I have created a PR with 2 items in the R/3 Backend using the me51n transaction in which for one of the items i have updated the Revision Level field.
    2) To transfer the purchase requisitions created in the above step to the SRM system(sourcing cockpit) i executed  the report BBP_EXTREQ_TRANSFER with transaction SE38.
    3) Now when i go to the SRM portal and navigate to find the external requirement in the sourcing cockpit, I am not able to find the Revision Level field entered in the backend.
    Can some one help.
    Regards
    Sam

    Hi
    Please go through this ->
    Version Management in R/3
    http://help.sap.com/saphelp_47x200/helpdata/en/8a/60b43bb7492147e10000000a114084/frameset.htm
    Versioning in SRM
    http://help.sap.com/saphelp_srm50/helpdata/en/42/c92d6e3ed16babe10000000a1553f6/frameset.htm
    Prerequisites for Version Control in SRM
    I)        You have activated the version control so that the system creates historical versions.
    See the path in the IMG: SRM Server  ®  Cross-Application Basic Settings  ®  Switch On Version Control for Purchasing Documents
    II) You have set up and activated the workflow for the approval of changes to active purchasing documents. See also: Approval Workflows for Documents and Objects
    ( Related link -> http://help.sap.com/saphelp_srm50/helpdata/en/5a/af5efc85d011d2b42d006094b92d37/frameset.htm )
    Some related SAP OSS Notes ->
    Note 1030548 - Revision level in SRM 6.0 connected to ERP 2005
    Note 1026021 - EXTREQ interface: Data transfer structures
    Note 122105 - ME51, RM06BBI0: Revision level is not filled
    Hope this will definitely help.
    Regards
    - Atul

  • Can I find the current tab in Terminal using applescript?

    Running a script from the shell by prepending
    #! /usr/bin/osascript
    as part of my .profile, can I find the "current" tab using Applescript. Most of the time, the "current" tab will not be visible, as the shell is being initialised, or re-initialised.
    I want to set the dircolors for my shell by determining the background color of the tab in which the shell is executing.

    Under the Window menu you can activate any of the palettes that you want. In your case the Field tab is under the Object palette

  • How to find the current state in web dynpro

    Hi,
       Can any one tell me how to find the current state of system (idle /not idle).
    Thanks,
    Krishna..

    Please explain further.  I don't understand how you are expecting to test for idle.  If ABAP code is being executed, then you know that the application is not idle. Only a server event could trigger code execution. Only a timedTrigger would be able to tell you that a certain amount of time has passed without activitity - although the event of the timer itself will be a server event that constitutes activity.

  • How to find the current iTunes Library

    Hello,
    somehow, opening iTunes the last time I came to a previous iTunes Library and do not find the current one, where much more songs and downloads are in.
    Searching in Windows also did not help. How could I get back to the current one, as everytime opening iTunes the previous shows up.
    Does anybody know?
    Thx

    The only way is to search in Windows and look at the Size & Date Modified fields.
    Are you searching ALL your hard drives, even external ones?
    Are your Windows Explorer folder options set to hide system folders? Hide file extensions? You will need to uncheck both those options for the search to be useful.

  • How can I automatically have a new tab always be a copy of the current active tab?

    The add-on extension "NewTabURL" (by "sogame") provided the option I want and used for a number of years. But it stopped working when Firefox was updated to version 16.0. When I click for a new tab, all I get is a completely blank tab. How can I automatically have the new tab always be a copy of the current active tab?
    Can the extension "NewTabURL" be revised to work in version 16 and/or version 17? If not, how else can I get the new tab functionality that I desire? I can't seem to find any other extension that provides that functionality.
    Milt Beychok

    My trackball has 4 buttons and a scroll wheel. Each of the 4 buttons is programmable. The 4 buttons are normally pre-programmed for single-click, double-click, drag and right-click by simply pressing on them
    Each of the 4 buttons may be programmed to also have other functions. For example, I programmed "control/single-click" to produce a middle click. I could also have used "shift/single-click" or "alt/single-click" to produce the middle-click. Or I could have similarly programmed double-click or drag or right-click. The Kensington Expert Mouse is quite versatile ... once you get the hang of programming it.
    I have had it for about 4 years and I had never had the need to program one of them until you told me about using a middle-click.
    Milt Beychok

  • How to find the current line in the table control in module pool ?

    How to find the current line in the table control in module pool ?
    This is an urgent requirement? please do help me.

    refer to this example
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
    lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    DESCRIBE TABLE itab LINES lines.
    flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX<b> flights-current_line.</b>
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
          ENDIF.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
    ENDLOOP.
          ENDIF.
    ENDCASE.
    ENDMODULE.

  • Finding the current iTunes version

    How do I find the current iTunes version so that I can request a track....and how do I find the operating system of my computer. I'm a complete technophobe. Can anyone help?

    You can find the iTunes version by clicking *Help... About iTunes*. Mine reads iTunes 9 and then the scrolling text reveals the version number is 9.1.1.11. If you're trying to fill out your version number in a form on the Apple website then these are usually out of date and have an option for the current build. Just use the most recent build listed.
    Your signature suggests you've already worked out that your OS is Windows XP.
    tt2

  • Issue in finding the current row

    I am rendering rows of a VO using an iterator component. One of the component I am rendering is a declarative component created by me.
    In this component there is a clickable link on which i can write any method to achieve desired functionality.
    Since, iterator is used so the current row is set to the last row. Now on clicking the link in the declarative component i need to do some operation based on the current row (pk of that row). So, how to find the current row id?
    Note: If it would be a simple adf component like a commandLink i could have inserted a setServerListener inside it and could have put the id in to requestScope to access it. But as this is the declarative component in which i cannot create a serverListener so I am looking for some other solution.

    Hi john,
    My table have the selection listener.
    Thanks in advance

  • To find the date type fields in the row and validate those date fields

    TYPES : BEGIN OF TY_MARA,
              MATNR TYPE MARA-MATNR,
              ERSDA TYPE MARA-ERSDA,
              ERNAM TYPE MARA-ERNAM,
              LAEDA TYPE MARA-LAEDA,
              MTART TYPE MARA-MTART,
            END OF TY_MARA.
    DATA : it_mara TYPE STANDARD TABLE OF ty_mara,
          it_mara1 TYPE STANDARD TABLE OF ty_mara,
           wa_mara TYPE ty_mara.
    loop at it_mara into wa_mara.
      describe field wa_mara-ersda type c_data.
    if c_data eq 'D'.
      CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
        EXPORTING
          date                            = wa_mara-ersda
       EXCEPTIONS
         PLAUSIBILITY_CHECK_FAILED       = 1
         OTHERS                          = 2
      IF sy-subrc eq 0.
    wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
        else.
            wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
      ENDIF.
      endif.
      endloop.
    This issue regarding how to find the date type fields in the row and validate those date fields.If its not a valid date ,i have to assign initial value to that.
    I've tried that for single field using describe field.Please help me do that for all fields.

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Adding a year to the current date field

    Hello,
    Can any one please help on how to add a year to the current date field.
    e.g 7/19/2011 plus a year = 7/19/2012
    Thanks,
    Han Dao

    If you had a field DateTimeField1 and wanted to display the following year in DateTimeField2, you could do the following in JavaScript;
    var d1 = util.scand("yyyy-mm-dd", DateTimeField1.rawValue);
    if (d1 !== null)
    d1.setFullYear(d1.getFullYear()+1);
    DateTimeField2.rawValue = util.printd("yyyy-mm-dd", d1);
    Good luck
    Bruce

  • How to Find the Current Instance Id in Oracle 10g

    Hi,
    how to find the current instance id in oracle 10g studio,
    I have the below code :
    if (InstanceScreenFlow.processInstance.id.id.indexOf(text : ins.id) < 0) {
    /// do something
    it is saying that "'processInstance' is not a function"
    Thanks,
    Brijesh Kumar Singh.

    Why not just pass in the "id" predefined variable into your screenflow? Once you do that you'll be able to refer to it as "id.id" anywhere inside your screenflow.
    Dan

  • How to find the current SQL

    Dear All,
    My testing engineers are checking the application from front end, i have to find the current SQL (What SQL queries are used in the application) statements in the back end.
    Please let me know how to find the current executing SQL stements.
    Thanks in advance
    Mahi

    You need to join this query with one more table - v$sqlstats. There are many statistics in particular cpu_time, elapsed_time etc stored in that table for each sql statement.
    You can join v$sqlstats by sql_id until you have multiple child cursors for single statement.
    Or you can just join to v$sql and get statistics from there and in this latter case you include child_number column to distinguish child cursors from each other.
    Best Regards,
    Alex

  • Standard report Programs to find the current status of workflows

    Hi Experts,
                       Are there any Standard report Programs to find the current status of workflows or workflows which are pending.
    Regards,
    Hari

    Go to SWI1 t-code
    Give the appropriate Status - Ready or Inprocess or Waiting
    Input the Task - either WF Template or Standard Task.
    Choose the time period and execute the report.
    Regards,
    PR.

Maybe you are looking for

  • Saving a PDF file to a Word Document

    Can someone please tell me how to save a PDF file as a word document?  When I do a "save as" with the doc extension, a window pops up that says, "Save as failed to process this document.  No file was created."  Any help would be appreciated.  Thank y

  • 870a gx54 problem with FX4100 CPU

    Just built a pc for my son and it won't boot up - did the usual bits swapping out items for known working items and it boots fine with an AMD x4 process but is just dead with the FX4100 -don't have another am3+ system so can't check whether the CPU i

  • JSS error while trying to use amsdk.

    I have a existing web application that uses AM sdk to perform SSO, which is deployed in Sun Webserver 7. It works perfectly fine. I have developed another sample web application to do the same I deployed it in the same web container but I am getting

  • MS Office (Excel) Toolkit - trouble formatting cells

    I have the MS Office toolkit 1.1 and LabVIEW 7.0. I am using 'Excel easy table' to write arrays of strings (number strings and titles, etc.) to a spreadsheet but I also want to control the number of decimal places and the number format. I want to use

  • CS5 License

    Hello Adobe guys, i need some help. I bought two years ago an Illustrator CS5 License. for that time we were using an imac 10.5.8. Nowadays we have made a clean format to the computer. and all old programs are gone, also we update the computer to Mac