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

F4 Help to variable

Former Member
0 Likes
587

Hi All.

-


TYPES : BEGIN OF gt_help occurs 0,

fdno LIKE zpjt-fdno,

fdname LIKE zpjt-fdname,

END OF gt_help.

-


I get some help value data to itab.

how can I use F4 Help set itab to variable Not screen parameters.

which one of I will to use call Function.

Regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
465

IF You want the FM name then see the below code.

----


  • At selection-screen *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_workc-low.

REFRESH it_dynp.

CLEAR it_dynp.

  • Move plant parameter to dynamic field

MOVE: text-009 TO it_dynp-fieldname.

  • Extended program check or source code inspector might give error please ignore it

APPEND it_dynp.

  • Read screen field values before PAI field transport

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = text-014

dynumb = sy-dynnr

TABLES

dynpfields = it_dynp

EXCEPTIONS

OTHERS = 1.

  • Extended program check or source code inspector might give error please ignore it

READ TABLE it_dynp INDEX 1.

IF SY-SUBRC EQ 0.

  • Do Nothing

ENDIF.

MOVE it_dynp-fieldvalue TO w_plant.

  • Fire select on the 'CRHD_V1' view to get the plant description on the basis of plant

SELECT werks ktext arbpl

FROM CRHD_V1

INTO TABLE it_garage

WHERE werks = w_plant.

IF SY-SUBRC EQ 0.

  • Function module for f4 help

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = text-015

value_org = text-016

TABLES

value_tab = it_garage

return_tab = it_return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

  • Extended program check or source code inspector might give error please ignore it

READ TABLE it_return_tab INDEX 1.

IF SY-SUBRC EQ 0.

  • Do Nothing

ENDIF.

IF sy-subrc = 0.

MOVE it_return_tab-fieldval TO so_workc-low.

ENDIF.

ENDIF.

CLEAR: it_return_tab, w_plant.

Amresh

2 REPLIES 2
Read only

Former Member
0 Likes
465

search before posting

similar thread ->

Read only

Former Member
0 Likes
466

IF You want the FM name then see the below code.

----


  • At selection-screen *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_workc-low.

REFRESH it_dynp.

CLEAR it_dynp.

  • Move plant parameter to dynamic field

MOVE: text-009 TO it_dynp-fieldname.

  • Extended program check or source code inspector might give error please ignore it

APPEND it_dynp.

  • Read screen field values before PAI field transport

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = text-014

dynumb = sy-dynnr

TABLES

dynpfields = it_dynp

EXCEPTIONS

OTHERS = 1.

  • Extended program check or source code inspector might give error please ignore it

READ TABLE it_dynp INDEX 1.

IF SY-SUBRC EQ 0.

  • Do Nothing

ENDIF.

MOVE it_dynp-fieldvalue TO w_plant.

  • Fire select on the 'CRHD_V1' view to get the plant description on the basis of plant

SELECT werks ktext arbpl

FROM CRHD_V1

INTO TABLE it_garage

WHERE werks = w_plant.

IF SY-SUBRC EQ 0.

  • Function module for f4 help

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = text-015

value_org = text-016

TABLES

value_tab = it_garage

return_tab = it_return_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

  • Extended program check or source code inspector might give error please ignore it

READ TABLE it_return_tab INDEX 1.

IF SY-SUBRC EQ 0.

  • Do Nothing

ENDIF.

IF sy-subrc = 0.

MOVE it_return_tab-fieldval TO so_workc-low.

ENDIF.

ENDIF.

CLEAR: it_return_tab, w_plant.

Amresh