cancel
Showing results for 
Search instead for 
Did you mean: 

BEx Repoprt :Variable Type Customer Exit

ccc_ccc
Active Contributor
0 Kudos

Hi Experts,

Advance Thankx For Averyone. Follow my Question

I have one report that is <b>Stock Status Report</b> it will take date as input and shows the stock on that day.

so that i created one <b>Restricted Keyfigure based calendar day and characteristic Stock type</b>,it will take the date and display the stock on the day.

Now my question, as per client requirement he needs to display the stock on that day as well as previous month last day stock, of the given month

Ex 01 Mar 2005

STock 45 Cases

As per clinet requiement

<u><b>01 MAR 2005 28 Feb 2005</b></u>

Stock <b>45 cases 34 cases</b> <b>Like this</b>

also dispaly. i written one customer exit for this to get previous month last day, but i don't know how to go further. My idea is take two variable for calendar day bothe single variable represent, take one as Ready input , here user enter the date take this date make the relevant calculations and fill this date into second variable, but i don't how fill this date into second one pls help me on this issue or let me know any ohter solution.

Two vaiables YSINGDAT and YSINGDAT1 go like this

....<b></b>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You approach is correct.

1) create two varaibles on 0calday

2) one varible to take the user entry for 0calday(say VAR1)

3) other variable(say VAR2) to hold the last date of the previous month to user entry for VAR1.

4) take two selections

5) one selection with a restriction on 0calday with VA1

0calday = VAR1

6) another selection with a restriction on 0calday with VAR2

0calday = VAR2

7) in custoemr exit fill the value for VAR2 by using the value of VAL1.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi,

use this code to fill the value for ZVAR2 from ZVAR1.

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

data: datein like sy-datum,

dateout like sy-datum.

DATA: L_DATE LIKE SY-DATUM.

DATA: L_YEAR TYPE I.

DATA: L_MONTH TYPE I.

CASE I_VNAM.

WHEN 'ZVAR2'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZVAR1'.

CLEAR L_S_RANGE.

L_DATE = LOC_VAR_RANGE-LOW.

MOVE '01' TO L_DATE+6(2).

MOVE L_DATE(4) TO L_YEAR.

MOVE L_DATE+4(2) TO L_MONTH.

L_MONTH = L_MONTH - 1.

IF L_MONTH LT 1.

L_YEAR = L_YEAR - 1.

L_MONTH = 12.

ENDIF.

MOVE L_YEAR TO L_DATE(4).

MOVE L_MONTH TO L_DATE+4(2).

MOVE: L_DATE TO L_S_RANGE-LOW(8) .

datein = L_S_RANGE-LOW(8).

datein = L_S_RANGE-LOW(8).

CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

EXPORTING

DAY_IN = datein

IMPORTING

LAST_DAY_OF_MONTH = dateout

EXCEPTIONS

DAY_IN_NOT_VALID = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

L_S_RANGE-LOW(8) = dateout.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

endcase.

With rgds,

Anil Kumar Sharma .P

ccc_ccc
Active Contributor
0 Kudos

Hi Anil Sharma,

I don’t know how to say <b>Thanks</b> for your valuable help on this critical issue.

Really it is helped a lot. So once again <b>THANK you very much.</b>

If u don’t mind, can u give your personal id, if anything urgent I will touch through your personal mail id.

By

Anil Sharma

Former Member
0 Kudos

Hi,

Thank you very much for giving such a honour. My mail id is akssandesh@gmail.com.It is always better to post the questions in SDN , So that you will get better answers from experts than my explanation.

By the by, what is your name : Nanda or Anil Sharma

With rgds,

Anil Kumar Sharma .P

Message was edited by: Anil Kumar Sharma