Hi frnds,
In below code i want to hard code plant PALM.
IF plant is PALM then only if condition will fire other wise it raise a below mentiond message
I am taking that PALM value from the screen.
PALM Plant Validation
if wa_table-plant_palm is not initial.
select single matnr werks from marc into wa_marc where matnr eq wa_table-material
and werks eq wa_table-plant_palm.
if sy-subrc eq 0.
select single matnr werks from marc into wa_marc where matnr eq wa_table-component
and werks eq wa_table-plant_palm.
if sy-subrc <> 0.
message 'Component does not exit in this plant' type 'E'.
endif.
else.
message 'Material does not exit in this plant' type 'E'.
endif.
endif.
Edited by: Rakhi@abap on May 14, 2010 11:08 AM