on 07-17-2009 12:29 PM
hi!
i have the following code:
REPORT ZGLK_BGT_YEAR.
TABLES: ZGLKC_BGTYR.
data : plus like ZGLKC_BGTYR-ZZYEAR.
data : lock like ZGLKC_YEAR_LOCK-YEAR_LOCK.
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-003.
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETER : p_ZZYEAR like ZGLKC_BGTYR-ZZYEAR OBLIGATORY.
SELECTION-SCREEN END OF BLOCK bl2.
SELECTION-SCREEN END OF BLOCK bl1.
INITIALIZATION.
SELECT SINGLE ZZYEAR FROM ZGLKC_BGTYR INTO p_zzyear.
START-OF-SELECTION.
AT SELECTION-SCREEN ON p_ZZYEAR.
CALL FUNCTION 'ZGLK_GET_YEAR_LOCK'
EXPORTING
I_COMP_CODE = '1000'
IMPORTING
E_YEAR_LOCK = lock.
plus = sy-datum(4) + 1.
IF LOCK = 'X' .
IF p_zzyear = plus or p_zzyear = sy-datum(4).
MESSAGE I000(su) with p_zzyear text-I01.
else.
MESSAGE E000(SU) with text-E01.
endif.
ZGLKC_BGTYR-ZZYEAR = p_ZZYEAR.
MODIFY ZGLKC_BGTYR .
ELSEIF LOCK = ''.
ZGLKC_BGTYR-ZZYEAR = p_ZZYEAR.
MODIFY ZGLKC_BGTYR .
MESSAGE I000(SU) WITH P_ZZYEAR TEXT-I01.
ENDIF.
END-OF-SELECTION.
my task is to develop this in web dynpro abap but i dont know how to do this.
Hi,
Create a node with an attirbute for p_ZZYEAR .
Create a view with the Input field for p_ZZYEAR .Set the state as Required. Bind the value of Input field to this node. Create a button and assign an event to it.
Up on click of this button (handler), call the method of the class to validate the entry.
Create a custom class and a method to set the lock and validate the entry. Instantiate this class and
Call this mehtod to validate the value. You can get the value using GET_ATTRIBUTE method of the IF_WD_CONTEXT_NODE.
Check my reply in this thread -
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.