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

search help in table control

Former Member
0 Likes
6,043

hello

i have requirement that i have to create f4 help as per data in previous column.

means suppose in po column po =10 i have to take data according to that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,510

HI Rajan,

write the code after PAI in the screen like this..



*F4 Help
PROCESS ON VALUE-REQUEST.
  FIELD w_ponumber MODULE f4_tablecontrol_field.  "Table control field..


MODULE f4_tablecontrol_field INPUT.


  CLEAR : selline ,selindex.

* getting the cursor line in Table Control
  GET CURSOR FIELD selfield LINE selline.          
  selindex = tc_batch-top_line + selline - 1.   "tc_batch is the table control name..


* Read internal table of table control with f4 cursor selected
  READ TABLE t_ekko INTO wa_ekko
                            INDEX selindex.
if sy-subrc  = 0.
   move ponumner to another field...
endif.

select Po_number from ekpo into table t_ekpo 
                  where po_item = data read from above poitem or number.

"call function module

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield    = 'MATNR'       "Internal table field
        dynpprog    = sy-repid
        dynpnr      = '2010'           "screen number
        dynprofield = 'W_PONUMBER '
        value_org   = 'S'
      TABLES
        value_tab   = t_ekpo.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


ENDMODULE.                 " f4_tablecontrol_field INPUT


Regards,

Prabhudas

hello

i have requirement that i have to create f4 help as per data in previous column.

means suppose in po column po =10 i have to take data according to that.

5 REPLIES 5
Read only

Former Member
0 Likes
2,510

Hi Rajan,

Check below

Thanks!

Read only

Former Member
0 Likes
2,511

HI Rajan,

write the code after PAI in the screen like this..



*F4 Help
PROCESS ON VALUE-REQUEST.
  FIELD w_ponumber MODULE f4_tablecontrol_field.  "Table control field..


MODULE f4_tablecontrol_field INPUT.


  CLEAR : selline ,selindex.

* getting the cursor line in Table Control
  GET CURSOR FIELD selfield LINE selline.          
  selindex = tc_batch-top_line + selline - 1.   "tc_batch is the table control name..


* Read internal table of table control with f4 cursor selected
  READ TABLE t_ekko INTO wa_ekko
                            INDEX selindex.
if sy-subrc  = 0.
   move ponumner to another field...
endif.

select Po_number from ekpo into table t_ekpo 
                  where po_item = data read from above poitem or number.

"call function module

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
        retfield    = 'MATNR'       "Internal table field
        dynpprog    = sy-repid
        dynpnr      = '2010'           "screen number
        dynprofield = 'W_PONUMBER '
        value_org   = 'S'
      TABLES
        value_tab   = t_ekpo.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.


ENDMODULE.                 " f4_tablecontrol_field INPUT


Regards,

Prabhudas

Read only

Former Member
0 Likes
2,510

Hi ,

u can serach the same in sdn ,

it has been already solved

For ur refrence u can go for the link

Regards

Read only

Former Member
0 Likes
2,510

There are numerous posts on this topic, would have found your answer only if you had searched on SCN before posting.

regards,

Advait

Read only

Former Member
0 Likes
2,510

Hi,

Refer to this link..[How to provide search help in table control|]

Check this link[How to get the F4 help on data entered on previous column|]