cancel
Showing results for 
Search instead for 
Did you mean: 

Help with logic

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you only mentioned in the code the assignment of DOC_TO_LOOK. I am not able to understand your actual problem

<i>if FS_DTFIAR_3-REBZG = ''.

DOC_TO_LOOK = FS_DTFIAR_3-BELNR.

else.

DOC_TO_LOOK = FS_DTFIAR_3-REBZG.

endif.</i>

the field REBZG is checked that whether it holds blank value.If it holds blank value then the value of FS_DTFIAR_3-BELNR is assigned to the DOC_TO_LOOK .If REBZG is not equal to blank,FS_DTFIAR_3-REBZG is assigned to the DOC_TO_LOOK .

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hai Bhanu and Anil,

THanks for the replies. DOC_TO_LOOK is only found in this part of code for me. I have to decide how this field is getting filledup. Is there anyway that I can extract data and then see how this value is actually getiing filled up? I mean some kind of debugging...I would appreciate if anybody can help me in this regard. I think its something to do with RSA3- debugging checked and then extract in R/3 but the problem is the code that shows up in debugger doesnot show REBZG field anywhere. Does the code include user exit? Also like debugging update rules, can we see the values before and after execution of code?

Thanks a lot.

Former Member
0 Kudos

Hi,

Yes you can check the user exit code in RSA3 by using debugging function.FOr this use proper breakpoints. Any ABAPERS can give better explanation on Debugging. So contact your ABAPERS immmediately.

With rgds,

Anil Kumar Sharma .P

former_member188975
Active Contributor
0 Kudos

Hi Visu,

You can debug the extraction, including the user exit code in RSA3. Try to put a breakpoint somewhere in the user exit. The debugging is similar to to how you can do it in the update rules and lets you see a before and after value.

Hope this helps...

Former Member
0 Kudos

Hai Bhanu,

But in RSA3 there is no selection of user exit debugging and also selection of records.Is the user exit code selected by default? My extraction shows about 8000 records...I don't know about debugging but doesn't it take too long? I will contact my ABAPer. I think he is the best person to do that.

Thanks everybody for your help and time. I REALLY APPRECIATE IT.

Answers (2)

Answers (2)

Ashwin
Active Contributor
0 Kudos

Hi!

the field REBZG is not Filled here... as explained in my earlier post.. it is just checked if it is empty then the program takes the acconting document nr in to DOC_TO_LOOK and then uses it to check the clearance document.

<i>I think in any programing language its always the variables on leftside are filled with right side of an "= "sign.. and in your code "REBZG" is no where on left side except at '' which is empty and in if condition son not filled... isnt it simple.....Or ..am i missing anything ...:-?</i>

with regards

ashwin

former_member188975
Active Contributor
0 Kudos

Hi Visu,

REBZG is not being filled in here. The code just checks for the values (If) and then takes action (Then or Else) accordingly.

Hope this helps...