Smartform how to determine the language of apurchase order.
Maybe a simple question. But i cannot find it in my form because it isn't used in it so far.
A purchase order must be printed in the language of the receiver of the purchase (vendor).
Which variable is used to detemine in which language these form text has to be printed.
(it is not sy-langu).
No, just the first one
and well it wont be filled, YOU gotta fill it.
Since you want to print out something, you probably have an output type (Nachricht) which is beeing processed.
Language of output type (NAST-SPRAS) is normally drawn from communication language of customer.
So what you need to do is:
data: ls_controls type SSFCTRLOP. ls_controls-langu = nast-spras. CALL FUNCTION lv_formname EXPORTING * ARCHIVE_INDEX = * ARCHIVE_INDEX_TAB = * ARCHIVE_PARAMETERS = * CONTROL_PARAMETERS = ls_controls * MAIL_APPL_OBJ = * MAIL_RECIPIENT = * MAIL_SENDER = * OUTPUT_OPTIONS = * USER_SETTINGS = 'X' gt_header = gt_header gt_items = gt_items * IMPORTING * DOCUMENT_OUTPUT_INFO = * JOB_OUTPUT_INFO = * JOB_OUTPUT_OPTIONS = EXCEPTIONS formatting_error = 1 internal_error = 2 send_error = 3 user_canceled = 4 OTHERS = 5.