cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger the PAI in the POV (process value request)

Former Member
0 Kudos

Hello everybody,

On business agreement field in the POV, I developed a dropdown. This dropdown is working very well. When the user has chosen the business agreement in the dropdown, the corresponding address must be displayed in another field on the screen.

The search on the adress is in the PAI.

To see the address updated on the screen, the user must then press enter and that triggers the PAI.

Is it possible to trigger the PAI in the POV so that the user can see immediately on the screen the address ?

Accepted Solutions (0)

Answers (4)

Answers (4)

hymavathi_oruganti
Active Contributor
0 Kudos

PAI will be triggered only when u press enter.

so instead, u can call in POV itself DYNP_VALUES_UPDATE

or DYNP_VALUES_READ.

vinod_gunaware2
Active Contributor
0 Kudos

Hi

Use following functions,

I will definately work, i have faced same problem.

call function <b>'DYNP_GET_STEPL'</b>

importing

povstepl = step_line

exceptions

stepl_not_found = 1

others = 2.

ltab_fields-fieldname = 'ZMM_TABLE-VALUE'.

ltab_fields-fieldvalue = t_f4_table-fieldtext.

ltab_fields-stepl = step_line.

append ltab_fields.

call function <b>'DYNP_VALUES_UPDATE'</b>

exporting

dyname = lc_dyname

dynumb = lc_dynumb

tables

dynpfields = ltab_fields

exceptions

others = 8.

<b> commit work and wait.</b>

regards

vinod

Former Member
0 Kudos

Hi everybody,

Thanks for your help.

I have tried with function 'DYNP_VALUES_UPDATE' with and without 'DYNP_GET_STEPL' before but it still doesn't work.

Here are my code : if you find my error I recompense you very much immediately. )

Many thanks in advance

Marie

The name of the field to update on the screen is

ZCRMT_0100_BTX_UI08-ZZADTXT.

Here is my POV :

*****************

module list_box_zzbuag_id input.

  • Here is the piece of code for the dropdown

  • ------------------------------------------

perform read_activity_partner changing w_activity_partner.

clear i_buag_id.

refresh i_buag_id.

select buag_id

buag_text

into table i_buag_id

from crmh_buag_search

where partner eq w_activity_partner.

sort i_buag_id by buag_id.

delete adjacent duplicates from i_buag_id comparing buag_id.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = c_retfield_buag_id

value_org = c_value_org_s

tables

value_tab = i_buag_id

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

  • Here is the code to search the corresponding address

  • Within this module, I fill the screen field

  • zcrmt_0100_btx_ui08-zzadtxt with the address

perform read_adtxt.

  • Here I do my best to apply the solution you propose but without success

Here are the declarations :

data :

w_step_line like sy-stepl.

i_dynpfields type standard table of dynpread,

l_dynpfields like line of i_dynpfields.

w_dyname like d020s-prog,

w_dynumb like d020s-dnum,

c_adtxt like screen-name value 'ZCRMT_0100_BTX_UI08-ZZADTXT',

call function 'DYNP_GET_STEPL'

importing

povstepl = w_step_line

exceptions

stepl_not_found = 1

others = 2.

refresh i_dynpfields.

clear l_dynpfields.

w_dyname = sy-repid.

w_dynumb = sy-dynnr.

l_dynpfields-fieldname = c_adtxt.

l_dynpfields-fieldvalue = zcrmt_0100_btx_ui08-zzadtxt.

l_dynpfields-stepl = w_step_line.

append l_dynpfields to i_dynpfields.

call function 'DYNP_VALUES_UPDATE'

exporting

dyname = w_dyname

dynumb = w_dynumb

tables

dynpfields = i_dynpfields

exceptions

others = 8.

commit work and wait.

endmodule. " list_box_zzbuag_id INPUT

Former Member
0 Kudos

for me it is use less that you use STEPL is you are not in a table control or Step loop.

Are you sure sy-dynnr and sy-repid is correct ?

Is the field not in a subscreen maybe ?

The problem is it that it stays the same values ?

Is there any return code by the function dynp values update ?

hardcode a break point before the call of the FM and check the return code!

Former Member
0 Kudos

How does it work now ?

Former Member
0 Kudos

Hi Stephan,

It still doesn't work. I am very sorry.

I have put a breakpoint just after the function F4IF_INT_TABLE_VALUE_REQUEST (function for the drop down).

In fact, when I choose another BUAG_ID on the screen via this drop down function, it is ok on the screen but nothing happens in the code.

I have to press ENTER to force the system to continue the execution of the code in the POV (the read_adtxt subroutine and after the code for the DYNP_VALUES_UPDATE).

Perhaps it is in fucntion F4IF_INT_TABLE_VALUE_REQUEST that I have to add a parameter so that it continues to execute the code automatically. It is strange hein ..

I use the function for the dropdown like this :

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BUAG_ID'

value_org = 'S'

tables

value_tab = i_buag_id

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

(I don't know for what stands the 'S' because I have copied it from a demo).

Do you have an idea ?

Thanks ina dvance for your help,

Marie

Former Member
0 Kudos

Finally I solve this problem like this :

-> I put a function code on the field type listbox in the screen painter

and that triggers automatically the PAI when the user choose a value.

In the PAI I fill the address corresponding to the business agreement choosen.

Then the PBO is executed as usual and the address is displayed automatically to the user.

I don't know if it works with function DYNP_VALUES_UPDATE like you suggest because I don't succeed so I will not grant you points. Sorry for this time.

Marie

Former Member
0 Kudos

Hi Marie,

I suppose your requirement is like this

"when I select a value from the list , another field should be filled".

Just check this code.This works..

tables TCURT.

DATA DYFIELDS LIKE DYNPREAD OCCURS 1 WITH HEADER LINE.

PARAMETERS: P_WAERS LIKE TCURT-WAERS, "Currency

P_LTEXT LIKE TCURT-LTEXT, "Long Text

P_KTEXT LIKE TCURT-KTEXT. "Short Text

*----


*

*

*

*--- Example of updating value of another field on the screen -


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WAERS.

CLEAR: DYFIELDS[], DYFIELDS.

*--- select currency

CALL FUNCTION 'HELP_VALUES_GET'

EXPORTING

fieldname = 'WAERS'

tabname = 'TCURT'

IMPORTING

SELECT_VALUE = P_WAERS.

*--- get long text for the selected currency

SELECT SINGLE LTEXT FROM TCURT

INTO DYFIELDS-FIELDVALUE

WHERE SPRAS = SY-LANGU

AND WAERS = P_WAERS.

IF SY-SUBRC <> 0.

CLEAR DYFIELDS-FIELDVALUE.

ENDIF.

*--- update another field

DYFIELDS-FIELDNAME = 'P_LTEXT'.

APPEND DYFIELDS.

CALL FUNCTION 'DYNP_VALUES_UPDATE'

EXPORTING

DYNAME = SY-CPROG

DYNUMB = SY-DYNNR

tables

dynpfields = DYFIELDS .

*----


*- Example of reading value of anotherfield--


AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_KTEXT.

*--- read another field

CLEAR: DYFIELDS[], DYFIELDS.

DYFIELDS-FIELDNAME = 'P_WAERS'.

APPEND DYFIELDS.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = SY-CPROG

DYNUMB = SY-DYNNR

TABLES

DYNPFIELDS = DYFIELDS .

READ TABLE DYFIELDS INDEX 1.

*--- get short text and update current field

SELECT SINGLE KTEXT FROM TCURT

INTO P_KTEXT

WHERE SPRAS EQ SY-LANGU

AND WAERS EQ DYFIELDS-FIELDVALUE.

Regards,

Sylendra.

Former Member
0 Kudos

i had tried the same, but it doesnt work... even if u try to populate ur address in POV for BA, the value doesnt appear without pressing enter.

Regards,

Bikash

Former Member
0 Kudos

Hi!

Use fm

DYNP_VALUES_UPDATE

in order to set the value of another field of the screen!

this way is working!

Marie,

Utilise le function module

DYNP_VALUES_UPDATE

ce function module permet justement dans le POV d'affecter la valeur d'un autre champs!!

De la même manière DYNP_VALUES_READ permet dans le POV de lire un champs qui aurait été modifié!

Bien à toi et merci pour la récompens!

Former Member
0 Kudos

Hello Marie,

As u are using POV why don't to also determine the value which needs to be populated in the other field and write it.