2019 Nov 22 11:40 AM
Hello,
I am trying to call report RIEQUI20 with selection table. I noticed that if my selection table contains selections on field EQUNR, only the first entry in selection table is factored in, the rest are ignored.
The following code calls report RIEUI20 with two selections on field EQUNR. The report returns the entry for equipment 10004174. The one with number 10004171 is ignored and not returned. If I switch the order in selection table so that EQUNR 10004171 is the first entry, only the equipment 10004171 is returned by the report. The expected behavior would be that the report returns both equipments 10004174 and 10004171.
DATA:
selection_table TYPE TABLE OF rsparams,
selection TYPE rsparams.
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = '10004174'.
APPEND selection TO selection_table.
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = '10004171'.
APPEND selection TO selection_table.
SUBMIT riequi20
WITH SELECTION-TABLE selection_table
AND RETURN.
In this particular report this behavior seems to occur only with selections on EQUNR. Selections on other fields seem to work properly. I observed the same behavior with report RIAUFK20 with selection on AUFNR. Performing the same selections via SE38 returns correct data.
What is the cause of this? Can't selections on these fields be passed to the report via selection-tables? If so, why and how should one do it?
Thank you in advance,
Aleks
2019 Nov 22 12:00 PM
You are missing the leading zeros. Both types EQUNR and AUFNR using alpha conversion and selection table expects the values in internal format.
(It seems though that the conversion exit is automatically applied on the first record but not on the rest of them).
2019 Nov 22 12:00 PM
You are missing the leading zeros. Both types EQUNR and AUFNR using alpha conversion and selection table expects the values in internal format.
(It seems though that the conversion exit is automatically applied on the first record but not on the rest of them).
2019 Nov 22 12:25 PM
2019 Nov 22 12:25 PM
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = conv equnr( '10004174' ).
2019 Nov 22 1:27 PM
selection-low = |{ CONV equnr( '10004174' ) ALPHA = IN }|.
2019 Nov 22 1:42 PM
Yep it does not work, I let my comment for your correction
This is typicaly the statement not logic, not easy to read
2019 Nov 22 12:23 PM
@Aleksander Zotov It is problem with the conversion, where it was not adding leading zeroes except first line, try with the code below
DATA:selection_table TYPE TABLE OF rsparams,
selection TYPE rsparams.
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = CONV equnr( |{ '10004174' ALPHA = IN }| ).
APPEND selection TO selection_table.
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = CONV equnr( |{ '10004171' ALPHA = IN }| ).
APPEND selection TO selection_table.
SUBMIT riequi20
WITH SELECTION-TABLE selection_table
AND RETURN.
2019 Nov 22 12:24 PM
selection-selname = 'EQUNR'.
selection-sign = 'I'.
selection-kind = 'S'.
selection-option = 'EQ'.
selection-low = conv equnr( '10004174' ).