Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Search Help - format problem

Former Member
0 Likes
718

Hi,

i did a search help, when i'm executing the same for the first time the output is fine but if i repeat the same execution for the second time the output format got change.

the part of the code where i'm display the output is shown below:

LOOP AT li_ekko INTO lwa_ekko .

MOVE lwa_ekko to lwa_record_tab-string+3.

APPEND lwa_record_tab to RECORD_TAB.

CLEAR: lwa_ekko, lwa_record_tab.

ENDLOOP.

can anyone help me on this issue.

thanks

Regards,

7 REPLIES 7
Read only

Former Member
0 Likes
676

Hi

Are you using it in a search help exit with the following condition ?

IF CALLCONTROL-STEP = 'SELECT'

..

..

ur code ...

---
ENDIF.

Hope this will help.

Regards

- Atul

Read only

0 Likes
676

Hi Atul,

yes, you are right, i'm using a search help exit, but my code is in the 'DISP' part.

IF CALLCONTROL-STEP = 'DISP'.

code..

...

endif.

Read only

0 Likes
676

Hi

Instead of this follow this sample code ->

use IF CALLCONTROL-STEP = SELECT.
 
first populate the data in the reord_tab [] table and then

*--- Map the Results in this Function module 
    CALL FUNCTION 'F4UT_RESULTS_MAP'

    callcontrol-step = 'DISP'.
    EXIT. "Don't process STEP DISP additionally in this call.
  ENDIF.

Hope this will help.

Regards

- Atul

Read only

0 Likes
676

Hello Atul,

thanks for this help.

can you please explain me in brief how to map results in the FM you've provided?

thanking you

Regards,

Nitin

Read only

0 Likes
676

Hi

<u>Here is the sample code</u>

<b>you need to declare an internal table in the search help exit say lt_final nbased on the fields which are to be diplayed in the search help.</b>

    CALL FUNCTION 'F4UT_RESULTS_MAP'
      TABLES
        shlp_tab          = shlp_tab " 
        record_tab        = record_tab 
        source_tab        = lt_final "Final Data -> which you have to display in the search help

      CHANGING
        shlp              = shlp
        callcontrol       = callcontrol
      EXCEPTIONS
        illegal_structure = 1
        OTHERS            = 2.
    IF sy-subrc NE 0.
      callcontrol-step = 'DISP'.
      EXIT.
    ENDIF.

Hope this will help.

<b>Please reward suitable points, incase it suits your requirements.</b>

Regards

- Atul

Read only

Former Member
0 Likes
676

Hello,

CHange this code:


clear: lwa_record_tab,RECORD_TAB.
refresh: RECORD_TAB             " Check this.....
LOOP AT li_ekko INTO lwa_ekko .
MOVE lwa_ekko to lwa_record_tab-string+3.
APPEND lwa_record_tab to RECORD_TAB.
CLEAR: lwa_ekko, lwa_record_tab.
ENDLOOP.

Vasanth

Read only

Former Member
0 Likes
676

Hi,

You should not change the contents of the record_tab directly. See notes 736293 related to this.

Use the function modules F4UT_PARAMETER_RESULTS_PUT or F4UT_RESULTS_MAP as appropriate.

Hope this helps.