Skip to Content
0
Former Member
Dec 19, 2006 at 11:10 AM

CODING FOR ROUTINE

31 Views

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