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

dependencies rules

Former Member
0 Likes
300

Hi all,

I'm trying to create a dependecie rule but it does not work and I don't know the reason.

So, I want to do like this:

XPKGA it is a var (characteristic) that can assume the values: 900002, 900003, 900004 and XUNIT will be 01 for 900002, 02 for 900003 and 03 for 900004.

How can I create a dependencie rule here?

Could anyone help on that?

Kind regards

Oliver F

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
273

Are you looking this solution in ABAP code.

DATA: VAR_XPKGA(6) TYPE n,

VAR_XUNIT(2) TYPE n.

1. VAR_XPKGA = XPKGA.

2. VAR_XUNIT = VAR_XPKGA+4(2).

3. VAR_XUNIT = VAR_XUNIT - 1.

4. XUNIT = VAR_XUNIT

-


Explanation:

XPKGA = 900002.

1.Moving XPKGA to VAR_XPKGA, now it contains 900002.

2.Moving last 2 digit of VAR_XPKGA to VAR_XUNIT, now VAR_XUNIT contains 02.

3.Substract 1 from VAR_XUNIT.

4.Move VAR_XUNIT to XUNIT, now XUNIT contains 01.

XUNIT contains 1 less than the last 2 digit of XPKGA.

Regards,

A.Singh

1 REPLY 1
Read only

Former Member
0 Likes
274

Are you looking this solution in ABAP code.

DATA: VAR_XPKGA(6) TYPE n,

VAR_XUNIT(2) TYPE n.

1. VAR_XPKGA = XPKGA.

2. VAR_XUNIT = VAR_XPKGA+4(2).

3. VAR_XUNIT = VAR_XUNIT - 1.

4. XUNIT = VAR_XUNIT

-


Explanation:

XPKGA = 900002.

1.Moving XPKGA to VAR_XPKGA, now it contains 900002.

2.Moving last 2 digit of VAR_XPKGA to VAR_XUNIT, now VAR_XUNIT contains 02.

3.Substract 1 from VAR_XUNIT.

4.Move VAR_XUNIT to XUNIT, now XUNIT contains 01.

XUNIT contains 1 less than the last 2 digit of XPKGA.

Regards,

A.Singh