Application Development 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: 

Object dependency to read substring

Former Member
0 Kudos

Hi.

Is it possible to evaluate a substring in an object dependency? I want to write a simple OD that defaults a char field to a month code (the 2 digit month) based on another field which stores a date.


Something similar to this:

$set_default ($self,Z_PUB_MNTH,'01')

    If Z_ON_SALE_DATE+4(2) = '01'                   'date stored as string yyyyddmm


I'm getting these errors:

E28031 Comparison operator required

E28024 Syntax error in simple action/procedure


Any help would be much appreciated. Many thanks.

1 REPLY 1

Former Member
0 Kudos

Hi,

I'm not really used to that syntax but I think this is not possible within an OD...

Can't you use a function module to fetch a char value (with Z_ON_SALE_DATE as input parameter and Z_PUB_MNTH as output)?

Anyway just a guess

Cheers,

Manu.