on 09-22-2016 9:01 PM
Hi All,
I am writing this simple code in IF_RSPLS_CR_METHODS~DERIVE but it is giving me a short dump while saving values through input query. I am writing this code after reading lot of threads. the code fails at the last step <l_chavl> = <l_calquart1>. with a short dump ( Field symbol has not been assigned yet) . Please advise if this way of writing code current?
CLEAR e_t_mesg.
field-SYMBOLS: <l_chavl> type any.
FIELD-SYMBOLS:
<l_fiscper3> TYPE /bi0/oifiscper3,
<l_calquart1> TYPE /bi0/oicalquart1.
ASSIGN COMPONENT 'FISCPER3' OF STRUCTURE c_s_chas TO <l_fiscper3>.
CHECK sy-subrc = 0.
ASSIGN COMPONENT 'CALQUART1' OF STRUCTURE c_s_chas TO <l_calquart1>.
CHECK sy-subrc = 0.
* Determine quarter value based on the fiscal period.
CASE <l_fiscper3>.
WHEN '001' OR '002' OR '003'.
<l_calquart1> = '1'.
WHEN '004' OR '005' OR '006'.
<l_calquart1> = '2'.
WHEN '007' OR '008' OR '009'.
<l_calquart1> = '3'.
WHEN '010' OR '011' OR '012'.
<l_calquart1> = '4'.
WHEN OTHERS.
CLEAR <l_calquart1>.
ENDCASE.
<l_chavl> = <l_calquart1>.
Regards,
Satish M
Hi Satish M,
as the dump says the field-symbols <l_chavl> was not assigned, i.e. it points to nothing. It seems that you want to derive CALQUART1 from FISCPER3. If this is the case you can simply delete the last line in your code.
Regards,
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
Why do you need <l_chavl>? Or you just copied some piece of code and <l_chavl> was there?
Regards,
Gersh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.