2009 Mar 21 5:23 AM
Hi friends,
For my requirement, I have to use Field Exit.
Can u please provide me steps/ notes for field exit.
Regards.
2009 Mar 21 9:40 AM
Hi,
Follow this:
- check data element of your field
- go to SE37 and create a function group of your choice
- run the program RSMODPRF
- type your data element and run it
- the system has to create FM for the field exit. It already suggests the name. Do not change it, just create that one.
- assign your previously created Function Group
- don't change the interface of the FM: input and output must be handled here in order to transport data to/from screen. Here you can check it the field fullfills your requirement
IF input = ...
MESSAGE 'Wrong input' TYPE 'E'. "message type E will restart PAI and field will be input ready again
ENDIF.
"at the end you must use this
output = input. "to transport data
- now using menu BACK function go back to program RSMODPRF and activate your field exit (Fieldexit -> Activate).
- Don't forget to activate your FG and FM too.
This procedure will activate Global field exit, if you want to create a local one, use the same program but Assing a screen and program to that data element.
Regards
Marcin
Hi friends,
For my requirement, I have to use Field Exit.
Can u please provide me steps/ notes for field exit.
Regards.
2009 Mar 21 9:40 AM
Hi,
Follow this:
- check data element of your field
- go to SE37 and create a function group of your choice
- run the program RSMODPRF
- type your data element and run it
- the system has to create FM for the field exit. It already suggests the name. Do not change it, just create that one.
- assign your previously created Function Group
- don't change the interface of the FM: input and output must be handled here in order to transport data to/from screen. Here you can check it the field fullfills your requirement
IF input = ...
MESSAGE 'Wrong input' TYPE 'E'. "message type E will restart PAI and field will be input ready again
ENDIF.
"at the end you must use this
output = input. "to transport data
- now using menu BACK function go back to program RSMODPRF and activate your field exit (Fieldexit -> Activate).
- Don't forget to activate your FG and FM too.
This procedure will activate Global field exit, if you want to create a local one, use the same program but Assing a screen and program to that data element.
Regards
Marcin
2009 Mar 21 11:38 AM
Thanks Marcin Pciak for your Reply.
I am using for KOSTL field.
What i will declare in Import/ Export Tab.
1. I tried with INPUT type KOSTL / OUTPUT type KOSTL. Is it correct ?
2. Also i want for perticular screen & perticular program.
How i will do ??
Regards,
2009 Mar 21 12:53 PM
1) Not necessary but correct
2) Run the program RSMODPRF, leave the fields initial and execute it. This will show all field exits
Now you can see your field as GLOBAL one. To change it to LOCAL follow the steps below:
- Select data element for KOSTL and press Assign Prog/Screen
- Type your program and screen number. For field exit input field, type number of the local fieldexit (i.e.1 as we don't have any other, max 36)
- System again will expect to create FM (this time for LOCAL fieldexit). Do same steps as for GLOBAL fm creation
- Activate FM and FG
- Go back to fieldexit overview, select once again KOSTL and choose from menu Field->Activate
- Run the program with the field and observe the results
Note!
- LOCAL fieldexit can only be created once GLOBAL one is created. So unfortunatelly these 2 procedures must be completed. Though GLOBAL one is not used anymore, don't remove FM for it. System needs it for some internal purposes.
- Do not use any of these command inside this FM: BREAK-POINT, CALL, SUBMIT, COMMIT/ROLLBACK, STOP, REJECT, MESSAGE type W/I
Regards
Marcin
2009 Mar 24 5:56 AM