Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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).

Gr., Frank

Former Member
Former Member replied

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
*     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
*     JOB_OUTPUT_INFO            =
*     JOB_OUTPUT_OPTIONS         =
      formatting_error           = 1
      internal_error             = 2
      send_error                 = 3
      user_canceled              = 4
      OTHERS                     = 5.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question