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

Creating MACRO with condition

Hi All,

I want to create a MACRO with some condition as below Can anybody help me?

Ex :- There are 3 KFs.

A,B and C

If A is not initial (or > 0).

C = A

Else

C = B

Endif.

I tried to put condition like this but i could not achieve it. I am new to MACROs, So not aware of the operations to select.

Can anybody help?

Sameer.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Feb 06, 2012 at 09:18 AM

    Hello Sameer,

    I think this should be an easy macro, so not sure why you cannot acheive it.

    I suppose you should make the macro like this:

    <Macro>----


    Macro Name

    <Step>----


    Step Name (Iteration)

    <Condition Statement>-------IF

    <Condition>----


    Condition Description

    <Row>----


    Row A > 0

    <Row>----


    Row C =

    <Row>----


    Row A

    <Condition Statement>-------ELSE

    <Row>----


    Row C =

    <Row>----


    Row B

    <Condition Statement>-------ENDIF

    Two points to notice:

    1) Be careful with the level of each elements. For example, <Condition Statement> and <Condition> should be on the same level, while ' <Row> Row A > 0' should be on the next level of <Condition>.

    2) The above example uses 'Row A > 0'. If you want to check whether it's initial, you should use macro function IS_INITIAL() , if you're using SCM5.0 or higher. Please refer to SAP note 1068603.

    Best Regards,

    Ada

    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.