01-30-2009 3:26 PM
Hi ,
I am using set parameter id and then using call transaction to display the document number. I have checked that the parameter ID is correct and also the field value is correct. but when i click on say any document no. on the list display it always displays the last document.say, if documents no. 1 to 10 are on the list display, it always fetches document no. 10 when i click on any of the document.I even tried to use Free Memory ID 'BLN' but of no use.Can anyone please give me a suggestion on this?
01-30-2009 3:36 PM
Have you put in a break-point just before the call transaction to see what the values of the PIDs are?
Rob
01-30-2009 3:35 PM
Yes, it appears that you are not putting the HIDE statement at the correct spot. Are you using the HIDE?
Also, here is another way to achieve the same thing,.
report zrich_0002 no standard page heading.
data: ivbak type table of vbak with header line.
data : cursor_field(30),
field_value(30) .
select-options: s_vbeln for ivbak-vbeln.
start-of-selection.
select * into corresponding fields of table ivbak
from vbak
where vbeln in s_vbeln.
loop at ivbak.
write:/ ivbak-vbeln.
endloop.
at line-selection.
get cursor field cursor_field value field_value.
case cursor_field.
when 'IVBAK-VBELN'.
set parameter id 'AUN' field field_value.
call transaction 'VA03' and skip first screen..
endcase.
Regards,
Rich Heilman
01-30-2009 3:36 PM
Have you put in a break-point just before the call transaction to see what the values of the PIDs are?
Rob
01-30-2009 3:44 PM
Thanks for replies.
Yes I have checked while debugging ,i see that at "SET PARAMETER ID 'BLN' FIELD sel_field-value. " the value of sel_field is correct , but when call transaction statement executes it display wrong document. Below is the code im using. I'm calling this from user command routine of FM "REUSE_ALV_GRID_DISPLAY'.
CASE u_com.
WHEN '&IC1'.
IF sel_field-fieldname = 'BELNR'.
IF NOT sel_field-value IS INITIAL.
SET PARAMETER ID 'BLN' FIELD sel_field-value.
SET PARAMETER ID 'BUK' FIELD p_bukrs.
CALL TRANSACTION 'FBD3' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDCASE.
01-30-2009 3:49 PM
Try setting the PID for fiscal year (GJR) as well. It may be trying to use the wrong value.
Rob
01-30-2009 3:52 PM
Hi Mike, ok so we are not talking about a report list display, and it appears that you know the value is correct just before the SET PARAMETER statement. So the problem is in the called program. I just jumped into an ECC 6.0 system and found that in the PBO of the intital screen, it does some logic with conditions, where is it actually using the GET PARAMETER statement with three different parameter Ids, one is the BLN id, and it is also checking against BLD and BLM. You might want to try the other two to see if that helps your situation.
Regards,
Rich Heilman
Edited by: Rich Heilman on Jan 30, 2009 10:53 AM
01-30-2009 3:56 PM
01-30-2009 4:12 PM
Thank you Rich. You were right. it was looking for parameter ID 'BLD'. The issue is resolved.
01-30-2009 3:40 PM
hie
if u are displaying data on screen on a report u should use the HIDE functionality so that your field will contain the correct line item value from the user screen selection. that way you will populate your parameter id with the correct value.
regards
Isaac Prince
01-30-2009 3:56 PM
Are you using something like:
DATA: belnr TYPE belnr_d,
bukrs TYPE bukrs,
gjahr TYPE gjahr.
belnr = '0000000001'.
bukrs = 'XPTO'.
gjahr = '2008'.
SET PARAMETER ID 'BLN' FIELD belnr.
SET PARAMETER ID 'BUK' FIELD bukrs.
SET PARAMETER ID 'GJR' FIELD gjahr.
CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
Regards,
Valter Oliveira.
01-30-2009 3:48 PM
Hi,
You are not passing the fiscal year..Check if it is causing the issue..
You can set the parameter GJR for the fiscal year.
Thanks
Naren
01-30-2009 3:50 PM
Hi Mike,
Hope if you are using HIDE than placing it in the right place.
loop at itab into wa.
write:/
wa-field.
hide:
wa-field.
endloop.
at line-selection.
set parameter id 'BLN' field wa-field.
call transaction 'XXXX'.
01-30-2009 4:13 PM
Thank you every body for your prompt replies. I learnt new things today
01-30-2009 4:21 PM
You might also want to consider if you really want to include recurring documents in your report.
Rob