Pada bagian ini, kita akan berkenalan dengan library string yang dapat digunakan untuk menyederhanakan berbagai pemrosesan string. Berikut merupakan fungsi string di pemrograman Abap :

  • FIND : Pernyataan ini digunakan untuk mencari pola dalam string.
  • REPLACE : Pernyataan digunakan untuk menemukan pola dalam sebuah string dan menggantinya dengan substring yang diberikan.
  • SHIFT : Pernyataan yang digunakan untuk menggeser karakter di sekitar string.
  • CONCATENATE : Pernyataan yang digunakan untuk menggabungkan satu atau lebih string menjadi satu string tunggal.
  • SPLIT : Pernyataan ini digunakan untuk membagi string menjadi serangkaian substring .
  • TRANSLATE : Pernyataan ini digunakan untuk menerjemahkan string menjadi huruf besar atau huruf kecil.
  • CONDENSE : Pernyataan ini digunakan untuk menghapus spasi berlebihan dari sebuah string.
  • STRLEN : Fungsi ini digunakan untuk mengembalikan / mendapatkan jumlah karakter dalam string.

Dalam Pemrograman ABAP, ada sebuah fungsi untuk operation string yaitu salah satunya condense.  Menurut Wiki SAP (https://wiki.scn.sap.com) : This string function is used to remove the blank spaces in the given string. Condense  secara mudah dapat di artikan menghapus banyak spasi (ruang kosong dalam string).


Problem / Masalah : Misalkan ada string yang berisi ”     ILMU PROGRAM  .  COM   ”  ,  hapus semua spasi tersebut termasuk yang ada di antara kata “ILMU” dan kata “PROGRAM”  dsb, sehingga hasil outputnya menjadi “ILMUPROGRAM.COM”.

Solusi : Pakailah operasi CONDENSE yang di akhiri dengan operasi NO-GAPS, rumus menggunakan condense adalah CONDENSE text [NO-GAPS].

Efek : Spasi di awal dan akhir string akan benar-benar dihapus dan akan digantikan satu spasi – jika NO-GAPS ditentukan – setiap spasi isi variable tersebut akan di hapus.

Code Program di Abap :

data : str_condense type string.
str_condense = '   ILMU PROGRAM . COM     '.
CONDENSE str_condense NO-GAPS.
WRITE str_condense.

Hasil Output :



Wahyu Amaldi, M.Kom has written 209 articles

Hallo Pembaca,
Saya merupakan konsultan di dunia SAP dan merupakan Spesialis .Net Programming.
Saya gemar berbagi pengalaman mengenai SAP & Dunia Programming, dan jika ada sesuatu yang perlu ditanyakan, bisa hubungi saya di email berikut ini:

Email 1 : wahyu.amaldi@outlook.com
Email 2 : wahyu.amaldi@ilmuprogram.com

Semoga Artikel yang Anda baca di website ini berguna dan dapat membantu Anda dalam menemukan solusi.


  1. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  2. Hi! I know this is kinda off topic but I’d figured I’d ask. Would you be interested in trading links or maybe guest authoring a blog article or vice-versa? My website discusses a lot of the same subjects as yours and I feel we could greatly benefit from each other. If you happen to be interested feel free to shoot me an e-mail. I look forward to hearing from you! Great blog by the way!

  3. Hey there would you mind letting me know which web host you’re working with? I’ve loaded your blog in 3 completely different browsers and I must say this blog loads a lot faster then most. Can you suggest a good hosting provider at a fair price? Many thanks, I appreciate it!

  4. investment says:

    Do you have a spam problem on this website; I also am a blogger, and I was wanting to know your situation; we have developed some nice procedures and we are looking to exchange strategies with other folks, why not shoot me an e-mail if interested.

  5. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your blog when you could be giving us something informative to read?

  6. you are in point of fact a good webmaster. The site loading pace is amazing. It kind of feels that you’re doing any distinctive trick. In addition, The contents are masterpiece. you’ve done a great task on this topic!

  7. Hi there, just became aware of your weblog through Google, and found that it is truly informative. I’m gonna be careful for brussels. I’ll be grateful should you continue this in future. Many folks will be benefited from your writing. Cheers!

  8. Hello! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone 4. I’m trying to find a template or plugin that might be able to fix this problem. If you have any suggestions, please share. With thanks!

  9. jobs at home says:

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?

  10. cancer sign says:

    I don’t know if it’s just me or if perhaps everyone else encountering issues with your website. It appears as if some of the text within your content are running off the screen. Can someone else please comment and let me know if this is happening to them as well? This may be a issue with my web browser because I’ve had this happen before. Thanks

  11. Autoankauf says:

    Great beat ! I would like to apprentice whilst
    you amend your web site, how can i subscribe for a blog website?
    The account aided me a appropriate deal. I have been a
    little bit familiar of this your broadcast offered
    bright clear concept

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>