Skip to Content

Hello Colleagues!

My own 2 cents

First of all I’d like to say Thank You for all SCN team for their Great Job! You are doing really amazing things all over here! And I like it very much! 😎

Many folks may blame new SCN. But much much more will appreciate it, I believe!!! So keep going please!!

Good Old Code Button

Actually I’d like to write this blog (as soon as it’s easier now) because I’ve already met some discussions where people provide their suggestions in a way of coding samples. And this is great. But they are doing this in simple way: copy and paste the code. Simple, but not readable. In old SCN it used to be a button to surround the code with some tags which make the code readable.

Where is it now?

ℹ When you’re writing a blog post (as I’m doing right now) or starting a discussion it’s here:

/wp-content/uploads/2012/03/1_81456.png

ℹ And when you post or reply in discussions it’s in Advanced Editor:

/wp-content/uploads/2012/03/2_81457.png

/wp-content/uploads/2012/03/3_81497.png


➖ Here is an example without using Syntax Higlighting.

DATA: current TYPE REF TO cl_crm_bol_entity,

lr_entity       TYPE REF TO cl_crm_bol_entity,

lr_textset_col  TYPE REF TO if_bol_bo_col,

lr_iterator     TYPE REF TO if_bol_bo_col_iterator. 

  value = ”.

  if iterator is bound.

    current ?= iterator->get_current( ).

  else.

    current ?= collection_wrapper->get_current( ).

  endif.

  CHECK current IS BOUND.

  lr_entity ?= current->get_related_entity( ‘BTADVSOpp’ ).

  CHECK lr_entity IS BOUND.

  lr_entity = lr_entity->get_related_entity( ‘BTOrderHeader’ ).


➕ And here is an example with it.

DATA: current TYPE REF TO cl_crm_bol_entity, 
lr_entity       TYPE REF TO cl_crm_bol_entity, 
lr_textset_col  TYPE REF TO if_bol_bo_col, 
lr_iterator     TYPE REF TO if_bol_bo_col_iterator.  

  value = ''. 

  if iterator is bound. 
    current ?= iterator->get_current( ). 
  else. 
    current ?= collection_wrapper->get_current( ). 
  endif. 

  CHECK current IS BOUND. 
  lr_entity ?= current->get_related_entity( 'BTADVSOpp' ). 

  CHECK lr_entity IS BOUND. 
  lr_entity = lr_entity->get_related_entity( 'BTOrderHeader' ).  

Fill the difference please. I personally remember the times when there were ‘code samples’ on SDN forums looked like insertion of the code even without line breaks not to say formatting. Really painful. Always keep in mind that many people are around you and actually they read what you contribute. So please do not be lazy and make your posts pretty. My opinion.

To report this post you need to login first.

13 Comments

You must be Logged on to comment or reply to a post.

    1. Andrei Vishnevsky Post author

      Hi, Gregor.

      Unfortunately, yes. Same experience. But I think it’s just the matter of time. And hope it will be fixed soon.

      And ABAP highlighting is a must 🙂

      (0) 
    1. Manish Kumar

      Discussion is locked, and new reply can’t be posted by normal users.

      Moderators can possibly do it, but I don’t know why this link has come up.

      Document by Andrei is newer than linked discussion. I do not see any FAQ article that links to the discussion. How did you find it?

      (0) 
          1. Manish Kumar

            Perhaps they thought:

            What good is an ABAPer who can’t find his way around to show colorful code on a web platform that supports rich text..

            (0) 

Leave a Reply