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

Module Pool Programming : Screen Fields.

Former Member
0 Likes
654

Hello

i have 2 fields in a screen. Field1 and Field2

i enter the field1 and want to set the f4 help for second field field2 on the basis of the input in field1.

but when i enter field1 and press f4 help for field2, it doesnot work because the field1 values are not passed when i use process on value request for field2 .

please help .... what am i missing.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
636

Hi ,

you have to use "DYNP_VALUES_READ" function mdule to read the field1 value to process in "F4IF_INT_TABLE_VALUE_REQUEST" function module.

check the code below

declare one internal table like this.

data dynpro_values type table of dynpread.

add the fields which you want to read.

field_value-fieldname = Z_POLCY-BUKRS'.

append field_value to dynpro_values.

field_value-fieldname = 'Z_POLCY-WERKS'.

append field_value to dynpro_values.

call function 'DYNP_VALUES_READ'

exporting

dyname = progname

dynumb = dynnum

translate_to_upper = 'X'

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

tables

dynpfields = dynpro_values

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

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

else.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

  • DDIC_STRUCTURE = ' '

retfield = 'POLTYPE'

  • PVALKEY = ' '

dynpprog = progname

dynpnr = dynnum

dynprofield = 'z_POLCY-POLTYPE'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

tables

value_tab = it_poltype

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING = it_ret

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.

endif.

regards

shibu

*check the code for syntax i just given one prototype

4 REPLIES 4
Read only

Former Member
0 Likes
637

Hi ,

you have to use "DYNP_VALUES_READ" function mdule to read the field1 value to process in "F4IF_INT_TABLE_VALUE_REQUEST" function module.

check the code below

declare one internal table like this.

data dynpro_values type table of dynpread.

add the fields which you want to read.

field_value-fieldname = Z_POLCY-BUKRS'.

append field_value to dynpro_values.

field_value-fieldname = 'Z_POLCY-WERKS'.

append field_value to dynpro_values.

call function 'DYNP_VALUES_READ'

exporting

dyname = progname

dynumb = dynnum

translate_to_upper = 'X'

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

tables

dynpfields = dynpro_values

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

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

else.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

  • DDIC_STRUCTURE = ' '

retfield = 'POLTYPE'

  • PVALKEY = ' '

dynpprog = progname

dynpnr = dynnum

dynprofield = 'z_POLCY-POLTYPE'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

value_org = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM = ' '

  • CALLBACK_FORM = ' '

tables

value_tab = it_poltype

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING = it_ret

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.

endif.

regards

shibu

*check the code for syntax i just given one prototype

Read only

0 Likes
636

shibuettickal,

thanks dude,

it solved my probelm ... i rewarded you full points.

Thanks,

Hem

Read only

Former Member
0 Likes
636

hi,

u need to press enter after entering data in field1 then only it will have data in field1.

reward if usefull...

Read only

0 Likes
636

Dhwani shah,

thanks for helping me ... ánd for your efforts.

thanks

hem