Purpose Use external and internal data formats The Open Call Interface provides and assumes all data to be in external format; this is normally the appropriate format for the UI layer. For particular cases you can use a special notation to exchange field values in the internal format. |
Data format in the Remote Function Call This is how it looks when your SAP logon language is English and your user defaults are "decimal point" and date format "MM-DD-YYYYY": Here DOC_ means "Document type".
In contrast to both screens above, the standard RFC returns internal values, e.g. The SAP conversion exits are special function modules; they consist mainly of
If you develop GuiXT scripts for users who work in different languages and with different settings for date and number display, the conversion rules need special attention and testing. Some rules are not obvious; for example, an order type "TA" will work in English with the same meaining as "OR" as long as no "TA" order type is created for English (table TAUUM, transaction OVA3). The Open Call Interface always provides the results in external format as shown in the SE37 environment, i.e. it automatically applies the appropriate conversion rules for input and output so that you can immediately work with the UI-format of all values. There are cases where you prefer to send or receive a value in the internal format; this is supported with the notation "*xxxx" instead of "xxxx" in the definition of a GuiXT structured variable or table variable. You may also use both notations simultaneously in one stucture if you need a value both in internal and in external format. Example The following Version 1 works well for users with English logon, but will not work in other logon languages if the partner role "SH" is not defined or has a different meaning in this language: // create structures/tables with the fields we need CreateTable V[orderpartners] include=V[orderpartner] // read partner roles for given order number V[aufnr] export.SALESDOCUMENT="aufnr" _ import.ORDERPARTNERS="orderpartners" // search "ship-to" partner Set V[mysearch.partn_role] "SH" Set V[mysearch.itm_number] "000000" // header partners // search partner table if Q[ok]Message "Ship-to partner: &V[orderpartner.customer]" else Message "Ship-to partner not found" endif
Version 2 uses the notation "*partn_role". This requests the internal value of the partner role and thereby will work in any language: // create structures/tables with the fields we need CreateTable V[orderpartners] include=V[orderpartner] // read order export.SALESDOCUMENT="aufnr" _ import.ORDERPARTNERS="orderpartners" // search "ship-to" partner Set V[mysearch.*partn_role] "WE" // WE from German "Warenempfänger" Set V[mysearch.itm_number] "000000" // header partners // search partner table if Q[ok]Message "Ship-to partner: &V[orderpartner.customer]" else Message "Ship-to partner not found" endif Formatting rules in the case of *xxxx notation
|
Components |