Wildcard selection: I am having a problem with the following script (transaction IH01):

// Functional Location Structure: Structure List

Screen RIIFLO10.0100

  Enter "/Menu=5,1"         // Notifications

// Functional Location Structure: Selection of Notifications

Screen RIQMEL20.1000

  Set C[Postponed]           " "
  Set C[Completed]           " "
  Set C[Outstanding] "x"
  Set C[In Process] "x"
  Set F[Order]      ""
  Set F[Order to]                "1"
  Set F[Notification date]               ""
  Set F[Notification date to]          ""
  Set F[Priority]   "&V[Noti_Priority]"
  Set V[FUNCTIONAL_LOCATION]  "&F[Functional Location]"
  Set F[Functional Location]  "&V[FUNCTIONAL_LOCATION]*"

  Set F[Layout] "//NOTIF LIST"

  Enter "/8"          // Execute

If I select more than 1 function location, it picks up all the function locations but only applies the wildcard (*) to one of the function locations. Any ideas please?

In this case you need to detect whether several functional location values exist and then append the '*' to all values. The coding below uses the icon id of the button to detect multiple values; it works for up to 8 values. If even more values occur, you need to add scrolling.

// Functional Location Structure: Structure List

Screen RIIFLO10.0100

  Enter "/Menu=5,1"          // Notifications

// Functional Location Structure: Selection of Notifications

Screen RIQMEL20.1000

  Set C[Postponed]            " "
  Set C[Completed]            " "
  Set C[Outstanding] "x"
  Set C[In Process] "x"
  Set F[Order]       ""
  Set F[Order to]                 "1"
  Set F[Notification date]                ""
  Set F[Notification date to]           ""
  Set F[Priority]    "&V[Noti_Priority]"

  Set F[Layout] " //NOTIF LIST"

// multiple values for functional location?

  GetFieldAttribute P[%_STRNO_%_APP_%-VALU_PUSH] buttonicon= "iconid"

  if V[iconid=1E]

    // display values

    Enter P[%_STRNO_%_APP_%-VALU_PUSH]

  else

    // start list processing

    Set F[Functional location] "&F[Functional location]*"

    Enter "/8"

  endif

// Multiple Selection for Functional Location

Screen SAPLALDB.3000

  // append * to up to 8 values

  // please note: if more values can occur, table needs to be scrolled in InputScript

  Set V[i] 1

  label next_value

  Set V[val] "&cell[Table,Single value,&V[i]]"

  if V[val]

    Set cell[Table,Single value,&V[i]] "&V[val]*"

  endif

  Set V[i] &V[i] + 1

  if V[i<9]

    goto next_value

  endif

  Enter "/8"

Screen RIQMEL20.1000

  Enter "/8"