Skip to Content
0
Former Member
Aug 03, 2005 at 01:46 PM

Help with logic

21 Views

Dear Experts,

I have a user exit for data coming from R/3. I am a little confused whether the field REBZG is being filled in this code or is just checking the original and clearing invoices and calculating the ammounts? I am sorry to ask the same question again. But Its very important for me to get things clear about this REBZG. Here is the code:

DATA: DOC_TO_LOOK like FS_DTFIAR_3-BELNR

  • Pickup clearing document into internal table.

SELECT * FROM BSEG INTO TABLE ZCLEAR_DOC

WHERE BUKRS = FS_DTFIAR_3-BUKRS

AND BELNR = FS_DTFIAR_3-AUGBL

AND GJAHR = ZFISYEAR.

  • Calculate amount to clear by looking for residual items.

  • Find original invoice: Invoice reference or current item.

if FS_DTFIAR_3-REBZG = ''.

DOC_TO_LOOK = FS_DTFIAR_3-BELNR.

else.

DOC_TO_LOOK = FS_DTFIAR_3-REBZG.

endif.

Thank you.