Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Press of Enter Button in input field module pool value disappears

acetedi
Participant
0 Kudos
1,217

I have a requirement when pressing enter all data in the fields not getting disappeared

when i press enter all the data i inputted has been disappeared

how to aviod this, iam trying to find a solution to the community not getting a solution

Iam using data dictionary reference for all paremeter

and this is my PAI

WHEN 'ENTER'.
  lw_rebate-vkorg = ztable-vkorg.
     SELECT SINGLE vtext
        FROM tvkot
        INTO tvkot-vtext
        WHERE spras = sy-langu AND
              vkorg = ztable-vkorg.

iam using this logic to get text description from sales organization but when pressing the enter value i have been inputted dissapeared

Any guide or hint I would be thankful...

8 REPLIES 8

Sandra_Rossi
Active Contributor
0 Kudos
1,139

Dynpro principle: the names of the screen fields must correspond to names of variables declared within the global scope inside your program. The transfer of values from program to dynpro is implicit. The transfer of values from dynpro to program happens during PAI according to "FIELD" in the flow logic, or all are transferred if there's MODULE without FIELD, or none if it's an exit function.

You may use the ABAP debugger to add a watchpoint on a variable, which pauses the execution when its value is changed (e.g. cleared, initialized, etc.)

Please share your ABAP code and dynpro code if you need more help.

acetedi
Participant
0 Kudos
1,139

thank you for your answers

this is my global data declaration based on dynpro screen using dictionary reference

TYPES: BEGIN OF ty_gsrebate,
vkorg TYPE ztable-vkorg,
vtweg TYPE ztable-vtweg,
spary TYPE ztable-spart,
kunnr TYPE ztable-kunnr,
krech TYPE ztable-krech,
zttgt TYPE ztable-zttgt,
END OF ty_gsrebate.

DATA: g_srebate TYPE TABLE OF ty_gsrebate,
w_srebate TYPE ty_gsrebate.

and this is my dynpro code.

PROCESS BEFORE OUTPUT.
MODULE status_9100.
*
PROCESS AFTER INPUT.
MODULE user_command_9100.
MODULE back AT EXIT-COMMAND.

and this is my screen input

ztable-vkorg "sales org
ztable-vtweg "dist channel
ztable-spart "division
ztable-kunnr 'customer
ztable-krech "rebate type
ztable-zttgt "terget type

Thank you for any help

Sandra_Rossi
Active Contributor
0 Kudos
1,139

What about the debug?

Sandra_Rossi
Active Contributor
0 Kudos
1,139

Oh, you didn't define ZTABLE as a global variable in your program. Did you read my first comment?

acetedi
Participant
0 Kudos
1,139

sorry dont mention that iam using ztable as a global variable

this is my code

TABLES: ZTABLE.

Sandra_Rossi
Active Contributor
0 Kudos
1,139

OK. What about your debug? (watchpoint + what is code of MODULE user_command_9100 + what gives debug of user_command_9100)

acetedi
Participant
1,139

I just realize I put clear ztable in my pbo that's why when I press enter value is disappeared

CLEAR: ZTBALE "in my pbo

so i deleted this code and put in pai (i need that code for another reason).

Thank You Sandra Rossi give me hint or guide

Sandra_Rossi
Active Contributor
0 Kudos
1,139

Yes, watchpoint is such a great tool to find in one second that you have a CLEAR ZTABLE somewhere. I hope you have understood correctly.