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

Value transfer from screen to program

Former Member
0 Likes
2,671

Hi,

Ive created a screen in module pool.It has input/output fields on it.But when i enter data in those i/o fields, the values are not transferred to the program.When i press enter, the values are cleared.Ive defined the fields on the basis of Ztable fields.

When i give some other name to the i/o field, it works.I can see the values in the debugger.But i need to get the attributes of the table fields so ive defined the name as <tablename>-<fieldname> and ive defined that Ztable in the program using TABLES keyword.

Why are the values not transferred to program. Pls help.

Thanks,

Nidhi.

11 REPLIES 11
Read only

Former Member
0 Likes
1,555

Hi

define work area as type of your ztable and use that fields for screen designing

regards

m.a

Read only

0 Likes
1,555

Initially i had done that only but i wanted to get the domain values from dictionary in F4 of the fields on the screen.

Is thr any other way out for that.

Read only

0 Likes
1,555

Hi,

Did you refer that program DEMO_DYNPRO_DICTIONARY?

Regards,

Dhina..

Read only

0 Likes
1,555

Hi,

IF you need the domain values from the table, implies you need to adapt the screen fields from DDIC structure.

In that case just define a workarea like the same structure.

Define tables and use the same as workarea.

Read only

0 Likes
1,555

Hi Nidhi,

for screen values read you can use DYNP_VALUES_READ

and for domain values you can use the following methods:

1.CALL METHOD cl_reca_ddic_doma=>get_values

EXPORTING

id_name = p_l_f_domain"Domain name

id_langu = sy-langu

IMPORTING

et_values = l_t_value "values.

EXCEPTIONS

not_found = 1

OTHERS = 2.

2.* CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

  • EXPORTING

  • retfield = l_val "Field name on the screen

  • value_org = 'S'

  • TABLES

  • value_tab = itab_carrid " values.

  • EXCEPTIONS

  • parameter_error = 1

  • no_values_found = 2

  • OTHERS = 3.

  • IF sy-subrc <> 0.

    • ...

  • ENDIF.

3.CALL FUNCTION 'DDIF_FIELDINFO_GET'

EXPORTING

tabname =

FIELDNAME = ' '

LANGU = SY-LANGU

TABLES

  • DFIES_TAB =

  • FIXED_VALUES =

4.CALL FUNCTION 'DDIF_DOMA_GET' .

Read only

Former Member
0 Likes
1,555

Hi,

1) Please ask the query in the correct forum for better responses .[UI programming].

2) The basic idea of linking the screen field values and program data is the name of the fields.You just need to make sure, the name defined on screen is the same as the workarea / variable being use din your program.

3)Also make sure you have defined ok_code both in screen and program.

Read only

Former Member
0 Likes
1,555

hi,

In the top include you just define the work area as type of your ztable. Please refer the sample program

DEMO_DYNPRO_DICTIONARY

Regards,

Dhina..

Read only

Former Member
0 Likes
1,555

Hello Nidhi ,

are your using table control ?......paste your codings for PAI event.......

loop.

field wa-field1 module check1.

field wa-field2 module check2.

module update_itab.-->here you need to update your itab table ....i

endloop.


 module update_itab.
 modify itab.
 if sy-subrc ne 0.
  insert itab .
 endif.
endmodule.

regards

Prabhu

Read only

Former Member
0 Likes
1,555

Hi,

I have faced similar issue before of values not getting transferred to program from screen. the first thing you should check is your moulde-pool program should start with 'SAPM' followed by program name. example SAPMZPROGRAM.

Read only

Former Member
0 Likes
1,555

Ive seen the demo program.Also i tried using the work area type my Ztable but even that is not working.My i/o field is on the tabstrip control.So i cannot assign ok_code to a subscreen.Is it because of the tabstrip control?

Read only

Former Member
0 Likes
1,555

Hi friends i found the problem with my code.....I had not written the call subscreen statement in the PAI event.That is why it was not transferring the values....Thanks a ton for the help anyway.

Nidhi