Welcome Corner Blog Posts
Go a little bit deeper into the Welcome Corner with blog posts. Learn how to get started in SAP Community and get tips on maximizing your participation.
cancel
Showing results for 
Search instead for 
Did you mean: 
VishnAndr
Active Contributor

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! :cool:

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:


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


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.

13 Comments