2006 Aug 24 1:42 PM
Hi all,
i got an input/output field of length 5 characters.My requirement is if the user enters 3 character in tht I/O field and pushes a button.A pop up should be displayed showing tht it does not accept .Pls give me the logic or an sample code.
2006 Aug 24 1:45 PM
Hi ,
Use this logic when user click button
v_data = strlen( screen-field ).
if v_data = 3.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
TEXTLINE1 = WSC-DECISION_TEXT1
TEXTLINE2 = WSC-DECISION_TEXT2
TITEL = '??? DECISION TIME ???'
IMPORTING
ANSWER = WSC-ANSWER
EXCEPTIONS
OTHERS = 1.
endif.
Regards
amole
Hi alex,
In the PAI
field fieldname module modulename
v_len = strlen( v_str ).
if v_len = 3.
CALL FUNCTION 'POPUP_FOR_INTERACTION'
EXPORTING
HEADLINE = 'Warning'
TEXT1 = 'Enter 5 character value'
TICON = 'W'
BUTTON_1 = 'Ok'.
endif.
Regards,
Vidya
2006 Aug 24 1:45 PM
Hi ,
Use this logic when user click button
v_data = strlen( screen-field ).
if v_data = 3.
CALL FUNCTION 'POPUP_CONTINUE_YES_NO'
EXPORTING
TEXTLINE1 = WSC-DECISION_TEXT1
TEXTLINE2 = WSC-DECISION_TEXT2
TITEL = '??? DECISION TIME ???'
IMPORTING
ANSWER = WSC-ANSWER
EXCEPTIONS
OTHERS = 1.
endif.
Regards
amole
2006 Aug 24 1:45 PM
Hi alex,
In the PAI
field fieldname module modulename
v_len = strlen( v_str ).
if v_len = 3.
CALL FUNCTION 'POPUP_FOR_INTERACTION'
EXPORTING
HEADLINE = 'Warning'
TEXT1 = 'Enter 5 character value'
TICON = 'W'
BUTTON_1 = 'Ok'.
endif.
Regards,
Vidya
2006 Aug 24 1:46 PM
In the PAI event write this logic.
DATA : V_LENGTH TYPE I.
V_LENGTH = STRLEN( INPUTFIELD ).
IF V_LENGTH <> 5.
*--If length is not equal to 5.
CALL FUNCTIN 'POPUP_TO_DISPLAY'.... to display the message..
endif.
2006 Aug 24 1:49 PM
in PAI section:
module check.
in program:
module check.
data: v_len type i.
case sy-ucomm.
when '<your fcode for button>.
v_len = strlen( v_field ).
if v_len < 5.
message w001(zz) with 'Not acceptible'.
endif.
endcase.
endmodule.
in se91 create a message class with name zz and have an entry 001 with a place holder &.
Regards,
Ravi
2006 Aug 24 1:51 PM
Hi,
in the flow logick of your dynpro in PAI area write
the word 'module' and press F1 you could see than what is possible to do.
regards
Vladimir
2006 Nov 02 10:33 AM
Thanks for the given help but I'm not getting it Wright. I presume the module check is to check the data in the field, but the data is only considered to be written after I press ENTER without passing to next screen. Is there any way to force the field to be read without pressing ENTER.
Best Regards
2006 Nov 02 10:37 AM
in my opinion no it is not possibile without press ENTER or another button.
but if you press enter is not obligatory pass to next screen
Message was edited by: rita cortese
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |