..3 Printing program
Create a report Z_SHIPPING_LABEL and paste below code into it:
REPORT z_shipping_label.
* declare selection-screen
PARAMETERS:
p_name TYPE text255 ,
p_street TYPE text255 ,
p_town TYPE text255 ,
p_state TYPE text255 ,
p_zip TYPE text255 .
* declare the context
DATA gs_context TYPE zcontext_shipping_label .
* fill the context
gs_context-to_name = p_name .
gs_context-to_street = p_street.
gs_context-to_town = p_town .
gs_context-to_state = p_state .
gs_context-to_zip = p_zip .
* call the form
CALL FUNCTION 'ZXLWB_CALLFORM'
EXPORTING
iv_formname = 'SHIPPING_LABEL'
iv_context_ref = gs_context
EXCEPTIONS
OTHERS = 2.
IF sy-subrc NE 0 .
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 .
ENDIF .