cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement Type UserExit for Variable

Former Member
0 Kudos

Hello all,

in my planning layout i defined several variables.

one variable should be automatically dervied by the system via userexit and it should be in the webtemplate shwon as a default value which can be overwrtitten by the user (input field).

this variable contains the posting period. if i call the userexit and execute the planning function the the follwoing error appears:

"Value of variable XXX Period Year ( XXXPER ) cannot be determined.

You are using variable XXX Period Year ( XXXPER ), but the system cannot determine the value of variables. The replacement type 'user-specific values' is set up for the variable, but no values are maintained for your user ID. In addition, the indicator 'Input allowed by user' is not set for the variable. This means the variable cannot be used."

I don't understand it because i did not have set user-specific values but UserExit as replacement type.

As an example: Today we have 13.10.2006; in the template there should appear 001.2006 in the input field.

Can anybody help ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi, the following coding is in the FM.

FUNCTION Z_SAM_DATE_TO_PERIOD_CONVERT .

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_DATE) LIKE SY-DATUM DEFAULT SY-DATUM

*" VALUE(I_PERIV) LIKE T009B-PERIV DEFAULT 'V9'

*" EXPORTING

*" REFERENCE(SAMPER) TYPE /BI0/OIFISCPER

*" EXCEPTIONS

*" INPUT_FALSE

*" T009_NOTFOUND

*" T009B_NOTFOUND

*" OTHERS

*"----


Data: IDATE(7) TYPE C,

E_BUPER LIKE T009B-POPER,

E_GJAHR LIKE T009B-BDATJ,

SAMPER1(8) TYPE C.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

I_DATE = SY-DATUM

I_PERIV = 'V9'

IMPORTING

E_BUPER = E_BUPER

E_GJAHR = E_GJAHR

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4.

IF SY-SUBRC = 0.

CONCATENATE E_BUPER(3) '.' E_GJAHR INTO SAMPER1.

CALL FUNCTION 'CONVERSION_EXIT_PERI7_INPUT'

EXPORTING

INPUT = SAMPER1

IMPORTING

OUTPUT = SAMPER.

ENDIF.

ENDFUNCTION.

Former Member
0 Kudos

Hi Marc

If this is the function module attached in BPS0, the function module interface has incorrect parameters. The parameters should have parameters similar to UPF_VARIABLE_USER_EXIT function module. Hope this helps

NS

Former Member
0 Kudos

hi NS,

thanks a lot. it works now !

kind regards

marc

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marc,

sorry for maybe asking a very trivial question, but have you debugged your coding and are you sure that the value derived by the coding is correct in terms of the value and the format of the value?

If yes please post the coding here.

When a variable value cannot be determined the system always deliver this note on "user specific values ..." even when, as in your case, you have defined a Xit variable.

Martin

Former Member
0 Kudos

Hi Martin,

yes i have debugged it and tried severla things. The last thing was to call the Conversion Rule Peri7 to be 100% sure of the correct format. But the result stays the same.

Here's the Coding:

FUNCTION Z_SAM_DATE_TO_PERIOD_CONVERT .

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_DATE) LIKE SY-DATUM DEFAULT SY-DATUM

*" VALUE(I_PERIV) LIKE T009B-PERIV DEFAULT 'V9'

*" EXPORTING

*" REFERENCE(SAMPER) TYPE /BI0/OIFISCPER

*" EXCEPTIONS

*" INPUT_FALSE

*" T009_NOTFOUND

*" T009B_NOTFOUND

*" OTHERS

*"----


Data: IDATE(7) TYPE C,

E_BUPER LIKE T009B-POPER,

E_GJAHR LIKE T009B-BDATJ,

SAMPER1(8) TYPE C.

CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'

EXPORTING

I_DATE = SY-DATUM

I_PERIV = 'V9'

IMPORTING

E_BUPER = E_BUPER

E_GJAHR = E_GJAHR

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4.

IF SY-SUBRC = 0.

CONCATENATE E_BUPER(3) '.' E_GJAHR INTO SAMPER1.

CALL FUNCTION 'CONVERSION_EXIT_PERI7_INPUT'

EXPORTING

INPUT = SAMPER1

IMPORTING

OUTPUT = SAMPER.

ENDIF.

ENDFUNCTION.

Message was edited by: Marc Wagener

Former Member
0 Kudos

Hi marc,

If you are still facing the issues Can you please post the code of the function module that you have attached on the BPS0 screen. The attached FM doesn't have the standard interface.

thanks