How to change field text at  run time in alv

Hi all,
Following are the columns need to displayed in an alv. year shd be the year which was entered in the selection screen.
if the year entered was between 2001 and 2003 then the o/p(for year)  shd be as follows
Division/Name     Position     Management Level     year 2001     Year 2002      Year 2003
How can i achieve this. i have tried as follows:
  data : lv_yr1(4),
       lv_yr2(4),
       lv_yr3(4).
  clear: lv_yr1,
         lv_yr2,
         lv_yr3.
  lv_yr1 = s_date-low(4).
  lv_yr2 = s_date-high(4) - 1.
  lv_yr3 = s_date-high(4).
  perform fill_fieldcats using:
  'PERNR'         'GT_FINAL' '1'  'Employee No.'            ' '       ' ',
  'RTEXT1'        'GT_FINAL' '5'  'Year'  lv_yr1                ' ',
form fill_fieldcats using %fname
                          %tabname
                          %col_pos
                          %text_l
                          %text_m
                          %emphasize.
  gs_fieldcat-fieldname  = %fname.
  gs_fieldcat-tabname    = %tabname.
  gs_fieldcat-col_pos    = %col_pos.
  gs_fieldcat-seltext_l  = %text_l.
  gs_fieldcat-seltext_s  = %text_m.
  gs_fieldcat-emphasize  = %emphasize.
  append gs_fieldcat to gt_fieldcat.
  clear gs_fieldcat.
but the o/p i'm getting is only year. where shd i pass the value of year in the fieldcatalog?

Hi all,
My self resolved the issue.

Similar Messages

  • How to change field text in standard trasaction

    Hi,
    In XD01 transaction i need to change the standard field label, How difficult/easy is it to change field label of a SAP standard field? Is there any other way to change the screen text. please let me know.
    regards
    Jaya

    Hi Jaya,
    You can change the label on the screen directly - BUT this would be a modification.
    There is a way to change field labels without a modification, but that has to be done on the data element level.
    For that just find out the data element that is referenced and create a Text Enhancement for that Data Element which is NOT a modification.
    - Goto transaction CMOD
    - Choose Menu 'Goto'
    - 'Text Enhancements'
    - 'Keywords'
    - 'Change'
    - Put in the data Element Name and confirm
    - You'll have the possibility to change the Label texts for
         Short, Medium and Long Field Label
         Heading
         Short Description
    - Make your Changes and save
    - Done
    Where ever that data element is referenced you'll see your own text.
    Hope that helps,
    Michael

  • How to change the skin at run time

    I am using jDeveloper 11.1.1.3 for ADF.
    My UseCase: i want to give a dropdown for skins. User should be able to select the skin at run time and it should be loaded. Please let me know how can i achieve it.
    Zee

    As per usecase, looks like you have the LOV containing the different skins.
    You can ensure that the application is skinned according to the selected value in the LOV.
    Ensure that you have a session scope variable that is set, whenever you change the LOV.
    For more details, look into this link http://download.oracle.com/docs/cd/E14571_01/web.1111/e10140/skinning.htm
    Thanks for your reply, but then...... what will be the skin loaded by default before the user selects the skin - drop down. Do i have to set something default before hand .?Define the LOV such that there are no empty elements. i.e the first element in the LOV is selected.
    In the Managed bean, if the session scope is not set, return the skin family for the first element. This would be the scenario when the application loads.
    Thanks,
    Navaneeth

  • How to change the text of a button in ALV dynamically?

    Hi Gurus,
    I have a ALV with a button in the toolbar.Basically i have to change the button text each time the button is pressed.
    How can i do this?
    PS:points will be awarded

    On your alv model, first call if_salv_wd_function_settings~get_function( ID = <your ID> ). This will return you a reference of cl_salv_wd_function. If your function uses a button editor, do the following:
    data:
    lr_button type ref to CL_SALV_WD_FE_BUTTON,
    lr_function type ref to cl_salv_wd_function.
    lr_function = l_alv_model->if_salv_wd_function_settings~get_function( ID = <your ID> ).
    lr_button ?= lr_function->get_editor( ).
    lr_button->set_text( ).
    I have not tried this, but it should work.
    Regards
    Nithya

  • How to change dynamically text label at run time in the forms

    Hi,
    I am having a form in which i want to change the text label dynamically. I mean when a certain condition match then text label should be change and when condition does not match then the text label should reamin as it is in the same form.
    plz help
    thanks in advance
    azhar

    Hi,
    Use this code to change the label at run time.
    set_item_property('deptno',prompt_text,'pagal dept');
    Prompt_text is used for changing label at run time.

  • How to change the text of a user defined field in dynamic selections?

    Logical Database PSJ is used by t code CJI3 - we added a couple of user fields into the dynamic selections of CJI3.
    Now - how to change the text of this user filed (USR01 of structure PRSP_R in logical database PSJ)?
    Found an OSS note - 86980 - that tells that this is not possible.
    But when we read the documentation on the user field (CJI3 - dynamic selections  - double click on user field - F1), it shows the following text:
    User-defined field in which you can enter general information with a length of up to 20 characters.
    Dependencies
    The names (key words) for  user-defined fields depend on the field key.
    Now the question is where to change the field key..
    Thanks,
    Ven

    Madhu - you did not get the question I think.
    Anyways - I found an OSS note 1266643 - this code change should take care of the issue - it will then reflect the details maintained in custoizng at transaction code OPS1..
    Thanks,

  • How to change the text of a field in organisational assignment.

    hi gurus,
    how to change the text of field MSTBR (super visor) to a differnt name in info type pa0001.
    i have changed the field name in cmod , changed name appears in table.but it is not appearing in the info type screen 0001.
    how to resolve this pls help me..

    hi,
    The Field showing in the infotype 1 is FORPR.
    Change the text of this Field in CMOD.
    CMOD ->Go to ->tect Enhancements->keywords-> Change ->FORPR
    Change the text and check again.
    Regards,
    Manoj.

  • How to change the text under RECORD WORKING TIME IN ESS.

    Hi,
    How to change the text under RECORD WORKING TIME in ESS.
    Is there any setting at page or iview level?
    Please help me.
    Regards,
    Thirun.

    Hi,
    If it is standard business package ,then check home page framework
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0e3a488-cdc2-2b10-209b-e01a0ed934b4
    Regards
    Koti Reddy

  • How to check data type of the field symbol at run time

    Hi,
    My code is as following:
          LOOP AT <fs> ASSIGNING <wa_covp_ext>.
            ASSIGN COMPONENT 86 OF STRUCTURE <wa_covp_ext> TO <f_zzname>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 158 OF STRUCTURE <wa_covp_ext> TO <f_pernr>.
              IF sy-subrc = 0.
                  SELECT SINGLE sname INTO <f_zzname> FROM pa0001
                                WHERE pernr = <f_pernr>
                                AND endda GE sy-datum
                                AND begda LE sy-datum.
             ENDIF.
          ENDIF.
        ENDLOOP.
    This query is giving dump when <f_zzname> is type P length 8 and decimals 2, because it tries to put PA0001-sname into it which is type C length 30. So I want to check the type of <f_zzname> before the select statement. If it is character 30, then I will write the select statement else not.
    How to check data type of the field symbol at run time? If it's not possible, then can somebody suggest a workaround? Thanks.

    check this ...
    write describe statement  ...
    field-symbols : <f_zzname> .
    data : sname like pa0001-sname,
           typ(10).
    assign sname to  <f_zzname>.
    describe  field <f_zzname> type typ.
    write : typ. <-- typ contains character type in this case ..
    U can check if typ is of character(C) if so .. write the select statement ...

  • How to change the text of label dynamically

    Hi all,
    I have done a dynpro program.It requires to implement the dynamically display the label text, for example: there is a label, sometimes, we want to display "Purchase Order" and sometimes we want to display "Sales Order". Can anyone tell me how to change the text of label according to my requirements? thanks in advance!

    Hi Wei,
    AS of now you will not be able to change the Text Field ( Label ) dynamically or at runtime. This is a limitation.Refer to this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
    But, there is a way around.
    You can make a text field Visible / Invisible based on your program logic. So, based on what you want, you can process a module which will take care of that.
    Have a look at these DEMO Code. You can have a good idea to implement the logic.
    DEMO_DYNPRO_MODIFY_SCREEN - Demonstration of Dynamic Screen Modifications
    Thanks,
    Samantak.

  • How to change the text of a button dynamically in module pool

    hi gurus,
    how to change the text of button dynamically

    Hi ,
    Declare a variable in TOP Include with your button name.
    Example : P_BUTTON(20) TYPE C.
    Place button with name P_BUTTON on you screen. Do not forget to mark it as "Output Field". [ Double click on button, Attributes --> Program tab --> tick "Output Field".
    In you PBO / PAI , whereever you want to change your text -
    Assign value to P_BUTTON.
    Example -
    iF COND1..
    P_BUTTON = 'EDIT'.
    ELSEIF COND2.
    P_BUTTON = 'DISPLAY'.
    ENDIF.
    Regards,
    Mohaiyuddin

  • How to change standard text in(me33k)?

    How to change standard text in me33k (under Reference data : Dept/Proj Manager) field. I tried it changing in CMOD - under Goto in Text enhancements in Keywords then Change . I did this change and in table ekko-verkf I can see the change, but in me33k I cannot . Appreciate if anybody can  reply back soon and help me solve this issue? points awarded for sure.

    If u are talking about the text  related to a Contract by (Trx ME33K --> Header --> Texts --> Text Overview).
    Then u need to use the FM create_text and then put the import parameters as
    Text Name     =  (contract number)
    Language       = EN
    Text ID        = K00  Release order header  text put K01 for first item text K02 for second item text so on
    Text object    = EKKO       Purchasing doc. header texts
    and then call bapi_transaction_commit
    u ll be a ble to find the changes
    thnks
    kanishak

  • How do change the text color in the variable screen ?

    Hi Experts ,
    I would like to know about , How do change the text color in the variable screen ?
    Using web templates (Analytical) can get the output. It has the variable screen contains 6 fields (Company code, Country , Region , COB, Plant and Purchasing Group). I want to make RED color text on Plant. Please help me .
    Thank you ,
    Prasad.

    Hi,
    I am looking for nearly the same. What I have found is that it seems to manipulate the SAP theme that is used in standard when template is executed in the portal. Just display the source code of the HTML and there you will see the included SAP theme (normally SAP_TRADESHOW). Then you have to go to the SAP portal and change this stuff. But for that you have to know where to find it and what impact this change has.
    I am not pretty sure if this is the right way. But as I want to change the standard layout of a whole template to a customer specific layout I think there is no other way in BI7.0.
    Regards,
    Peter

  • How to create transparent image at run-time?

    How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...

    i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
    greetz
    chris

  • HoW to ChaNGE the text in the mobile application to be in MulTi-CoLoR text

    _*  Do anyone can tell me how to change the text in the mobile application to be in multi-color text, to make it more interesting and increase readability?
    Is it using the Graphic's paint() method? or any better suggestion?
    Please give the short example if can?
    Please help... "_"
    Hearing from u all soon...@_@
    thanks....

    Go into outline view. If you can see the outlines of the letterforms, you can't just change the text. If the letterforms are solid black, take the type tool, select the text and type yours.
    Anyway you can just select the letters, take the type tool and type new text.
    Working with the type tool is a basic. Please see the manual for details

Maybe you are looking for

  • Sony Handycam DCR-DVD105

    Hello, we have a sony handycam dcr-dvd105. We have had this for a few years now & we have never been able to put our movies onto either the macbook or mbp. Can someone please tell me what cable is needed to transfer the movies. I have asked many peop

  • Security Filter Problem

    Hi , I am facing one problem related to security Filter for one user. We are on the Hyperion Version 11.1.2.1 Fusion Edition. We had one user created in Shared Services with ID : TESTUSER and added in the group. Initially access for this user was wor

  • Load Balancing in Oracle AS10g

    Hi all, i have several applications deployed in my application server. Each application is deployed in his OC4J Container Application A is Deployed in OC4J Container - Container A I have configured container A, so that it starts 4 processes (i.e. 4 j

  • How can I change a title in I books

    I have a ton of PDF files in iBooks. The All have very vague titles. How can I retitle and organize? I'm on ipad2

  • Help sorting an array of objects needed please.

    I am trying to sort the array Students[] in descending order of Fees due. Using the code below I get a null pointer error at runtime. The array is not completely full, it has 20 cells, but the variable studentArrayCounter holds the number of used cel