Application Development and Automation 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: 
Read only

Problem with CALL Transaction syntax

Former Member
0 Likes
766

Hi All,

I have created a report in which Im displaying Sales order, planned order n production order details.

In the output if the user double clicks, anyone of the sales order/planned order/production order no, it has to take to concern transaction.

Sales order and planned order are perfectly working.

problem is with production order, it is not displaying, the exact order no.

my code:

WHEN '&IC1'.
      IF rs_selfield-fieldname = 'VBELN'.
     READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex
              .
        SET PARAMETER ID 'AUN' FIELD wa_final_so-vbeln.
        CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

      ELSEIF rs_selfield-fieldname = 'PLNUM'.
     READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'PAF' FIELD wa_final_so-plnum.
        CALL TRANSACTION 'MD13' AND SKIP FIRST SCREEN.

      ELSEIF rs_selfield-fieldname = 'AUFNR'.
     READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'ANR' FIELD wa_final_so-aufnr.
        CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

In debugging I checked, after call transaction, the system executing the following code, here CAUFVD-AUFNR is initial.

So, it has been picking some different no.

*&----

-


  • Starten Batchrezept über Einsatzplanung - DO-THANH

*----

-


MODULE GET_PARAMETER OUTPUT.

IF CAUFVD-AUFNR IS INITIAL.

GET PARAMETER ID 'BR1' FIELD *CAUFVD-AUFNR.

IF NOT *CAUFVD-AUFNR IS INITIAL.

CAUFVD-AUFNR = *CAUFVD-AUFNR.

ENDIF.

ENDIF.

ENDMODULE. " GET_PARAMETER OUTPUT

Pls help me how to resolve the above problem.

Valuable suggesstion will be highly appreciated.

regards,

Priya

1 ACCEPTED SOLUTION
Read only

I066686
Product and Topic Expert
Product and Topic Expert
0 Likes
496

Hi,

Note that the code as different Parameter id

you are setting the parameter 'ANR'


SET PARAMETER ID 'ANR' FIELD wa_final_so-aufnr.

Where as in that method it is reading the parameter id 'BR1'


 GET PARAMETER ID 'BR1' FIELD *CAUFVD-AUFNR.

so try by setting the 'BR1' in set parameter.

  ELSEIF rs_selfield-fieldname = 'AUFNR'.
     READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'BR1' FIELD wa_final_so-aufnr.
        CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

Regards,

Kiruba.

2 REPLIES 2
Read only

I066686
Product and Topic Expert
Product and Topic Expert
0 Likes
497

Hi,

Note that the code as different Parameter id

you are setting the parameter 'ANR'


SET PARAMETER ID 'ANR' FIELD wa_final_so-aufnr.

Where as in that method it is reading the parameter id 'BR1'


 GET PARAMETER ID 'BR1' FIELD *CAUFVD-AUFNR.

so try by setting the 'BR1' in set parameter.

  ELSEIF rs_selfield-fieldname = 'AUFNR'.
     READ TABLE gt_final_so INTO wa_final_so INDEX rs_selfield-tabindex.
        SET PARAMETER ID 'BR1' FIELD wa_final_so-aufnr.
        CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

Regards,

Kiruba.

Read only

Former Member
0 Likes
496

From your analysis (also based on COR3 transaction ) it is clearly a Process Order, But you are setting value to Production order Parameter id. so change the code as below instead of setting the value to ANR.

SET PARAMETER ID 'BR1' FIELD wa_final_so-aufnr.

Ignore my post, it is already given in previous post.

Edited by: Vijay Babu Dudla on Jun 22, 2010 7:50 AM