‎2007 Sep 03 5:53 PM
Hi Experts,
Hi Experts,
In my report i need to declare a select-option . This select-option is a combination of Period and fiscal year i..e the values in the select-option should be like
PPP/YYYY period and year need to be separated by "/".
I had declared in that format. Here the period starts from 001-012.So when ever the User enters 010/2005 in low and 007/2007 in high it is giving an error that Lower limit is greater than Higher limit .
For this i had created a Data element with domain that is having a function module
with the folowing code
FUNCTION CONVERSION_EXIT_ZCCON_INPUT.
*"----
""Local Interface:
*" IMPORTING
*" VALUE(REFERENCE) OPTIONAL
*" EXPORTING
*" VALUE(REFERENCE1)
*"----
DATA : L_PPP(3) TYPE C,
L_YYYY(4) TYPE C.
REFERENCE1 = REFERENCE.
SPLIT REFERENCE1 AT '/' INTO L_PPP L_YYYY.
CONCATENATE L_YYYY '/' L_PPP INTO REFERENCE1.
ENDFUNCTION.
but when ever give some data in the selection-screen that is declred with this data element data is not passing to the function module.
‎2007 Sep 03 6:12 PM
Hi
I believe your input format should be a number, so you should concantenate only the year and the month into the input:
FUNCTION CONVERSION_EXIT_ZCCON_INPUT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(REFERENCE) OPTIONAL
*" EXPORTING
*" VALUE(REFERENCE1)
*"----------------------------------------------------------------------
DATA : L_PPP(3) TYPE C,
L_YYYY(4) TYPE C.
REFERENCE1 = REFERENCE.
SPLIT REFERENCE1 AT '/' INTO L_PPP L_YYYY.
CONCATENATE L_YYYY L_PPP INTO REFERENCE1.
ENDFUNCTION.
FUNCTION CONVERSION_EXIT_ZCCON_OUTPUT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(REFERENCE) OPTIONAL
*" EXPORTING
*" VALUE(REFERENCE1)
*"----------------------------------------------------------------------
DATA : L_PPP(3) TYPE C,
L_YYYY(4) TYPE C.
L_YYYY = REFERENCE(4).
L_PPP = REFERENCE+4(3).
CONCATENATE L_PPP '/' L_YYYY L_PPP INTO REFERENCE1.
ENDFUNCTION.Max
‎2007 Sep 04 1:46 AM
I think that you MUST name your parameters to conversdion exits INPUT and OUTPUT. I did the following and it works.
1. created a domain znrwperiod....char8....conversion routine znper
2. created a data element using the above domain
3. created function moduleS in the same group as each other
3a. CONVERSION_EXIT_ZNPER_OUTPUT
FUNCTION CONVERSION_EXIT_ZNPER_OUTPUT.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----
DATA : L_PPP(3) TYPE C,
L_YYYY(4) TYPE C.
SPLIT input AT '/' INTO L_YYYY L_PPP.
CONCATENATE L_PPP '/' L_YYYY INTO output.
ENDFUNCTION.
3b. CONVERSION_EXIT_ZNPER_INPUT
FUNCTION CONVERSION_EXIT_ZNPER_INPUT.
*"----
""Local interface:
*" IMPORTING
*" REFERENCE(INPUT)
*" EXPORTING
*" REFERENCE(OUTPUT)
*"----
DATA : L_PPP(3) TYPE C,
L_YYYY(4) TYPE C.
SPLIT input AT '/' INTO L_PPP L_YYYY.
CONCATENATE L_YYYY '/' L_PPP INTO output.
ENDFUNCTION.
‎2007 Sep 04 2:26 AM