SAP Functions

Alles rund um die Sprache ABAP®: Funktionsbausteine, Listen, ALV

SAP Functions

Postby Christoph4837 » Wed May 28, 2003 9:43 am

Hi all experts,

Sorry, I don't know german language.

I would like to ask for some SAP functions.

a. convert the leading space to zeros at char field.
Example: a filed with ' 6' convert to '000006'.

b. Check the blank field.
Example: a field called wa_text = ' '.
at ABAP, I would like to check if wa_text = blank field.

Please advise the functions, thanks.

Tim Chan
Christoph4837
.
.
 
Posts: 2
Joined: Wed May 28, 2003 9:43 am

Postby Philippa2744 » Wed May 28, 2003 10:01 am

Hi Tim,

don't worry about the german language. english is also fine ;-) hopefully this board will also fully support english in the near future.

a. could be solved doing this:

Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. data: interim(7) type n.
  2. data: yourfield(7) type c value '6'.
  3. move yourfield to interim.
  4. move interim to yourfield.
  5.  
GeSHi ©


yourfield should contain then '0000006'.

b. could be done like that, assuming wa_text is string or char.
Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
  1. if wa_text is initial.
  2. * do whatever
  3.  
GeSHi ©


Best regards,
LoLo
Philippa2744
...
...
 
Posts: 303
Joined: Fri Mar 07, 2003 5:17 pm

SAP Functions - Thanks for your help.

Postby Christoph4837 » Thu May 29, 2003 5:29 am

Hi LoLo,

I have to say thank you for your help and you are really helping me a lot.

Thanks and regards,

Tim Chan :lol:
Christoph4837
.
.
 
Posts: 2
Joined: Wed May 28, 2003 9:43 am

Postby Philippa2744 » Thu May 29, 2003 11:04 am

Hi Tim,

you're welcome :D

Best regards,
LoLo
Philippa2744
...
...
 
Posts: 303
Joined: Fri Mar 07, 2003 5:17 pm

Postby Alva1590 » Fri Jun 13, 2003 8:58 pm

to convert between leading zeros and none use function modules
CONVERSION_EXIT_ALPHA_INPUT-> leading zeros
CONVERSION_EXIT_ALPHA_OUTPUT -> no leading zeros

regards,
Hans
Alva1590
.....
.....
 
Posts: 4387
Joined: Mon Dec 02, 2002 3:01 pm


Return to ABAP® Core

Who is online

Users browsing this forum: No registered users and 2 guests