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

calculation

Former Member
0 Likes
1,441

DATA: PASS1(6) TYPE C,

CRR(6) TYPE C,

PF(5) TYPE C,

DED(4) TYPE C,

PFP(4) TYPE C,

PD(6) TYPE C,

ABS(2) TYPE C,

ABSC(4) TYPE C,

NETS(5) TYPE C.

PF = '13.75'.

WHEN 'SAL'.

NETS = CRR - PFP - ABSC - DED.

PD = CRR / 30.

ABSC = ABS * PD.

PFP = CRR * PF / 100.

my errror is statemwnt is not accessible

6 REPLIES 6
Read only

s1252
Product and Topic Expert
Product and Topic Expert
1,327

What are you trying to do ? why is this "WHEN 'SAL'." hanging in middle of the code like an orphan.

Read only

DoanManhQuynh
Active Contributor
1,327

in real life, you also need when what = what so only WHEN 'SAL' doesnt make any sense. you should read more about CASE...WHEN.

Read only

0 Likes
1,327

SURE THANKS

Read only

SimoneMilesi
Active Contributor
1,327

Hello and welcome.

If this is your whole code, I think you should learn a bit more about ABAP, reading books or attending some courses, before jumping here and dropping the code like this.

Which is the aim you are trying to achieve with that code?

Why declaring variables as strings and then perform math operations with them?

Which statement is not accessible? The syntax check tells you which one and, once you got it, place your cursor on it and press F1 to obtain the help about that statement.

Read only

matt
Active Contributor
1,327

It's not even syntactically correct.

Read only

Jean_Sagi
Participant
0 Likes
1,327

Maybe asking again with more information about your problem leads to better answers to your problem.

J.