2014 Oct 08 9:44 PM
I have defined a search help and have a requirement to retrieve multiple reason codes from the search help, thus I have also defined a search help exit. In the search help exit I have the parameter CALLCONTROL-MULTISEL = 'X'. Once I do this I am able to retrieve multiple values into the RECORD_TAB and concatenate them into a single field which I bring back to the main program.
The problem is that whenever I use CALLCONTROL-MULTISEL = 'X' I get this small popup window next to the search help dialog. If I remove this parameter from the exit, the window does not appear but I am only able to select one entry.
Also, if I close the small window that appears, the transaction crashed when selecting entries from the search help dialog. Has anyone ever seen this window appear before and/or know how to get rid of it?
Thanks.
I have defined a search help and have a requirement to retrieve multiple reason codes from the search help, thus I have also defined a search help exit. In the search help exit I have the parameter CALLCONTROL-MULTISEL = 'X'. Once I do this I am able to retrieve multiple values into the RECORD_TAB and concatenate them into a single field which I bring back to the main program.
The problem is that whenever I use CALLCONTROL-MULTISEL = 'X' I get this small popup window next to the search help dialog. If I remove this parameter from the exit, the window does not appear but I am only able to select one entry.
Also, if I close the small window that appears, the transaction crashed when selecting entries from the search help dialog. Has anyone ever seen this window appear before and/or know how to get rid of it?
Thanks.
2014 Oct 09 10:08 AM
Hi,
I don't get any popup like that.
Please paste your search help Exit code to Analyse.
I use MULTISEL in
if callcontrol-step = 'PRESEL1'.
callcontrol-multisel = 'X'.
Exit.
endif.
write my selection under the
if callcontrol-step = 'SELECT'.
select...... into table......
Exit.
endif.
Hope this helps.
Regards,
K.S
2014 Oct 09 1:54 PM
Thanks for the reply, below is my search help exit code.
FUNCTION Z_ZP61_REASON_EXIT.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCT
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
*"----------------------------------------------------------------------
DATA: W_RECORD(24) TYPE C.
DATA: W_RECORD2(24) TYPE C.
DATA: I_RECORD LIKE ZP61_RC_DESC OCCURS 0 WITH HEADER LINE.
DATA: RC like sy-subrc.
*"----------------------------------------------------------------------
* STEP SELONE (Select one of the elementary searchhelps)
*"----------------------------------------------------------------------
* This step is only called for collective searchhelps. It may be used
* to reduce the amount of elementary searchhelps given in SHLP_TAB.
* The compound searchhelp is given in SHLP.
* If you do not change CALLCONTROL-STEP, the next step is the
* dialog, to select one of the elementary searchhelps.
* If you want to skip this dialog, you have to return the selected
* elementary searchhelp in SHLP and to change CALLCONTROL-STEP to
* either to 'PRESEL' or to 'SELECT'.
IF CALLCONTROL-STEP = 'SELONE'.
* PERFORM SELONE .........
EXIT.
ENDIF.
*"----------------------------------------------------------------------
* STEP PRESEL (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
IF CALLCONTROL-STEP = 'PRESEL'.
* PERFORM PRESEL ..........
EXIT.
ENDIF.
IF CALLCONTROL-STEP = 'PRESEL1'.
CALLCONTROL-MULTISEL = 'X'.
EXIT.
ENDIF.
*"----------------------------------------------------------------------
* STEP SELECT (Select values)
*"----------------------------------------------------------------------
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.
IF CALLCONTROL-STEP = 'SELECT'.
* PERFORM STEP_SELECT TABLES RECORD_TAB SHLP_TAB
* CHANGING SHLP CALLCONTROL.
SELECT * FROM ZP61_RC_DESC INTO I_RECORD.
APPEND I_RECORD.
ENDSELECT.
CALL FUNCTION 'F4UT_RESULTS_MAP'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = I_RECORD
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
illegal_structure = 1
OTHERS = 2.
IF rc = 0.
callcontrol-step = 'DISP'.
ELSE.
callcontrol-step = 'EXIT'.
ENDIF.
" EXIT. "Don't process STEP DISP additionally in this call.
ENDIF.
*"----------------------------------------------------------------------
* STEP DISP (Display values)
*"----------------------------------------------------------------------
* This step is called, before the selected data is displayed.
* You can e.g. modify or reduce the data in RECORD_TAB
* according to the users authority.
* If you want to get the standard display dialog afterwards, you
* should not change CALLCONTROL-STEP.
* If you want to overtake the dialog on you own, you must return
* the following values in CALLCONTROL-STEP:
* - "RETURN" if one line was selected. The selected line must be
* the only record left in RECORD_TAB. The corresponding fields of
* this line are entered into the screen.
* - "EXIT" if the values request should be aborted
* - "PRESEL" if you want to return to the selection dialog
* Standard function modules F4UT_PARAMETER_VALUE_GET and
* F4UT_PARAMETER_RESULTS_PUT may be very helpfull in this step.
IF CALLCONTROL-STEP = 'DISP'.
EXIT.
ENDIF.
IF CALLCONTROL-STEP = 'RETURN'.
LOOP AT RECORD_TAB.
W_RECORD2 = RECORD_TAB-STRING(24).
CONDENSE W_RECORD2.
IF W_RECORD IS INITIAL.
CONCATENATE W_RECORD2 W_RECORD
INTO W_RECORD.
ELSE.
CONCATENATE W_RECORD2 W_RECORD
INTO W_RECORD SEPARATED BY ','.
ENDIF.
CONDENSE W_RECORD.
ENDLOOP.
LOOP AT RECORD_TAB.
RECORD_TAB-STRING = W_RECORD.
MODIFY RECORD_TAB.
ENDLOOP.
EXIT.
ENDIF.
ENDFUNCTION.
2014 Oct 09 4:45 PM
Hi,
Still I am able to execute without any issues.
Please let me know your requirement. How you pass the multiple values selected to the next step. What you do with this further.
Please let me know and accordingly I can try here.
Also a Suggestion.
IF CALLCONTROL-STEP = 'RETURN'.
LOOP AT RECORD_TAB.
W_RECORD2 = RECORD_TAB-STRING(24).
CONDENSE W_RECORD2.
IF W_RECORD IS INITIAL.
CONCATENATE W_RECORD2 W_RECORD
INTO W_RECORD.
ELSE.
CONCATENATE W_RECORD2 W_RECORD
INTO W_RECORD SEPARATED BY ','.
ENDIF.
CONDENSE W_RECORD.
ENDLOOP.
LOOP AT RECORD_TAB.
RECORD_TAB-STRING = W_RECORD.
MODIFY RECORD_TAB.
ENDLOOP.
When you have 2 rows in the record_tab after Looping through 2 rows you will have only the value of 2nd row in w_record.
then you again Loop and modify the string using w_record which will always return the value of last row.
Best is you can modify in the first Loop and prevent second Loop.
Regards,
K.S
2014 Oct 09 5:39 PM
Thanks for the suggestion, I will do that.
My requirement is to display a list of valid reason codes in the search help, the user can select multiple reason codes and I concatenate their selections (ex. 1,3,4,5) and pass it back to the field. This works fine, except that small window containing only an 'M' is displayed along with the search help. Once a selection is made, it disappears.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |