Can't initialise dialog screen fields with values

Hi.
I have a dialog screen with 10 fields named
TXT_FILEDESC1, TXT_FILEDESC2, ...TXT_FILEDESC10.
I tried to initialise these 10 fields with the following codes, but I got an error message:
DATA: TXT_FILENAME TYPE ZDM_OF-FILE_NAME,
      TXT_FILEDESC TYPE ZDM_OF-FILE_DESC.
FIELD-SYMBOLS: <FS_TXT_FILENAME>, <FS_TXT_FILEDESC>.
MODULE PBO_9000 OUTPUT.
  SET PF-STATUS 'STATUS_9000'.
  SELECT FILE_NAME FILE_DESC FROM ZSCSDM_OF INTO TABLE SCREEN_INIT.
  LOOP AT SCREEN_INIT INTO SCREEN_INIT_LINE.
    SCREEN_INIT_NO = SY-TABIX.
    CONCATENATE 'TXT_FILEDESC' SCREEN_INIT_NO INTO TXT_FILEDESC.
    ASSIGN (TXT_FILEDESC) TO <FS_TXT_FILEDESC>.
    MESSAGE E002(ZMSGGARY) WITH TXT_FILENAME.
    <FS_TXT_FILEDESC> = SCREEN_INIT_FILEDESC.
    ENDLOOP.
ENDMODULE.                    "PBO_9000 OUTPUT
Runtime Error - A new value is to be assigned to the field "<FS_TXT_FIELDDESC>", although this field is entirely or partly protected against changes...
Could anyone share why I got the above error message when i try to run the program (Execute --> In A New Window)? Thanks.
null

I got the reason for the error. It's because I did not clear the contents of TXT_FILENAME before the next loop.
LOOP AT SCREEN_INIT INTO SCREEN_INIT_LINE.
<b>TXT_FILENAME = ''. ==> This solves the problem.</b>
CONCATENATE 'TXT_FILEDESC' SCREEN_INIT_NO INTO TXT_FILEDESC.
ENDMODULE. "PBO_9000 OUTPUT

Similar Messages

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • A function instead of UNBOUNDED PRECEDING (like "Last field with value=0")

    Hello,
    I have a table with many rows. The attributes of the table are code, month and value.
    For each code there are 12 months and 12 values.
    No I want to add the gaps between the months...
    Is it possible to count the following gaps between the different rows...?
    For example:
    Original table1:_
    code, month, value
    1,1,20
    1,2,0
    1,3,30
    1,4,0
    1,5,40
    1,6,0
    1,7,0
    1,8,20
    1,9,0
    1,10,10
    1,11,0
    1,12,0
    5,1,0
    5,2,20
    5,3,10
    description:*
    january value = 20
    february value = 0 (=>count this gap => new value 1 )
    march value = 30
    april value = 0 (=>count this gap => new value 1 )
    may value = 40
    june value = 0
    july value = 0 (=>count this two following gaps => new value 2 )
    agust value = 20
    september value = 0 (=>count this gap => new value 1 )
    october value = 10
    november value = 0
    december value = 0 (=>count this two following gaps => new value 2 )
    New target table:_
    code, month, value
    1,1,20
    1,2,*1*
    1,3,30
    1,4,*1*
    1,5,40
    1,6,0
    1,7,*2*
    1,8,20
    1,9,*1*
    1,10,10
    1,11,0
    1,12,*2*
    5,1,*1*
    5,2,20
    5,3,10
    I tried this code:
    select code, month
    sum(value) over (
    order by month
    rows between unbounded preceding and current row
    *) as final_value*
    from table1 order by month;
    This adds all following fields cumulative from beginning to current_row. But I need this adding only for the following gaps... then start with countin by 0.
    I need only the following like in the example on top. Maybe is there an other function like decode to count only the following gaps...!?
    A function instead of unbounded preceding....like "*Last field with value=0*" or something... ?
    Best regards,
    Tim

    TimB83 wrote:
    I have a table with many rows. The attributes of the table are code, month and value.
    For each code there are 12 months and 12 values.
    No I want to add the gaps between the months...
    Is it possible to count the following gaps between the different rows...?
    For example:
    Original table1:_
    code, month, value
    1,1,20
    1,2,0
    1,3,30
    1,4,0
    1,5,40
    1,6,0
    1,7,0
    1,8,20
    1,9,0
    1,10,10
    1,11,0
    1,12,0
    5,1,0
    5,2,20
    5,3,10
    description:*
    january value = 20
    february value = 0 (=>count this gap => new value 1 )
    march value = 30
    april value = 0 (=>count this gap => new value 1 )
    may value = 40
    june value = 0
    july value = 0 (=>count this two following gaps => new value 2 )
    agust value = 20
    september value = 0 (=>count this gap => new value 1 )
    october value = 10
    november value = 0
    december value = 0 (=>count this two following gaps => new value 2 )
    New target table:_
    code, month, value
    1,1,20
    1,2,*1*
    1,3,30
    1,4,*1*
    1,5,40
    1,6,0
    1,7,*2*
    1,8,20
    1,9,*1*
    1,10,10
    1,11,0
    1,12,*2*
    5,1,*1*
    5,2,20
    5,3,10
    ...Tim,
    you should post this question on the "SQL and PL/SQL" forum since it's a typical SQL question.
    There are probably much better ways to accomplish this and the guys over there will tell you, but here are two examples that might get you started:
    1. Pre-10g without MODEL clause
    with t as (
    select 1 as code, 1 as month, 20 as value from dual union all
    select 1 as code, 2 as month, 0 as value from dual union all
    select 1 as code, 3 as month, 30 as value from dual union all
    select 1 as code, 4 as month, 0 as value from dual union all
    select 1 as code, 5 as month, 40 as value from dual union all
    select 1 as code, 6 as month, 0 as value from dual union all
    select 1 as code, 7 as month, 0 as value from dual union all
    select 1 as code, 8 as month, 20 as value from dual union all
    select 1 as code, 9 as month, 0 as value from dual union all
    select 1 as code, 10 as month, 10 as value from dual union all
    select 1 as code, 11 as month, 0 as value from dual union all
    select 1 as code, 12 as month, 0 as value from dual union all
    select 5 as code, 1 as month, 0 as value from dual union all
    select 5 as code, 2 as month, 20 as value from dual union all
    select 5 as code, 3 as month, 10 as value from dual
    r1 as (
    select
            case
            when value = 0
            then 1
            else 0
            end as is_gap
          , case
            when value != 0
            then rownum
            else null
            end as grp_info
          , code
          , month
          , value
    from
            t
    r2 as (
    select
            last_value(grp_info ignore nulls) over (partition by code order by month) as grp
          , is_gap
          , code
          , month
          , value
    from
            r1
    select
            code
          , month
          , case
            when value = 0
            and (lead(value) over (partition by code order by month) != 0 or
                 lead(value) over (partition by code order by month) is null)
            then sum(is_gap) over (partition by code, grp)
            else value
            end as value
    from r2;2. 10g and later with MODEL clause
    with t as (
    select 1 as code, 1 as month, 20 as value from dual union all
    select 1 as code, 2 as month, 0 as value from dual union all
    select 1 as code, 3 as month, 30 as value from dual union all
    select 1 as code, 4 as month, 0 as value from dual union all
    select 1 as code, 5 as month, 40 as value from dual union all
    select 1 as code, 6 as month, 0 as value from dual union all
    select 1 as code, 7 as month, 0 as value from dual union all
    select 1 as code, 8 as month, 20 as value from dual union all
    select 1 as code, 9 as month, 0 as value from dual union all
    select 1 as code, 10 as month, 10 as value from dual union all
    select 1 as code, 11 as month, 0 as value from dual union all
    select 1 as code, 12 as month, 0 as value from dual union all
    select 5 as code, 1 as month, 0 as value from dual union all
    select 5 as code, 2 as month, 20 as value from dual union all
    select 5 as code, 3 as month, 10 as value from dual
    select
             code
           , month
           , value
    from
             t
    model
    partition by (code)
    dimension by (month)
    measures (value, 0 as gap_cnt)
    rules (
      gap_cnt[any] order by month =
      case
      when value[cv() - 1] = 0
      then gap_cnt[cv() - 1] + 1
      else 0
      end,
      value[any] order by month =
      case
      when value[cv()] = 0 and presentv(value[cv() + 1], value[cv() + 1], 1) != 0
      then presentv(gap_cnt[cv() + 1], gap_cnt[cv() + 1], gap_cnt[cv()] + 1)
      else value[cv()]
      end
    );Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Member selection xml is malformed, can't initialise dialog

    Hi,
    when I try to use a valid web form in smartview it works, until I try to change the default form variable to refresh data at which point I get; - Member selection xml is malformed, can't initialise dialog
    11.1.2.1.00 (Build 271) is my version.
    Anyone know a fix?
    thanks,
    Robert.

    Hi again.
    On further analysis this only manifests in our Entity dimension, the other dimensions' form variables function as they should.
    Is your question about substitution variables aimed at the underlying data content of the dimension, rather than the naming of the form variable, are you indicating that there are certain restrictive characters that if they appear in the data can cause this problem??
    If so is " all I need to look for, or are there any other characters (& : )? that can cause problems??
    thanks again,
    Robert.

  • Can I replace the screen myself with a kit on my iPod touch?

    Can I replace the screen myself with a kit on my iPod touch?   Stores are charging in excess of 100 dollars to fix them.

    Note, though, that if you do the repair yourself or have any unauthorized shop do it, you will void any further support from Apple, including having them replace the iPod for their out-of-warranty replacement fee.
    Regards.

  • Process on value request in Dialog screen based on value of screen field

    Hello Gurus,
    I have a check box on a dialog screen. If the checkbox is checked, based on that I want the other field on the same dialog screen to follow logic for F4 dropdown.
    Now I know if I want to write this, I have to write this in Process on value-request. But how do I get the value of the check box checked or not on the same screen in Process on value-request.
    If it had been a simple selection screen I would have defined the check box as
    Parameter: v_checkbox as checkbox user-command uc1.
    But how do I handle above situation in dialog screen case ?
    Please help.
    Regards,
    Jainam.
    Edited by: Jainam Shah on Sep 29, 2009 6:19 PM

    Hi Shah,
    You have the addition for MODULE statement as ON INPUT.
    Eg :  FIELD <screen field> MODULE <module> ON INPUT.
    You can give the check box field name in the above statement.
    If you want to find as soon as the check box is checked, you can find it here.
    Or else, in the addition ON REQUEST
      you can see for the check box field value whether it is checked or not.
    Thanks,
    Prasad

  • How to populate 2 screen-fields with one [ON VALUE-REQUEST FOR input] evnt?

    I have a selection screen with 2 text inputs - input1, input2.
    For the first one I have an "AT SELECTION-SCREEN ON VALUE-REQUEST FOR input1" event.
    I successfully get a value there and that is set to the screen field. But I also want input2 to be automatically populated with a value corresponding to the selected input1 (eg. input1=ID, input2=Name).
    I'm able to set input2 ABAP variable but not the screen-element.
    (I guess that ON VALUE-REQUEST doesn't fire any events for screen fields update, because if I press ENTER after using my search-help, then input2 is set with the right value)
    How to solve the problem?

    Hi Ramchander,
    Actually I used FM F4IF_FIELD_VALUE_REQUEST which doesn't have mapping parameters.
    But after your advice I looked through F4IF_INT_TABLE_VALUES_REQUEST and found that it's
    DYNP_VALUES_UPDATE FM that solves my task.
    Thanks!

  • Dialog screen fields: Can I name them dynamically in the modules?

    Hi.
    I am using dialog screens for my program.
    I need to dynamically refer to the screen fields on my dialog screen.
    I tried the following, but encountered errors:
    DATA: TXT_FILE(10) TYPE C VALUE 'TXT_FILE1'.
    MODULE GET_FILE10.
        (TXT_FILE) = XFILETABLE-FILENAME.
      ENDIF.
    ENDMODULE.            
    Error encountered: Field "(TXT_FILE) is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement.

    Try using field symbols here.
    DATA: TXT_FILE(10) TYPE C VALUE 'TXT_FILE1'.
    MODULE GET_FILE10.
    Field-symbols: <fs>.
    assign (txt_File) to <fs>.
    <fs> = XFILETABLE-FILENAME.
    ENDMODULE.
    Regards,
    Rich Heilman

  • Search help on a field with value range

    Hi,
    I have a z-table. One of its fields has a z-data element with z-domain which has a value range. I have a requirement to add a search help on selection screen field which is parameter for mentioned field of my z-table. How can I do that?
    Tnx in advance,
    Nati

    Hi,
    Where you want to add the search help, i mean in report or in screen painter.
    In Screen painter, you can take the reference of Z-Data Element by Dictionary option in Screen layout.
    If it is report, you can use F4 function module(F4IF_INT_TABLE_VALUE_REQUES) or can creat the elementary search help in DDIC and give it as MATCHCODE OBJECT in PARAMETER statement.
    Regards,
    Chandu

  • Custom field in SRM as a dropdown field with values stored in R/3

    Hi all,
    I need help with custom drop-down field in SRM 5.0 shopping cart. We need to create custom field called Location in SRM goods receipt transaction. And this location field will be a drop-down field that will be filled with values from locations stored in R/3. I would really appreciate if someone can help me achieve this.
    Regds,
    Kim

    Hi,
       Just attach a  custom search help to this field and then in the search help EXIT(RFC enabled Function module) write the logic to reterive the values from R/3.
    BR,
    Disha.
    Pls reward points for useful answers.

  • Table with a dropdown field with values.....

    Friends, I opened this new thread with my good explanation whatim looking for . sorry for this.
    I have a table:
                        col1            col2               col3
    row1              r1c1           r1c2               r1c3
    row2              r2c1           r2c2               r2c3
    row3              r3c1           r3c2               r3c3.
    I need col2 to be dropdown. Here when doinit default data is being passed to this table. Now when the WDA loads, i want col2 to be dropdown, but with only one value. whatever i have in backend.Here intially i want to disable col2. User should not hcange it.
    But when i hit ADDNEWROW button, it shoudl create row4,  with some (i m writing a query to fetch col2 values) values in the dropdown. User should be able to select any value here.
    The r1c2 and r2c2, r3c2, should not change on ADDNEWROW.  they should remain the same.
    Hope this time i explained you correctly, and im expecting ur replies friends...
    Kindly respondg back to me. thanks to all in advance,
    Niraja

    Hi Niraja,
    Please refer the code below for filling drop down in table.... this is hard coding i.e. i m filling value directly with out using database table .now wht u have to do is that you have to create an internal table with two column one key and one value. select data from database into internal table. thn just replace hard coding with the value and key column of internal table
    Please note SAP doesnt recommend usage of select query in WD abap. use any FM instead.
    DATA LR_NODE_INFO TYPE REF TO if_wd_context_node_info.
    data ls_value type wdy_key_value.
    data lt_value_set type wdy_key_value_table.
    ls_value-key = 'a'.
    ls_value-value = 'APPLE'.
    append ls_value to lt_value_set.
    ls_value-key = 'b'.
    ls_value-value = 'BANANA'.
    append ls_value to lt_value_set.
    ls_value-key = 'c'.
    ls_value-value = 'GRAPES'.
    append ls_value to lt_value_set.
    ls_value-key = 'd'.
    ls_value-value = 'MANGO'.
    append ls_value to lt_value_set.
    lr_node_info = wd_context->get_node_info( ).
    lr_node_info = lr_node_info->get_child_node( 'CN_UITABLE' ).
    lr_node_info->set_attribute_value_set( name = 'CA_COLUMN2' value_set = lt_value_set ).
    As suggested by Stefan you can make the read only field by using enable property.
    regards Pranav
    Edited by: Pranav Nagpal on Nov 21, 2008 5:55 AM

  • Hide or Show the Dialog Screen Field in a SAP Transaction

    Hi All,
    I am working on a SAP Upgrade Project (4.6C to ECC 5.0). In VA03 Transaction, There is a Filed Name VBAK-KTEXT with Field Text as “Description” appears in 4.6C. But it does not appear in ECC 5.0. I checked the screen Layout in 4.6C as well as ECC 5.0 and noticed that VBAK-KTEXT is available in the Layout of ECC 5.0 but does not appear in the Transaction VA03.
    I was told that there is a way in Customization to Hide or Show a Screen Field for any Transaction. Can any one please guide me through this? I need this help as soon as possible.
    Thanks,
    Kannan.SA

    Hi,
    I am not sure if there's a tcode using which you can configure all the screens the only tool I know that can do this is GUIXT. Regarding the configuration some of the fields are configurable based on document types you should check with SD functional person regarding this. Unfortunately I don't have R/3 access right now, but you can look under SPRO in SD and look for document type.
    thanks

  • Is it possible to prefix a field with value in search layout in CRMOnDemand

    Hi Folks,
    We have a requirment where customer wants to prefix Service Request No field with "489124-" in the search layout,so that the agent can type in the remaining part of the SR number in the search layout w/o having to type "489124" every time as it is same for every SR that is created in the system.
    Any help/ thoughts / ideas are appreciated.
    Cheers!!!
    Deepak Veearavalli.
    Edited by: Deepak Veeravalli on Nov 30, 2010 1:34 PM

    Hi,
    Thank you for your response. Am sorry I couldn't get what exactly you meant. I Would be greatful if you could provide/elaborate in detail as how it needs to be done. Also please provide an example as how to do that.
    Cheers!!!
    Deepak.

  • Change Dialog Screen Field Position Dynamically

    Hi
    Can I change screen field position at runtime?
    I saw that in the SCREEN Structure there aren't any fields to set the position. Is there a Function Module or a Class to do that?
    Thanks,
    Eyal

    Hi Eyal,
    Good Question.
    1. R/3 abap does not allow this facility.
    2. However, if we use a custom control /container,
       then there one property LEFT, TOP,
      which is avaialbe in the OO hierarchy.
      CL_GUI_OBJECT  1 
      CL_GUI_CONTROL 2  <----
      ... CL_GUI_ALV_GRID, ETC. ETC.
    3. This 2 has got this property
    4.  we can use like this.
      CALL METHOD grid->set_top
        EXPORTING
          top        = 1500
        EXCEPTIONS
          cntl_error = 1
          OTHERS     = 2.
    5. I tried but i don't know why its not working.
    regards,
    amit m.

  • Can't lock the screen anymore with a password

    I can't lock the screen anymore since I installed Mavericks. I have assigned a password to the screensaver in the system preferences, but when I activate the screensaver on my iMac 8,1 it does not ask for the password when I wake it up from sleep. I have checked the option in the security preferences that the Mac should ask for a password immediately.
    Any idea how the enable the password?

    Okay, the problem is solved. I don't really know how - I just restarted the mac several times and now it works.

Maybe you are looking for

  • Error when printing reports from forms in Linux

    Im having an error when printing a report from a form. The problem is, only with certain forms. when printing a report (to PDF) from other forms, it prints with no problems. The oracle is 10g AS and operating system is Redhat AS 3. The error, in the

  • Reroute some vrf traffic between 2 sites over redundant link

    hey guys, We have a single client (in vrf) with 2 sites in different states and running over our mpls core.. Our primary link in our core is experiencing degredation of service and want to route this client over our redundant link while keeping all o

  • NOKIA 5800 Xpressmusic software updates

    Hello, its been 3 months since v60.0.003 has been released and it is still not available for my phone phone model: 5800 xpressmusic product code: 0596011 software version: v52

  • Power Not Charging 100%

    Dear Support Tech Team, My computer is using: Lenovol G480. After My Lap had finished updating windows, My Adater not charging 100%. Ussually, Power charged at 50 ~ 60%. Plz check & feedback for me the way to Repair its. Tks & Best Regard. Huu Thuan

  • External and Proxy User

    Hi, I currently have 2 users: APP_USER and OPS$APP_USER (External). I have granted OPS$APP_USER to be able to proxy authenticate APP_USER. As it is now, my external user can connect to the database like so: sqlplus /And I can connect via proxy auth l