Tips and Tricks

Resolutions for well-being

Well, you might want to make some change to your lifestyle to reduce coronary artery disease. It seems Google is trying to help Googler geting resolutions for well-being. Dr. Taraneh Razavi, a staff doctor, posted a blog about at . As a result, for notable reductions in coronary artery disease and mortality, we should make these changes:

Choosing a Blog Engine (Part 2)

In part 1, you should now already choose what you want your blog look like and how you work with. For my case, Blogger.com is not suitable becuase I am not SEO expertiest so I will often change layout for sure. Let me take you to next question.

The second question is how to organize posts in my new blog. What I mean is a kind of category. I don"t think that my blog will have only single topic for all posts. In fact, every posts are, in my mind, classified to a kind of hierarchical categories. By this way, posts in same topic are kept together and easier to be found by search engine.

Select...Where & Select...Check in ABAP/4

Select...Where


SELECT * FORM SPFLI
WHERE CARRID = ’LH’.
...
...
...
ENDSELECT.

Select...Check

SELECT * FORM SPFLI.
CHECK SPFLI-CARRID = ’LH’.
...
...
...
ENDSELECT.
In above logic, Select...Where is better than Select...Check because the database can then user an index and system resource load is considerably less.

SELECT...INTO TABLE & SELECT...APPEND in ABAP/4

Select...Into Table


DATA: itab LIKE SPFLI OCCURS 0 WITH HEADER LINE.
SELECT * FORM SPFLI INTO TABLE itab.

Select...Append

DATA: itab LIKE SPFLI OCCURS 0 WITH HEADER LINE.
SELECT * FORM SPFLI INTO itab.
APPEND itab.
ENDSELECT.
In above logic, Select...Into Table is faster than Select...Append.

How to call SMARTFORMS from ABAP/4

When you create the form by SMARTFORMS, system will automatically create the function module for called by ABAP/4. You can get this function module by apply function module "SSF_FUNCTION_MODULE_NAME" and send the form name. This function will return the function name for call SMARTFORMS that you created.

Example


DATA: smf_name TYPE TDSFNAME VALUE ’ZSMARTFORM01’,
fn_name TYPE RS38L_FNAM.
CALL FUNCTION ’SSF_FUNCTION_MODULE_NAME’
EXPORTING
FORMNAME = smf_name
IMPORTING
FM_NAME = fn_name.

How to Popup Confirm Message in ABAP/4

When you want to popup message to confirm action, you can apply function module "POPUP_TO_CONFIRM_WITH_MESSAGE". The function will return:

  • ’A’ - Yes
  • Others - No or Cancel

Example


CALL FUNCTION ’POPUP_TO_CONFIRM_WITH_MESSAGE’
EXPORTING
DIAGNOSETTEXT1 = ’Do you want save data?’
TEXTLINE1 = ’ ’
TITEL = ’Confirm message!’
IMPORTING
ANSWER = lv_answer.