Application Development 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: 

Field modification in dialog programming.

Former Member
0 Kudos

Hi,

I am working on dialog prog for the first time and need your help.

I have z t-code.After executing this I get a screen,which has 3 i/o box

1.Approver name

2.Approver Group

3.Requester name.

The requirement is whenever the approver group is changed the approver name also should change.

But the appover name is not getting altered.

How to achieve this.

The field approver group has a search help associated with it.

Both the fields are from the same z table.

Regards,

5 REPLIES 5

tarangini_katta
Active Contributor
0 Kudos

HI Sucharita,

Write u r code in u r POV(process on value request).

POV.

MODULE change_approver.

Write code u r wish code in module.

IF approver group changes.

select the data from ztable for the approver group.

approver name = wa_approver name.

endif.

I think it will helpful to you.

Thanks

Former Member
0 Kudos

Create a search Help with the fields 1.Approver name 2.Approver Group

Attach it in the Screen attributes - Search Hlp for the field Approver name

IF approver name is entered manually..handle it in PAI on "ENTER"

Cheers

Former Member
0 Kudos

Hi tarangini ,

Can u plz tell me how to code for :

If approver got changed.

Thanks,

sucharita.

Former Member
0 Kudos

Hi ,

Write a seperate module to fill the values of approver group and approver name.

PROCESS ON VALUE-REQUEST.

FIELD 'Approver group' MODULE fill_group.

FIELD 'Approver name' MODULE fill_name.

In this module select the values from the database table into an internal table and call FM :

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'Field name'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'Screen field'

value_org = 'S'

TABLES

value_tab = 'Internal table'

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

In your module fill name - select the approver name based on the approver group into the internal table.

Thanx & Rgds,

Krishna

0 Kudos

Hi ,

I have put the following code.

Now the same field that is the approver group field is getting changed and not the approver name field .

Is this because the approver name field is disabled i.e in output only mode?

MODULE fill_group INPUT.

TYPES :BEGIN OF t_zvmwfreq,

zzvmapprgr TYPE zv_adl-ZVMAPRGRP,

NAME_TEXT TYPE zv_adl-NAME_TEXT,

END OF t_zvmwfreq.

DATA : i_zvmwfreq TYPE STANDARD TABLE OF t_zvmwfreq WITH HEADER LINE,

i_apprgroup TYPE STANDARD TABLE OF t_zvmwfreq WITH HEADER LINE,

wa_zvmwfreq TYPE t_zvmwfreq.

SELECT ZVMAPRGRP

NAME_TEXT

FROM zv_adl INTO TABLE i_zvmwfreq.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

  • DDIC_STRUCTURE = ' '

retfield = 'ZVMAPRGRP'

  • PVALKEY = ' '

DYNPPROG = sy-cprog

DYNPNR = sy-dynnr

DYNPROFIELD = 'ZVMWFREQ-ZZVMAPPRGR'

  • STEPL = 0

  • WINDOW_TITLE =

  • VALUE = ' '

VALUE_ORG = 'S'

  • MULTIPLE_CHOICE = ' '

  • DISPLAY = ' '

  • CALLBACK_PROGRAM =

  • CALLBACK_FORM = ' '

  • MARK_TAB =

  • IMPORTING

  • USER_RESET =

tables

value_tab = i_zvmwfreq

  • FIELD_TAB =

  • RETURN_TAB =

  • DYNPFLD_MAPPING =

  • 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.

ENDMODULE. " FILL_GROUP INPUT

&----


*& Module FILL_NAME INPUT

&----


  • text

----


module FILL_NAME input.

  • TYPES :BEGIN OF t_zvmwfreq,

    • zzvmapprname TYPE zvmwfreq-zzvmapprname ,

  • zzvmapprgr TYPE zv_adl-ZVMAPRGRP,

  • NAME_TEXT TYPE zv_adl-NAME_TEXT,

    • zzvmreqname TYPE zvmwfreq-zzvmreqname,

  • END OF t_zvmwfreq.

  • DATA : i_zvmwfreq TYPE STANDARD TABLE OF t_zvmwfreq,

  • i_apprgroup TYPE STANDARD TABLE OF t_zvmwfreq,

  • wa_zvmwfreq TYPE t_zvmwfreq.

Select NAME_TEXT

from zv_adl

into CORRESPONDING FIELDS OF TABLE i_apprgroup

where NAME_TEXT = i_apprgroup-name_text.