‎2007 Apr 09 9:13 PM
Dear all,
I have an issue, I need to except three values on a screen and process them,
as soon as the user enters the first field (even before OK_CODE ) I need to process the value in that field and control the entry of the next 2 fields.
Can any one tell me how to process the content of the field even before the OK_CODE is execuated.
Thanks,
VJ
‎2007 Apr 09 9:16 PM
You must fire some event in order for the application to process the screen, meaning user must hit enter or something. You may be able to tie an FCODE to a listbox field, where when the user selects a value from a listbox, the FCODE is automatically fired. Would this work for you?
Regards,
Rich Heilman
‎2007 Apr 09 9:16 PM
You must fire some event in order for the application to process the screen, meaning user must hit enter or something. You may be able to tie an FCODE to a listbox field, where when the user selects a value from a listbox, the FCODE is automatically fired. Would this work for you?
Regards,
Rich Heilman
‎2007 Apr 09 9:23 PM
It may work, but the next field the user need to enter a value is depandent on the previous field
1) Plant
2) Family
3) Period
Plant will determine the process on value request for the next two fields ( family and period).
I need to process the content of the field "plant" when the process on value request is activated on next two fields.
‎2007 Apr 09 9:25 PM
‎2007 Apr 09 9:29 PM
‎2007 Apr 09 9:35 PM
Here is a sample where it is implemented in a selection screen, it is pretty much the same when doing it with a dynpro.
For example, if you enter a sales document number, and do F4 on the item, only the item numbers that exist for that sales document will be shown.
report zrich_0002 .
parameters: p_vbeln type vbak-vbeln,
p_posnr type vbap-posnr.
at selection-screen on value-request for p_posnr.
data: begin of help_item occurs 0,
posnr type vbap-posnr,
matnr type vbap-matnr,
arktx type vbap-arktx,
end of help_item.
data: dynfields type table of dynpread with header line.
dynfields-fieldname = 'P_VBELN'.
append dynfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
tables
dynpfields = dynfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
others = 11.
read table dynfields with key fieldname = 'P_VBELN'.
p_vbeln = dynfields-fieldvalue.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = p_vbeln
importing
output = p_vbeln.
select posnr matnr arktx into table help_item
from vbap
where vbeln = p_vbeln.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'POSNR'
dynprofield = 'P_POSNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = help_item.
REgards,
RIch Heilman
‎2007 Apr 09 9:22 PM
Yep, just tested this in Netweaver 2004s, works good. IN screen painter, double click on the field in question, in the dialog, select "ListBox" for the "DropDown" field, then set an fcode in the FCODE field. Save and activate. Now when the user selects a value the PAI will be fired automatically.
Regards,
Rich Heilman
‎2007 Apr 09 9:41 PM