Friday, April 30, 2010

song "things left unsaid"



I heard this song on the radio.

You can watch the music video here:

The song is about the things that have been left unsaid and how we wish after the fact that we would have told those we love how much we love them while they were still here to tell.



Tuesday, April 27, 2010




To start, now that I am getting the correlation between ABAP and COBOL it is now time to increase value by learning JAVA.

In doing some research, I believe I will start here:

It looks like a good place to start.

Nice thing about learning JAVA, is that it works even outside of SAP.

In this economy, its best to learn as much as you can while you can.


Using JAVA script in the ABAP workbench...



I have been reading up in the ABAPDOCU in SAP that there is a class available to use in ABAP that will simulate a JAVA Script engine.

The class is CL_JAVA_SCRIPT.


According to the documentation there are 4 things you need to do to get the JAVA Script engine to function in the ABAP environment.

The following in exerpted from the ABAPDOCU:

Executing JavaScript Programs

You can use the CL_JAVA_SCRIPT class to execute JavaScript programs that, for example, have been loaded from external resources or programmed in an Editor you have written yourself: The following are the methods you use, in the sequence in which they are called:

  1. CREATE to create a JavaScript context
  2. CREATE to compile a JavaScript source in the current context
  3. EXECUTE to execute a compiled JavaScript
  4. EXECUTE to delete a compiled JavaScript from the context

Methods 2 to 4 are combined in the method EVALUATE.

I just used their class to write a hello world in JAVA SCRIPT also taken from their docu section…

REPORT  zjava_demo_abap_1.
DATA: js_processor TYPE REF TO cl_java_script,
      return_value TYPE string.

js_processor = cl_java_script=>create( ).

js_processor->compile( script_name = 'SCR.JS'
                 script = 'var Field = "Hello World!";' ).
js_processor->execute( script_name = 'SCR.JS' ).
return_value =
   js_processor->evaluate( java_script = 'Field;' ).

WRITE return_value.



So I guess my question is, If we have to have the PI environment to run certain programs because they require JAVA Script to run, WHY not convert them to use the JAVA_SCRIPT class?



Monday, April 26, 2010


Watched AVATAR 3 times since buying the video Friday.

There is a lot of truth packed into that movie.





Interview with James Cameron

For Neytiri my Best friend...

Wednesday, April 14, 2010

Using a status bar in ABAP Programs

Thought this would be cool to share with my ABAPer friends:


When writing a report that you know is going to take a long time to run, and it is an interactive report, use the status bar function to help your user see how far into the processing the report is, and give them a little bit of an idea how long it may be before it is finished and it displays. Start at the start of selection and use the status function module…

          percentage = 05
        text       = 'starting load 5%'.

“SAPGUI_PROGRESS_INDICATOR” is a SAP function module for doing just that. I started my program out with one just inside the start of selection. This didn’t seem to do much because it skips past the start of selection and into the form routines rather quickly. I put another one after the sequel statement loading the bulk of the data into the internal tables.


  IF NOT sy-subrc IS INITIAL.
    ps_flag = 'N'.
        percentage = 10
        text       = '...Main table loaded 10% done'.


The percentage export tells the function module how much in percentage to shade the clock that is on the status bar.

The text is what appears on the status bar next to the clock.




      percentage = 20
      text       = '...Processing data. 20% '.

In the form routines that take a while to run put another one to help keep track of the progress.


When you are about to list the report put your final one in with 100% loaded and a message telling your user that their report is coming.

  IF ws_flag = 'Y' AND NOT gt_dump IS INITIAL.
        percentage = 100
        text       = '.....Here comes your report. 100% '.

MESSAGE i208(00WITH 'No information returned.'(001).