cancel
Showing results for 
Search instead for 
Did you mean: 

Variable-Customer Exit on 0calday for two weeks range

Former Member
0 Kudos

Hi Gurus,


Please can any one help me Customer exit on 0calday for two weeks of range. The system should throw error if user enters more two weeks date range.


here my variable is 'ZSCM_CALDAY2' but it is showing 0DAT, as said
•The i_step = 3 its failing i am not sure from where the default values are coming as i_step = 1.
•i_t_var_range is getting sy-datum(today date),

I tried keeping my code in first line still not success

WHEN 'ZSCM_CALDAY2'.

IF i_step = 3.

  CLEAR : loc_var_range, ls_range.
  READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZSCM_CALDAY2'.

  DATA : lv_DIFF TYPE I.

  if loc_var_range is NOT initial.


    LV_DIFF = loc_var_range-HIGH - loc_var_range-LOW.

    IF LV_DIFF <= 14.

      ls_range-low = loc_var_range-low.
      ls_range-high = loc_var_range-high.
      ls_range-sign = 'I'.
      ls_range-opt = 'BT'.

      APPEND ls_range TO e_t_range.
    ELSE.

      MESSAGE e009(zerrormsg) DISPLAY LIKE 'W' WITH text-000 .
    endif.
  ENDIF.
endif.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Able to check the i_step= 3.

Now, iam unable to see the data for only 14 days. It is also showing for more than 14 days data.

former_member182470
Active Contributor
0 Kudos

Please continue with your other thread. So your code is working. Are you able to see the error message when a user enters more than a range? If yes you can close other thread and even this as well.

Former Member
0 Kudos

No Suman, Code is not working, 2 weeks data is not working and not populating the error message.

anshu_lilhori
Active Contributor
0 Kudos

Hi,

What is your user input variable --i think that should be of type manual input and not cmod unless you are trying to get some value in it.

You just need the validation check on the user input variable.

So use the same variable in i_step = 3.

Please check the same and confirm.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

I feel you should use i_step = 2 and i_step  = 3 combination for your requirement. Please check this blog which has got comprehensive explanation. I feel this would fit your requirement.

You can take the ideas from the blog and try to implement it.

http://scn.sap.com/people/mansi.dandavate/blog/2009/12/16/using-combination-of-istep-2-and-istep-3-t...

Loed
Active Contributor
0 Kudos

Just an offtopic guyz, I'm not hijacking this thread..

What are the differences between i_step = 1, i_step = 2, i_step = 3, and so on if there are still other values?

I just use i_step = 2 which is needed if there is a MANUAL INPUT..Right?

How about the other two (2)?

anshu_lilhori
Active Contributor
0 Kudos

Hi Loed,

You can easily get lot of documents on the same if you just search customer exit variables in BEx.

There you can get proper definition and usage of different i_step.

Regards,

AL

Loed
Active Contributor
0 Kudos

Thanks for the info Anshu!

Loed

former_member182470
Active Contributor
0 Kudos

Hi Loed,

Please search "Customer Exit Variables in SAP BW/BI Reports" and

"SAP BI Global Report Variable User Exit Modularization"

Regards,

Suman

Loed
Active Contributor
0 Kudos

Thanks Suman!

Loed