Ask the Expert

Field issues in Update Rules

Hi, I am BW consultant with little experience in ABAP coding. I am creating a routine in Update Rules which reads the information that has been loaded into InfoCube. For a set of fields, the programs try to reach another table in order to get a set of registry that matches with the set of fields. Each register of these sets of the fields has a specific value x. For these sets of registry, it needs to be summarized. I created the routine, but although I have 5 registers that matches with the set of the fields, one register is being skipped. I don't know what is wrong in my routine. If you can help me I will be glad...
The

    Requires Free Membership to View

selection routine is:
SELECT /BIC/ZSDLS_QTY                   FROM /BIC/FZSS_THRU
INTO L_STOCKQTY
WHERE KEY_ZSS_THRU1 = L_DIMCOMPCODE
AND KEY_ZSS_THRU2 = L_DIMPAYER
AND KEY_ZSS_THRU4 = L_DIMMATERIAL
AND KEY_ZSS_THRUT = L_DIMCALDAY.
L_ACUMULA = L_ACUMULA + L_STOCKQTY.
ENDSELECT.
IF SY-SUBRC = 0.
RESULT = L_STOCKQTY * 28 / L_TOTAL_NW4.
ENDIF.

I really don't know what is wrong here.


Without seeing your data, it is not so easy to help. But here are some tips. First of all, rather than perform the addition yourself, let the database server do the work:


SELECT SUM( /BIC/ZSDLS_QTY ) INTO L_ACUMULA
    FROM /BIC/FZSS_THRU
    WHERE KEY_ZSS_THRU1 = L_DIMCOMPCODE
    AND KEY_ZSS_THRU2 = L_DIMPAYER
    AND KEY_ZSS_THRU4 = L_DIMMATERIAL
    AND KEY_ZSS_THRUT = L_DIMCALDAY.

Using debugger, find out the value of L_DIMCOMPCODE,L_DIMPAYER etc., at the point of selection. The use SE16 on table /BIC/FZSS_THRU, using these values, and see what you get back. The problem is most likely to be on your selection not matching exactly.


This was first published in October 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: