cancel
Showing results for 
Search instead for 
Did you mean: 

CODING FOR ROUTINE

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member193831
Active Participant
0 Kudos

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.

Former Member
0 Kudos

HI vivek... Can u plz code and give it 2 me.. If itz possible..

According to the program which i have written...

Anwering getz appreciated,

CHEERZ,

<i>ALURI</i>