Use the User EXIT..
EXIT_SAPFP50M_001 - PBO
EXIT_SAPFP50M_002 - PAI
EXIT_SAPFP50M_002 - PAI
Based upon the requirement, we need to write the logic either in PAI or PBO.
Use the below logic to fetch the screen data..
DATA : lx_0267 TYPE p0267.
Constant : lc_0267 TYPE infty value '0267'.
* Check the Infotypes...
CLEAR lx_0267.
IF sy-tcode NE 'PA20' AND ( ipsyst-ioper EQ 'INS' OR ipsyst-ioper EQ 'MOD' ).
CASE innnn-infty.
WHEN lc_0267.
*** Importing data from innnn to the structure lx_0267
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = lx_0267.
CLEAR lx_0267.
IF sy-tcode NE 'PA20' AND ( ipsyst-ioper EQ 'INS' OR ipsyst-ioper EQ 'MOD' ).
CASE innnn-infty.
WHEN lc_0267.
*** Importing data from innnn to the structure lx_0267
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = lx_0267.
Here you can write the logic... Like... Validations or pass default values..
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
EXPORTING
pnnnn = lx_0267
IMPORTING
prelp = innnn.
WHEN OTHERS.
ENDCASE.
WHEN OTHERS.
ENDCASE.
ENDIF.
EXPORTING
pnnnn = lx_0267
IMPORTING
prelp = innnn.
WHEN OTHERS.
ENDCASE.
WHEN OTHERS.
ENDCASE.
ENDIF.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.