Skip to Content
author's profile photo Former Member
Former Member

Object dependency to read substring

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2014 at 01:36 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.