Former Member

# PO Quantity in SAP BODS

Hi All,

Am new to SAP BODS,can you please any one help me please.

I got a task to create in PO Quantity in SAP BODS.

i need to join two tables i.e EKPO and EKBE,so i need to calculate po quantity in EKBE fields are (EBELN,EBELP,BEWTP,BWART,).

they providing logic like this,

If the item category is service (EKPO-PSTYP=9) and material (EKPO-MATNR) is blank , po quantity (EKPO-MENGE) in MSAP = PO quantity (EKPO-MENGE) in GSAP If the item category is standard (EKPO-PSYTP=0) and material (EKPO-MATNR) is NOT blank, po quantity(EKPO-MENGE) is calculated as below: PO quantity (EKPO-MENGE) in MSAP = PO quantity (EKPO-MENGE) in GSAP - ( SUM of RECEIVED QTY - SUM of RETURNED qty)

Can you please suggest me,how to create and where i should map this logic.

regards,

mahesh.

10|10000 characters needed characters exceeded

### Related questions

• Posted on Jul 19, 2016 at 09:29 AM

Hi Mahesh

First you need to get the data of EKKO, EKPO, EKBE in your template table. Then it will be easy in my understanding you want to calculate the open quantity.

Thanks and Regards

Vijay Mukunthan

pastedImage_0.png (14.4 kB)
10|10000 characters needed characters exceeded
• Former Member

Hi Vijay,

Thank you so much for replying.

Am already join in EKKO and EKPO after i need to join EKBE table,

So in EKBE table fields i need to calculate PO Quantity after output i need to join in some other table.i want final report in one table.

for there fields i wan to calculate the PO Quantity (EKBE-EBELN,EKBE-EBELP,EKBE-BEWTP) for this condition.

Query 1:

Query=>Where clause

ifthenelse(EKPO.PSTYP =0,ifthenelse( EKPO.MATNR = '',EKPO.MENGE))

Quary 2:

Query=>Where clause

ifthenelse(EKPO.PSTYP =9,ifthenelse( EKPO.MATNR IS NOT '',EKPO.MENGE))

is it correct or not,please suggest me.

PO quantity (EKPO-MENGE) in MSAP = PO quantity (EKPO-MENGE) in GSAP - ( SUM of RECEIVED QTY - SUM of RETURNED qty).