2013 Nov 26 6:13 AM
Hi Experts,
I have a requirement to add new page to my custom SAP Script with some additional data. Structure "HRPAYCHLAW_OUTPUT" was enhanced with additional fields and those fields were populated using BADI implementation for BADI "HRPAYCHLAW2(HR-CH: Wage Statement 2005).
Method "Print" for class "CL_HRPAYCH_LAW" was enhanced to call newly added page with following code.
CALL FUNCTION 'END_FORM'. "End of printing page BEIBLATT
CALL FUNCTION 'START_FORM' "Start a new page
EXPORTING
Startpage = 'TAXCONLT'. "Direct access to page TAXCONLT for tax confirmation letter.
* lw_output = a_output.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
Window = 'HEADERTL'. " Window to print Header information for TAX confirmation letter.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAXLETTER'
Window = 'MAINTL'.
CALL FUNCTION 'END_FORM'. "End of printing page TAXCONLT for tax confirmation letter.
Now the issue is availability for Data inside this Form. Structure a_output holding data is not available inside WRITE FORM. Request your inputs how to pass the values to FORM.
Hi Hemant
In your sap script which variables are you using to Display the output? If you are using A_OUTPUT it will work ...
Nabheet
2013 Nov 26 6:18 AM
Hi Hemant
In your sap script which variables are you using to Display the output? If you are using A_OUTPUT it will work ...
Nabheet
2013 Nov 26 7:06 AM
Hi Nabheet,
Thanks for your reply.
I am using A_OUTPUT for displaying values, but inside write forms the structure values are blank and when I return back to enhancement values are in the structure.
2013 Dec 23 12:24 PM
Issue is resolved now. Data was cleared in structure HRPAYCHLAW_OUTPUT when following statement was executed.
CALL FUNCTION 'END_FORM'. "End of printing page BEIBLATT
It is working with the following code:-
* Start second page
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'NEW-PAGE TAXCONLT'.
| CALL FUNCTION 'WRITE_FORM' | |
| EXPORTING | |
| element = 'TAXLETTER' | |
| Window = 'MAINTL' | |
| EXCEPTIONS | |
| OTHERS = 01. |
Thanks.
Hemant Singh Bisht
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |