‎2006 Jun 02 8:12 AM
Hi all,
Good Day to all of u.
i have a problem with PO in Sap Script. In the output
all values appearing like 1.000,00 which must be 1,000.00
why this problem at the output as i am picking variable by inserting and how to solve this problem.
‎2006 Jun 02 8:27 AM
Thanx for replies, i set the setting but again the problem is same.
how and where to set country in script .
Regards,
Rajvinder
‎2006 Jun 02 8:15 AM
Hi rajvinder,
1. This format of output
depends upon the user settings.
2. the user himself/herself
can change their settings,
and things will become allright.
3. SYSTEM------> USER PROFILE -
> OWN DATA
In that there is on tab
DEFAULTS
4. In that there is the field
DECIMAL NOTATION.
(for DOT, COMMA IN NUMBERS AND DECIMAL AS WELL)
regards,
amit m.
‎2006 Jun 02 8:15 AM
system>user profil-> owndata->default->choose decimal notification of ur choice...
‎2006 Jun 02 8:16 AM
Hi
The output format depends on the user attributions, if you want to use different attributions use SET COUNTRY statament in sapscript.
Max
‎2006 Jun 02 8:42 AM
Thanx Max,
My problem is rectified one more thing i want ask.
I also tried for puting text in the PO by using
DEFINE &PONO& = '&ekpo-ebeln&'
DEFINE &ITEMNO& = '&EKPO-ebelp&'
DEFINE &NUMBER& = '&PONO&&ITEMNO&'
INCLUDE &PONO& OBJECT EKPO ID F01 LANGUAGE 'EN'
where in PONO i am concateing the Po no and item ,
but i am not getting the text. plz. give your suggestion
Regards,
Rajvinder
‎2006 Jun 02 8:58 AM
Hi
You can't do the statament CONCATENATE in the sapscript, but in the driven program.
If you don't want or can't change it you should create a routine to do that:
/: PERFORM <form> IN PROGRAM <prog>
/: USING &ekpo-ebeln&
/: USING &EKPO-EBELP&
/: CHANGING &NUMBER&
/: ENDPERFORM
/: INCLUDE &NUMBER& OBJECT EKPO ID F01 LANGUAGE 'EN'
The form for CONCATENATE has to be defined in program <prog> and has to have the followin interface:
FORM <form> TABLES IN_TAB STRUCTURE ITCSY
OUT_TAB STRUCTURE ITCSY.
DATA: EBELN TYPE EBELN,
EBELP TYPE EBELP.
DATA: TXT_NAME(20).
READ TABLE IN_TAB WITH KEY FIELD = 'EKPO-EBELN'.
IF SY-SUBRC = 0.
EBELN = IN_TAB-VALUE.
ENDIF.
READ TABLE IN_TAB WITH KEY FIELD = 'EKPO-EBELP'.
IF SY-SUBRC = 0.
EBELP = IN_TAB-VALUE.
ENDIF.
CONCATENATE EBELN EBELP TO TXT_NAME.
READ TABLE OUT_TAB WITH KEY FIELD = 'NUMBER'.
IF SY-SUBRC = 0.
OUT_TAB-VALUE = TXT_NAME.
MODIFY OUT_TAB INDEX SY-TABIX.
ENDIF.
ENDFORM.
P.S. use conversion routine ALPHA to convert the output format to input format for field EBELN and EBELP.
Max
‎2006 Jun 02 8:19 AM
Hi,
this is specific to some countries.
Check your default settings in SU01.
rgds,
latheesh
‎2006 Jun 02 8:27 AM
Thanx for replies, i set the setting but again the problem is same.
how and where to set country in script .
Regards,
Rajvinder
‎2006 Jun 02 8:36 AM
Hi
You should place it at the beginning of text element, anyway before printing the variable.
This is an extract of the help:
..........................................
The formatting for certain field types depends on the country settings. These field types include, for example, date fields and number fields that include either a decimal point or the thousands separator character. The formatting options defined in the user master record are usually the ones used here. To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command. The country-dependent formatting options are stored in the T005X table.
Syntax:
/: SET COUNTRY country_key
You can enter the country key either as a literal value enclosed in quotes or as a symbol.
/: SET COUNTRY 'CAN'
/: SET COUNTRY &country_key&
Use a blank country name to revert to the setting found in the user master record:
/: SET COUNTRY ' '
This SAPscript command actually calls the corresponding ABAP command internally. This guarantees the effect of the SAPscript command to be identical with that of the ABAP command.
If the formatting turns out not to be as required, then you should check the settings in table T005X.
This is the link:
http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm
Max
‎2006 Jun 02 8:56 AM
Setting the User Decimals Format
OY01
SU01
- Maintain users -> Click DefaultsbuttonFormatting Date Fields: SET DATE MASK
To define the formatting of date fields, use the SET DATE MASK control command. Executing this command causes all subsequent date fields to be printed using the specified format.Country-Dependent Formatting: SET COUNTRY
The formatting for certain field types depends on the country settings. These field types include, for example, date fields and number fields that include either a decimal point or the thousands separator character. The formatting options defined in the user master record are usually the ones used here. To choose a formatting option other than the one specified in the user master record, use the SET COUNTRY control command. The country-dependent formatting options are stored in the T005X table.Syntax:
/: SET COUNTRY country_key
You can enter the country key either as a literal value enclosed in quotes or as a symbol.
/: SET COUNTRY 'CAN'
/: SET COUNTRY &country_key&
Use a blank country name to revert to the setting found in the user master record:
/: SET COUNTRY ' '
This SAPscript command actually calls the corresponding ABAP command internally. This guarantees the effect of the SAPscript command to be identical with that of the ABAP command.
If the formatting turns out not to be as required, then you should check the settings in table T005X.
regards
vinod