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: 

Regarding Call Transaction

sandip_sonar
Participant
0 Kudos

Dear All,

In my report I m displaying Process Order No.(AUFNR) , I want to call transaction COR3 using USER COMMAND on AUFNR. I have used following code for this:

form PROCESS using USER_COMMAND like sy-ucomm sel type slis_selfield.

IF SEL-FIELDNAME = 'AUFNR'.

SET PARAMETER ID 'ANR' FIELD sel-value.

CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

ENDIF.

endform.

By using this code I am able to open COR3 Transaction, but all the time it will open for the same Process Order Number.

I have done this for other transaction also, but for that i am getting correct result.

I m using MATNR to call MM03.

Pls,Suggest any good solution.

Thanks & Regards,

Sandip Sonar.

12 REPLIES 12

Former Member
0 Kudos

Hi Sandeep,

Check that in the debuggin, why every time its coming the same value...

and also use the CHANGING for the sel-value. so that it will effects...

Regards!

Former Member
0 Kudos
SET PARAMETER ID 'ANR' FIELD <process order number>.

CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

should work. It is working in my system.

Former Member
0 Kudos

HI,

form PROCESS using USER_COMMAND like sy-ucomm sel type slis_selfield.

IF SEL-FIELDNAME = 'AUFNR'.
SET PARAMETER ID 'ANR' FIELD sel-value.
CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
CLEAR sel.       " Add this line
ENDIF.

endform.

0 Kudos

Thanks all for your reply, but i have tried out all these options though I am having the problem.

Regards,

Sandip Sonar.

dev_parbutteea
Active Contributor
0 Kudos

Hi,

Did you check in debug mode if the set parameter id is working and whether the sel-value is storing the correct values?

Regards,

Dev.

Former Member
0 Kudos

Hi Sandip,

Try this one..

IF lv_selfield-fieldname = 'AUFNR'.

  • Read output data table, using index of row user clicked on

READ TABLE gi_output INTO wa_output INDEX lv_selfield-tabindex.

  • Set parameter ID for transaction screen field

SET PARAMETER ID 'ANR' FIELD wa_output-aufnr.

CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.

I think this should solve your problem.

Regards,

Mallika.

Former Member
0 Kudos

Hi,

Hope the following code will help u.



TYPE-POOLS: slis.

TYPES: BEGIN OF x_it,
       aufnr type aufk-aufnr,
       END OF x_it.

DATA: it TYPE STANDARD TABLE OF x_it,
      wa LIKE LINE OF it.

data: it_fieldcat type slis_t_fieldcat_alv,
      wa_fieldlog type slis_fieldcat_alv,
      it_layout type slis_layout_alv .

select aufnr FROM aufk INTO TABLE it .

  wa_fieldlog-fieldname = 'AUFNR'.
  wa_fieldlog-seltext_l = 'PO'.
  wa_fieldlog-tabname   = 'it'.
  wa_fieldlog-hotspot   = 'X'.
  append wa_fieldlog to it_fieldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     I_CALLBACK_PROGRAM                      = sy-repid
     I_CALLBACK_USER_COMMAND           = 'USERCOMMAND'
     IT_FIELDCAT                                         = IT_FIELDCAT
    TABLES
      t_outtab                                                = IT
            .
  IF sy-subrc <> 0.
  ENDIF.

  form USERCOMMAND using ucomm like sy-ucomm sel type slis_selfield.
CASE ucomm.

when '&IC1'.
IF SEL-FIELDNAME = 'AUFNR'.
SET PARAMETER ID 'ANR' FIELD sel-value.
CALL TRANSACTION 'COR3' AND SKIP FIRST SCREEN.
ENDIF.

ENDCASE.
endform.

Thanks.

Former Member
0 Kudos

hI,

Check in debug mode. If the value is correct it should come correct other wise check logic and also check cel value

regards

Md.MaahboobKhan

Former Member
0 Kudos

Dear Sandip,

I saw your Question on getting the same Process Order Number when using Call Transaction COR3 in ALV display. I am facing similar issue and need your help. I have tried the solutions posted by others in this thread but none of it worked.

Please let me know how you solved this problem.

Thanks,

Saritha

Former Member

I got to know the problem, Inside the COR3 transaction, it uses BR1 as Parameter ID instead of ANR. We need to set Parameter as BR1 and not ANR.

0 Kudos

Hi,

How would you find the new parameter ID for AUFNR. I tried to search but did not get it.

It would be great if you let me the procedure for the same.

0 Kudos

Just debug the Standard COR3 transaction. It has this line in GET_PARAMETER_OKCODE Module.

SET PARAMETER ID 'BR1' FIELD CAUFVD-AUFNR.