on 08-24-2012 4:31 AM
I have to write code regarding user availability if user is on leave on particular day than that day should be mark as 'L'.
And display it in webdynpro table.Structure of table is Name day1 day2 day3 ... day31.
Am not getting how to insert data in internal table
Jay,
Let there are two tables, one is employee attendance which includes leaves also and another is to insert leave days...
IT_ATTENDANCE_TAB,
IT_LEAVE_DAYS.
loop at IT_ATTENDANCE_TAB into IS_ATTENDANCE_TAB.
if IS_ATTENDANCE_TAB-LEAVE = <abap_true> "" this is your check condition, i've mentioned for demo
IS_LEAVE_DAYS-DAY = IS_ATTENDANCE_TAB-DAY.
append IS_LEAVE_DAYS to IT_LEAVE_DAYS.
endif.
endloop.
hope you understood.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jay,
To assign a value to a particular "day" in your structure, you could use ASSIGN COMPONENT.
ASSIGN COMPONENT comp OF STRUCTURE struc TO <fs>.
For example.
FIELD-SYMBOLS <day> TYPE CHAR01. " typed same as ls_leave_days-dayN
ASSIGN COMPONENT 'DAY1' OF STRUCTURE ls_leave_days TO <day>.
This will result in the field-symbol <day> pointing to field LS_LEAVE_DAYS-DAY1, and you can then assign a value to the individual field:
<day> = 'L'. " on leave
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.