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 using F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
706

data: begin of t_object occurs 0,

num(20) type C,

end of t_object.

Data: t_ob like MARA-MATNR.

DATA: progname TYPE sy-repid,

dynnum TYPE sy-dynnr.

PARAMETERS: P_Objnum(20) Type C.

INITIALIZATION.

PROGNAME = SY-REPID.

DYNNUM = SY-DYNNR.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_Objnum.

select MATNR into t_ob from MATNR where ERNAM = SY-UNAME.

t_object-num = t_ob.

append t_object.

endselect.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'ABC'

value_org = 'S'

dynpprog = PROGNAME

dynpnr = DYNNUM

TABLES

value_tab = t_OBJECT.

When I click on matchcode for parameter P_OBJNUM, I see a blank list. How do I modify my code ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
681

Hi Rajesh,

Can you add dynprofield as exporting paramter to the FM as below:

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'ABC'

dynprofield = 'P_OBJNUM'

dynpprog = PROGNAME

dynpnr = DYNNUM

value_org = 'S'

tables

value_tab = T_OBJECT.

Also check if t_object internal table has values after the select statement by debugging through.

Cheers,

Vikram

Pls reward for helpful replies!!

6 REPLIES 6
Read only

Former Member
0 Likes
682

Hi Rajesh,

Can you add dynprofield as exporting paramter to the FM as below:

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'ABC'

dynprofield = 'P_OBJNUM'

dynpprog = PROGNAME

dynpnr = DYNNUM

value_org = 'S'

tables

value_tab = T_OBJECT.

Also check if t_object internal table has values after the select statement by debugging through.

Cheers,

Vikram

Pls reward for helpful replies!!

Read only

0 Likes
681

On the top of list I see "Restrict valuye range (3) 115 Entries found". But it does not get dispalyed in the list ......

Read only

Former Member
0 Likes
681

Modify ur code....

select MATNR into t_ob from <b>MARA</b> where ERNAM = SY-UNAME.

t_object-num = t_ob.

append t_object.

endselect.

Message was edited by:

Ramesh Babu Chirumamilla

Read only

0 Likes
681

Yes I did, I see the 115 entries found at the top but I do not see the entries displayed in list.....

Read only

0 Likes
681

Rajesh,

declare like this.

data: begin of t_object occurs 0,

<b>matnr like mara-matnr,</b>

end of t_object.

Data: t_ob like MARA-MATNR.

DATA it_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

PARAMETERS: P_Objnum(20) Type C.

INITIALIZATION.

PROGNAME = SY-REPID.

DYNNUM = SY-DYNNR.

select matnr into table t_object from mara.

sort t_object by matnr.

clear t_object.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

<b> retfield = 'MARA'

window_title = 'TEST'</b>

value_org = 'S'

  • dynpprog = PROGNAME

  • dynpnr = DYNNUM

TABLES

value_tab = t_OBJECT

return_tab = it_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc = 0.

endif.

Vivek

Read only

0 Likes
681

Here is the complete code:

data: begin of t_object occurs 0,

*num(20) type C,

matnr like mara-matnr,

end of t_object.

Data: t_ob like MARA-MATNR.

DATA it_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

PARAMETERS: P_Objnum(20) type c.

INITIALIZATION.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_Objnum.

select matnr into table t_object from mara.

sort t_object by matnr.

clear t_object.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MARA'

window_title = 'TEST'

value_org = 'S'

TABLES

value_tab = t_OBJECT

return_tab = it_return

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

IF sy-subrc = 0.

CLEAR t_object.

READ TABLE it_return INDEX 1.

p_objnum = it_return-fieldval.

endif.

Reward points if helpful.

Vivek