2008 Nov 05 9:38 AM
Hello Friends,
I have two parameters on selection screen.
Date
ID
When I do F4 for Date parameter, By calling following function it gives me date and ID value
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = ' '
F2NME = 'F110V-LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = v_laufd
LAUFI = v_laufi.
All I need is when I do F4, It should automatic fill the ID parameter.
Note : Date parameter filled automatically by doing F4.
Please give me an example.
Regards,
RH
2008 Nov 05 9:49 AM
Hi
U need to use the fm DYNP_VALUES_UPDATE in order to update ther field V_LAUFI
PARAMETERS: V_LAUFD TYPE F110V-LAUFD,
V_LAUFI TYPE F110V-LAUFI.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_LAUFD.
DATA: DYNAME LIKE D020S-PROG,
DYNUMB LIKE D020S-DNUM,
DYNPFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = ' '
F2NME = 'F110V-LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = V_LAUFD
LAUFI = V_LAUFI.
DYNAME = SY-REPID.
DYNUMB = SY-DYNNR.
DYNPFIELDS-FIELDNAME = 'V_LAUFI'.
DYNPFIELDS-FIELDVALUE = V_LAUFI.
APPEND DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = DYNAME
DYNUMB = DYNUMB
TABLES
DYNPFIELDS = DYNPFIELDS.Max
2008 Nov 05 9:41 AM
Hi.
Assign the value to another parameter in the event
AT SELECTION-SCREEN OUTPUT.
2008 Nov 05 9:46 AM
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = ' '
F2NME = 'F110V-LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = v_laufd
LAUFI = v_laufi.
if sy-subrc eq 0.
date-low = v_laufd.
id-low = va_laufi.
endif.
2008 Nov 05 9:47 AM
Hi Ronny,
See the below example.
Say two parameters.
1. Plant
2. Material type C.
Now say u enter Plant 0820. and if u press F4 in Material Field, F4 has to show all the material of Plant 0820.
If your question is as above here is the answer for that.
Else come out of Loop.
get all the material Using select query with respect to plant into one internal table.
Now using At Selection Screen on value-request for material.
call FM f4if_int_table_value_request.
Pass the internal table here.
Now if you press F4 for Material, u will get only those values corresponding to Plant.
Hope useful to U.
Regards,
Priya.
2008 Nov 05 9:48 AM
Hello,
When you press F4 and selects the data for that field then immediately move the ID field to the parameter of the id.
2008 Nov 05 9:49 AM
Hi
U need to use the fm DYNP_VALUES_UPDATE in order to update ther field V_LAUFI
PARAMETERS: V_LAUFD TYPE F110V-LAUFD,
V_LAUFI TYPE F110V-LAUFI.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_LAUFD.
DATA: DYNAME LIKE D020S-PROG,
DYNUMB LIKE D020S-DNUM,
DYNPFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = ' '
F2NME = 'F110V-LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = V_LAUFD
LAUFI = V_LAUFI.
DYNAME = SY-REPID.
DYNUMB = SY-DYNNR.
DYNPFIELDS-FIELDNAME = 'V_LAUFI'.
DYNPFIELDS-FIELDVALUE = V_LAUFI.
APPEND DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = DYNAME
DYNUMB = DYNUMB
TABLES
DYNPFIELDS = DYNPFIELDS.Max
2008 Nov 05 9:53 AM
you have to mention both field names in the function call (I assume these are v_laufd and v_laufi):
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = 'V_LAUFD'
F2NME = 'V_LUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = v_laufd
LAUFI = v_laufi.no need for dynpro update and such things, just check what the standard is doing
2008 Nov 05 10:13 AM
Hi Guy
The problem is the event AT SELECTION-SCREEN ON VALUE-REQUEST <FIELD>.
After leaving the event all values of all other input/output fields of selection-screen (except <FIELD>) will be lost: so if it needs to update other input/output fields in this event, the fm DYNP_VALUES_UPDATE has to be used just I've explained in my previuos answer.
Max
2008 Nov 05 10:18 AM
woud you please give it a try with the following example:
PARAMETERS : p_laufd TYPE reguh-laufd,
p_laufi TYPE reguh-laufi.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_laufd.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
f1typ = 'D'
f1nme = 'P_LAUFD'
f2nme = 'P_LAUFI'
* DISPLAY_LAUFK = 'X'
* EXPLAIN_LAUFK = ' '
IMPORTING
laufd = p_laufd
laufi = p_laufi.
* TABLES
* LAUFK =.(pls. note the difference: in importing parameters f1nme and f2nme the names of the dynpro fields have to be mentioned)
2008 Nov 05 10:24 AM
2008 Nov 05 10:26 AM
Max is right Eric.
I already tried like u did but its not working.
anyway i got ans.
Thanks Max,
Thanks All.
2008 Nov 05 10:27 AM
interesting... if I try than it works
can you copy the code here?
Again, again, again: the importing parameters (f1nme and f2nme) of the FM has to get the names of the two selection screen fields for the payment run and date, the DYNP_VALUE_UPDATE FM will be called inside the F4_ZAHLLAUF FM in this case
modified source code of Max:
PARAMETERS: V_LAUFD TYPE F110V-LAUFD,
V_LAUFI TYPE F110V-LAUFI.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_LAUFD.
* DATA: DYNAME LIKE D020S-PROG,
* DYNUMB LIKE D020S-DNUM,
* DYNPFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
F1TYP = 'D'
F1NME = 'V_LAUFD'
F2NME = 'V_LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
LAUFD = V_LAUFD
LAUFI = V_LAUFI.
* DYNAME = SY-REPID.
* DYNUMB = SY-DYNNR.
* DYNPFIELDS-FIELDNAME = 'V_LAUFI'.
* DYNPFIELDS-FIELDVALUE = V_LAUFI.
* APPEND DYNPFIELDS.
*
* CALL FUNCTION 'DYNP_VALUES_UPDATE'
* EXPORTING
* DYNAME = DYNAME
* DYNUMB = DYNUMB
* TABLES
* DYNPFIELDS = DYNPFIELDS.
2008 Nov 05 10:43 AM
Hi
I'm sorry Eric is right, that works:
PARAMETERS : V_laufd TYPE reguh-laufd,
V_laufi TYPE reguh-laufi.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR V_laufd.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
f1typ = 'D'
f1nme = 'V_LAUFD'
f2nme = 'V_LAUFI'
DISPLAY_LAUFK = 'X'
EXPLAIN_LAUFK = ' '
IMPORTING
laufd = V_laufd
laufi = V_laufi.Where is the trick?
Just into the fm F4_ZAHLLAUF, here the fm DYNP_VALUES_UPDATE is called in order to update both fields.
Max
2008 Nov 05 10:54 AM
>
>
> f1nme = 'V_LAUFD' > f2nme = 'V_LAUFI' >>
> Where is the trick?
>
> Just into the fm F4_ZAHLLAUF, here the fm DYNP_VALUES_UPDATE is called in order to update both fields.
>
> Max
I left only the "tricky" change from the FM call - you can note the difference (I told earlier these are importing parameters, but no, they are exporting ones.)
2009 Mar 18 8:39 AM
Hi,
I just found this thread, because I have the same problem. I inserted the solution but it doesn't work sufficient.
When I choose F4 in the field LAUFD it succesfully shows all the payment runs. If I choose one of them only the field LAUFD will be updated. The field LAUFI remains empty. Here my listing:
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_laufd LIKE f110v-laufd OBLIGATORY,
p_laufi LIKE f110v-laufi OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
----
At Selection-Screen *
----
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_laufd.
CALL FUNCTION 'F4_ZAHLLAUF'
EXPORTING
f1typ = 'D'
f1nme = 'F110V-LAUFD'
f2nme = 'F110V-LAUFI'
display_laufk = 'X'
explain_laufk = ' '
IMPORTING
laufd = p_laufd
laufi = p_laufi.
What is wrong on it?
Thanks
Uwe
2009 Mar 18 9:36 AM
Hi,
got the solution. For my request it as necessary to use the function DYNP_VALUES_UPDATE. Now it works.
Thank to all.
Uwe