Dynamic value assignment to a particular column in a vertical ALV

Hi Friends,
In the present program ALV has 44 fields and output row is only one(with some field editable).
My requirement is to change present output to vertical ALV and editable field should be available
as editable.
Now I have changed this to transposed ALV manually(not dynamically) with required fields editable.
Now there is 44 rows and two column "FIELD and "VALUE'.Some values in the second column is editable.
Previously output was like this:
field1   field2  field3 ...
val1     val2    val3   ...
Now output is like:
FIELD   VALUE
field1  value1(type INT)
field2  value2(type char5) Editable(need F4 help)
field3  value3(type date)
My present structure declaration is:
types: begin of ty_itab,
        field type char 50,
        value type char70,
        celltab type lvc_t_styl,(for editing some values in VALUE column).
       end of ty_itab.
data: itab type standard table of ty_itab.
Now the second column i have declared as CHAR70 which contains only char
values because to put all differt types of values to one single column named
'VALUE'.
But as field1 field2 field3... had differnt type of value like integer char date...I need to validate some values
(specially those which are editable) before saving to custom DB table.
So I need dynamic value assignment to VALUE column when preparing internal table for display.
What I want to say is that VALUE column should be able to contain different type of values like INT, DATE, CHAR...etc
Is the requirement is feasible?
If yes then How should I declare the structure and populate different type of values within single column 'VALUE'.
Also is it possible to have F4 helps in the second column (VALUE)???

Hi Manab,
I did something comparable: We have a very complex transaction with several subscreens with multiple fields to be filled with complex logic to create a very special contract. The requirement was to create a method to create a copy of this contract being able to apply some changes.
I created a wizard (transaction SBPT_WIZARD_BUILDER - Wizard-Builder) to accomplish that. I grouped all the fields to just 3 logical groups and thius created 3 stesp where the user gets an ALV as you describe, but we have the rows like FIELD  with the new value editable. Additionally I have hidden fields with table name and field name so that I can determine the characteristics (datatype) at run time.
The value fields are just strings (every ALV field is a text field on the surface).
For editable fields, you have an event DATA_CHANGED. I used this method as a handler for the event:
(I will leave out the wizard part here - maybe a good idea for a blog to explain that)
METHOD handle_data_changed.
    CALL FUNCTION 'RS_CONV_EX_2_IN'
      EXPORTING
         input_external                     = <mod>-value
         table_field                        = ls_tabfield
I also created handlers for F1 and F4
Handler for CL_GUI_ALV_GRID->ONF1
METHOD handle_f1.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
      EXPORTING
        called_for_tab   = lv_tabname
        called_for_field = lv_fieldname
      EXCEPTIONS
        object_not_found = 1
        sapscript_error  = 2
        OTHERS           = 3.
Handler for CL_GUI_ALV_GRID->HANDLE_F4
METHOD handle_f4.
  CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
      tabname    = lv_tabname
      fieldname  = lv_fieldname
    TABLES
      return_tab = lt_return_tab
    EXCEPTIONS
      OTHERS     = 5.
    er_event_data->m_event_handled = abap_true.
* if er_event_data->m_event_handled is not set to abap_true, system will handle it.
* In this context the message 'Keine Eingabehilfe verfügbar' will be displayed
ENDMETHOD.
This is just an excerpt from my project. It shows that you can do more in ALV as you knew.
I tried to post a little more but the formatting break down, possibly a result of the character limit
Regards,
Clemens

Similar Messages

  • Can a pop list have a dynamic value assigned to it?

    Can a pop list have a dynamic value assigned to it?
    like Select actualValue, fullname from category;
    and assigning fullname to the list of values of the pop list and actualValue to each of the values returned...

    The following code will help you and define on when-new-form-instance trigger,
    DECLARE
    rg_name VARCHAR2(40) := 'EMP';
    rg_id RecordGroup;
    errcode NUMBER;
    BEGIN
    rg_id := Find_Group( rg_name );
    IF not Id_Null(rg_id) THEN
       delete_group(rg_id);
    END IF;
    rg_id := Create_Group_from_query(RG_NAME, 'SELECT ename, TO_cHAR(empno) FROM emp');
    errcode := Populate_Group( rg_id );
    -- Error occured while populating the record group
    if errcode != 0 then
    message(' Error occured while populating the record group');
    raise form_trigger_failure;
    end if;
    -- Clearing the list before populating it.
    clear_list('here you define block column name');
    populate_list('here you define block column name',RG_ID);
    exception
    when no_data_found then
    null;
    when others then
    null;
    END;  

  • Is there a way to get the new value assigned to a serial column (DG4IFMX)

    Hi Folks,
    I need to insert records into a table whose primary key is a serial column (Same as a trigger based primary key in Oracle). I've been told that the way to trigger the next value is to insert a zero into the column, which is fine. The problem is, I need to know what that next value is that was assigned, and there's not enough time between transaction to do a "select max(column_name)", for example. Is there something (a function perhaps) that fills this need, and I just don't know about it?
    Thanks, any insight would be appreciated.
    -Adam vonNieda

    The gateway offers the PASSTHROUGH package -described in the manual more detailed- which allows you to send anything to the foreign database without being touched by Oracle.
    Depending on your function you could use the DBMS_HS_PASSTHROUGH.EXECUTE_IMMEDIATE package and if you need to fetch something you could use:
    dbms_hs_passthrough.parse
    DBMS_Hs_Passthrough.fetch_row
    dbms_hs_passthrough.get_value

  • Use the value of a field as column-name of a dynamic table

    Hi All
    I have the following situation:
    a) Internal table TB_ORDER_CONDITION ==>  data: tb_order_condition type standard table of bapicond.
         sample of the internal table TB_ORDER_CONDITION:
    CONT_TYPE # CONDVALUE# CONDBASEVAL  
        ZR00         #    38.800000#  1.000000
        ZR30         #    2.800000  #  0.000000
        SKTO        #    0.000000  #  57.8500000
    b) dynamic-table  <L_TABLE_II> has the following columns:
    ZR00#ZR30#ICM3#IPS2  SKTO  
    c) I would like to move as below:
    ZR00#ZR30# ICM3#IPS2# SKTO 
    38.800000#2.800000#57.8500000
    Observation:
    I used this symbol just to show the separationfrom one column from another.
    Items a) and b) are OK. The problem is that I don't know how to make this move as showed in item c).
    Could you please advise?
    Thanks in advance.
    Gaia

    Hello,
    Check the code snippet below:
    FIELD-SYMBOLS: <wa_order_creation>  TYPE bapicond,
                   <l_table_ii>         TYPE STANDARD TABLE,
                   <l_wa_ii>            TYPE ANY,
                   <l_fieldval>         TYPE ANY.
    SORT tb_order_condition BY itm_number. "Sort by Item Number
    LOOP AT tb_order_condition ASSIGNING <wa_order_creation>.
    * Add a record to the dynamic table for each item
      AT NEW itm_number.
        APPEND INITIAL LINE TO <l_table_ii> ASSIGNING <l_wa_ii>.
      ENDAT.
      ASSIGN COMPONENT <wa_order_creation>-cond_type
      OF STRUCTURE <l_wa_ii> TO <l_fieldval>.
      IF sy-subrc = 0.
        <l_fieldval> = <wa_order_creation>-cond_value.
      ENDIF.
    ENDLOOP.
    BR,
    Suhas

  • How to assign the dynamic value of PV to Sip Header in ICM?

    Hi everybody,
    I would like to ask your help, please. We are working on Temporary IVR Handoff (ICM+CVP). I need to add/modify a customer Sip header in ICM transfer script. The value for that header is dynamic and stored in the one of ICM Call Peripherial Variables (PV9, for examle).
    Is it possible somehow to assign the value of that PV9 to Sip header (Set Variable Call.SipHeader)? I tried to do it but unfortunally without any success. I can assign any static string, but how to assign the value of the PV??? That's the question...
    For static string assignment the syntax of the Set Variable Node (Call.SipHeader) looks like that:
    "IVR-Handoff~add~It's Cisco"
    and it works fine.
    For dynamic value (PV9) I tried:
    "IVR-Handoff~add~Call.PeripherialVariable9" - it add Call.PeripherialVariable9 as a string, but not it's value;
    "IVR-Handoff"~add~Call.PeripherialVariable9 - returns a syntax error;
    Call.PeripherialVariable9 - no Sip header is added.
    What do you think? Is it doable at all?
    Any ideas, answers or examples how to do it would be much appreciated.
    Thank you in advance.
    Dmitriy.

    Hi Senthil,
    Yes! It works, but with the little difference. The right answer is:
    "IVR-Handoff~add~"&Call.PeripherialVariable9
    (Call.PeripherialVariable9 is without quotes, otherwise it insert the name of the variable, but not it's value)
    The other solution is shown here (thanks to Paul Tindall):
    http://developer.cisco.com/web/cvp/forums/-/message_boards/message/15627744?p_p_auth=6psgR8ML
    concatenate("IVR-Handoff~add~",Call.PeripherialVariable9)
    Thank you so much for the idea! I very appreciate your help and vote you.

  • How to assign a dynamic value to the value property of a button ?

    Hi Folks,
    I have a need, can i know how to assign a dynamic value to the value property of a button. Scenario is like follows...
    This is a struts based web application
    1. I have a file which consists of login user details (user name and his previlages) for a web application.
    2. I got those user details, into a List.
    3. When a user logged into the web app, in the home page there are few buttons. The type and number of buttons shown depends on the type of user/ user. (Buttons have different combination and the number of buttons available are not constant, they will vary from user to user).
    4. for each button, there will be a different action. I can pass the value of a button to an action class, but here button must have a dynamic value.
    Here is my test code:
    <%
    if (List != null)
    for (int i = 0; i <List.length; i++)
    %>
    <html:submit property="rduname" value= "<%=List%>" onclick="return submitRdu('<%=List[i] %>');"/>
    <%
    %>
    But my problem is how to assign a dynamic value to the value property of the button ( i know 'value= "<%=List[i]%>" ' will not work, just wanted show you guys).
    Thanks in advance,
    UV
    Edited by: UV_Dev on Oct 9, 2008 2:15 PM

    Let me try i know am not good at JSP but do we need double quotes here
    value= <%=List%>i think JSTL should help you about the dynamic thing                                                                                                                                                                                                                                                                                                                       

  • How to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    PDF 417 Barcode Description given in the Livecycle Designer 8.2
    : PDF 417 Non-Scriptable Barcode. Value must be assigned to this barcode at design time, and this barcode will not update after form object value changes.
    And my question is how to generate a PDF 417 Barcode by assigning a dynamic value at runtime?

    All the information you described points to the problem that reports seems can't generate to a file which already exist. You can verify that by simply doing
    r30run32 C:\AC_REPORT.REP DESTYPE = FILE DESFORMAT = PDF BATCH = YES' desname=c:\temp\ac_report.pdf
    several times. If first time the report is successfully generated in c:\temp\ac_report.pdf, but not the second, third time, then it looks like there is a bug on reports r30run32 executable.
    You may try to find any latest patch for Reports 3.0 to see if patch can solve you problem. But keep in mind Reports 3.0 is de-supported, you are better to move to 6i or 9i reports.
    Thanks,
    -Shaun

  • Sql:How to find out Particular column Value in DB?

    Hi,
    I have to findout particular column value inDB ( I don't know table Name ).
    can U tell me query for above.

    I want to find the 'name of that 27 year old male train passenger'. I don't know in which country. can you help me please... :-(..commmooon..

  • How to replace part of column name with dynamic value

    I have the following construction in an update transaction:
    $upd_blg_user_usr->addColumn("report_1_user", "NUMERIC_TYPE", "VALUE", "{rsCatReport.id_report}");
    The dynamic value, {rsCatReport.id_report}, gets a url variable.
    I want this variable to replace the "1" in the column name "report_1_user". Something like this:
    $upd_blg_user_usr->addColumn("report_{rsCatReport.id_report}_user", "NUMERIC_TYPE", "VALUE", "{rsCatReport.id_report}");
    That construction, however, does not work. Prevents the page from loading. I've tried different constructions but have not hit one one that works.
    First, I'm not sure anything will work and second, if some different construction will work, I don't know what it is.
    Can anyone answer these questions. Thanks in advance for your help.

    What? Are you some kind of genius?
    Yes that works perfectly. Thanks as always!
    Here's the rationale. The same basic form appears on many different pages. The only difference among the forms is the outcome of submitting the form. The form on different pages takes you to a different download page and a database column is marked to signify that the user downloaded that form. For instance:
    report_1_usr
    report_2_usr
    report_3_usr
    And so forth...
    Up to now each form has had to include the url variable so the submit would take the user to the right download page and it has had to include a unique reference to the correct database column.
    Now I can echo or insert that url variable all over the place, including the reference to the column name in the transaction, so I can use a single instance of the form and include it on all pages.
    Thanks for helping me figure out the last step.

  • Concatenating values of a particular column.

    Hi All,
       I have a requirement in which I  need to select the data in a particular column of a table and store it like a comma separated value. For example there is a table called employee and a field called employee name in the following manner
    EmpName
    John
    Mary
    Margaret
    I want to select these values and store it in a particular variable like for eg the variable name is store and store should be equal to John,Mary,Margaret. store = John,Mary,Margaret
    How to select these values and store it in a particular variable ?
    Thanks in advance.

    Hi,
    That's called String Aggregation.
    Starting in Oracle 11.2, you can use the built-in LISTAGG function, like this:
    SELECT    job
    ,         LISTAGG (ename, ',') WITHIN GROUP (ORDER BY ename)
                       AS ename_list
    FROM      scott.emp
    GROUP BY  job
    Output:
    JOB       ENAME_LIST
    ANALYST   FORD,SCOTT
    CLERK     ADAMS,JAMES,MILLER,SMITH
    MANAGER   BLAKE,CLARK,JONES
    PRESIDENT KING
    SALESMAN  ALLEN,MARTIN,TURNER,WARD
    For other techniques that work in various versions, see
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php

  • How to find out Particular column value in DB

    Hi All,
    I have to find out Particular column value in DB .can U tell me the Query for that.

    There is one way:
    Re: How to write the Query

  • Need help in hiding particular column of a table depending upon value

    Hi experts,
    I have developed a custom smartform and Print program.
    My problem is ..depending upon the data i recieve,...i have to hide a particular column.
    For example ... i have a table with 2 rows...one header and main row..This table has 3 column.
    I have to hide one of the column depending upon the data i recieve. So my output should have 2 rows and 2 columns.
    Please help.

    well vishwa u r right it wont work for multiple columns,
    then i guess this shud work.
    @thendral
    U can try like this create the rows with single column
    then print all ur text elements with spaces inserted manually between them with text editor then in conditions tab of the text elements specify ur condition according to what all u want to print.
    кu03B1ятu03B9к

  • Compare tables in two schemas for the table with particular column & value

    Hello All,
    I have a query to find out the list of table from a given schema to extract all the tables having a search column .
    ex :
    SELECT OWNER, TABLE_NAME, COLUMN_NAME FROM
    ALL_TAB_COLUMNS WHERE OWNER='<SCHEMA_NAME>'
    AND COLUMN_NAME='<COLUMN_NAME>'
    I want to compare two schemas for the same above query .
    Can we wirte a query on this - I am using SQL DEVELOPER , which has menu item - TOOL - database differneces to find the diffenence between two schemas but my requirement is to find the differences in two schemas for all the tables matching for a particular column ( as given in quer).
    Appreciate your help.
    thanks/Kumar
    Edited by: kumar73 on 29 Nov, 2012 1:50 PM

    Hi, Kumar,
    This is the SQL and PL/SQL forum. If you have a question about SQL Developer, then the SQL Developer is a better place to post it. Mark this thread as "Answered" before starting another thread for the same question.
    If SQL Developer has a tool for doing what you want, don't waste your time trying to devise a SQL solution. The SQL Developer way will probably be simpler, more efficient and more reliable.
    If you do need to try a SQL solution, then post some sample data (CREATE TABLE and INSERT statements for a table that resembles all_tab_columns; you can call it my_tab_columns) and the results you want from that data.

  • Dynamic value binding for InputTextField - Expression within an expression

    Hi,
    I have this requirement where I have to use an EL expression's output as a bean's property in the value attribute of a InputTextField. E.g.
              <h:dataTable value="#{entity.formats}" var="field">
                   <h:column>
                        <h:outputLabel value="#{field.shortDesr}"/>
                   </h:column>
                   <h:column>
                        <h:inputText value="#{*entity."+#{field.shortDesr}+*"}"/>     
                   </h:column>     
              </h:dataTable>
    The JSF page will be a generic one so the fields within a form will be dynamic and will be formed at run-time. Since the exact bean property(entity in the code above) for a particular field is not known before, it needs to be dynamicaly built
    To give more clarity. In the following snippet, i know that entity is the bean to be used but which property(XXX) the text field has to be bound is not known and needs to be assigned at run-time.
    <h:inputText value="#{entity.*XXX*"/>     
    Is this possible? Are there any direct JSF solution or work arounds for it? Appreciate your inputs.
    Thanks
    Ranjith

A: Dynamic value binding for InputTextField - Expression within an expression

Hi BaluSC,
Your solution is totally acceptable. But I was also looking for something that can make possible direct binding to the bean properties without going through a Map.
In the meantime, I worked around the problem by not using the DataTable. Instead I loop the collection and add the Form elements programatically (code given below). With this I am able to achieve the desired effect of binding directly to the bean's property. But I am hitting another problem now, On submit the form Seam throws up 'No active conversational context" error while binding the #{sdmManager.grid} attribute. Now, I am trying to figure out how to come across it.
JSF
     <h:panelGrid columns="2" binding="#{sdmManager.grid}">
</h:panelGrid>
Bean code
     public HtmlPanelGrid getGrid(){
     grid = new HtmlPanelGrid();
     List<UIComponent> children = grid.getChildren();
     Collection<FieldFormatData> formats = dataManager.getFieldFormatData();
     for(FieldFormatData format:formats){
          HtmlOutputLabel outputLabel = new HtmlOutputLabel();
          outputLabel.setValue(format.getShortDesr());
          children.add(outputLabel);
          HtmlInputText inputText = new HtmlInputText();
          inputText.setSize(10);
          inputText.setMaxlength(10);
          System.out.println("Binding ................................... " + format.getEntityField());
          inputText.setValueBinding("value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{entity."+format.getEntityField()+"}"));
          children.add(inputText);
     return grid;

Hi BaluSC,
Your solution is totally acceptable. But I was also looking for something that can make possible direct binding to the bean properties without going through a Map.
In the meantime, I worked around the problem by not using the DataTable. Instead I loop the collection and add the Form elements programatically (code given below). With this I am able to achieve the desired effect of binding directly to the bean's property. But I am hitting another problem now, On submit the form Seam throws up 'No active conversational context" error while binding the #{sdmManager.grid} attribute. Now, I am trying to figure out how to come across it.
JSF
     <h:panelGrid columns="2" binding="#{sdmManager.grid}">
</h:panelGrid>
Bean code
     public HtmlPanelGrid getGrid(){
     grid = new HtmlPanelGrid();
     List<UIComponent> children = grid.getChildren();
     Collection<FieldFormatData> formats = dataManager.getFieldFormatData();
     for(FieldFormatData format:formats){
          HtmlOutputLabel outputLabel = new HtmlOutputLabel();
          outputLabel.setValue(format.getShortDesr());
          children.add(outputLabel);
          HtmlInputText inputText = new HtmlInputText();
          inputText.setSize(10);
          inputText.setMaxlength(10);
          System.out.println("Binding ................................... " + format.getEntityField());
          inputText.setValueBinding("value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{entity."+format.getEntityField()+"}"));
          children.add(inputText);
     return grid;

  • Adding inputhelp to a particular column in tableview

    Hi experts,
      I need to display a particlular column by providing inputhelp in tableview.My requirement is to save the data entered in the tableview to the database. but in particlular coulmn v should select data from the inpuhelp.please help me out.Please anybody help me how should i make particular column as inputhelp in tableview. This is urgent requirement.
    Thanks in advance.
    Regards,
    sireesha

    Hi,
    Can anybody tell me whats wrong with the following script.and also can see the layout here.
    <script language="JavaScript" type="text/javascript">
              function pass_data()
                   if (top.window.dialogArguments) {
                   if ( document.form1.row_sel.value )
    top.dialogArguments.document.form1.tab01_6_2.value=document.form1.row_sel.value;
                   top.close();
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          <htmlb:tableView id              = "tab01"
                           table           = "<%= flights %>"
                           visibleRowCount = "14"
                           width           = "100%"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           onRowSelection  = "my_event"
                           selectionMode   = "SINGLESELECT" >
          </htmlb:tableView>
          <htmlb:inputField id      = "row_sel"
                            value   = "<%= rowselected %>"
                            visible = "false" />
    In this script am getting the following error:
    <b>top.dialogArguments.document.form1.tab01_6_2.value is null or not an object.</b>
    In the OnInputProcessing the event is getting triggered when i click on the row in tableview. And that selected value is also assigned to the inputfield.But in the layout am getting the above error.Can anybody pls help me out.I dont know the javascript.
    How should i pass this selected value to the inputfield in the parent window.
    Pls help me out.
    Thanks in advance
    Regards
    sireesha
    In the OnInputProcessing

  • Maybe you are looking for

    • Is there a way to hookup shuffle to standard iPod dock connector?

      I just got a brand new shuffle, looks real sharp and easy to use, it's my first one since I sold my 1st gen iPod Touch years ago. At that time, I hooked up an adapter (using standard dock connector) to my car's stereo system, through the back of it (

    • Automatic Clearing F.13 - Clearing Criterion

      Dear Forum, We are having problems with the open items clearing for payments made in foreign currencies (EUR) out of local currency account (USD). At the time of payment the system is posting the following entry - Dr. Vendor  - Doc Currency EUR Local

    • Help with formatting a Graph in Numbers on ipad

      I have created a spreadsheet to track the overall percentages of our kids basketball team free throws for the coaches. I then have it on a graph but the colunms are super close to each other (attached picture). I have tried to get it to spread them o

    • Authorization to Vendor Accout group in FBL1N

      Hi All, I want to restrict users in FBL1N based on the account groups. For example I want to authorize set of users to see a particular group in FBL1N. -- Syed Abid Hussain

    • How to handle Communication Exception

      Hi, Env: Weblogic 6.1 on SUN SOlaris. Once going through the clustering EJB's documents, I came across some documents which give informatio about clustering EJB's. There I fould that, in a clustered environment cluster aware session EJB's are deploye