Skip to Content

Two SELECTINPUT in the same Package

Hi experts,

I am trying to use two PROMPT( SELECTINPUT) in the same package but this is returning a generic error - see image.

When I use just one SELECTINPUT everything works fine, but no way to have both. Bellow it is the script I am writing:

PROMPT(SELECTINPUT,,,"anyText","%TIME_DIM%",,1)

PROMPT(SELECTINPUT,,,"anyText","%CATEGORY_DIM%",,1)

INFO(%EQU%,=)

INFO(%TAB%,;)

TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,ATINGIR_META.LGF)

I'd appreciate any help!

Tks

capture.jpg (33.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Sep 21, 2017 at 08:36 PM

    Even after you corrected the original question (bad idea in general - answer logic is lost) I can only repeat:

    PROMPT(SELECTINPUT,,,"anyText","%TIME_DIM%",,1)

    PROMPT(SELECTINPUT,,,"anyText","%CATEGORY_DIM%",,1)

    Both will overwrite the same default variable: %SELECTION%

    What do you want to achieve?

    Once again, please read help:

    "The syntax is a follows: PROMPT(SELECTINPUT, [variable], , [label], [dimensions], [default members])"

    Where Means Default Value

    [variable] The name of the returned variable %SELECTION%

    P.S. I can rewrite your statements:

    PROMPT(SELECTINPUT,%SELECTION%,,"anyText","%TIME_DIM%",,1)

    PROMPT(SELECTINPUT,%SELECTION%,,"anyText","%CATEGORY_DIM%",,1)



    Add comment
    10|10000 characters needed characters exceeded

    • "In the first one only Category_DIM to be selected and the second one TIME_DIM, ENTITY_DIM, MOREONE_DIM and so on.

      For me, this requirement looks very straightforward, however I am struggling to achieve it."

      Sorry, but still not clear why do you want to select something on one page and something on another page? What is the benefit???

  • Sep 21, 2017 at 08:18 PM

    Hi Bruno, please close you previous question accepting the correct answer...

    About this question:

    What a strange idea to put 2 SELECTINPUT,,,???

    Both will overwrite the same default variable: %SELECTION%

    What do you want to achieve?

    Read help:

    https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.29/en-US/f9c652116faf1014878bae8cb0e91070.html

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2017 at 02:39 PM

    I've achieved it doing this:

    PROMPT(MESSAGE,ANY_MESSAGE,"PROPERTY_01","","","","")

    PROMPT(SELECT,%VAR1%,,"ANY_TEXT","DIMENSION",,1)

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

    PROMPT(COMBOBOX,%VARIABLE2%,"ANY_TEXT",0,,{"JAN","FEV","MAR","ABR","MAI","JUN","JUL","AGO","SET","OUT","NOV","DEZ"})

    PROMPT(COMBOBOX,%VARIABLE3%,"ANY_TEXT",0,,{"[AT_001] - OPTION1,[AT_002] - OPTION2,[AT_003] - OPTION3"})

    PROMPT(TEXT,%VARIABLE4%,Valor,"% ANY_TEXT",)

    PROMPT(COMBOBOX,%VARIABLE5%,"ANY_TEXT"},)

    INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,TAB,%TAB%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,EQU,%EQU%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,SELECTION,%SELECTION%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,MEMBERSELECTION,SOURCE%EQU%%VAR1%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,VARIABLE2%EQU%%VARIABLE2%%TAB%VARIABLE3%EQU%%VARIABLE3%%TAB%VARIABLE4%EQU%%VARIABLE4%%TAB%VARIABLE5%EQU%%VARIABLE5%)

    TASK(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,LOGIC_FILELGF)

    Therefore, inside the script logic I was able of using variables like: %TIME_SET%,%CATEGORY_SET% (first screen) and $SOURCE$ (second

    screen).

    Tks for your help

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2017 at 07:48 PM

    Hi, If you want to get two dimension, you do not need two SELECTINPUT, just with one you could use for get two dimensions, like this.

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

    Regards

    Add comment
    10|10000 characters needed characters exceeded