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

How can i run the package when the variable is empty in a prompt of package in SAP BPC NW 10.1?

Former Member
0 Kudos
776

Hi expert,

When I run a package, we can insert 2 variables. The problem is that the variables have to be populated.

the error appears when the variable is empty. you can see the error:

ABSDA2 =

[Message] -------------------------------------------------------------- RUN_LOGIC:BADI parameter error: "ABSDA2="

The task i run with this package is the following:

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%") PROMPT(TEXT,%ABSTE%,"aaa",,)

PROMPT(TEXT,%ABSDA1%,"bbb",,)

PROMPT(TEXT,%ABSDA2%,"ccc",,)

INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/IC_ELIMINATION_LOGIC,SUSER,%USER%) TASK(/CPMB/IC_ELIMINATION_LOGIC,SAPPSET,%APPSET%) TASK(/CPMB/IC_ELIMINATION_LOGIC,SAPP,%APP%) TASK(/CPMB/IC_ELIMINATION_LOGIC,SELECTION,%SELECTION%) TASK(/CPMB/IC_ELIMINATION_LOGIC,LOGICFILENAME,ARRASTRE_FUSIONES.LGF) TASK(/CPMB/IC_ELIMINATION_LOGIC,REPLACEPARAM,ABSTE%EQU%%ABSTE%%TAB%ABSDA1%EQU%%ABSDA1%%TAB%ABSDA2%EQU%%ABSDA2%)

How can I run the package when the variable is empty?

Thank you all

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Sorry, but where is the script text of the lgf file?

Second - how do you want to populate variables?

Former Member
0 Kudos

Hi,

The variables are Entity, this run succeed if two variables are populated.

For example: S10 and S20

SCRIPT:

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET SCOPE = NON_GROUP

*XDIM_MEMBERSET FLOW = BAS(TOT),999,ERR,C999

*WHEN ENTITY

*IS $ABSDA1$,$ABSDA2$

*ELSE

*WHEN INTERCO

*IS I_10

*WHEN AUDITTRAIL

*IS INPUT

*WHEN FLOW

*IS 100

*REC(FACTOR = -1,FLOW = 999,AUDITTRAIL=AJ_MERG2)

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

Thank you

former_member186338
Active Contributor
0 Kudos

Sorry, but in your original question I see an error related to badi call. I don't see badi call in the provided script!

And you didn't explained the logic in case one of the variables is empty. What do you want in this case?

Former Member
0 Kudos

Hi,

The code dont call any badi. This is all the code.

If the variable $ABSDA2$ is empty, we want that only run with the variable $ABSDA1$.

thank you

former_member186338
Active Contributor
0 Kudos

Ok, still don't understand why you have 3 variables in the advanced script but in script logic you use only 2. Why you are providing selection for 2 entities using prompt text? Very strange approach...

former_member186338
Active Contributor
0 Kudos

By the way, in prompt text user is able to enter multiple entities using comma separated string.

Former Member
0 Kudos

Thank you,

This work correctly but i need to separate the entities in different variables.

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

Now the script is different 🙂 You are changing requirements!

Use:

*SELECT(%IABS1%,"[ID]",INTERCO,[ENTITY]=%ENTITY_SET%)

*WHEN INTERCO

*IS %IABS1%

...

Former Member
0 Kudos

Hi,

Thank you, your solution is correct: "in prompt text user is able to enter multiple entities using comma separated string."

In my final script for fusion, I use two "text prompt" one of them for one member (absorbing Entity)and the other one for multiples values (absorbed Entities) and in the script i use "FOR". Now i can run the second "text prompt" with the FOR

former_member186338
Active Contributor
0 Kudos

Not sure that I fully understand what are you doing! In general FOR has to be used only in specific cases...

It's better to provide your real script with the logic description then may be I can give you a better idea!

TEXT prompt is not very good for user input - high probability of mistakes.

former_member186338
Active Contributor
0 Kudos

Why not to use:

PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%TIME_DIM%,%ENTITY_DIM%")

without any PRPMPT(TEXT ???

You will be able to select multiple entities...

in the script:

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

Former Member
0 Kudos

Hi,

Thank you

your answer "in prompt text user is able to enter multiple entities using comma separated string." its correct.

But the problem now is with a "SELECT"

I cant without PROMPT because This is for entities fusion and I need to get in the script logic the entities in differents variables for then do different "SELECT".

This works.. but with "ABSDA2" empty not work, the problem is that sometimes i need 2 or 3 depends...

If I use "in prompt text user is able to enter multiple entities using comma separated string." The script not work because of "SELECT"

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET SCOPE = NON_GROUP

*XDIM_MEMBERSET FLOW = BAS(TOT),999,ERR,C999

*SELECT(%IABS1%,"[ID]",INTERCO,"[ENTITY]='$ABSDA1

*SELECT(%IABS2%,"[ID]",INTERCO,"[ENTITY]='$ABSDA2")

*WHEN ENTITY

*IS $ABSDA1$,$ABSDA2$

*ELSE

*WHEN INTERCO

*IS %IABS1%,%IABS2%

*WHEN AUDITTRAIL

*IS INPUT

*WHEN FLOW

*IS 100*REC(FACTOR = 1,FLOW = 999,,AUDITTRAIL=AJ_MERG2,INTERCO = INTERCO.FUSION)

*ENDWHEN

*ENDWHEN

*ENDWHEN

*ENDWHEN

Thank you