Making view fields to output fields dynamically

Hi,
I have a maintainance view. One of the fields contains a checkbox. If I check the checkbox i want to change input fields of that row to output fields. And if I uncheck the checkbox, the viceversa should happen.
I tried doing this by calling a module in PAI block. In that module I looped through the screen structure and made screen-input = 0 for the fields I want to make as output fields.
But I dont get the result.
Can anyone help me out as how I can do this?
Thanks,
Reena

Hi Prashant,
I already tried as you said but by giving screen-input = 0 as I want to make the fields as output fields. But it doesn't work. When i debug, I find the function module gets called and screen-input value for fields is set to 0. But I dont see the result in the view.
I guess that screen-input is getting reset back to 1 after my module is called. So I am not sure if i am calling my module from the right place.
Here is my PAI block. The code in bold below is where i am calling the module. Is it the right place?
PROCESS AFTER INPUT.
  MODULE liste_exit_command AT EXIT-COMMAND.
  MODULE liste_before_loop.
  LOOP AT extract.
    MODULE liste_init_workarea.
    CHAIN.
      FIELD v_t5asrmsgmap1s-msgty .
      FIELD v_t5asrmsgmap1s-msgid .
      FIELD v_t5asrmsgmap1s-msgno .
      FIELD v_t5asrmsgmap1s-msgtxt .
      FIELD v_t5asrmsgmap1s-hide_message .
      FIELD v_t5asrmsgmap1s-alt_msgty .
      FIELD v_t5asrmsgmap1s-alt_msgid .
      FIELD v_t5asrmsgmap1s-alt_msgno .
      FIELD v_t5asrmsgmap1s-alt_msgtxt .
      MODULE check_fields_view1s.
      MODULE set_update_flag ON CHAIN-REQUEST.
      MODULE complete_v_t5asrmsgmap1s ON CHAIN-REQUEST.
    ENDCHAIN.
    FIELD vim_marked MODULE liste_mark_checkbox.
    CHAIN.
      FIELD v_t5asrmsgmap1s-msgty .
      FIELD v_t5asrmsgmap1s-msgid .
      FIELD v_t5asrmsgmap1s-msgno .
      MODULE liste_update_liste.
    ENDCHAIN.
<b>    chain.
      FIELD v_t5asrmsgmap1s-hide_message .
      module on_hide_message.
    endchain</b>.
  ENDLOOP.
  MODULE liste_after_loop.
-Reena

Similar Messages

  • How to hide a form view field dynamically based on condition?

    Actually I have two dropdowns. First dropdown has two entries( Yes and No). If I select YES in the first dropdown then second dropdown will get hide as well as if I select NO in first dropdown then the second dropdown will be show as mandatory(*) and populate with some entries.
    Kindly help me out with the code.
    Regards
    Munna.

    Hi Munna,
    You can control the dynamic field hiding by using the form iterator class.
    Please follow the below step to hide the field,
    First create custom class with interface IF_CHTMLB_FORM_ITERATOR, then add the code in RENDER_CELL_START and constructor methods.
    You need to add the below code in your .htm page
    lr_form_iterator type ref to "new class name.
    create object lr_form_iterator
      exporting iv_context_node = BTCUSTOMERH iv_opport_h = BTOPPORTH.( these are context nodes you need to pass which are having your fields, so that you can access the fields inside the render_cell_start method)
      cl_chtmlb_config=>set_iterator( lr_form_iterator ).
    You need to write the code in Render_cell_start method of the new class. You need to access the context nodes to the new class and then use them to get the field1 value. If the field1 value is YES you can set empty instance to the EV_REPLACEMENT_BEE for the field2.
    lv_current = gv_context_node->collection_wrapper->get_current( ). " you can set the gv_context_node in constructure method.
        IF lv_current IS BOUND.
          lv_current->get_property_as_value(
                                  EXPORTING
                                    iv_attr_name = 'Field1'
                                  IMPORTING
                                      ev_result = lv_trailclass ).
        ENDIF.
    data: lv_bee TYPE REF TO cl_bsp_bee_table.
    if field1 = YES.
    Case iv_bidnding_string
    when 'Field2'.
    create object lv_bee.
    EV_REPLACEMENT_BEE = lv_bee.
    endcase.
    You can use the below link for more details
    Change Property of the Label and Input field in UI for Form View - Part 2
    For the second issue, you can achieve it by modifying the get p and Get V method of the second attribute.
    let me know if you need more clarification on this.
    Best Regards,
    kasi.

  • Adding field dynamically on screen.

    Hi All,
    I have to add fields dynamically on screen based on the no. of data records.
    Is there any way to add field dynamically.
    I need field like this:
    first a check box       second not editable field  third editable field.
    Table control is another way to solve the problem but only constraint about check box.
    Please help me find out any solution.
    Thanks in advance.
    Piyush Mathur

    write your code as :
    AT SELECTION-SCREEN OUTPUT.
    for making data set 2# inactive
      IF rdt1 = c_x.
        LOOP AT SCREEN.
          IF screen-name EQ 'S_BELNR-LOW' OR
             screen-name EQ 'S_BELNR-HIGH' OR
             screen-name EQ 'P_GJAHR'.
            screen-input ='0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    for making data set 1# inactive
      IF rdt2 = c_x.
        LOOP AT SCREEN.
          IF screen-name EQ 'S_BUDAT-LOW'
             OR screen-name EQ 'S_BUDAT-HIGH'
             OR screen-name EQ 'S_KUNNR-LOW'
             OR screen-name EQ 'S_KUNNR-HIGH'
             OR screen-name EQ 'RDS1'
             OR screen-name EQ 'RDS2'.
            screen-input ='0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    END-OF-SELECTION.

  • View Fields Not Getting Displayed in View Set

    Hi All
    I have created a new View for Component IUICMDC and assigned it to a ViewSet and on click of a button i need to display this view . The navigation is happening fine but i am not able to see View Fields in it , only ZIUICMDC/AdvSearchVS is getting displayed on top of the page.
    View Area is defined and Debugger is stopping in the Do_init method of View which is assigned to ViewSet.
    Regards
    Alok Sharma

    You should provide the ability to create rows, you can do it on the table by making the table editable and putting a Add another row or you can choose to add it in a drill down create page.
    You can also add a set of new rows initially by creating and inserting rows in the vo in your PR.

  • Making selective fields editable in adobe form [using web dynpro]

    Hi,
    I have displayed an adobe form using web dynpro application. But I have to make certain fields (not all fields) on this adobe form editable. I dont want to make this adobe form interactive because I dont have to save any data in database. The data entered in the editable fields will be saved as a pdf.
    What I did so far:
    1) The fields which I want as editable,  I have given there type as "User entered/ optional" & for rest of the fields I have given type as "Read only".
    2) In web dynpro, I have enabled the adobe
    3) This is not making the fields editable.
    4) If I write the following code in my webdynpro method WDDOMODIFYVIEW, then my data coming from adobe is not getting displayed even though the fields get selectively editable.
    *data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
    *LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    *check first_time = abap_true.
    *LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT('adobe').
    *LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
    *LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    Any inputs regarding this??
    Thanks & Regards.

    Hi,
    Like I had mentioned using the following code in my webdynpro method WDDOMODIFYVIEW, my data coming from adobe form was not getting displayed even though the fields get selectively editable.
    *data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
    *LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    *check first_time = abap_true.
    *LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT('adobe').
    *LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
    *LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    So I kept this code & I also kept the Interface type "ABAP Dictionary based".
    Additionally in Webdynpro, I used adobe form generated FM to get the adobe content & passed it to the "content" parameter of my adobe component in webdynpro.
    Thanks & Regards.

  • Pass value to a field dynamically..

    Hi Experts,
    Can any one solve this issue?.
    I want to pass value to different fields dynamically..
    Egu2026
    I have work are having fields
    lwa_table-var1,
    lwa_table-var2,
    lwa_table-var3,
    lwa_table-var4,
    u2026.. up to lwa_table-var100.
    My logic is I have to pass l_tot value .. based on the last letter like below.
    if l_tot value is 1 we have pass to lwa_table-var1
    if l_tot value is 2 we have pass to lwa_table-var2
    if l_tot value is 3 we have pass to lwa_table-var3
    if l_tot value is 100 we have pass to lwa_table-var100.
    <removed_by_moderator>
    Thanks in advance.
    Regards,
    Kumar.
    Edited by: Julius Bussche on Aug 12, 2009 8:41 AM

    Hi Friend,
    U can do Following.....
    data:  text(12) type c.
    data : num type n.
    data: int type i.
    data: begin of wa_test,
          var1,
          var2,
          var3,
          var4,
          end of wa_test.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    do 4 times.
      int = int + 1.
      num = int.
      CONCATENATE 'wa_test-' 'var' num into text.
      ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
      UNASSIGN <fs_wa>.
    enddo.
      write : wa_test-var1 , wa_test-var2 , wa_test-var3 ,wa_test-var4 .
    ouput will be :     1 2 3 4.
    Lets take Your Scenario----
    >>>>>>>>>>>>>>>>>
    Data: begin of lwa_table,
    Var1,
    Var2,
    Var3,
    u2026..
    u2026u2026
    Var100,
    End of lwa_table.
    Data: l_tot type i.
    u2022     For example l_tot = 36.
    u2022     Then u want to pass the same to lwa_table36.
    For this do followingu2026..
    Now Define-->>>
    data: text(13) type c.
    data : num type n.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    *Now till now we done all the data definitions now u have to do following to pass it dynamically,
    l_tot = 36.
    Num  =  l_tot.
    CONCATENATE lwa_table-' 'var' num into text.
    ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
    UNASSIGN <fs_wa>.
    Write : lwa_table-var36.
    Output will be 36.
    Hope this resolves ur issue,
    Regards,
    Akash Rana
    Edited by: AKASH RANA on Aug 12, 2009 8:53 AM

  • How to change the attributes of screen fields dynamically

    <b></b>
    well i have created a table by name empmaster_data with following fields.
    *emp_id.
    *emp_fname.
    *emp_lname
    *dob.
    *doj.
    *dept.
    *desig.
    now using a single screen i want to create,change and display the information.even i am using save and exit button.
    now i want to change the attributes of screen fields dynamically like active,input,output,invisible.

    Hi,
    Have Different Radio Buttons for the purposes what you have and use AT Selection Screen Output, Under the event Use loop at screen and with continue with your requirement.
    Hope This Info Helps YOU.
    <i>Reward Points If It Helps YOU.</i>
    Regards,
    Raghav

  • How to update screen fields dynamically

    Hi,
    Can any one help me in updating screen field dynamically using so_expr, so_where,so_flds

    Hi,
      Use this type of logic. Though this code is for selection-screen, but you can use this type of logic for screens by using screen table and implement this logic in PAI.
    REPORT z_sdn.
    PARAMETERS:
      p_num RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND abc,
      p_char RADIOBUTTON GROUP rad1.
    PARAMETERS:
      p_num1 TYPE i MODIF ID num,
      p_num2 TYPE i MODIF ID num,
      p_char1 TYPE c MODIF ID chr,
      p_char2 TYPE c MODIF ID chr.
    AT SELECTION-SCREEN OUTPUT.
      IF p_num EQ 'X'.
        LOOP AT SCREEN.
          IF screen-group1 EQ 'CHR'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN.
          IF screen-group1 EQ 'NUM'.
            screen-active = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Regards
    Abhijeet

  • How to download only some fields(dynamically) from alv grid layouts

    I have ALV grid list.
    I have layouts for selecting sets of fields dynamically.
    If I select a particular layout, I want to download only those fields into an Excel sheet.
    If I select another layout, I want to download only fields of that layout , into an Excel sheet.
    Can u plz write examples.
    Narendra

    Hello ,
    Here it is.
      FIELD-SYMBOLS <FS> TYPE ANY.
      DATA: GR_ATTACHMENT TYPE Z48S3_ATTACHMENT,
            GT_ATTACHMENT TYPE Z48S3_ATTACHMENT_TAB,
            L_F_TITLE     TYPE SO_OBJ_DES,
            L_R_FIELDCAT  LIKE LINE OF GT_FIELDCAT,
            L_F_FIELD     LIKE L_R_FIELDCAT-FIELDNAME,
            L_F_EMAILID   TYPE Z48S3_RECEIVER,
            L_F_FIRST     TYPE C.
      IF SY-SYSID EQ G_C_DEV_SYSTEM OR
         SY-SYSID EQ G_C_QUA_SYSTEM.
        CONCATENATE SY-SYSID '/' SY-MANDT ':' INTO L_F_TITLE.
        CONDENSE L_F_TITLE.
        CONCATENATE L_F_TITLE SY-TITLE INTO L_F_TITLE SEPARATED BY SPACE.
      ELSE.
        L_F_TITLE = SY-TITLE.
      ENDIF.
      G_R_VARIANT-REPORT = SY-REPID.
      G_R_VARIANT-VARIANT = P_VARIAN.
      CALL FUNCTION 'REUSE_ALV_VARIANT_SELECT'
           EXPORTING
                I_DIALOG            = 'N'
                I_USER_SPECIFIC     = 'A'
                I_DEFAULT           = 'X'
                IT_DEFAULT_FIELDCAT = G_T_FIELDCAT
                I_LAYOUT            = GR_LAYOUT
           IMPORTING
                ET_FIELDCAT         = G_T_FIELDCAT
                ES_LAYOUT           = GR_LAYOUT
           CHANGING
                CS_VARIANT          = G_R_VARIANT
           EXCEPTIONS
                ERROR_MESSAGE       = 4
                OTHERS              = 4.
      SORT G_T_FIELDCAT BY COL_POS.
      PERFORM CREATE_EXCEL_ATTM_HEADING_ROW TABLES GT_ATTACHMENT
                                                   G_T_FIELDCAT.
      LOOP AT G_T_ALVLIST.
        L_F_FIRST = 'X'.
        LOOP AT G_T_FIELDCAT INTO L_R_FIELDCAT WHERE NO_OUT IS INITIAL.
          CLEAR GR_ATTACHMENT-XNEWLINE.
          IF NOT L_F_FIRST IS INITIAL.
            GR_ATTACHMENT-XNEWLINE = 'X'.
            CLEAR L_F_FIRST.
          ENDIF.
          CLEAR L_F_FIELD.
          CONCATENATE 'G_T_ALVLIST-' L_R_FIELDCAT-FIELDNAME
                 INTO L_F_FIELD.
          CONDENSE L_F_FIELD.
          ASSIGN (L_F_FIELD) TO <FS>.
          WRITE <FS> TO GR_ATTACHMENT-FIELDVALUE.
          UNASSIGN <FS>.
          APPEND GR_ATTACHMENT TO GT_ATTACHMENT.
        ENDLOOP.
      ENDLOOP.
    Regards,
    Vasanth

  • Short Dump while making a fields as required in BDT object screens

    Hi,
    I'm making a field as "required" by checking the required button on that field in the BDT screen.
    But am getting a short dump when I'm trying to use that screen.
    It seems like some data is getting converted to bad format due to this (am not fully sure about it.)
    Any idea on this.
    Thanks & Regards,
    Vipul.

    Hi Pinaki,
    The entire functionality is working absolutely perfect if I dont check that field as "Required" .
    I'm not sure if I'm missing some customising or is it a problem with BDT.
    Thanks & Regards,
    Vipul.

  • PDF Form javascript for making readonly field by using button

    Please let me know the PDF Form JavaScript for making selected fields(Text field,Drop down list,..) as read-only by using Button.

    Do you want your button to be made read only?
    One starts with Acrobat JS Reference.
    // make all fields in a form read only;
    var oField; // variable for field being processed;
    // loop through the form fields;
    for (var i = 0; i < this.numFields; i++) {
    // process each field name;
    oField = this.getField(this.getNthFieldName(i)).readonly = true;

  • How to add form fields dynamically

    Hi
    I have a form with several fields, and in one section I have one check box and two text fields in a row and also have one button "Add more"
    when I click on the Add more button I need to create one more row with the above fields dynamically.
    how can I do it? Could some one suggest me with any code snippet?
    thanks,
    Suman K

    Use custom tags.
    Create all the new fields on the JSP page using custom tags ... i,e through Java code.

  • Calculated Field formula not appearing in Power View Field List panel

    Hi,
    On Power View1 sheet of this
    workbook, the two PowerPivot calculated Field formulas (First Visit and First date of FY) are not appearing in the Power View Fields panel on the right hand side.
    I want to drag client and First Visit (calculated Field) to the Power View.
    Why is this happening?
    Regards, Ashish Mathur Microsoft Excel MVP www.ashishmathur.com

    I found a workaround for it - I was having the same problem as you. I wanted to display the last refresh date of my data, but Power View wouldn't display a date resulting from the [Last Refresh]=MAX(Date[Date]) formula.
    HOWEVER, a Pivot Table can handle that Calculated field just fine. So I renamed my measure "Refreshed Date" and added another tab in the Excel Sheet. I added a Pivot Table from PowerPivot into cell A1 and the only thing I put was that single
    measure (A2). To the right of that, I did =A2 and created an Excel Data Table. The title of that was "Last Refresh". Now, I could add that Data Table to the PowerPivot Model and into Power View. And then I hid that tab.
    The only downside to this method, is that if you're refreshing single tables at a time, you have to remember to refresh the Pivot Table when new data is added AND update the data in the model. I'm only connecting to one database, so I just choose
    "Refresh All" in Excel and it updates everything. It works perfectly! :)
    Well shoot, I even took a screenshot that helped explain everything, but it won't let me post it because my account isn't verified and it won't tell me how. If you have any questions, please let me know and I'll clarify!

  • How to change the Display Pattern for Decimal Fields dynamically

    hi all,
    Can any one help me how to change the display pattern for decimal fields dynamically???
    Currently I am using z,zzz,zzz,zz9.999 Display pattern for Quantity Field. If the value is blank it is displaying as 0.000 on the Screen. But I don't want this to be printed.
    Please help me how to solve this ASAP.
    Thanks,
    Prabhu

    Hi,
    Alternatively you can handle it in the context.
    In the context area, click on the quantity. In the bottom, click on the conditions tab, and put a condition
    <quan field> NE initial.
    So the field will not be printed if there is no value.
    Regards,
    Vidya Chowdhary A.

  • View Field Formatting in the Active Studio:

    Hi
    View Field Formatting in the Active Studio:
    I need to format a date type using the Brazilian format: “dd/mm/yyyy”.
    How can I create this format? What do I do to show this format?
    Alexandre

    Any ideas?
    Thanks
    Alexandre

Maybe you are looking for

  • How to call a stored procedure which has out parameter value

    my code is public Connection createConnection() {                Connection conn = null;                     try {                          Class.forName(DRIVER);                          conn = DriverManager.getConnection(URL,USER,PASS);            

  • MDX - how to calculate the sales between a certain period and the currentmember with a max date

    Hi all, 1)I need to calculate the sales between W1 and the currentmember, but the max date should be W20. How can I solve this in MDX? MEMBER [Measures].[Q1 act.period to date sales] AS Sum( [Date invoice].[Bonus calendar - Week].[Bonus week of year]

  • Why is query so slow?

    Hi all, I am trying to get a count of all files that are inside a regular folder (not universe folder). My query is below, but it is SOOO slow IInfoObjects rFiles = infoStore.query ("SELECT SI_NAME FROM CI_INFOOBJECTS WHERE SI_KIND IN ('FullClient',

  • SID changing

    Hi all, We  are planning to create a new test system from Dev and in process we have to change the SID  and Logical name of the system, how to change  the SID and LSN. After creating the syetm we have to upgrade the system is itpossibule to change he

  • I tried uploading my mp4 and mov in premier Cc 2014 ?

    But it Has the audio but no video, its just a green screen, please help