2010 Jan 21 4:25 PM
Hi!
I want to do the following: I got an Invoice and I want to print an invoice form so I created a message (KSCHL) that shall be found under certain circumstances.
It looks like that:
FORM KOBED_663.
BREAK-POINT id Y_KOBE_663. "Transaction SAAB
* infinite loop - trick for debugging
data lv_infinite type c.
lv_infinite = 'X'.
while lv_infinite = 'X' .
* infinite loop
endwhile.
*Check requirement 662 first
PERFORM kobed_662.
IF sy-subrc = 0. "if requirement 662 is fulfilled
* do some more checking...
DATA lv_ktokd TYPE ktokd.
CLEAR lv_ktokd.
SELECT SINGLE ktokd FROM kna1 INTO lv_ktokd WHERE kunnr = komkbv3-kunrg.
IF lv_ktokd <> '0003'.
sy-subrc = 4. "requirement not fullfilled... dont find the message!
ENDIF.
ENDIF.
ENDFORM.
FORM KOBEV_663.
Now I got a invoice with no messages within it and I try to debug it because I get my new Print out even in cases I should not because requirement 663 is not fullfilled.
I made a checkpoint with transaction SAAB, I made an infinite Loop to debug with SM50 and of course I had variours and numerous breakpoints all over and everywhere. But I never stopped within KOBEV_663. Of course I got also the KOBED_663 with identical code and identical "debug"-stuff.
When I try with my invoice and VF02 going to the messages then my message is found but I did not stop in the kobev_663.
Question: What do I have to do to debug this? it lookes like the rule is not even checked at all. But in customizing the rule is there (and active of course).
I also tried logging kompletely off with /NEX and I even cleared all buffers with /$sync (its not the prod. system of course).
Please help me, I have no further idea.
Manfred
2010 Jan 22 4:23 AM
Hi,
Please follow this to debug the routine.
1. Place a hard coded break Point (BREAK user ID)
2. Use Classical Debugger, not the new debugger.
3. After going into debugging mode, Setting--> Update debugging mode.
4. you will stop at your routine and you can see why the routine is not full filled.
I hope this is helpful.
Thanks,
Rohan
Hi!
I want to do the following: I got an Invoice and I want to print an invoice form so I created a message (KSCHL) that shall be found under certain circumstances.
It looks like that:
FORM KOBED_663.
BREAK-POINT id Y_KOBE_663. "Transaction SAAB
* infinite loop - trick for debugging
data lv_infinite type c.
lv_infinite = 'X'.
while lv_infinite = 'X' .
* infinite loop
endwhile.
*Check requirement 662 first
PERFORM kobed_662.
IF sy-subrc = 0. "if requirement 662 is fulfilled
* do some more checking...
DATA lv_ktokd TYPE ktokd.
CLEAR lv_ktokd.
SELECT SINGLE ktokd FROM kna1 INTO lv_ktokd WHERE kunnr = komkbv3-kunrg.
IF lv_ktokd <> '0003'.
sy-subrc = 4. "requirement not fullfilled... dont find the message!
ENDIF.
ENDIF.
ENDFORM.
FORM KOBEV_663.
Now I got a invoice with no messages within it and I try to debug it because I get my new Print out even in cases I should not because requirement 663 is not fullfilled.
I made a checkpoint with transaction SAAB, I made an infinite Loop to debug with SM50 and of course I had variours and numerous breakpoints all over and everywhere. But I never stopped within KOBEV_663. Of course I got also the KOBED_663 with identical code and identical "debug"-stuff.
When I try with my invoice and VF02 going to the messages then my message is found but I did not stop in the kobev_663.
Question: What do I have to do to debug this? it lookes like the rule is not even checked at all. But in customizing the rule is there (and active of course).
I also tried logging kompletely off with /NEX and I even cleared all buffers with /$sync (its not the prod. system of course).
Please help me, I have no further idea.
Manfred
2010 Jan 21 4:54 PM
Output requirement would come into picture when System determines the Output. It would process this requirement, if it found the SY-SUBRC = 0, than it would process it. Otherwise, you can see the Go to > Determination Analysis from the messages screen. This option would be open only in the create / change mode.
When you manually try to create the output, system doesn't go through the Output determination. Hence, it doesn't check the requirement. When you see the print preview, it doesn't go through the determination because output is already generated.
You can simply put the breakpoint in the Subroutine. Now, try to go to the edit Messages screen Go to > Header > Output in the invoice main screen in the Create / Change mode of the invoice. It would stop at the breakpoint.
If the include is inactive or not yet connect to main program, you need to run the report RV80HGEN to generate the VOFM requirements.
Regards,
Naimesh Patel
2010 Jan 21 8:37 PM
Hello Manfred
In order to check whether the conditions is passed or not I would add a simple LOG-POINT to the routines:
FORM KOBED_663.
BREAK-POINT id Y_KOBE_663. "Transaction SAAB
LOG-POINT ID y_kobe_6633.
...
The break-point may have no effect in background (or output determination) yet the LOG-POINT should always result in a LOG entry in SAAB (kind of a smoke test).
If you do not find LOG entries then check the customizing again carefully and ensure that the conditions are assigned to the output determination routines.
Regards
Uwe
2010 Jan 22 4:23 AM
Hi,
Please follow this to debug the routine.
1. Place a hard coded break Point (BREAK user ID)
2. Use Classical Debugger, not the new debugger.
3. After going into debugging mode, Setting--> Update debugging mode.
4. you will stop at your routine and you can see why the routine is not full filled.
I hope this is helpful.
Thanks,
Rohan
2010 Jan 22 7:27 AM
Hello Manfred
You should have a look at the blog [Debugging Outbound IDoc Output Control scenarios|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6355] [original link is broken] [original link is broken] [original link is broken];
and the references mentioned in the following discussion.
Regards
Uwe
2010 Jan 22 7:54 AM
Hi!
First of all: thanks for your great Help! I tried all of your hints and thats the result (maybe someone with my problem comes across this thread).
@Naimesh Patel: My problem was that the message was found and I wanted to debug the requirement because I was sure, that the message not even should have been found because of not matching the requirement. I did not want to debug the process that creates the message like the print program... but in one point your Post was vital for me: RV80HGEN was missing.
@Uwe Schieferstein: Unfortunately I dont have LOG-POINTS... maybe my release is too old... I have only 640 here. The Link you posted is of course very interesting! Thanks for that.
@Rohan Leonce D'souza: Setting--> Update debugging... that was necessary! With that in combination of the RV80HGEN I think it stopped even at my Break-Point ID... to be secure I had your idea with the break USER in addition within the code.
Now I have the pain to grant forum points... I cant split them unfortunately. Only the combination of several Posts was my solution. But Thanks to all of you!
Edited by: ManfredScherer on Jan 22, 2010 8:54 AM - solved -
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |