Hi Murali,
The SAP delivers the solution to print the TO item by SAPScript, but we can do it by Smartform as well, as in
- You need to create a project for the enhancement MWMD0001, because EXIT_RLVSDR40_001 will fulfill your purpose of doing it the other ways i.e. via Smart from.
- For this you have to use CMOD transaction to create the project for the above said enhancement.
- Note: If you do this way any configuration done via OMNU wont't be considered.
- Then after in teh import parameters you have a table XRLDRI, which contains both the warehouse number and the transfer order number, the same can be passed on to the designed Smartform to fulfill your purpose.
Sample Code, you can refer to:
*local variable declaration.
DATA: l_wa_fm_name TYPE rs38l_fnam.
* Local Field Symbols
FIELD-SYMBOLS : <l_fs_rldri> TYPE rldri.
* Local Constant declaration
CONSTANTS : lc_fmname TYPE tdsfname VALUE 'XYXYXYXY', "Smartform name, here designated by 'XYXYXYXY'
lc_chk TYPE rldrudruck VALUE 'X'.*Moving Transfer Order Print :Item level data into corresponding work area.
LOOP AT xrldri ASSIGNING <l_fs_rldri>.
* Determine smartform function module
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lc_fmname
IMPORTING
fm_name = l_wa_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc = 0.
* Call the function module of the smartform
CALL FUNCTION l_wa_fm_name
EXPORTING
user_settings = lc_chk
tanum = <l_fs_rldri>-tanum
lgnum = <l_fs_rldri>-lgnum
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc = 0.
ENDIF.
ENDIF.
ENDLOOP."LOOP AT xrldri ASSIGNING <l_fs_rldri>.
Please validate the same at your end and let me know in case you require any further inputs from my end.
BR/Thanks
Pranav Agrawal