cancel
Showing results for 
Search instead for 
Did you mean: 

BPC Conversion file

former_member221145
Participant
0 Kudos
1,011

Hi Experts,

I am trying to acheieve the below condition in BPC conversion file using Java Script.

When GL account starts with 1 and ends with 1 and Value < 0 then GL+"L" Else GL

js:%external%.Value<0 ? %external%.toString()+"L": %external%.toString()

I have also tried the below

I have followed the syntax from the below threads

https://answers.sap.com/questions/11917893/conversion-file-question.html

https://answers.sap.com/questions/11288651/jsscript-in-conversion-files-with-if-then-else-syn.html?s...

https://www.w3schools.com/js/js_math.asp

Thank You,

View Entire Topic
former_member186338
Active Contributor
0 Kudos

Value system variable can be used only in FORMULA column - not your case!

The only solution is to write UJD_ROUTINE BADI

P.S.

"I want to update the master data" - slightly confusing! May be you mean that you want to change target account?

former_member221145
Participant
0 Kudos

Hi Vadim,

When the Asset account balance is less than 0 then I want to map the GL Account to a different account.

In my example 1???????1 is the account in my external. When balance for asset account I'd beginning with 1 and ending with 1 and the balance of such accounts is negative then map the GL to a different GL account.

Thanks,

Rohit

former_member186338
Active Contributor
0 Kudos

rohit.padala

That's what I assumed!

And you have a clear answer - write badi.

About 2 hours for ABAP developer. It's simple!

Old but useful document: https://cupdf.com/document/how-to-use-start-end-routine.html?page=1

Unable to find it on SAP site.