Archive

Author Archive

Lesson of the day

May 16th, 2010

Always use variable when trying to modify table, or else you’ll get randomly unexpected results.. well, at least that’s what happened to me with SAP/R3 4.6D.

For example, you’ve got a transparent table you wish to manipulate named: ZTXXX.
Create a variable named WA_ZTXXX.

DATA: WA_ZTXXX LIKE ZTXXX.

CLEAR WA_ZTXXX.
SELECT SINGLE * INTO WA_ZTXXX
FROM ZTXXX
WHERE [CONDITION].

IF SY-SUBRC EQ 0.
WA_ZTXXX-FIELD1 = ‘Blabla’.
WA_ZTXXX-FIELD2 = ‘Blibli’.

MODIFY ZTXXX FROM WA_ZTXXX.
ENDIF.

vera ABAP

Recurring fetal loss (part II)

November 26th, 2009

All this time I’ve been wondering what went wrong with my body, cause I’ve got this recurring fetal loss for 3 times now. The doctor who observed me always gave partial answers… Sometimes I even thought they were only guessing the problem.. I never got the answer.

And then I got pregnant again, just found out a few weeks ago. I’m thrilled, excited, but then again.. seeing my medical history in my last recurring fetal loss, I’m worried.

Last night we went to the doctor, and you know what? the doctor said my current pregnancy wouldn’t look so good either. Well, at least we had prepared ourselves to hear it.

Now the big question is, what’s wrong? We had gone through so many tests and the result was okay. Then the doctor explained.. the problem is in my body’s metabolism. And the cause to it was lack of exercise and sudden weight gain. Somehow my eggs are not ovulating perfectly, so the quality is not good enough.

Anyway, my doctor told me to have exercise.. starting… now! Even when I’m pregnant, I’m advised to go for exercise. Okay, I’m going to start exercising today… plus… praying of course.

Here are some references I found in the internet. I guess It’s quite helpful.

http://www.ivf.com/pcostreat.html
http://www.womenshealth.gov/faq/polycystic-ovary-syndrome.cfm

vera Uncategorized

Meaning of T004F

October 7th, 2009

T162K

Tables required: T004F, T162K

Get the index of the field in T004F from T162K.

vera Uncategorized

Bingung

July 27th, 2009

Gimana perasaan kita saat kita tau orang yang kita percaya mengkhianati kita… sakit hati, marah, bingung?

Apalagi yang ada di otak kita bahwa orang itu adalah orang yang sangat baik… flawless…

Ya Allah, semoga Engkau memberikan petunjuk apa yang harus hamba lakukan sekarang… Amin.

vera Uncategorized

Type conflict #1

July 14th, 2009

If you assign a field symbols with STANDARD TABLE type, you should never declare the reference with header line cause it will give you error.

WRONG:
DATA: ITAB LIKE BSID OCCURS 0 WITH HEADER LINE.
FIELD-SYMBOLS: <F> TYPE STANDARD TABLE.

It will give error when you do this:
ASSIGN (’ITAB’) TO <F> .

CORRECT:
DATA: ITAB LIKE BSID OCCURS 0.

vera ABAP , ,

User Exits

June 5th, 2009

I got the link from: http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

well, who knows I might need it later ;)

TITLE: A Short Tutorial on User Exits

Content Author: Abhishek

1. Introduction:

User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.

The naming standard of function modules for functionmodule exits is:
EXIT_
<3 digit suffix>

The call to a functionmodule exit is implemented as:
CALL CUSTOMER.-FUNCTION <3 digit suffix>

Example:

The program for transaction VA01 Create salesorder is SAPMV45A Read more…

vera ABAP ,

So what’s the problem?

May 27th, 2009

The doctor suspected there’s something wrong with me, so he instructed me to do some lab test for TORCH, ACA, and other small tests.

We got the result last night, and read there’s nothing wrong with the result. Everything seems to be okay… So what’s the problem? Why do I keep losing my fetus? … and like I said, it’s already my third loss!!!

vera Daily

What causes my reccuring fetal loss?

May 25th, 2009

….and this is gonna be my third…

vera Daily

Material beginning stock

March 19th, 2009

If you go through MB5B, you can see beginning stock, receiving / issuing, and ending stock of a specified material in specified plant / storage location. Now, if you need to get that beginning stock of a specified date, sometimes it becomes quite tricky.  I don’t know if SAP provides any function module to read that beginning stock.. I made several trials but never got a correct result that runs correctly for every material.  So, what I did was turning ST05 and run MB5B to see what it really does in the program. It turned out that the program actually “traceback” the stock from the current condition! It doesn’t read any history table (MARDH or MBEWH). I thought that method will take me forever to get the result, but I was wrong! It turned out to be the fastest way compared with all the other methods I tried by reading the history tables!

Here’s my code to get that beginning stock of a material:

Read more…

vera ABAP

Selecting MKPF-MSEG

March 11th, 2009

Selecting data from MKPF and MSEG can be quite tricky.. It will take forever to get just a few rows if you make the wrong selection.

Before you select anything from the table, you need to make sure your selections are in the table’s indexes and make as many conditions possible to restrict an exhaustive selection from the database.

I tried using select in select, get the mkpf in an internal table and then getting the mseg using for all entries, all took a long time… it just didn’t work the way I wanted to be.

And here’s my latest code as an example, and I’m satisfied with it.

Read more…

vera ABAP