BEX - Pull "From" date from input variable range F

Question: How to pull just the "from" date out of an input variable used in the query that contains From & To date range?

Answer:
This is what I did based on feedback from this forum and it worked.
Create a formula variable using Customer Exit.

If ZDATE is the name of your formula variable
POST_DT is the name of the date range variable that the user fills in when running the query.

DATA: DATEFROM LIKE SY-DATUM,
WA TYPE RRS0_S_VAR_RANGE.

CASE I_VNAM.
WHEN 'ZDATE'.
LOOP AT I_T_VAR_RANGE INTO WA
WHERE VNAM = 'POST_DATE'.
MOVE WA-LOW TO DATEFROM.


L_S_RANGE-LOW = DATEFROM.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
ENDLOOP.
APPEND L_S_RANGE TO E_T_RANGE.

ENDCASE.


Hope this helps.

Answer:
What time characteristic are you using? If you are using 0fiscper, there is already an SAP exit variable 0p_fper3 that takes the last period from 0i_fper. Hope this helps.

thanks,
jlaruss

Answer:
Is there a variable that takes the first period (the From)?

Answer:
No, there is not, but you can use the same logic as the To variable but replace the code for pulling the to value with the from. Use a customer exit like kmmfp said.

thanks,
jlaruss
Copyright ?2007 - 2008 www.jt77.com