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

how to get parameter help through internal table...

Former Member
0 Likes
764

hi,

i am having function module which returns internal table itab having few values that i want to put as parameter on selection screen , how its possible.??

plz let me know..

thanks,

saurin..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
621

Hi,

Use the function module 'F4IF_INT_TABLE_VALUE_REQEST'

'DATA: BEGIN OF it_bukrs OCCURS 0,

bukrs LIKE t001k-bukrs,

END OF it_bukrs.

SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

PARAMETERS: p_bukrs(4) TYPE c.

SELECTION-SCREEN END OF BLOCK main.

*----


  • Validation Section

*----


INITIALIZATION.

SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BUKRS'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_BUKRS'

value_org = 'S'

TABLES

value_tab = it_bukrs

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
621

Hi,

try like this.

DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,

lws_retfield TYPE dfies-fieldname.

DATA : wa_ret_tab LIKE LINE OF li_ret_tab.

**- Get the device numbers

SELECT serge FROM equi

INTO TABLE i_help1

WHERE sparte EQ c_51.

IF sy-subrc EQ 0.

lws_retfield = text-030.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = text-033

dynpprog = sy-repid

dynpnr = c_dynpnr

dynprofield = text-033

value_org = 'S'

TABLES

value_tab = i_help1

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

ENDIF.

ENDIF.

is this fulfills ur requirement......

Regards,

kk.

Read only

Former Member
0 Likes
622

Hi,

Use the function module 'F4IF_INT_TABLE_VALUE_REQEST'

'DATA: BEGIN OF it_bukrs OCCURS 0,

bukrs LIKE t001k-bukrs,

END OF it_bukrs.

SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.

SELECTION-SCREEN SKIP.

PARAMETERS: p_bukrs(4) TYPE c.

SELECTION-SCREEN END OF BLOCK main.

*----


  • Validation Section

*----


INITIALIZATION.

SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'BUKRS'

dynpprog = sy-repid

dynpnr = sy-dynnr

dynprofield = 'P_BUKRS'

value_org = 'S'

TABLES

value_tab = it_bukrs

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Read only

learnsap
Active Participant
0 Likes
621

Hi,

Create a parameter on the selection screen and in the AT SELECTION-SCREEN ON VALUE-REQUEST. Pass the internal table with the values to this function module F4IF_INT_TABLE_VALUE_REQUEST.

Whenever user clicks for the F4 help he can view the values.

Regards,

Ramesh