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: 

value help with short text

mrahhaoui
Participant
0 Kudos
135

Hi gurus,

I'm trying to create a input value help with the records from my internal table but I woulkd like also to put the short when the popup displays.

Actually I only have the records.

SELECTION-SCREEN BEGIN OF BLOCK ref WITH FRAME TITLE text-t03.

SELECT-OPTIONS:

                s_kstar FOR i_cska-kstar.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_kstar-low.
  PERFORM search_kstar USING s_kstar-low.

FORM search_kstar
                 using kstar type cska-kstar.

  SELECT * FROM cska
               INTO CORRESPONDING FIELDS OF TABLE i_cska
               WHERE kstar LIKE '08%'
               OR    kstar LIKE '008%'
               OR    kstar LIKE '0008%'.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield    = 'KSTAR'
      dynprofield = 's_kstar'
      dynpprog    = sy-cprog
      dynpnr      = sy-dynnr
      value_org   = 'S'
    TABLES
      value_tab   = i_cska.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  CALL FUNCTION 'HELP_VALUES_GET'
       EXPORTING
            fieldname        =  'KSTAR'
            tabname          =  'i_cska'
       IMPORTING
            SELECT_VALUE     =   kstar.

ENDFORM.                    " SEARCH_KSTAR

Anybody would a solution.

Thx in advance for your help.

Mohamed.

1 ACCEPTED SOLUTION

former_member1245113
Active Contributor
0 Kudos
87

Hi Mohamed,

Check the Following.

"  Implement your own search Help as below
PARAMETERS : carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
             fldate TYPE sflight-fldate.
 
DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
 
 
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
else in PROCESS ON VALUE REQUEST
  SELECT * FROM sflight INTO TABLE itab.
  SORT itab BY carrid connid fldate.
  DELETE ADJACENT DUPLICATES FROM itab
  COMPARING carrid connid fldate.
  fmap-fldname = 'CARRID'.
  fmap-dyfldname = 'CARRID'.
  APPEND fmap.
  fmap-fldname = 'CONNID'.
  fmap-dyfldname = 'CONNID'.
  APPEND fmap.
  fmap-fldname = 'FLDATE'.
  fmap-dyfldname = 'FLDATE'.
  APPEND fmap.
 
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
     ddic_structure         = 'SFLIGHT'
      retfield               = 'CARIID'
*     PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     DYNPROFIELD            = 'CARRID'
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
     value_org              = 'S'
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
*     CALLBACK_PROGRAM       = ' '
*     CALLBACK_FORM          = ' '
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
    TABLES
      value_tab              = itab
*     FIELD_TAB              =
*     RETURN_TAB             =
     dynpfld_mapping        = fmap
*   EXCEPTIONS
*     PARAMETER_ERROR        = 1
*     NO_VALUES_FOUND        = 2
*     OTHERS                 = 3
            ." Just Execute this pilot program and verify
  IF sy-subrc  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Cheerz

Ram

7 REPLIES 7

former_member1245113
Active Contributor
0 Kudos
88

Hi Mohamed,

Check the Following.

"  Implement your own search Help as below
PARAMETERS : carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
             fldate TYPE sflight-fldate.
 
DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
 
 
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
else in PROCESS ON VALUE REQUEST
  SELECT * FROM sflight INTO TABLE itab.
  SORT itab BY carrid connid fldate.
  DELETE ADJACENT DUPLICATES FROM itab
  COMPARING carrid connid fldate.
  fmap-fldname = 'CARRID'.
  fmap-dyfldname = 'CARRID'.
  APPEND fmap.
  fmap-fldname = 'CONNID'.
  fmap-dyfldname = 'CONNID'.
  APPEND fmap.
  fmap-fldname = 'FLDATE'.
  fmap-dyfldname = 'FLDATE'.
  APPEND fmap.
 
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
     ddic_structure         = 'SFLIGHT'
      retfield               = 'CARIID'
*     PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     DYNPROFIELD            = 'CARRID'
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
     value_org              = 'S'
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
*     CALLBACK_PROGRAM       = ' '
*     CALLBACK_FORM          = ' '
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
    TABLES
      value_tab              = itab
*     FIELD_TAB              =
*     RETURN_TAB             =
     dynpfld_mapping        = fmap
*   EXCEPTIONS
*     PARAMETER_ERROR        = 1
*     NO_VALUES_FOUND        = 2
*     OTHERS                 = 3
            ." Just Execute this pilot program and verify
  IF sy-subrc  0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Cheerz

Ram

0 Kudos
87

Hi Ram,

thank you for your quick response but I only need the description in the popup.

0 Kudos
87

Hello

If I has understood question correct, that use in your code table CSKU instead of CSKA.

0 Kudos
87

Hi Maros,

My select-option is based from cska. In your ipinion, should I use 2 selects to fill in my internal table?

How to get the description related to the the cost element in the pop up?

Thx.

0 Kudos
87

Hello

No. You no need use 2 selects.

Just declare table i_cska like table CSKU and use in select table CSKU instead of CSKA.

P.s. try to replace CSKA to CSKU in your code. No more changes.

0 Kudos
87

Actually I did a select join with cska and csku and it works except after selected my record I receive a popup saying "The system cannot display possible entries here".

0 Kudos
87

I did your method but the popup always dispay after selected a record.

select ktopl kstar ktext from csku
         into TABLE i_cska
         where kstar like '08%'
         or    kstar like '008%'
         or    kstar like '0008%'.