2006 Apr 11 12:07 PM
Hi All,
I want a field called status on my screen, once i select that field to 'yes' i want to automatically set a date field on the screen to today's date.
I want this to happen even before the PAI event, i.e., when i change a value on one field i want to trigger the action of updating another field.
is there a way to do this???
Thanks & Regards,
Thirumal
Hi All,
I want a field called status on my screen, once i select that field to 'yes' i want to automatically set a date field on the screen to today's date.
I want this to happen even before the PAI event, i.e., when i change a value on one field i want to trigger the action of updating another field.
is there a way to do this???
Thanks & Regards,
Thirumal
2006 Apr 11 12:10 PM
2006 Apr 11 12:10 PM
Hi Thirumal,
YOu may have to use DYNP_VALUES_READ and DYNP_VALUE_UPDATE function modules in PBO section.
Regards,
Ravi
2006 Apr 11 12:14 PM
Hi Both,
I am working on this function module already, but what i found in library is this :"There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event"
So does this mean that only on POV this is used or if it can solve my case can anyone tell me the logic
2006 Apr 11 12:18 PM
I don't think ther is any problem in using these Fms in other places.
DYNP_VALUES_READ would give the values of the screen fields and DYNP_VALUES_UPDATE would update the screen fields with the values you pass.
There are examples given in the FM documentation also.
Regards,
Ravi
2006 Apr 11 12:34 PM
Hi Vinod,
In my case i have a field on the module pool program, the f4 help is attached in the database table itself..
there is no POV event in the program.. how can i trigger that...
Thanks,
Thirumal
2006 Apr 11 12:18 PM
<b>DYNP_VALUES_READ</b> Reads a screen field
<b>DYNP_VALUES_UPDATE</b> Updates a screen field
<b>Check it PAI after 'yes'</b>
REPORT ZVV.
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 another field -
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
vinod
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |