cancel
Showing results for 
Search instead for 
Did you mean: 

how to truncate a field in a Select Query

Former Member
0 Kudos

Hello Gurus,

I am new in SAP, i have a question i am making an appointment letter in SMARTFORMS , in global declaration (initialization) i am using a select query

SELECT SINGLE BET01 FROM PA0008 INTO G_BET01 WHERE PERNR = WA_PERNR.

where BET01 is the Amount field which is getting printed in the smart form but its takes 5 to 6 character blank spaces in the printing time, i want to truncate this space (remove this space ) in the print time , please tell me how to remove this space , the field size is 13 , how can i reduce the field size in my smartform query. please help . G_BET01 is a variable

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Welcome to SDN.

Display amount field as shown in the below example. Make sure you change your editor.

EX: &AMOUNT(C)&

Regards,

SaiRam

Answers (2)

Answers (2)

Former Member
0 Kudos

thankyou so much , i just got the answer half an hour ago , i condense it "&G_BET01(12C)&" by editing the field "&G_BET01" , and its working for me , bu againt thankyou so much for the reply.

Former Member
0 Kudos

Maybe you can use this.

DATA: d_char(15).

WRITE G_BET01 TO d_char CURRENCY 'XXX'.

'Then you can remove the spaces using :

CONDENSE d_char no-gaps.