Skip to Content
author's profile photo Former Member
Former Member

Copy Variable Value

Hi,

I have Profit Center1 & Profit Center2 variables on the webtemplate.

Whatever the value user enters in for Profit Center1,

that value should be copied to ProfitCenter2 variable.

I tried with following code it didn't work...

WHEN 'ProfitCenter2'.

CLEAR: L_S_RANGE.

IF I_STEP = 2.

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM =

'ProfitCenter1'.

MOVE LOC_VAR_RANGE-LOW to L_S_RANGE-LOW.

MOVE LOC_VAR_RANGE-HIGH to L_S_RANGE-HIGH.

MOVE LOC_VAR_RANGE-OPT to L_S_RANGE-OPT.

MOVE LOC_VAR_RANGE-SIGN to L_S_RANGE-SIGN.

APPEND L_S_RANGE TO E_T_RANGE.

ENDLOOP.

ENDIF.

Any ideas ??

Thanks in advance,

GSM.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2005 at 07:11 PM

    Hi dear,

    your code is more or less equal to SAP sample...did you build your variable of variable as "mandatory variable entry" and not marked as "ready for input" ?

    Bye,

    Roberto

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 07, 2005 at 09:03 PM

    Hi,

    Try this code,

    WHEN 'PROFITCENTER2'.

    IF i_step = 2.

    LOOP AT i_t_var_range INTO loc_var_range

    WHERE vnam = 'PROFITCENTER1'.

    CLEAR l_s_range.

    l_s_range-sign = 'I'.

    l_s_range-opt = 'BT'.

    l_s_range-low = loc_var_range-low.

    l_s_range-low = loc_var_range-high.

    APPEND l_s_range TO e_t_range.

    ENDLOOP.

    ENDIF.

    Variable 'PROFITCENTER1' should be a User entry variable or filed in i_step = 1 and Variable 'PROFITCENTER2' should be Customer exit variable

    Thank you

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      System is raising the following error:

      No value could be determined for variable ZPROF_CTR2.

      ProfitCenter1 is UserEntry variable attached to the characteristic.

      ProfitCenter2 is Customer Exit, mandatory and ready for input is not checked. Varibale represents selection option. also I tried with interval.

      Thanks a lot for your help,

      GSM.

  • Posted on Jun 08, 2005 at 04:00 PM

    Hi,

    After User Entry both I_STEP = 2 AND I_STEP = 3 will be fired.

    You get the following error,

    "No value could be determined for variable ZPROF_CTR2."

    Because you are not filling the Mandatory customer exit variable 'ZPROF_CTR2' in I_STEP = 2. You cannot expect to automatically populate from ZPROF_CTR1

    Thank you

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.