Skip to Content
author's profile photo
Former Member

Data is not populating in textboxes

Hi Folks,

On my selection screen, when I am taking data from F4 help, first field is populating properly but rest two fields are populating only after pressing enter.

Scenario is like that I have three textboxes on selection screen. Out of them two are in display only mode. When I take F4 help on editable text box it shows me list of all the values of three fields. As soon as I select an entry the editable text box get the value but display only text box get values only after pressing enter.

I have tried to debug the code just after pressing enter and checked whether the variables have value in then or not. I got to know that value exists there. But it is not populating in the text boxes.

Please help me with the same.

Thanks

Siddarth.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 03:20 AM

    Can you place your code here?

    I believe, if it is a custom search help, while assigning the values to the fields for other boxes, you are clearing the header which makes values vanish. But when you hit enter first value gets into header and on selection screen.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Ashish,

      It is custom search help. But I can't place the code over here as it is too long.

      Let me check your thing so that I will be able to solve the problem.

      Thanks for your quick reply.

      Siddarth

  • Posted on Sep 28, 2007 at 03:52 AM

    call function 'F4IF_INT_TABLE_VALUE_REQUEST'

    exporting

    <b>retfield = 'BEGRU'</b>

    <b>value_org = 'S'</b>

    tables

    <b>value_tab = t_values

    return_tab = t_return</b>

    exceptions

    parameter_error = 1

    no_values_found = 2

    others = 3.

    Above values in bold should be passes alwyz. Please check your code for the same.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi sid,

      are these ur textbox names on the screen:-

      <i>retfield</i> and <i>value_org</i> ??

      if so have u defined them in ur prog ?? (exact same name exact same type)

      if so check in the debugger, the values of the variables.

      still if everythin matches and the ouput isn't. can u pls paste the code!!

      regards,

      sagar.

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:09 AM

    hi sid,

    <b>1)</b> make sure that the variable names that are representing the text boxes in the program and in the screen layout are <b>same</b>.

    <b>2)</b> at the end of the PAI module in which u r processing the OKCODE... clear the value of OKCODE.

    <b>3)</b> then while processing the OKCODE u can insert an additional condition representing whether a blank enter has been pressed:-

    CASE OKCODE.

    WHEN ''.

    populate the values of the textboxes.

    at the end of ur query u r writting that the values exists in the variables but rn't populatin.. that condition only happens when the variable name and type donot match (thats they are different in the program and the screen layout).

    and in the following thread u mentioned that u r using a custom search help. if im not wrong then u will have to run a database search in the program to retrieve the values for seperate textboxes.. u can do that in the <b>third step</b>.. for that try adaptin the following code:-

    SELECT name, dept INTO textbox2 textbox3

    FROM table_name

    WHERE emp_id = textbox1.

    hope this helped solving your problem.

    Regards,

    sagar.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sagar,

      Please find my responses after your comments in italics.

      <b>1)</b> make sure that the variable names that are representing the text boxes in the program and in the screen layout are <b>same</b>.

      <i>Varible names are same. but i am not using any Dynpro screen. In progam it just normal selection screen.</i>

      <b>2)</b> at the end of the PAI module in which u r processing the OKCODE... clear the value of OKCODE.

      <i>As there is no Dyn Pro screen, there is no OKCODE and PAI.</i>

      <b>3)</b> then while processing the OKCODE u can insert an additional condition representing whether a blank enter has been pressed:-

      CASE OKCODE.

      WHEN ''.

      populate the values of the textboxes.

      at the end of ur query u r writting that the values exists in the variables but rn't populatin.. that condition only happens when the variable name and type donot match (thats they are different in the program and the screen layout).

      <i>All variable name and type are same all over the code.</i>

      And in the following thread u mentioned that u r using a custom search help. If i'm not wrong then u will have to run a database search in the program to retrieve the values for seperate textboxes.. u can do that in the <b>third step</b>.. for that try adapting the following code:-

      SELECT name, dept INTO textbox2 textbox3

      FROM table_name

      WHERE emp_id = textbox1.

      <i>I can't understand why I need to run the database query when I have already created the search help in Data dictionary.</i>

      thanks

      Siddarth.

  • Posted on Sep 28, 2007 at 05:09 AM

    Hi,

    1. You get all the F4 data into a internal table

    2. call the FM "DYNP_VALUES_READ"

    3. Call the FM "HELP_VALUES_GET_WITH_TABLE"

    4. For all the fields which the data to be populated

    5. Upon User selection from the F4 help, modify the internal table used in DYNP_VALUES_READ, with the values.

    6. call the FM "DYNP_VALUES_UPDATE"

    If the hint is useful… Say thanks by reward….

    Regards,

    Prabhu Rajesh

    Message was edited by:

    PrabhuRajesh Janardanan

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Prabhu Rajesh,

      Is it necessary to go in such complex manner?? Because I am using F4_FIELD_ON_VALUE_REQUEST Function module for this purpose.

      Thanks

      Siddarth

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 05:16 AM

    Hi Siddarth,

    Try using event

    AT SELECTION-SCREEN ON <editable field>.

    ur code to poputalte data in non editable fields.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mandeep,

      AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varit.
        PERFORM f_display_version_entries USING p_varit
                                                p_date
                                                p_time.
      

      In the form I am using Function Module 'F4_FIELD_ON_VALUE_REQUEST' and further populating the fields but still data is not showing.

      Thanks

      Siddarth