Skip to Content
author's profile photo Former Member
Former Member

Values are disappearing when press enter in module pool

Hai All

Iam developing a module pool ,when iam entering the values in the screen and after press enter the values are disappearing,

without pressing the enter button,if iam saving the values,the values are saving into the ztable.

Regards,

Jyothi

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

14 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2013 at 09:10 AM

    Hi Sivajyothi,

    there is two solution for your problem:

    1) If you select field with reference to dictionary (ex: like mara-matnr). this won't disappear after pressing enter.

    2) Define your screen name of the field, by data statement in your program.

    Then it won't disappear by pressing enter.

    Hope it will help You.

    Regards,

    Ravi Pratap Singh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2013 at 04:16 AM

    Hi Sivajyothi,

    Please check the Enter command Logic which u have written whether you have used any Refresh command or clear command for the output table to be displayed. And check it in debugging mode what it is happening.

    Thanks

    Pavan.N

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Sivajyothi,

      Seems that your select statement is selecting the values into same work area which is on the screen.

      think what will happen if there is no record for the intno = wa_licens-intno, i think i will get cleared with sy-subrc not initial.

      Please another work area to select values from table and assign individually if record found.

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 10:23 AM

    Hi,

    Is it displaying values after saving..? If not check your PBO logic.

    Regards,

    Praveen

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Jyothi,

      If you have following code in PAI it is ok. otherwise add following line in PAI

      Field : structure-fieldname.

      check during debug after this statement, fieldname has to be filled with input that we entered on screen. After that you can use watch point to check where this value is clearing in your code.

      Regards,

      Praveen

  • Posted on Aug 29, 2013 at 10:45 AM

    Hi,

    There could the two reasons for this.

    1. Values being cleared using clear or refresh.
    2. The screen values not being populated to program fields - In a module pool program, when the user does some action(PAI), like hitting enter, the screen field values are copied to the program variables(with the same name). The reverse action, of copying the values in the program variables to screen fields, is carried on when the PBO is called.

    You can debug and check the same of the values are getting copied to the variables.

    For further information, please check http://help.sap.com/saphelp_40b/helpdata/en/9f/db9d0335c111d1829f0000e829fbfe/content.htm

    Hope this helps.

    Regards,

    Sagar

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 10:53 AM

    Hello Sivajyothi.

    Check if Output field is ticked in the screen painter for that field.

    Regards.


    a.jpg (69.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • Sivajyothi,

      I guess your issue lies in the select statement.

      Your select statement will fetch and put the data only in the internal table header and not in body.

      Into corresponding-It will fetch and put the data only in header.

      USE Into corresponding fields of table-It will fetch the data and put into the internal table body.

      For instance ,

      select * from VBRP into CORRESPONDING FIELDS OF TABLE ivbrp

      where vrkme is not null.


      Regards.


  • Posted on Aug 29, 2013 at 10:57 AM

    Hi,

    The Screen Variable Names and the Program Variables (declared in TOP Module) should be same.

    Regards

    Sajid

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 11:18 AM

    Hi,

    Assuming all the screen tools are named correctly , with the same name as program variables, u need to write code for handling 'ENTER' command in PAI.

    Regards,

    Shruti

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 11:36 AM

    Hi

    pls check the flow of your program and remember that every time when u press enter a pai event is activated. so after entering the values in the fields u press enter......the control will go to the pai block.....depending on if conditions and ok_code it will execute the necessary fuctions and then the control will go back to the pbo of the same screen if only one screen is there ( in case if the screen is a subscreen then after pai it will go to the pbo of the main screen then pai of mail screen and then pbo of the current activated screen and stop the execution). So if any where during the flow if u are clearing the fields it wont display those fields. And when u press enter the sy-ucomm values is null and when u press save the sy-ucomm value will take the corresponding value.

    With regrads

    Suneesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 12:43 PM

    Hi,

    Please assign your field-values to the field-name in pai(Both can be same sometimes). That will solve the problem.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 01:34 PM

    Hi Jyothi,

    After input the values, when you press PAI will trigger and before screen appears PBO also triggers. As PBO is triggering again & again, your screen filed get clearing. please check the declaration of the variables also, declaration should be in the TOP include. And wile creating Module pool program better start in SE80 transaction rather using SE38.

    - Srini

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.