2009 Apr 29 9:46 PM
Hi,
When I select an employee in Infotype 0194 using transaction PA30, I would like to set a series of fields to a series of values from another table. I've implemented it via an enhancement to HRPAD00INFTY's BEFORE_OUTPUT method, but the values aren't showing up in the fields on the change screen, and I do not understand why it isn't working properly. Could someone tell me what I'm doing wrong?
DATA i0194 TYPE p0194.
IF sy-tcode = 'PA30' AND INNNN-INFTY = '0194'.
CLASS cl_hr_pnnnn_type_cast DEFINITION LOAD.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = i0194.
"Changes to i0194 here
i0194-ORNAM = ........
i0194-ORSTR = ........
i0194-ORORT = ........
........etc.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = i0194
IMPORTING
PRELP = INNNN.
ENDIF.
Looking through the debugger, the code is being executed and the data appears to be copied over, but it's not appearing in the fields on the change or display screens.
Hi,
When I select an employee in Infotype 0194 using transaction PA30, I would like to set a series of fields to a series of values from another table. I've implemented it via an enhancement to HRPAD00INFTY's BEFORE_OUTPUT method, but the values aren't showing up in the fields on the change screen, and I do not understand why it isn't working properly. Could someone tell me what I'm doing wrong?
DATA i0194 TYPE p0194.
IF sy-tcode = 'PA30' AND INNNN-INFTY = '0194'.
CLASS cl_hr_pnnnn_type_cast DEFINITION LOAD.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = i0194.
"Changes to i0194 here
i0194-ORNAM = ........
i0194-ORSTR = ........
i0194-ORORT = ........
........etc.
CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP
EXPORTING
PNNNN = i0194
IMPORTING
PRELP = INNNN.
ENDIF.
Looking through the debugger, the code is being executed and the data appears to be copied over, but it's not appearing in the fields on the change or display screens.
2009 Apr 29 10:05 PM
Hello Andrew
Have you had a look at the type of the method parameters?
All are IMPORTING meaning that none of the changes you do within your method is propagated to the calling program.
However, you may use the following trick described in:
[SAP User Exits and the People Who Love Them|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]
Regards
Uwe
2009 Apr 30 3:46 PM
Ah. Thank you for pointing that out. The original plan was to modify the user exit to do this, but the PBO use exit does not seem to be invoked when selecting change or display mode. I'm at a bit of a loss as how to modify the screen fields during PBO.
2009 Apr 30 7:46 PM
I resolved the problem by enhancing a later point in the program MP019400 to place the values for P0194-ORNAM, etc., in there. Now it is setting the data as I want it.
2009 Aug 03 5:34 PM
Can you please explain the procedure to do it as I am facing the same problem.
Thanks
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |