2014 Dec 15 3:50 PM
There is a dump error for this code, Can anyone pls help me ??
FIELD-SYMBOLS : <fs1> TYPE any ,
<fs2> TYPE any .
RANGES : tb_set FOR reguh-laufi.
DATA : BEGIN OF tb_setleaf OCCURS 0.
INCLUDE STRUCTURE setleaf.
DATA : END OF tb_setleaf.
CLEAR w_pay.
SELECT * FROM setleaf INTO CORRESPONDING FIELDS OF TABLE tb_setleaf
WHERE setname = 'ALC_FI_CYCLE_ID'.
IF sy-subrc EQ 0.
LOOP AT tb_setleaf.
MOVE tb_setleaf-valsign TO tb_set-sign.
MOVE tb_setleaf-valoption TO tb_set-option.
MOVE tb_setleaf-valfrom TO tb_set-low.
MOVE tb_setleaf-valto TO tb_set-high.
APPEND tb_set.
IF bkpf-bktxt CS tb_set-low.
MOVE 'X' TO w_pay.
ENDIF.
ENDLOOP .
CHECK w_pay EQ 'X'.
** recup nom du cycle
ASSIGN '(SAPF110S)REGUV-LAUFI' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_laufi = <fs2> .
UNASSIGN : <fs1>, <fs2>.
IF w_laufi IN tb_set.
** recuperation date de base
ASSIGN '(SAPF110S)REGUP-ZFBDT' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_zfbdt = <fs2>.
UNASSIGN : <fs1>, <fs2>.
** recuperation condition de paiement
ASSIGN '(SAPF110S)REGUP-ZTERM' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_zterm = <fs2>.
UNASSIGN : <fs1>, <fs2>.
** calcul date d'échéance
2014 Dec 15 4:51 PM
There is a dump error for this code, Can anyone pls help me ??
FIELD-SYMBOLS : <fs1> TYPE any ,
<fs2> TYPE any .
RANGES : tb_set FOR reguh-laufi.
DATA : BEGIN OF tb_setleaf OCCURS 0.
INCLUDE STRUCTURE setleaf.
DATA : END OF tb_setleaf.
CLEAR w_pay.
SELECT * FROM setleaf INTO CORRESPONDING FIELDS OF TABLE tb_setleaf
WHERE setname = 'ALC_FI_CYCLE_ID'.
IF sy-subrc EQ 0.
LOOP AT tb_setleaf.
MOVE tb_setleaf-valsign TO tb_set-sign.
MOVE tb_setleaf-valoption TO tb_set-option.
MOVE tb_setleaf-valfrom TO tb_set-low.
MOVE tb_setleaf-valto TO tb_set-high.
APPEND tb_set.
IF bkpf-bktxt CS tb_set-low.
MOVE 'X' TO w_pay.
ENDIF.
ENDLOOP .
CHECK w_pay EQ 'X'.
** recup nom du cycle
ASSIGN '(SAPF110S)REGUV-LAUFI' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_laufi = <fs2> .
UNASSIGN : <fs1>, <fs2>.
IF w_laufi IN tb_set.
** recuperation date de base
ASSIGN '(SAPF110S)REGUP-ZFBDT' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_zfbdt = <fs2>.
UNASSIGN : <fs1>, <fs2>.
** recuperation condition de paiement
ASSIGN '(SAPF110S)REGUP-ZTERM' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
w_zterm = <fs2>.
UNASSIGN : <fs1>, <fs2>.
** calcul date d'échéance
2014 Dec 15 4:01 PM
hi giri,
have you debugged and checked that
which part of the code is causing this error?
2014 Dec 15 4:07 PM
2014 Dec 15 4:28 PM
No,
it's in this part:
ASSIGN '(SAPF110S)REGUV-LAUFI' TO <fs1>.
ASSIGN (<fs1>) TO <fs2>.
Why do you assume, that REGUV-LAUFI (which is an identifyer for a payment-run)
can be used as a memory handle?
Because this is what you attempt to do. You take whatever value REGUV-LAUFI has in program SAPF110S and try to access a memory-area (variable) named like that.
The least you can do is, to make certain that your field-symbol is assigned. The error you get is, because it is not assigned, is because your attempted assignment did not succeed.
Check in debug-mode, what the actual value of <fs1> is at that time and then ask yourself, if there is any variable named like that.
Best regards - Jörg
2014 Dec 15 4:43 PM
Hi Giri,
The problem occurs at here, ASSIGN (<fs1>) TO <fs2>. <fs2> is still not assigned.
If you want use this grammar, assign ('(program1)fieldName') to <fs>, you must make sure the current program and program1 is under same 'call stack'. You can check 'call stack' in debugging view.
regards,
Archer.
2014 Dec 15 4:51 PM
2014 Dec 15 5:13 PM
2014 Dec 15 5:14 PM
I just reread your coding.
just skip the line ASSIGN (<fs1>) TO <fs2>.
You want to have the values, that are already (if successfull) accessible in <fs1>
So use them.
Your code would look like this then:
ASSIGN (SAPF110S)REGUV-LAUFI TO <fs1>
IF <fs1> IS ASSIGNED.
w_laufi = <fs1>.
ENDIF.
The same is true for the next two assignments for ZFBDT and ZTERM.
They too don't get better with a second assignment.
Keep in mind that by using the brackets, you dereferenciate the field. That is, instead of the memory-area, which is assigned to <fs1>, you attempt to find a different memory area NAMED like the current value of <fs1>. That will not work in your setting.
BR - Jörg
2019 Jun 28 10:19 AM
Hi,
To fix this dump, you can read SAPNOTE 0002730043.
Implementing the note should fix that dump.
If you dont know how to implemente a Sap note, check this link https://blogs.sap.com/2013/06/26/how-to-implement-sap-note-in-snote/
Best regards,
Horacio Nhacuonga