cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform how to determine the language of apurchase order.

Former Member
0 Kudos

Hi,

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

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

The language is in the vendor master data (LFA1-SPRAS). Pass it to the Smart Forms in CONTROL_PARAMETERS field LANGU (and don't forget to use control_parameters-langu in the Smart Forms when required)

Regards,

Raymond

Former Member
0 Kudos

Hi all,

Thanx for the answers so far.

1 question left for this. Which variable in the smartform itself is normally used/filled with the language to print.

Gr., Frank

raymond_giuseppi
Active Contributor
0 Kudos

As i wrote above, smart forms use control_parameters-langu

If the form does not exist in the language specified in LANGU , SAP Smart Forms evaluates the fields REPLANGU1-3 in the given sequence for the second choice.

Look at [Control Structure|http://help.sap.com/saphelp_nw70/helpdata/en/71/9ccd9c8e0e11d4b608006094192fe3/frameset.htm]

Regards,

Raymond

Former Member
0 Kudos

Hi Guiseppe,

So if i do uinderstand it right i have to check in this sequence

SSFCTRLOP-LANGU

SSFCTRLOP-REPLANGU1

SSFCTRLOP-REPLANGU2

SSFCTRLOP-REPLANGU3

And the first one filled is the right one.

Gr., Frank

Former Member
0 Kudos

No, just the first one

SSFCTRLOP-LANGU

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.

Former Member
0 Kudos

Thanx all for Helping

Gr., Frank

Answers (3)

Answers (3)

Former Member
0 Kudos

when calling a smartform you have some standard interface parameters.

one of them is called OUTPUT_OPTIONS and is of type SSFCOMPOP.

this parameter has an attribute bcs_langu.

Smartforms in done in this language when given, when not given smartforms is done in original language of the smartform.

former_member194416
Contributor
0 Kudos

In the program you call smartform While running smartform FM You must fill the langu field of Control_parameters structure.

Edited by: Gungor Ozcelebi on Jul 2, 2009 1:08 PM

Former Member
0 Kudos

Hi,

Before calling the smartfrom..use SET LANGUAGE statement

SET LANGUAGE <Reciever Language>.

Call the smartform Now

.