Skip to Content
0

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

Jan 02 at 12:43 PM

59

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Vadim Kalinin Jan 02 at 01:13 PM
0

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

Second - how do you want to populate variables?

Show 6 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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?

0
Former Member

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

0

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...

0

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

0
Former Member

Thank you,

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

0
Vadim Kalinin Jan 02 at 02:47 PM
0

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%

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0
Vadim Kalinin Jan 02 at 03:45 PM
0

Now the script is different :) You are changing requirements!

Use:

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

*WHEN INTERCO

*IS %IABS1%

...

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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.

0