Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logic needed

Former Member
0 Likes
730

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
670

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

5 REPLIES 5
Read only

Former Member
0 Likes
670

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.

Read only

Former Member
0 Likes
671

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

Read only

0 Likes
670

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.

Read only

0 Likes
670

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

Read only

0 Likes
670

thanks Shibin,

My problem was resolved