‎2008 Mar 05 5:05 AM
i want to put a check that if asset no. is blocked then it shuld nt allow processing in my application.
I have used this logic :
form check_asset_master .
clear : anla-xloev, anla-deakt.
if zmm_isslip-anln1 is not initial.
select single gsber into gsber from t134g
where werks = zmm_isslip-werks.
if sy-subrc = 0.
select single xloev deakt
into (anla-xloev, anla-deakt)
from anla
where bukrs = zmm_isslip-bukrs
and anln1 = zmm_isslip-anln1
and anln2 = zmm_isslip-anln2.
if sy-subrc is not initial.
message e058 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if anla-xloev <> ''. "Check deletion indicator
message e059 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if anla-deakt <> '' or anla-deakt <> '00000000'. "Check deactivation date
message e060 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
endif.
endif.
endform.
But error is tht
anla-deakt is always having value '00000000' in my logic.
Plz guide
Edited by: ABHUT on Mar 5, 2008 10:38 AM
‎2008 Mar 05 5:31 AM
Hi,
You have to move anla-deakt data to work area and check the work area data.If still the value of anla-deakt is 00000,then check the database table whether data is available for the selection criteria or fix a breakpoint in the program and check the data.
form check_asset_master .
clear : anla-xloev, anla-deakt.
if zmm_isslip-anln1 is not initial.
select single gsber into gsber from t134g
where werks = zmm_isslip-werks.
if sy-subrc = 0.
select single xloev deakt
into (wa_anla-xloev, wa_anla-deakt)
from anla
where bukrs = zmm_isslip-bukrs
and anln1 = zmm_isslip-anln1
and anln2 = zmm_isslip-anln2.
if sy-subrc is not initial.
message e058 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if wa_anla-xloev ''. "Check deletion indicator
message e059 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if wa_anla-deakt = '00000000'. "Check deactivation date
message e060 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
endif.
endif.
endform.
Hope this would help you.
Regards
Shibin
‎2008 Mar 05 5:13 AM
Hi Abhut,
may be theres no data fulfilling the selection criteria. Please run a check if the data is available for the corresponding fields in the table.
‎2008 Mar 05 5:31 AM
Hi,
You have to move anla-deakt data to work area and check the work area data.If still the value of anla-deakt is 00000,then check the database table whether data is available for the selection criteria or fix a breakpoint in the program and check the data.
form check_asset_master .
clear : anla-xloev, anla-deakt.
if zmm_isslip-anln1 is not initial.
select single gsber into gsber from t134g
where werks = zmm_isslip-werks.
if sy-subrc = 0.
select single xloev deakt
into (wa_anla-xloev, wa_anla-deakt)
from anla
where bukrs = zmm_isslip-bukrs
and anln1 = zmm_isslip-anln1
and anln2 = zmm_isslip-anln2.
if sy-subrc is not initial.
message e058 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if wa_anla-xloev ''. "Check deletion indicator
message e059 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if wa_anla-deakt = '00000000'. "Check deactivation date
message e060 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
endif.
endif.
endform.
Hope this would help you.
Regards
Shibin
‎2008 Mar 05 5:38 AM
data : xloev like anla-xloev,
deakt like anla-deakt.
clear : xloev,deakt.
if zmm_isslip-anln1 is not initial.
select single gsber into gsber from t134g
where werks = zmm_isslip-werks.
if sy-subrc = 0.
select single xloev deakt
into (xloev, deakt)
from anla
where bukrs = zmm_isslip-bukrs
and anln1 = zmm_isslip-anln1
and anln2 = zmm_isslip-anln2.
if sy-subrc is not initial.
message e058 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if xloev <> ''. "Check deletion indicator
message e059 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if deakt <> ''. "Check deactivation date
message e060 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
endif.
endif.
still deakt has 00000000 by default.I want tht
if deakt = 00000000 or deakt = ' ' in both case it should work other wise a msg asset is blocked.
‎2008 Mar 05 5:43 AM
Hi,
data : xloev like anla-xloev,
deakt like anla-deakt.
clear : xloev,deakt.
if zmm_isslip-anln1 is not initial.
select single gsber into gsber from t134g
where werks = zmm_isslip-werks.
if sy-subrc = 0.
select single xloev deakt
into (xloev, deakt)
from anla
where bukrs = zmm_isslip-bukrs
and anln1 = zmm_isslip-anln1
and anln2 = zmm_isslip-anln2.
if sy-subrc is not initial.
message e058 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if xloev ''. "Check deletion indicator
message e059 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
if deakt = '0000000' or deakt = ' ' . "Check deactivation date
message e060 with zmm_isslip-anln1 zmm_isslip-anln2.
endif.
endif.
endif.
Hope this will help
Regards
Shibin
‎2008 Mar 05 5:59 AM