SQL LIFE

Sap Abap Search Help

sap abap search help kullanımı

Merhaba,
bu yazımda F4IF_INT_TABLE_VALUE_REQUEST kod ile search help apmanın pratik bir yöntemini paylaşacağım. Search help uygulamak istediğimiz alanı key value değerleri ile fonksiyona verdikten sonra DYNP_VALUES_UPDATE fonksiyonunu çağırıyoruz.

 
report ztest_ezgim line-size 255.

data:begin of lt_region  occurs 0 ,
       kofiz  like te097-kofiz,
       text50 like te097t-text50,
     end of lt_region.

data: gt_return     type table of ddshretval,
      gs_return     type ddshretval,
      wa_dynpfields type dynpread,
      gt_fields     type table of dfies,
      i_dynpfields  type table of dynpread,
      gs_fields     type dfies.
parameters:  kofiz  type ever-kofiz.


at selection-screen on value-request for kofiz.
select kofiz text50 into table lt_region from te097t where bukrs = 'P100' and kofiz in ( '21','22','23','24','25','26' ).


 
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
  retfield         = 'KOFIZ'
  value_org        = 'S'
  callback_program = sy-repid
  dynpnr           = sy-dynnr
tables
  value_tab        = lt_region
  return_tab       = gt_return
exceptions
  parameter_error  = 1
  no_values_found  = 2
  others           = 3.

loop at gt_return into gs_return.
  if sy-tabix = 1.
    wa_dynpfields-fieldname    = 'KOFIZ'.
    wa_dynpfields-fieldvalue   = gs_return-fieldval.
  endif.
  append wa_dynpfields to i_dynpfields.
endloop.


call function 'DYNP_VALUES_UPDATE'
exporting
  dyname     = sy-repid
  dynumb     = sy-dynnr


tables
  dynpfields = i_dynpfields.
 





 
#
Ezgim Çelik
They didn't know it was impossible, so they did it - Mark Twain