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 in module pool

Former Member
0 Likes
554

Hi experts,

Plz help me on below issue. In module pool i create F4 help for customer field. If we choose f4 for customer field it display customer number, plant, serial number and material.

for example in f4 its showing 10 records. If i select 5 th record I need to store mateiral serail number . How to do this one? I am using F4IF_INT_TABLE_VALUE_REQUEST for customer field f4.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
520

Hi Experts , Plz help me.

If i choose f4 in customer feild place its displaying 10records . I selected 5 th recored . It contains 100(kunnr),120(serial number ) , 1250 ( material number ) 1800(plnat). I need to store this mateirla serail number 120 in some some varialble . how to store this ?

Regards

urssmn

3 REPLIES 3
Read only

Former Member
0 Likes
521

Hi Experts , Plz help me.

If i choose f4 in customer feild place its displaying 10records . I selected 5 th recored . It contains 100(kunnr),120(serial number ) , 1250 ( material number ) 1800(plnat). I need to store this mateirla serail number 120 in some some varialble . how to store this ?

Regards

urssmn

Read only

0 Likes
520

hello,


CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
  EXPORTING
*   DDIC_STRUCTURE         =
    retfield               = 'KUNNR'
*   PVALKEY                = ' '
    DYNPPROG               = sy-cprog
    DYNPNR                 = sy-dynnr
    DYNPROFIELD            = 'P_KUNNR'
*   STEPL                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   VALUE_ORG              = 'S'
*   MULTIPLE_CHOICE        = ' '
*    DISPLAY                = 'X'
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
* IMPORTING
*   USER_RESET             =
  tables
    value_tab             = lt_itab
*   FIELD_TAB              = 
   RETURN_TAB             = lt_ret
*   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.

read table lt_ret into ls_ret index 1.
 if sy-subrc is initial.
  read table lt_itab with key kunnr = ls_ret-FIELDVAL.
   lv_matnr =  lt_itab-matnr.                                  "this you need
   lv_serial = lt_itab-sernr.                                    "this you need
endif.

Regards,

Diwakar

Read only

0 Likes
520

Thanks Diwakar, this code is very helpful to me.