Skip to Content
author's profile photo
Former Member

populate BEx date variable dynamically from VB

Hi,

We've a requirement to use SAPBEXsetVariables from within VB to automate a workbook that needs to run on dialy basis & this is on BW 3.0.

Everything works perfect except variables can't be populated dynamically.

As pete mentioned in other thread, on sheet2, I created variables range & running the workbook that needs to 2 variables and these are always "current date-1" & "current date-2"

If i hardcode values like '20071010 & '20041009 which are of format (number stored as text), it works great.

but, if i include excel formulas like today()-1 & today()-2 error message is coming with " Variables Contain Invalid Values"

Is there a way, I can get this workbook working with formulas to have dynamic values populated to BEx variables.

Appreciate your help.

Hari Immadi

http://immadi.com

SEM BW Analyst

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 11, 2007 at 02:05 PM

    May be you can try this:

    calculate the date, =TODAY()-1 in cell A1 and =TODAY()-2 in cell A2.

    for the cell refering to your variable say V1 and V2 link these cells to A1 and A2.

    here we are not calculating the veriable value by excel formula but we are linking the result of this calcualtion to variable.

    Add comment
    10|10000 characters needed characters exceeded