on 11-15-2010 1:45 PM
Hello
Can somebody do me a favour and answer the following questions :
1. How to debug selection routine in DTP?
2. Routine in DTP has the following build-in code :
read table l_t_range with key
fieldname = 'PSTNG_DATE'.
l_idx = sy-tabix.
Why is it necesary to read table l_t_range for posting date if the table is always empty? Selection for DTP is defined within the routine and nowhere else. Just give me theoretical example how this table may contain records for posting date by the moment the DTP routine runs?
Thanks a lot
Similar but not same issue in this post.
From what I've found is that sometimes the table that is built when you put in a range (l_t_range) sometimes has a record without a specified field name associated to that record. I'm not sure when this happens other than I've always seen example code check for this case and if it is found. Enter the record into l_t_range and populate that field by modifing that record.
You could test this out, enter some values on the thing you are filtering on like a normal filter. And then run the code with a break-point. Check whether at the beggining does l_t_range return a record for that field name. And then remove those filters and try it. Perhaps there's only a record if you've also hard coded a prompt.
Edited by: Andrew Averbeck on Nov 15, 2010 2:43 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Put break-point in the routine and debug, you will get all ur answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Table l_t_range is the internal table which is filled by the values coming from the source. This table is filled when the DTP is executed.
You can place a break-point within your code & as pointed out earlier, you will have to use the options - Serially Debug in the DTP execute tab. This should work.
Regards
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks but it doesnt answer question2
why its needed to read the table if its always empty?
if l_idx ne 0 then the record should be modified. What is to modify if thee are no records? The author suggests that the table sometimes may be populated with values. BUt what are these cases?
read table l_t_range with key
fieldname = ' '.
l_idx = sy-tabix.
*....
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
p_subrc = 0.
Hi,
I hope the 2nd option "Serially in the Dialog Process" under Execute tab in the DTP will work for your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.