OL_PREPARE_OUTPUT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name OL_PREPARE_OUTPUT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
WSO7
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'OL_PREPARE_OUTPUT' "
* EXPORTING
* lifnr = SPACE " lfa1-lifnr
* ekorg = SPACE " lfm1-ekorg
* no_warnings = ' ' " wtdy-typ01
TABLES
a_mara = " wsol_matnr
error_table = " wsol_matnr
fprot = " reo_message
* pt_twpdo = " twpdo
* pt_swhactor = " swhactor
. " OL_PREPARE_OUTPUT
The ABAP code below is a full code listing to execute function module OL_PREPARE_OUTPUT including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| it_a_mara | TYPE STANDARD TABLE OF WSOL_MATNR,"TABLES PARAM |
| wa_a_mara | LIKE LINE OF it_a_mara , |
| it_error_table | TYPE STANDARD TABLE OF WSOL_MATNR,"TABLES PARAM |
| wa_error_table | LIKE LINE OF it_error_table , |
| it_fprot | TYPE STANDARD TABLE OF REO_MESSAGE,"TABLES PARAM |
| wa_fprot | LIKE LINE OF it_fprot , |
| it_pt_twpdo | TYPE STANDARD TABLE OF TWPDO,"TABLES PARAM |
| wa_pt_twpdo | LIKE LINE OF it_pt_twpdo , |
| it_pt_swhactor | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_pt_swhactor | LIKE LINE OF it_pt_swhactor . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_lifnr | TYPE LFA1-LIFNR , |
| it_a_mara | TYPE STANDARD TABLE OF WSOL_MATNR , |
| wa_a_mara | LIKE LINE OF it_a_mara, |
| ld_ekorg | TYPE LFM1-EKORG , |
| it_error_table | TYPE STANDARD TABLE OF WSOL_MATNR , |
| wa_error_table | LIKE LINE OF it_error_table, |
| ld_no_warnings | TYPE WTDY-TYP01 , |
| it_fprot | TYPE STANDARD TABLE OF REO_MESSAGE , |
| wa_fprot | LIKE LINE OF it_fprot, |
| it_pt_twpdo | TYPE STANDARD TABLE OF TWPDO , |
| wa_pt_twpdo | LIKE LINE OF it_pt_twpdo, |
| it_pt_swhactor | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_pt_swhactor | LIKE LINE OF it_pt_swhactor. |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name OL_PREPARE_OUTPUT or its description.