cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BPC NW: Looping in Logic Script

Former Member
0 Likes
1,099

Hi all,

How to add a loop in logic script?

I want to do like this:

DO 2 TIMES <- how to write like this in logic script?

*START_BADI ZBPC_PRD_BADI_006_A
QUERY=OFF
WRITE=OFF
*END_BADI

*XDIM_MEMBERSET P_ACCOUNT = QTY_PRODUCED_AUTO, QTY_USED_AUTO
*XDIM_MEMBERSET FLOW = M10,M20
*START_BADI ZBPC_PRD_BADI_006_B
QUERY=ON
WRITE=ON
*END_BADI

ENDDO

Thank you for your help.

Kind regards,
Agus Eryanta

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor

Strange idea... What do you want ta achieve?

In general in order to loop some statements you can use for/next:

*FOR %I%=1,2

//SOME CODE

*NEXT

Former Member
0 Likes

I just need to execute these badi twice without rewrite these code twice. I'm looking for simple code to achieve that.

Thank you

former_member186338
Active Contributor
0 Likes

I have already answered you - FOR/NEXT will execute code inside FOR/NEXT number of times...

But it's useless, because 2 times it's better to repeat code!

Former Member
0 Likes

Thank you , your answer is help me to simplify my code. In case I need more iteration, now I just add the number.

Thank you

Answers (0)