Skip to Content
0
Former Member
Apr 29, 2014 at 11:32 AM

Problem with FM F4IF_INT_TABLE_VALUE_REQUEST

505 Views

Hello.

I have this code:

PARAMETERS: p_ort01 TYPE ort01.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ort01.

DATA: BEGIN OF table OCCURS 0,
MTEXT type MTEXT_D,
ORT01 type ORT01,
MWAER type MWAER,
END OF table.


DATA: lt_field_tab TYPE STANDARD TABLE OF dfies.
DATA: lw_field_tab TYPE dfies.


SELECT MTEXT ORT01 MWAER
INTO TABLE table
FROM t000.


lw_field_tab-tabname = 'T000'.
lw_field_tab-fieldname = 'MTEXT'.
APPEND lw_field_tab TO lt_field_tab.
lw_field_tab-fieldname = 'ORT01'.
APPEND lw_field_tab TO lt_field_tab.
lw_field_tab-fieldname = 'MWAER'.
APPEND lw_field_tab TO lt_field_tab.


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ORT01'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_ORT01'
window_title = 'Search'
value_org = 'S'
TABLES
value_tab = table
field_tab = lt_field_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.



And the result is that the cols aren't "associate" with the fields, each row from "TABLE" is treated like a single string, and is splitted in the cols:


When it should be like this:


The content of table "TABLE" is correct:



The first 3 characters are lost, maybe due to MANDT has 3 characters and is before than MTEXT.


If I set the parameter "value_org" to default value, the result is that only the field MTEXT from each row is showed:



Select MANDT or all of fields from T000 is not a possible solution.


What am I doing wrong? Thanks.

Attachments

ayuda4.JPG (15.6 kB)
ayuda.JPG (16.4 kB)
ayuda2.JPG (22.6 kB)
ayuda3.JPG (21.1 kB)