Reading contents of a field from a screen

Hi all,
     Is there a way to read the contents of a field in a particular screen. I want to read the data entered into  a particular field on a screen into the BADI and implement the logic based on the contents of the field.
Thanks.
Neha.

Hi,
You can use following code
data: it_dynpfields type STANDARD TABLE OF DYNPREAD,
      wa_dynpfields type dynpread.
wa_dynpfields-fieldname = 'CURR_PHASE'.
append wa_dynpfields to it_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
  EXPORTING
    dyname                               = SAPLCRM_1O_MANAG_UI
    dynumb                               = "<screen number where field is defined>
*   TRANSLATE_TO_UPPER                   = ' '
*   REQUEST                              = ' '
*   PERFORM_CONVERSION_EXITS             = ' '
*   PERFORM_INPUT_CONVERSION             = ' '
*   DETERMINE_LOOP_INDEX                 = ' '
*   START_SEARCH_IN_CURRENT_SCREEN       = ' '
*   START_SEARCH_IN_MAIN_SCREEN          = ' '
*   START_SEARCH_IN_STACKED_SCREEN       = ' '
*   START_SEARCH_ON_SCR_STACKPOS         = ' '
*   SEARCH_OWN_SUBSCREENS_FIRST          = ' '
*   SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
  tables
    dynpfields                           = it_dynpfields
EXCEPTIONS
   INVALID_ABAPWORKAREA                 = 1
   INVALID_DYNPROFIELD                  = 2
   INVALID_DYNPRONAME                   = 3
   INVALID_DYNPRONUMMER                 = 4
   INVALID_REQUEST                      = 5
   NO_FIELDDESCRIPTION                  = 6
   INVALID_PARAMETER                    = 7
   UNDEFIND_ERROR                       = 8
   DOUBLE_CONVERSION                    = 9
   STEPL_NOT_FOUND                      = 10
   OTHERS                               = 11
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
hope it helps

Similar Messages

  • Read contents of changing fields from internal table

    Hi Folks,
    Please help me in my query below:
    Consider there is a Z-table with two fields TABNAM and FIELD having values KNA1 and NAME1 respectively.
    In my report I have fetched entries for customers from KNA1. Now based on the field from Z-table I want to populate a variable suppose V_FREE_VAR with the value from KNA1 table.
    Here V_FREE_VAR is of CHAR200 so that it accomodate all types of values from KNA1.
    The value of Z-table FIELD can change daily i.e next day the value may be PSTLZ.
    So how can I read the particular field from internal table as the field to be read is dynamic.
    Note: using case is not feasible.
    Thanks in advance.
    Regards,
    Shardul

    @Hartmut P
    As Rob said i want to get the value of the field from internal table. the code is something like this.
    I_KNA1 contains records for customers.
    Suppose values of Z-table are in internal table I_TEMP_TABLE.
    Entries in I_TEMP_TABLE are as follows
    TABNAME      FIELDNAME
    KNA1                 NAME1
    The value of FIELNAME in Z-table can be changed
    Loop at I_TEMP_TABLE into WA_TEMP_TABLE.
    Read I_KNA1 into WA_KNA1 with key KUNNR = '0001002234'.
    IF SY-SUBRC EQ 0.
       CASE WA_TEMP_TABLE-FIELDNAME.
            WHEN 'NAME1'.
                 V_VAR = WA_KNA1-NAME1.
             WHEN 'PSTLZ'
                  V_VAR = WA_KNA1-PSTLZ.
    ENDIF.
    But using case is not appropriate as KNA1 contains 176 fields.

  • Merge omitting content of some fields (from Numbers)

    I am attempting to merge Numbers cell content into multiple iterations of a Pages document.
    I am using the Merge to New Document from Edit -> Mail Merge.
    Some of the content (a text field of about 225 words) is being omitted for the first merged document but included in others.
    I have gone back through the Numbers table and made sure there are no empty cells.
    Any other suggestions?

    Thanks. In a search of this forum I did find mention of a limit on number of characters, but I think it was older, so I searched the documentation for Numbers and Pages, and could not find any reference to a character limit. I guess I was hoping that limit no longer applied.
    Silly me -- I foolishly assumed that if there were limit on the number of characters it would have appeared in the documentation, and I failed to ask the Psychic Hot Line what the designers of iWork had in their minds. Now I have a number of college scholarship applications each with several essay-type answers which must be copied and pasted by hand into the summaries.
    On the bright side, the Acrobat responses document retains the entire content of all fields from the PDF forms and I can actually access any form from the responses window, so it's just a few more hours.

  • How to remove fields from Standard Screen

    Hi,
        I Have faced one problem in screens(se51). When apply one SAP Note i have to change the screen manually(as per Note ) . My requirement is to remove some text fields and label fields. But I cant delete the Fields.
       Normally just select the object and Press delete Key to remove one object from screen. But here it is not working.
      How can i remove the objects from the screen as per SAP Note.
    Thanks in Advance,
    WIth Regards,
    Neptune.M

    Hi,
    T.code SHD0 helps you control which fields to appear, suppress and make mandatory in Standard Screen.
    refer
    https://forums.sdn.sap.com/click.jspa?searchID=4359065&messageID=2961760
    Regards

  • How to Move a field from Header Screen to Overview Screen in SRM 7.0

    Hi,
    I  have a requirement to move a Standard field Service Date from Heder Screen to Overview Screen in Invoice in SRM 7.0. Please let me know how to do it. Both screens are Standard Web Dynpro Components.
    I appreciate your help!!
    Thanks,
    Monica

    Jay,
    Thank you. My problem has been resolved.
    Thanks,
    Monica
    Edited by: Monica Tubati on Mar 1, 2010 11:23 PM
    Edited by: Monica Tubati on Mar 1, 2010 11:24 PM

  • Updating custom mseg fields from CO11N screen

    Hello all,
    When i save an order from co11n screen, it creates a record in mseg table.
    I created some custom fields in mseg table and i want to fill them during this co11n screen fills the mseg table, but i couldnt find the correct user exit or enhancement.
    Someone has done this before?

    Put some debug statement and check the root cause.
    http://oracleanil.blogspot.com/2009/04/favourite.html
    And if you are running page locally then use
    System.out.println("Test");Thanks
    --Anil
    http://oracleanil.blogspot.com

  • How can I read content in Gujarati language from website?

    I unable to read content in Gujarati language in any website. website like WWW.ojas. guj. nic. in

    hello, thanks for reporting that - i have the same rendering issue on the site you've mentioned and have filed [https://bugzilla.mozilla.org/show_bug.cgi?id=903507 bug #903507] for it.

  • How to read the contents of Input Field created via Screen Painter?

    Hi All,
    I have a module program / dialog program, on my second screen, I created an input/outbox field via screen painter of course,
    now in my PAI, how can I read the contents of the input/outbox field?
    Let's say the name of my input/outbox field is: P_WEKRS.  Note: Get Parameter and Set Parameter is ticked.
    PROCESS AFTER INPUT.
      LOOP WITH CONTROL TC_DATA.
        MODULE MODIFY_DATA.
      ENDLOOP.
    I want to get the value of the input/outbox field before my loop in table control?  I thought that it will work like normal parameter in non-dialog programs.
    Any helpful inputs will be appreciated/rewarded.
    Thanks.
    Jaime

    Hi, Jaime
    Do the following Change in you Follow Logic
    PROCESS AFTER INPUT.
    MODULE read_or_change_value. " Add this
    LOOP WITH CONTROL TC_DATA.
      MODULE MODIFY_DATA.
    ENDLOOP.
    Add the Bellow Module code in you Driver Program.
    MODULE read_or_change_value.
    DATA: P_WEKRS like " the Field on Screen. Must be the same name as on SCREEN. and Type must be same too.
    " Here you will find the Value in that Variable or if you will change the Value here you will find it change on Screen
    END MODULE.
    Please Reply if any Issue..
    Best Regards,
    Faisal

  • Datatable wackiness - JSF trying to read a non-existant field from a bean

    I am having a very strange problem in JSF. I currently have one links page with four commandLinks in it, and one JSF page witha datatable in it, and an IBM <hx:pagerDeluxe> in it to page through the data. Each command link fires off a different action, as shown below:
         <h:commandLink action="UM02">
              <h:outputText value="UM02" />
         </h:commandLink>
         <h:commandLink action="UM03">
              <h:outputText value="UM03" />
         </h:commandLink>          ..........etc ........
    My Navigation rules all point to one JSP file, but with a different param appended to the URL:
              <from-view-id>/index.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>UM02</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM02</to-view-id>
              </navigation-case>
              <navigation-case>
                   <from-outcome>UM03</from-outcome>
                   <to-view-id>/jsp/mappings/listViewUM02.jsp?tbl=UPD_MAP_UM03</to-view-id>
              </navigation-case>     So as you can see, I have one JSF file to display a list from any given table name. I also dynamically populate the dataTable through my code, by reading through a list of columns for each table, and creating a "UIColumn":
              while( itr.hasNext() ){
                   String fieldName = (String) itr.next();                                                  
                   ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding("#{var." + fieldName + "}");
                   HtmlOutputText header = new HtmlOutputText();               
                   header.setValue(fieldName);               
                   UIColumn col = new UIColumn();
                   UIOutput out = new UIOutput();
                   out.setValueBinding("value", vb);
                   col.setHeader( header );
                   col.getChildren().add(out);               
                   dataTable.getChildren().add(col);               
              }          And that dataTable is shown in the JSF page. So i can go back to the main links page, click on another table name, and it will populate the datatable with the correct columns, data, etc. The problem happens when I go to one table, say UM02, and hit ">" on the pager, to go to the next page, which works, THEN i go back to the links page, and hit "UM03" and the first page displays fine. When I try to go to the next page, I get an error saying that the backing bean UM03Bean does not have field "subProductCd". Basically, values from the old dataTable objects are being used for smoe reason when I page. Not sure why this is happening.
    My datatable is defined like this:
         <h:form id="dataTableForm"><h:dataTable id="dataTable1" border="0" cellpadding="2"
              cellspacing="0" columnClasses="columnClass1"
              headerClass="headerClass" footerClass="footerClass"
              rowClasses="rowClass1, rowClass2, rowClass3"
              styleClass="dataTableEx" width="70%" rows="10"
              value="#{TestAction.list}" var="var"
              binding="#{TestAction.listDataTableUI}">
              <f:facet name="footer">
                   <hx:panelBox styleClass="panelBox" id="pagerbox">
                        <hx:pagerDeluxe styleClass="pagerDeluxe" id="deluxe1" for="dataTable1"/>                              
                        <h:commandLink action="home">
                             <h:outputText value="Back Home"></h:outputText>
                        </h:commandLink>
                   </hx:panelBox>     
              </f:facet>
         </h:dataTable>
         </h:form>

    BalusC wrote:
    It is comparing the selected value against the List<SelectItem> returned by getSetoresOrigem() as it is during the apply request values phase of the form submit request.Ok. That's what I supposed JSF was doing.
    BalusC wrote:
    If the selected value isn't in there, then you will get this error.I can understand this, but is this right? As I said, the old value isn't really there because I changed the list values to new ones. But the new value (the value of fSetorOrigem ) corresponds to a value that exist in the new list items, so a valid value. So JSF is not considering that I also changed the list, not just the value. It is comparing the new value with the old list, not the new one. Acting like this JSF is making the page looks like a static HTML page, not a dynamic one. If I can't change the list and the value, what's the point of that? In my point of view I'm not doing anything wrong, I'm not violating any JSF rules.
    Marcos

  • Copying fields from one screen to another

    Hi All,
    I want to move data from one field of a program to another field of a different program.  I mean, I have a date field (this field i will fill with the current date or any other date value) in my program.  This field is a parameter on my screen.  Now in my program I am calling a transaction, which opens up a new program with new screen.  I want to pass my date value to this new screen.  Is it possible to do that? Pls explain with an example.  Greatly appreciate that!
    Thanks in advanced!

    http://www.erpgenie.com/abap/bdc.htm
    http://www.sapdevelopment.co.uk/bdc/bdc_ctcode.htm
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    http://abap-gallery.blogspot.com/2007/08/bdc-batch-data-communication-tutorial.html
    http://www.savefile.com/files/155321
    http://www.savefile.com/files/155324
    http://www.savefile.com/files/155326
    Regards,
    Abhishek

  • Read content of input fields in an internal table?

    <b>Hello everybody!</b>
    This is my first posting here in that forum, so i hope you can help my with my issue..
    In the following time i will develop with Adobe Interactive Forms. I already had a SAP Training in it.
    My Question: It is very simple to define input fields in an Adobe Form. After fireing an Action (example "Send Document") the entered value should be transported back to the ABAP Interface, which is calling the Adobe Form. Is this plan realizable? If so, how can i realize it?
    The Adobe Form will calling from the SAP R/3 System and not via Web Dynpro!
    Thanks a lot for engagement.
    Greetings from Germany
    Ismail Er

    Has Anyone an idea? it is very urgent to know that...
    Thx

  • How to enable Further Entry Information from Entries Screen

    How to enable Further Entry Information field from Entries Screen. My requirement is to add a new input value in an existing element but system is not allowing me to enter a new input value , so I have decided to use Further Entry Information if it is possible? Any advise
    Regards,

    In leave adjustment element , i need to insert a comment input value to give comments for giving reason of adjustment etc. but system is not allowing us for a new input value , is there any solution? currently I am using reason LOV for this purpose.
    Regards,

  • Transfer from one screen to another screen in mm02

    hi guru,
    how to trasfer value of field from to screen to another screen.
    my problem is when we change in mm02 transaction Basic data1 view the field (prod.hierarchy) value it should be transfer to sale organization 2 view and displayed in prod.hierarchy.
    the value should be transfering from one screen to another screen.
    kindly do the need full code ASAP.
    Thanks & Regards,
    Sudheer.

    check this link....
    defining screen fields using FIELD-SYMBOL
    regds,
    kiran

  • Transfer data from Z screen to fv65

    Hello experts,
    I need to transfer data (4 fields) from z screen that we'd developed  to the standart transaction FV65, so that the user w'ont need to enter this fields in FV65. Is there BADI or USER EXIT that can help me?
    thanks,
    Yulia

    Hi Sandeep,
    There are multiple ways to pass your Z screen data to standard screen data.
    1. If you want to pass one are two values to standard transaction, you can use set Parameter ID and Call Transaction statements..
    2. If you want to create the complete Sales order information, Use Sales order creation BAPI to create the sales order.
    Please let me know if you need more information or close this thread by offiering the points( If you are satisfied).
    Regards,
    Sakthivel N

  • How to read tables and fields from a transaction screen.

    hi all,
    i am having problem in reading fields and tables from a screen, could any one help me in mapping tables from a structure as well.
    it will be very help full if u had any documentation.
    Thanking u
    kiran

    Hi,
    In classical debug mode from CALL STACK tab try to find out the structures holding the screen values .
    Capture the values from transaction using FIELD SYMBOLS .
    See the below code.
    DATA : l_prog_val(50) TYPE c VALUE '(SAPLCTMS)WI[]'.
    **To get the (SAPLCTMS)WI value in this program from call stack.
      FIELD-SYMBOLS: <wi> TYPE ANY.
    *Assign the structure (SAPLCTMS)WI to field symbol
      ASSIGN  (l_prog_val) TO <wi>.
      IF sy-subrc NE 0.
        EXIT.
    *Assign the structure (SAPLCTMS)WI to internal table
      ELSE.
        it_wi[] = <wi>.
      ENDIF.
    Sastry.

Maybe you are looking for

  • Can't see the other person, but they can see me. A...

    i was wondering if it is possible, this person i believe uses a Android or Iphone, for the camera to be turned off for video chat? I can never see the other person but they can see me - and i can see myself during the video chat. My video which they

  • How to map multiple output values to the output schema in biztalk mapper?

    Hi, In my biztalk mapper, I am using a "database lookup" functoid which is linked to a "Value Extractor" functoid. A source schema field is linked to the database lookup functoid which is linked to a "Value Extractor" functoid which is linked to the

  • New field in field catalog in output

    How can I add new field in field catalog in Output determination. I heard it can be done through a user exit. Can somebofd help with the user exit name.

  • Need to delete unsorted bookmarks folder

    FF3 brought us the "unsorted bookmarks" and associated star in the bar fail. I got rid of the start using userchrome.css file. I need to DELETE the "unsorted bookmarks" folder permanently and forever. If this cannot be done it should be added to FF4

  • Again same problem with quotes, but cant find a proper sol

    I've gone thru so many posts, but cud'nt really find a solution. someone please help me here. I have a single insert function, which does all inserts for many tables, so cant use ppdstmt.setString(1, "value"). I am trying to insert some data into SQL