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 with search help

Former Member
0 Likes
417

hi guyz,

this is my code..when i click on f4 its not populating no values eventhough my internal table got values in it.please help.


  gs_format-ftype = '.TXT'.
  APPEND gs_format TO gt_format.
  gs_format-ftype = '.CSV'.
  APPEND gs_format TO gt_format.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'FTYPE'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'p_FTYPE'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
     value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*     display                = 'F'
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = gt_format
*   FIELD_TAB              =
     return_tab             =  gt_return
*   DYNPFLD_MAPPING        =
   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.

thanks

Edited by: BrightSide on Jan 18, 2010 12:34 PM

3 REPLIES 3
Read only

Former Member
0 Likes
386

Hi,

Some minor changes required.




 CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'GS_FORMAT-FTYPE' "<---- fullname ITAB-FIELDNAME
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'P_FTYPE' "<----------- Capitals required
*   STEPL                  = 0


regards,

amit m.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
386

Hello,

2 things:

1. Type p_FTYPE as P_FTYPE & FTYPE as GT_FORMAT-FTYPE. The screen field name should be in CAPS.

2. After SY-SUBRC = 0, add this code:

IF sy-subrc EQ 0.
    IF gt_return[] is not Initial.
      Read table gt_return index 1.
      P_FTYPE = li_return-fieldval.
    ENDIF.
  ENDIF.

Hope this helps.

BR,

Suhas

Edited by: Suhas Saha on Jan 18, 2010 6:12 PM

Read only

MarcinPciak
Active Contributor
0 Likes
386

Ensure that internal table's fields are typed via component name or as data element, not as direct type

i.e.


data:begin of gt_format occurs 0,
        field1 type table-fieldname,             "field typed via table compent name
        field2 type data_element_name,      "field typed via data element
       field3(4) type c,                                "you cannot use direct typing!
      end of gt_format.

Regards

Marcin