on 12-19-2006 11:10 AM
Hi Friends!!!!
Good Evening to Everyone, Am ALuri an BW Consultant.. Am new 2 ABAP.. I dont know Coding..
I have a document like this....
Step1 : -
Select records from VBRK-VBRP where,
Billing Category = 'L'
SD Document Category = 'M'
Sales Document Item Category = 'TAN'.
For this, I have Written a Coding in BW Routine Like This,
IF COMM_STRUCTURE-DOC_CATEG = 'M' AND
COMM_STRUCTURE-ITEM_CATEG = 'TAN' AND
COMM_STRUCTURE-BILL_CAT = 'L'.
ENDIF.
Step 2:-
Check for 'ZBPM' Condition.There may be multiple ZBPM records.And take the condition Value.
For this For this, I have Written a Coding in BW Routine Like This,
IF COMM_STRUCTURE-CON_TYPE = 'ZBPM'
RESULT = COMM_STRUCTURE-KNVAL.
ENDIF.
And Am having remaining document, Whihc is like this,
- If 'ZBPM' Records is not present, Check for 'ZBPO' record and take the condition value.
- Check for 'ZEXT' condition and take the conditon value.
- If 'ZEXT' conditon is present, Check for 'ZECX' Conditon and take the condition value.
- If 'ZECX' Condition is not present , Check for 'JECX' Condition and take the Condition value.
- Check for 'ZEXM' condition and take the conditon value.
- Check for 'JMAN' condition and take the conditon value.
- Check for 'JEX2' condition and take the conditon value.
- Check for 'ZKO4' condition and take the conditon value.
- Check for 'ZK4A' condition and take the conditon value.
- Check for 'ZK07' condition and take the conditon value.
- Check for 'ZK7A' condition and take the conditon value.
And FInally the all the condition value's which have values should be summed
in a GROSS SALES.
I dont know.. Which statement i should use, Switch statement or case statement.... Plz KIndly help me.. And give me the remaining coding...
Answering getz Appreciated very high!!!!!
Itz Urgent.
CHEERZ,
ALURI
hi Aluri,
As you won't be able to check any particular fields/ variables value assuch, you need to use IF ELSE ENDIF stmts only.
FYI
syntax of CASE stmt (There is no Switch in ABAP)
CASE variable.
WHEN 1. ...
WHEN 2. .......
........
ENDCASE
Rgds,
Vivek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.