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

problem in F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
1,720

hi experts,

i am using f4 serach help for a field using F4IF_INT_TABLE_VALUE_REQUEST.

the values are coming in the selection screen .but how to select the particular no in the screen .

for examp-le .i have created a serach help for matnr .

after that i need to print some corresponding fields that matches tyhe matnr selected .what to do in thi scas e.

this is my code.

TABLES : mara.

data:begin of itab_help occurs 0,

matnr like mara-matnr,

end of itab_help.

data retfield like mara-matnr.

data : itab like mara occurs 0 with header line.

parameters: no like mara-matnr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR no.

SELECT matnr FROM mara into corresponding fields of TABLE ITAB_HELP where mtart = 'ROH'.

SORT ITAB_HELP BY matnr.

DELETE ADJACENT DUPLICATES FROM ITAB_HELP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

DYNPPROG = 'ZRPSTRESVSLIP'

DYNPNR = '1000'

DYNPROFIELD = 'MATNR'

VALUE_ORG = 'S'

tables

value_tab = itab_help.

select matnr from mara into corresponding fields of table itab where matnr eq no.

loop at itab.

write:/ itab-matnr.itab-mtart.

endloop.

where i have to change .when i select the matnr in the screen nothing is happening .

thanks

mani

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,298

Hi

In the function module F4IF_INT_TABLE_VALUE_REQUEST,

there is return_tab parameter in TABLES, pass a table of type ddshretval

after the function module, read the value from return_table and pass it to the alv and then refresh alv display.

The selected row in the alv is obtained from row id "es_row_no-row_id"

Check this example for any issues.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PARENT'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'PARENT'

stepl = 0

window_title = text-016

value_org = 'S'

TABLES

value_tab = gt_parent

return_tab = gt_ret_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE i022(zconvobj).

ENDIF.

READ TABLE gt_ret_tab INTO gs_ret_tab INDEX 1.

  • do the required in the alv using gs_ret_tab

regards,

Prasant

*Reward if helpful

Hi

In the function module F4IF_INT_TABLE_VALUE_REQUEST,

there is return_tab parameter in TABLES, pass a table of type ddshretval

after the function module, read the value from return_table and pass it to the alv and then refresh alv display.

The selected row in the alv is obtained from row id "es_row_no-row_id"

Check this example for any issues.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PARENT'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'PARENT'

stepl = 0

window_title = text-016

value_org = 'S'

TABLES

value_tab = gt_parent

return_tab = gt_ret_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE i022(zconvobj).

ENDIF.

READ TABLE gt_ret_tab INTO gs_ret_tab INDEX 1.

  • do the required in the alv using gs_ret_tab

regards,

Prasant

*Reward if helpful

6 REPLIES 6
Read only

Former Member
0 Likes
1,298

Recode like this,its working i have checked

TABLES : mara.

DATA:BEGIN OF itab_help OCCURS 0,

matnr LIKE mara-matnr,

END OF itab_help.

DATA retfield LIKE mara-matnr.

DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.

PARAMETERS: no LIKE mara-matnr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR no.

SELECT matnr FROM mara into corresponding fields of TABLE ITAB_HELP where mtart = 'ROH'.

SORT itab_help BY matnr.

DELETE ADJACENT DUPLICATES FROM itab_help.

DATA return_tab TYPE TABLE OF ddshretval WITH HEADER LINE.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

dynpprog = 'ZRPSTRESVSLIP'

dynpnr = '1000'

dynprofield = 'NO'

value_org = 'S'

TABLES

value_tab = itab_help

return_tab = return_tab.

break conap.

READ TABLE return_tab INDEX 1.

itab-matnr = return_tab-fieldval .

SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab WHERE

matnr EQ no.

LOOP AT itab.

WRITE:/ itab-matnr , itab-mtart.

ENDLOOP.

Message was edited by:

Arjun Puthuruthy

Read only

0 Likes
1,298

hi arjun ,

i am getting display on the selection screen .all i need is if i select one matnr from the list and give execute it has to display the write statement what i have given .that is not working .

thanks,

mani

Read only

0 Likes
1,298

Recode like this,(add start-of-selection. before select stmt)

TABLES : mara.

DATA:BEGIN OF itab_help OCCURS 0,

matnr LIKE mara-matnr,

END OF itab_help.

DATA retfield LIKE mara-matnr.

DATA : itab LIKE mara OCCURS 0 WITH HEADER LINE.

PARAMETERS: no LIKE mara-matnr.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR no.

SELECT matnr FROM mara into corresponding fields of TABLE ITAB_HELP where mtart = 'ROH'.

SORT itab_help BY matnr.

DELETE ADJACENT DUPLICATES FROM itab_help.

DATA return_tab TYPE TABLE OF ddshretval WITH HEADER LINE.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR'

dynpprog = 'ZRPSTRESVSLIP'

dynpnr = '1000'

dynprofield = 'NO'

value_org = 'S'

TABLES

value_tab = itab_help

return_tab = return_tab.

READ TABLE return_tab INDEX 1.

itab-matnr = return_tab-fieldval .

start-of-selection.

SELECT matnr FROM mara INTO CORRESPONDING FIELDS OF TABLE itab WHERE

matnr EQ no.

LOOP AT itab.

WRITE:/ itab-matnr , itab-mtart.

ENDLOOP.

Read only

0 Likes
1,298

coool arjun it is working .

Read only

0 Likes
1,298

sorry i gave points to other person without knowing

Read only

Former Member
0 Likes
1,299

Hi

In the function module F4IF_INT_TABLE_VALUE_REQUEST,

there is return_tab parameter in TABLES, pass a table of type ddshretval

after the function module, read the value from return_table and pass it to the alv and then refresh alv display.

The selected row in the alv is obtained from row id "es_row_no-row_id"

Check this example for any issues.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'PARENT'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'PARENT'

stepl = 0

window_title = text-016

value_org = 'S'

TABLES

value_tab = gt_parent

return_tab = gt_ret_tab

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE i022(zconvobj).

ENDIF.

READ TABLE gt_ret_tab INTO gs_ret_tab INDEX 1.

  • do the required in the alv using gs_ret_tab

regards,

Prasant

*Reward if helpful