Field name of column to be captured after click using Hotspot in block ALV

Dear All ,
A block list ALV Report has been designed using ' RESUSE_ALV_BLOCK_LIST_APPEND' . On a particular cell of the ALV List another screen comes up which gives details of that particular cell by fetching data from a particular Ztable .In the where clause I have already got the parameter which depends on the row no. Row no is being captured by using a structure SELFIELD type SLIS_SELFIELD which gives Row no in the field TABINDEX but the FIELDNAME field is blank .My Column no is a particular date spread across the month which i have to give in where clause .
Further DEBUGGING has given these results . Just after double click on cell a particular program SAPLKKBL opens up and in that perform USER_COMMAND_NEW comes up which has a perform by the name of SELFIELD_GET . In it the field name is captured in the structure ls_selfield .But how to get that particular field name my main program from that standard coding .
Plz help .
Regards,
Bharti Jain

Check this ( i have created a prog )
i am writing code:
*declaration of internal tables
DATA I_MAKT TYPE TABLE OF MAKT WITH HEADER LINE.
DATA IT_FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA IT_EVENT TYPE SLIS_T_EVENT.
DATA WA_EVENT LIKE LINE OF IT_EVENT.
*query
START-OF-SELECTION.
  SELECT * FROM MAKT INTO TABLE I_MAKT UP TO 70 ROWS.
*function module to get field catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
  EXPORTING
*     I_PROGRAM_NAME               =
*     I_INTERNAL_TABNAME           =
     I_STRUCTURE_NAME             = 'MAKT'
    CHANGING
      CT_FIELDCAT                  = IT_FCAT
*initial function module you must use to use event user command and pf status (custom pf).
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'    <----- add this FM to your code
    EXPORTING
      I_CALLBACK_PROGRAM       = SY-CPROG
*     I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
      I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
      IT_EXCLUDING             = IT_EXCLUDING.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
   EXPORTING
     I_LIST_TYPE           = 2
  IMPORTING
     ET_EVENTS             = IT_EVENT[]
*modify event table for top of page form.
READ  TABLE IT_EVENT INTO WA_EVENT WITH KEY  NAME = 'TOP_OF_PAGE'.
  WA_EVENT-FORM = 'TOP_OF_PAGE'.
  MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
  CLEAR WA_EVENT.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
      IS_LAYOUT                        = IT_LAYOUT
      IT_FIELDCAT                      = IT_FCAT
      I_TABNAME                        = 'MAKT'
      IT_EVENTS                        = IT_EVENT[]
    TABLES
      T_OUTTAB                         = I_MAKT
*at last use this FM to display data
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM SELFIELD
              TYPE SLIS_SELFIELD.
  BREAK-POINT.
  MESSAGE 'user command triggered' TYPE 'I'.
ENDFORM.
FORM TOP_OF_PAGE.
  BREAK-POINT.
  WRITE 'top of pageeeeeee.' COLOR 5 HOTSPOT.
ENDFORM.
<removed by moderator>
Edited by: Thomas Zloch on Feb 21, 2012

Similar Messages

  • In content query webpart columns are not displaying after clicking on edit webpart.

    Hi,
    I created a content query webpart. I added one custom item style in ItemStyle.xsl. This template having some date operations. Some date comparisons. The issue is, template containing some variables but after selecting my template it is not showing the variable
    names to enter the list column. What will be the issue? Below is the code..
    <xsl:template name="BirthdayList" match="Row[@Style='BirthdayList']" mode="itemstyle">
        <xsl:variable name="SafeImageUrl">
            <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
                <xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>  
    <xsl:variable name="EmployeeDesignation">
            <xsl:value-of select="@EmployeeDesignation" />
        </xsl:variable>
        <xsl:variable name="Birthday">
            <xsl:value-of select="@Birthday" />
        </xsl:variable>
        <xsl:variable name="dateTimeBirthday" select="ddwrt:FormatDate(string($Birthday), 1033, 3)" />     
                    <xsl:variable name="dateOfBirthday"  select="substring-before(substring-after($dateTimeBirthday, ', '), ', ')"
    />
                    <xsl:variable name="monthOfBirthday" select="substring-before($dateOfBirthday, ' ')" />
                    <xsl:variable name="yearOfBirthday"   select="substring-after(substring-after($dateTimeBirthday, ', '), ',
    ')" />
                    <xsl:variable name="TodaysDateOfBirthday">
                        <xsl:value-of select="ddwrt:FormatDate(string(ddwrt:Today()), 1033,3)"/>
                    </xsl:variable>
                    <xsl:variable name="TodaysDateOfBirthdayyy"  select="substring-before(substring-after($TodaysDateOfBirthday, ',
    '), ', ')" />
                    <xsl:variable name="TodaysmonthOfBirthday" select="substring-before($TodaysDateOfBirthdayyy, ' ')" />
                    <xsl:variable name="TodaysyearOfBirthday"   select="substring-after(substring-after($TodaysDateOfBirthday,
    ', '), ', ')" />
                     <xsl:if test="($dateOfBirthday)=($TodaysDateOfBirthdayyy)">
                     <xsl:if test="($monthOfBirthday)=($TodaysmonthOfBirthday)">
         <div>
            <div>       
        </div> 
        </div> 
        <table width="100%"> 
        <tr width="100%">
                    <td width="80%">
                                    <table>
    <tr>
     <td><b><xsl:value-of select="$DisplayTitle"/></b></td>
                       </tr>
    <tr>
    <td>  <xsl:value-of select="$EmployeeDesignation"/>
    </td>
                       </tr>
                                    </table>
                    </td>
                    <td width="20%">
                                    <table>                                               
    <tr>                      
    <td valign="top">
       <img width="60" height="60" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" title="{@ImageUrlAltText}" />                                                  
     </td>       
                                    </tr>
                                    </table>
                    </td>
       </tr>
        </table>
    </xsl:if>
           </xsl:if> 
    </xsl:template>

    Hi,
    Based on your example above, which columns / variables are not appearing when editing the CQWP that you want to bind managed properties / list columns to?
    Eric Overfield - PixelMill -
    ericoverfield.com -
    @EricOverfield

  • Field BSEG-ZLSPR has to be cleared after I use FBA7 trx

    Hi gurus! I need to clear  BSEG-ZLSPR field after i´ve post data in FBA7 trx. Actually that field fills with A letter. Do i have to check something in SPRO to make it non-automatic?

    Hi,
    The program sets a payment block 'A' only if the special G/L indicator A is allowed as transaction to be paid in the Customizing of the payment program (in other terms there is a 'A' in the field T042-ULSK1; this may be checked with transaction FBZP, button 'all company codes', window 'vendors', 'Sp. G/L transactions to be paid').
    If you see an 'A' here, remove it.
    If not, please check the OSS notes, for example 702555.
    Maybe the request of your users is the standard solution but your system needs applying an OSS note.
    The behaviour of the program may be different in the different releases. In which release are you working ?
    I'm working in 4.7 and I checked it: when T042-ULSK1 contains 'A', the down payments posted by FBA7 contain a payment block 'A'; when it is empty, FBA7 doesn't generate any payment block.
    best regards,
    Henri Loiseau

  • Using field names stored in the database in a query

    Hi,
    I'm working on a database that has field names stored in tables. In order to construct a query using the field names stored in the table, normally I'd use dynamic SQL. 
    For example in table1 I have
    Field_Name Value
    Field1
    'Name'
    Field 2
           'Address'
    I want to build a select statement  "SELECT Name, Address, FROM tblCustTable" - if possible not using dynamic SQL.
    Is there a neat way to do this?
    Thanks very much.
    Sad old developer

    No, it is not possible to dynamically include ANY object names (Columns, Tables, Functions, Procedures, etc) in SQL without using Dynamic SQL.
    The closest you can get, if you are choosing from a known set of names, is to use CASE statements:
    SELECT CASE
    WHEN t1.Field1='Name' THEN ct.[Name]
    WHEN t1.Field1='Address' THEN ct.[Address]
    END AS Field1
    FROM tblCustTable ct
    CROSSJOIN table1 t1
    WHERE ...
    However there are several disadvantages to this approach, and the SQL will quickly get very convoluted and difficult to maintain.   Dynamic SQL is much cleaner.
    -Tab Alleman

  • Read data element given field name

    Hello All,
       I have a DB table and field name, with this information how can i find the data element for this perticular field.
      is tehre any Funtion Modules exists for teh same.
    Thanks in advance
    Amarender Reddy B

    Hi Amar,
    You can get the data element for a field in a database table using DD03L table.
    Check this code.
    DATA V_ROLLNAME TYPE DD03L-ROLLNAME.
    SELECT ROLLNAME
       FROM DDO3L
         INTO V_ROLLNAME
    WHERE TABNAME = 'MARA'  -->Provide table name
         AND FIELDNAME = 'PSTAT'. -->Provide field name
    WRITE:/ 'Data element is: ', V_ROLLNAME.
    Otherwise, use function module KL_TABLE_INFO_GET to get the data element for a field of a database table. Provide table name to I_TABNAME and field name to I_FIELDNAME and you will get the data elemet in the export parameter E_TABFIELD_W-ROLLNAME.
    Thanks,
    Vinay

  • Bluetooth not working.  Greyed out after using hotspot

    My bluetooth and wifi stopped working after I used hotspot.  It is greyed out and I cannot get it working.  I have re-set the settings in general.  Anyone have any ideas?

    Hi awc4444,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iOS: Troubleshooting Bluetooth connections
    http://support.apple.com/kb/TS4562
    Cheers,
    - Judy

  • Capture field name in table control on double click

    Hi,
    How can I capture the field name of internal table passed to table control on double click?
    I have set function code as 'PICK' and applied 'Respond to double click' and used GET CURSOR statement. Here I can get the values like row number (line number), field value also. But I would like to capture on which field the cursor is (or on which column the cursor is)?
    Thanks in advance.
    Regards
    Ramesh.

    Got it.
    We can capture it by using the statement GET CURSOR only.
    GET CURSOR field <field xx> .
    Here the <field xx> is the field name where we have said double click.

  • How to rename the column field names

    hello guys,
    i am retrieving my field names from the database and i view it thru HTML.
    When i view it,the column names are those which are given while creating tables.
    Ex..
    fname,lname,phno,
    i want it as First Name,Last Name,Phone Number etc ...<%
    try {
         stmt = con.createStatement();
         sql="SELECT fname, lname, gender, email,phnum,sartweblink, sartaddress1, sartaddress2,sartcounty, country,sartpostcode,dob FROM Artist where artistid='" + sartid + "'";
         rs=stmt.executeQuery(sql);
         rsmd=rs.getMetaData();
         int colcount=rsmd.getColumnCount();
         for(i=1;i<=colcount;i++)
    %>
              <tr><td width="200"><FONT face=verdana size=2><%= rsmd.getColumnName(i)%>
    <%
    %>               </FONT>
        <font face=verdana size=2>
          <% while(rs.next())
              fname=rs.getString("fname");
              lname=rs.getString("lname");
              gender=rs.getString("gender");
              email=rs.getString("email");
               phnum=rs.getInt("phnum");
              weblink=rs.getString("sartweblink");
              address1=rs.getString("sartaddress1");
              address2=rs.getString("sartaddress2");
              county=rs.getString("sartcounty");
              country=rs.getString("country");
              postcode=rs.getString("sartpostcode");
               dob=rs.getString("dob");
          %>i make use of metadata..
    can anyone tell me how to do this..
    thanks in advance

    why not use alias:
    your query is
    SELECT fname, lname, gender, email
    and will be:
    SELECT fname FIRSTNAME, lname LASTNAME, gender GENDER, email EMAILADDRESS

  • XML Schema Collection (SQL Server 2012): How to create an XML Schema Collection that can be used to Validate a field name (column title) of an existing dbo Table of a Database in SSMS2012?

    Hi all,
    I used the following code to create a new Database (ScottChangDB) and a new Table (marvel) in my SQL Server 2012 Management Studio (SSMS2012) successfully:
    -- ScottChangDB.sql saved in C://Documents/SQL Server XQuery_MacLochlainns Weblog_code
    -- 14 April 2015 09:15 AM
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'ScottChangDB')
    DROP DATABASE ScottChangDB
    GO
    CREATE DATABASE ScottChangDB
    GO
    USE ScottChangDB
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL, [ID] INT NULL)
    INSERT INTO marvel
    (avenger_name,ID)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8);
    SELECT avenger_name FROM marvel ORDER BY ID For XML PATH('')
    DECLARE @x XML
    SELECT @x=(SELECT avenger_name FROM marvel ORDER BY ID FOR XML PATH('Marvel'))--,ROOT('root'))
    SELECT
    person.value('Marvel[4]', 'varchar(100)') AS NAME
    FROM @x.nodes('.') AS Tbl(person)
    ORDER BY NAME DESC
    --Or if you want the completed element
    SELECT @x.query('/Marvel[4]/avenger_name')
    DROP TABLE [marvel]
    Now I am trying to create my first XML Schema Collection to do the Validation on the Field Name (Column Title) of the "marvel" Table. I have studied Chapter 4 XML SCHEMA COLLECTIONS of the book "Pro SQL Server 2008 XML" written by
    Michael Coles (published by Apress) and some beginning pages of XQuery Language Reference, SQL Server 2012 Books ONline (published by Microsoft). I mimicked  Coles' Listing 04-05 and I wanted to execute the following first-drafted sql in
    my SSMS2012:
    -- Reference [Scott Chang modified Listing04-05.sql of Pro SQL Server 2008 XML by Michael Coles (Apress)]
    -- [shcColes04-05.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress]
    -- [executed: 2 April 2015 15:04 PM]
    -- shcXMLschemaTableValidate1.sql in ScottChangDB of SQL Server 2012 Management Studio (SSMS2012)
    -- saved in C:\Documents\XQuery-SQLServer2012
    tried to run: 15 April 2015 ??? AM
    USE ScottChangDB;
    GO
    CREATE XML SCHEMA COLLECTION dbo. ComplexTestSchemaCollection_all
    AS
    N'<?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="marvel">
    <xsd:complexType>
    <xsd:all>
    <xsd:element name="avenger_name" />
    <xsd:element name="ID" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>';
    GO
    DECLARE @x XML (dbo. ComplexTestSchemaCollection_all);
    SET @x = N'<?xml version="1.0"?>
    <marvel>
    <avenger_name>Thor</name>
    <ID>4</ID>
    </marvel>';
    SELECT @x;
    GO
    DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_all;
    GO
    I feel that drafted sql is very shaky and it needs the SQL Server XML experts to modify to make it work for me. Please kindly help, exam the coding of my shcXMLTableValidate1.sql and modify it to work.
    Thanks in advance,
    Scott Chang

    Hi Scott,
    2) Yes, FOR XML PATH clause converts relational data to XML format with a specific structure for the "marvel" Table. Regarding validate all the avenger_names, please see below
    sample.
    DECLARE @x XML
    SELECT @x=(SELECT ID ,avenger_name FROM marvel FOR XML PATH('Marvel'))
    SELECT @x
    SELECT
    n.value('avenger_name[1]','VARCHAR(99)') avenger_name,
    n.value('ID[1]','INT') ID
    FROM @x.nodes('//Marvel') Tab(n)
    WHERE n.value('ID[1]','INT') = 1 -- specify the ID here
    --FOR XML PATH('Marvel')  --uncommented this line if you want the result as element type
    3)i.check the xml schema content
    --find xml schema collection
    SELECT ss.name,xsc.name collection_name FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
    select * from sys.schemas
    --check the schema content,use the name,collection_name from the above query
    SELECT xml_schema_namespace(N'name',N'collection_name')
    3)ii. View can be viewed as virtual table. Use a view to list the XML schema content.
    CREATE VIEW XSDContentView
    AS
    SELECT ss.name,xsc.name collection_name,cat.content
    FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
    CROSS APPLY(
    SELECT xml_schema_namespace(ss.name,xsc.name) AS content
    ) AS cat
    WHERE xsc.name<>'sys'
    GO
    SELECT * FROM XSDContentView
    By the way, it would be appreciated if you can spread your questions into posts. For any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to capture the field name on a form when it's double-clicked?

    Hello,
    I plan to create a two field Help table that uses the thirty or so unique field names on the user form in field one. The second field is a Memo type field that contains the Help information for each field.
    Once I know the field name clicked, I will probably use a query to retrieve the help information. I'm planning to use the Double-Click event so the users can double-click any field on the form to be presented the specific field related information
    from the Help table.
    How can I capture the name of the field that was double-clicked, so I can proceed with this project? Thank you.
    Cordially,
    John
    Thank you, John Portland, Maine

    Thank you, Hans,
    How about this code:
    Dim varClickedFieldName as String
    varClickedFieldName = ScreenActiveControl.ControlSource
    Or would you recommend other code?
    Cordially,
    John
    Thank you, John Portland, Maine

  • Field name retrieval from field symbols after assigning to field in a struc

    We have an internal table of about 100 columns. First 7 of them have key values and other fields are data fields. Out of remaining 93 fields, any 2 to 3 fields have data stored in it in each record. Using field symbols in a loop (93 fixed iterations), we are identifying which fields has a data in it. Once we identify the field, how do we retrieve the name of the field / column of the table. We are performing further processing based on name of the field.
    Any ideas how to get the name of the column assigned to field symbols?
    sample raw code piece is as below:
    clear n.
    Do 93 times.
      n = n + 1.
      assign component n of structure itab to <fs>.
      if not <fs> is initial.
       Get name of the field in cfname.
        perform process_record using cfname.
      endif.
    enddo.
    Thanks.
    Regards.

    Hi,
    Try this..use the function module GET_COMPONENT_LIST to get the fields of the internal table and store it in an internal table ITAB_COMP..
    Then use READ TABLE ITAB_COMP INDEX sy-index..
    You can get the field name from the work area..
    Thanks,
    Naren

  • How to add get the field name for a newly added site column.

    I have the following:-
    Enterprise wiki site collection inside SharePoint server 2013.
    I added a new site column of type managed metadata.
    I opened the enterprisewiki.aspx page layout using the SP designer, to add the newly added site column to it.
    But I have noted that to add any site column I need to know the field name , for example the default wiki category column is referenced inside the page layout as follow:-
    <Taxonomy:TaxonomyFieldControl FieldName="Wiki_x0020_Page_x0020_Categories" EmptyValueDescriptionForTargetTemplate="<%$Resources:cms,enterwiki_nocategories_assigned%>" DisableInputFieldLabel="true" runat="server"/>
    <b>
    So my question is how I can know the field name for my newly added site column?
    Thanks in advance for any help.
    Regards

    Hi,
    The “FieldName” should be the internal name of the column, you will find it at the address bar at the “Site Columns”->”Edit Column” page:
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Problem with column/field names in Oracle resultset being UPPERCASE

    Hi everyone,
    I understand that Oracle DBMS returns all the field names in UPPERCASE in the result set. However this is undesired for my application and I was wondering if there is any workaround for getting the field names in the application in exactly the same format as your select query. Is there any set method which can be called before to control this behavior.
    E.g. select ename as employeename from table_name;
    ORACLE RETURNS --> EMPLOYEENAME
    Required --> employeename
    Please help me
    ..Vinit

    Vinit,
    You can use column aliases in your query -- see Oracle SQL Reference for more details.
    Then you can set some connection property in Oracle JDBC that allows you to obtain the column alias (I think). Check the Oracle JDBC User's Guide and Reference for more details.
    Good Luck,
    Avi.

  • Names of column appearing in alv output after changing layout in alvgrid?

    Hi all
    I have a requirement where I am displaying 20 fields using alv grid(cl_gui_alv_grid). Now each time when I run I can change layout and can display any number of columns in output using change layout option.
    My requirement is i need to know the column names of the fields which are displayed upon changing layout in output. Using this column names I have to write some logic in code. Each time number of column may vary as per the user selection. Is there any method or way to get the names of columns selected in output display?
    Please help me in this regard.

    Hi,
    During run time you will get the ALV layout info using this function module.
    REUSE_ALV_GRID_LAYOUT_INFO_GET
    Regards,
    Anversha

  • After renaming the field name in content server,I am get the Exception

    Hai All
    After renaming the field name in Content Server I got one Error Like
    *<ERROR> <oracle.ucm.idocs> <UCM-CS-000001> <General Exception>*
    intradoc.data.dataexception !csRequiredFieldMissing2 dRevLabel in UCM.
    Thanks,
    Hari
    Edited by: Hari on Jun 1, 2011 11:08 AM

    I think it is somehow related to your other question - pure renaming (that is. changing the text of the field's label) should not have an effect what-so-ever, but you probably somehow changed something in a required parameter, so that it is empty now.

Maybe you are looking for

  • Custom scale for counter input?

    Hello everyone, Is it possible to create a custom scale for a counter input? I saw there is a feature to allow input Custom Scale Name to the Channel Property Node. However, when I tried to create a custom scale to input to the channel, I got this er

  • I have the 24" imac 2.4ghz can it support elements 11

    i have the 24" imac 2.4ghz can it support elements 11??? i need to know soon

  • Query Rule Not working As Expected

    I'm trying to make a rule that will let me know when a server is not in one of 3 AD groups. This is the Query I have: select SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDom

  • Attaching a Wii console to the 32DT2u Television

    Can someone please tell me how to hook up a Wii console to the 32 DT2U television.  The Wii does not use a HDMI cable.  It has 3 RCA cables and a USB port.  I was told by a "gamer" that the USB port will not work.  Can't figure it out.  Please help! 

  • Extract nested Jar File

    Okay, I've been looking all day for solutions to this problem and nothing I've found pinpointed the solution, so if anyone would rather point me to another site, that's great. I have a .jar installer ( installer.jar ) that contains the installer code