The line you have given does not apply for a function call using F as Indicator for step.
It should be in the format
0006 WKWNG 06 715 F formname(progname)
where 'formname' is the form or routine in program 'progname'
As I said before, the routine needs to do any required validation, fetching the IT 8 relevant for the P0006-BEGDA, copying the IT 8 and changing any field as required and return the values in RP50D structure's fields.
Then the dynamic action will continue with lines as below:
0006 WKWNG 06 718 P RP50D-DATE1<>""
0006 WKWNG 06 727 I INS,0008,OZMG
0006 WKWNG 06 721 F P0008-BEGDA=DATE1
0006 WKWNG 06 724 F P0008-ENDDA=DATE2
0006 WKWNG 06 727 F ...
.....
Here it is assumed the form will fill RP50D structure fields DATE1 = IT 8's BEGDA and DATE2 = ENDDA. Check if the RP50D structure's fields are enough for your requirement. Else you can modify the include CI_PRP50D component type in the structure to add more fields. Use these fields to fill (by the form) and use them in the F indicator lines to fill the IT 8. Note if the include CI_PRP50D is not created already, you may need to create it and then add fields to the include.
The reason to display the IT 8 is so that the user may fill/change any data and then save. This will go through the normal R/3 program module so that all further processes are ensured for data maintenance.