Application Development 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: 

Search help exit while user double click

Former Member
0 Kudos

Hi,

As it was done earlier but while test facing some issue,Double clicked value from the output is not returned to input screen whatever thevalues only last value is returning to the screen

please ooverview some of my code,

IF callcontrol-step = 'DISP' or

    callcontrol-step = 'SELECT' or "or "AND

   callcontrol-step = 'RETURN'.

*  EXIT.

   SELECT *

   from /ain/dm_loct

   into table lt_loct.

   IF sy-subrc eq 0.

     READ TABLE shlp-INTERFACE into ls_interface INDEX 1.

     if ls_interface-shlpfield = lc_gln. "'GLN'.

       lv_cp_gln = ls_interface-value.

     ENDIF.

     loop at lt_loct INTO ls_loct.

       CALL FUNCTION '/AIN/UI_MAPPED_LOC_ID_GET'

         EXPORTING

           IV_LOC_GUID = ls_loct-loc_guid

           IV_ID_TYPE  = lc_fmcg "'FMCG'

         IMPORTING

           ET_VALUE    = lt_value.

*         ET_RETURN   =

       READ TABLE lt_value into ls_value with key element = lc_gln.

*    'GLN'.

       if sy-subrc = 0.

         ls_loc_gln-GLN     = ls_value-element_value.

         ls_loc_gln-locdesc = ls_loct-locdesc.

         APPEND ls_loc_gln to lt_valuex.

       endif.

       REFRESH lt_value.

     ENDLOOP.

     endif.

*-- Mape  output data

if callcontrol-step = 'DISP' OR

    callcontrol-step = 'SELECT'.

       IF lv_cp_gln = '' AND lt_valuex IS NOT INITIAL.

         CALL FUNCTION 'F4UT_RESULTS_MAP'

           EXPORTING

*           SOURCE_STRUCTURE   =

             apply_restrictions = gc_true "'X'

           TABLES

             shlp_tab           = shlp_tab

             record_tab         = record_tab

             source_tab         = lt_valuex

           CHANGING

             shlp               = shlp

             callcontrol        = callcontrol

           EXCEPTIONS

             illegal_structure  = 1

             OTHERS             = 2.

*      endif.

*        exit.

       Else.

         refresh: record_tab[],lt_final.

         LOOP at lt_valuex into ls_loc_gln where gln cp lv_cp_gln.

           ls_loc_glnx-GLN =    ls_loc_gln-gln.

           ls_loc_glnx-locdesc = ls_loc_gln-locdesc.

           APPEND ls_loc_glnx to lt_final.

         ENDLOOP.

         IF sy-subrc eq 0 and lt_final is NOT INITIAL.

           CALL FUNCTION 'F4UT_RESULTS_MAP'

             EXPORTING

*             SOURCE_STRUCTURE   =

               apply_restrictions = gc_true "'X'

             TABLES

               shlp_tab           = shlp_tab

               record_tab         = record_tab

               source_tab         = lt_final

             CHANGING

               shlp               = shlp

               callcontrol        = callcontrol

             EXCEPTIONS

               illegal_structure  = 1

               OTHERS             = 2.

         else.

         ENDIF.

         IF record_tab[] is INITIAL.

           message 'No values Exist' type 'S'.

         ENDIF.

       endif.

1 REPLY 1

Former Member
0 Kudos

sorry only first value is going to input screen