Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Parameter ID

Former Member
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Have you put in a break-point just before the call transaction to see what the values of the PIDs are?

Rob

13 REPLIES 13

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos

Have you put in a break-point just before the call transaction to see what the values of the PIDs are?

Rob

0 Kudos

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.

0 Kudos

Try setting the PID for fiscal year (GJR) as well. It may be trying to use the wrong value.

Rob

0 Kudos

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

0 Kudos

Yes, after looking at the logic a bit more, I think that using BLD will solve your problem.

Regards,

Rich Heilman

0 Kudos

Thank you Rich. You were right. it was looking for parameter ID 'BLD'. The issue is resolved.

prince_isaac
Active Participant
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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'.

Former Member
0 Kudos

Thank you every body for your prompt replies. I learnt new things today

0 Kudos

You might also want to consider if you really want to include recurring documents in your report.

Rob