Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Script Logic: Conditional script with Signed Data values - Above/Below zero

Hi SDN'ers,

I'm currently working through a Profit Share calculation in Script Logic.

To simplify the requirement, we need the following behaviour:

1. If Net Profit is Positive (+0) then multiply by a Profit Share driver

2. If Net Profit is Negative, do nothing (do not multiply by the Profit Share driver)

It is my understanding that Script Logic will not use Signed Data in a *WHEN statement, so cannot say:

*XDIM_MEMBERSET AUDIT_ID = INPUT

*XDIM_MEMBERSET ACCOUNT = BAS(NET_PROFIT)

*WHEN ACCOUNT

*IS NET_PROFIT

  *WHEN SIGNEDDATA

  *IS > 0

  *REC(FACTOR = 1, AUDIT_ID = PROFIT_SHARE)       // Write value to Profit Share Audit ID

  *ENDWHEN

*ENDWHEN

Another option performing this task is obviously creating a BAdI that will handle this scenario, however it seems to be massively over-kill and harder for the business to support than script logic.

Sharing of any experience and/or confirmation that conditional logic on signed data values would be appreciated.

Nick

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question