Skip to Content
0
Feb 20, 2006 at 09:20 AM

linking BSAK with EKBE

459 Views

Hello experts,

I am currently modifying a report where in I need to change some statements because it gets a PO's balance in table BSAK-wrbtr and instead I need to change it to EKBE-wrbtr. The problem is I don't know if there's a common field where I can link both tables.I have pasted below the code I am trying to modify. Also, How can I know if my report shows details of a PO correctly? where would I verify this? Thanks guys and take care!

SELECT augdt augbl shkzg dmbtr wrbtr FROM bsak

INTO (bsak-augdt,bsak-augbl,bsak-shkzg,

bsak-dmbtr,bsak-wrbtr)

WHERE bukrs = bkpf-bukrs

AND gjahr = bkpf-gjahr

AND belnr = bkpf-belnr.

IF bsak-shkzg = 'H'.

bsak-dmbtr = - bsak-dmbtr.

bsak-wrbtr = - bsak-wrbtr.

ENDIF.

IF t_pohistory-currency <> 'PHP'.

IF bsak-augdt GT pa_augdt.

  • IF bsak-augdt IN so_augdt.

t_amount-tramt = t_amount-tramt + bsak-wrbtr.

ENDIF.

ELSE.

IF bsak-augdt GT pa_augdt.

  • IF bsak-augdt IN so_augdt.

t_amount-tramt = t_amount-tramt + bsak-dmbtr.

ENDIF.

ENDIF.

ENDSELECT.

ENDIF.