05-23-2006 3:28 PM
hi folks,
I am working on an extension, where two similar conditions are checked for two different occasions.
There is a list of personnel subareas that need to be <b>checked one for action type '06'</b> and other for <b>employees enrolling for Benefit Plan 'DMAV'</b>. But the list of personnel subareas for both cases are different.
The requirement is to create a custom table for the list of personnel subareas.
NOTE: Suresh had helped in this regard earlier by using a query instead of hard coded here. Since then it was put on hold with some more changes coming in,and now I am working on it.
Here is the piece of code:
Case 1:
For the action type '06'.
ELSEIF p0000-massg EQ '06'.
" IF UNION NOT IN TABLE... XXX ERROR MESSAGE
IF p0001-btrtl <> 'GA03' AND
p0001-btrtl <> 'GA25' AND
p0001-btrtl <> 'GA26' AND
p0001-btrtl <> 'GA35' AND
p0001-btrtl <> 'A106' AND
p0001-btrtl <> 'DX04' AND
p0001-btrtl <> 'EG03' AND
p0001-btrtl <> 'EG04' AND
.
.
.
.
p0001-btrtl <> 'EX01' AND
p0001-btrtl <> 'CS19'.
MESSAGE e010(zh) WITH p0000-massg.
ENDIF.
Case 2:
LOOP AT p0167 WHERE bplan EQ 'DWAV'
AND begda LE i_new_0167-begda
AND endda GE i_new_0167-begda.
EXIT.
ENDLOOP.
IF sy-subrc NE 0.
**MDR 5/01/2000, unions who only have medical need to bypass this error
**message.
IF p0001-btrtl NE 'CE04' AND p0001-btrtl NE 'CF06' AND
p0001-btrtl NE 'BG02' AND p0001-btrtl NE 'BG05' AND
.
.
.
.
.
p0001-btrtl NE 'EF02' AND p0001-btrtl NE 'CS07' AND
p0001-btrtl NE 'CS11' AND p0001-btrtl NE 'LQ01'.
MESSAGE e033(zh).
ENDIF.
Thanks in advance for your help guys.
Vinu
05-23-2006 5:21 PM
Ok, create it, the table shoud have 3 fields:
btrtl
massg
bplan
All fields are mandatory.
Regards.