OPERATION STRING ABAP - CONDENSER | ILMU PROGRAMMER
Home » OPERATION STRING ABAP – CONDENSER

OPERATION STRING ABAP – CONDENSER

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).

OPERATION STRING ABAP – CONDENSER

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 :

OPERATION STRING ABAP - CONDENSE

31 thoughts on “OPERATION STRING ABAP – CONDENSER”

  1. Hi there i am kavin, its my first time to commenting anyplace, when i read this piece of writing i thought i could also create comment due to this brilliant post.

    Reply
  2. 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.

    Reply
  3. Generally I don’t read post on blogs, however I wish to say that this write-up very pressured me to try and do it! Your writing taste has been surprised me. Thanks, quite great post.|

    Reply
  4. 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!

    Reply
  5. 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!

    Reply
  6. 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.

    Reply
  7. Remarkable issues here. I am very satisfied to peer your article. Thank you a lot and I’m taking a look forward to contact you. Will you please drop me a mail?

    Reply
  8. 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?

    Reply
  9. 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!

    Reply
  10. 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!

    Reply
  11. Aw, this was an exceptionally good post. Taking a few minutes and actual effort to generate a very good article… but what can I say… I put things off a lot and never manage to get anything done.

    Reply
  12. 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!

    Reply
  13. 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?

    Reply
  14. 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

    Reply
  15. 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

    Reply

Leave a Comment

 
Open chat
Perlu Bantuan Konsultasi ?
Hallo Pembaca.
Telp (021) 55670115 untuk terhubung langsung dengan kami.

Apakah ada yang bisa kami bantu?