2009 Dec 02 10:54 AM
Hi all,
I want to preselect a mandatory dynpro field dependent on user inputs.
If the user pushs "enter" the field should be filled.
But there comes always the "Please fill all required fields" message.
The field is in the screen painter defined as "required".
Do I have to check the field value manually or how can I fill the field before the check occurs?
regards
Hi all,
I want to preselect a mandatory dynpro field dependent on user inputs.
If the user pushs "enter" the field should be filled.
But there comes always the "Please fill all required fields" message.
The field is in the screen painter defined as "required".
Do I have to check the field value manually or how can I fill the field before the check occurs?
regards
2009 Dec 02 11:06 AM
2009 Dec 02 11:52 AM
Hi,
lets say we have two dynpro fields.
Example:
field1 and field2
field2 is mandatory.
if the user enters a value in field1 the value should be automatically filled in field2 after pushing enter.
How can I do this?
I try to fill the field2 in PBO of my screen.
But there is always the "Fill all required fields" message..
regards
2009 Dec 02 11:58 AM
Hi,
Ok. for the user command of 'enter' copy the value of field 1 to field 2 in PBO.
2009 Dec 02 12:07 PM
Hi,
write a little test program and try your solution..
It will not work!!!!
regards
Edited by: Wolfgang Bauer on Dec 2, 2009 1:25 PM
2009 Dec 02 12:50 PM
Hi Wolfgang,
your requirement is not at all possible. You have to make the first field as Mandatory, other wise if you want to make second field as mandatory & press enter the system wont allow us to proceed by default since we have a mandatory field on the second line.
There is a function AT EXIT-COMMAND using which we can by pass all the mandatory fields on the screen but in your case I tried to use this function whats happening, the moment you enter some value in the first input field & hit enter the system processes AT EXIT-COMMAND but it deletes the values in the fisrt input field, so you cant move the value of the first field into the second field since it will be blank.
So What I suggest is make first field as Mandatory & proceed.
I have created a small program.
The code snippet for your perusal :-
Design two input fields of length on the screen
SE 38 code
REPORT ztest_scr .
DATA : field1(15) TYPE c,
field2(15) TYPE c.
START-OF-SELECTION.
CALL SCREEN 0100.
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
case sy-ucomm.
when ' '. "When you hit enter SY-UCOMM will be blank
field2 = field1.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUTSE51 Code
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.Regards
Abhii
Edited by: Abhii on Dec 2, 2009 1:51 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |