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: 

Call Transaction frm alv report.

Former Member
0 Kudos

HI Friends!

i m using this code.trying to call transaction co27 frm alv report. But displaying first screen and giving error -- All the production orders in the system are read.

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'.

if rs_selfield-fieldname = 'AUFNR'.

read table itab into wa_itab index rs_selfield-tabindex.

set parameter id 'ANR' field wa_ITAB-AUFNR.

call transaction 'CO27' and skip first screen.

endif.

endcase.

ENDFORM.

plz give some solution.

Rahul

6 REPLIES 6

former_member182371
Active Contributor
0 Kudos

Hi,

why not something like:

SUBMIT PPIOH000 VIA SELECTION-SCREEN AND RETURN WITH AUFNR EQ WA_ITAB-AUFNR.

Best regards.

former_member182371
Active Contributor
0 Kudos

Hi,

foget about my former answer. The correct answer is:

SUBMIT PPIOM000 VIA SELECTION-SCREEN AND RETURN

WITH P_PROFID EQ wa_ITAB-PROFID

WITH S_AUFNR EQ wa_ITAB-AUFNR.

You´ll need the values of PROFID and AUFNR.

Best regards.

0 Kudos

HI Pablo ,

hey ur code is very helpful. but after executing co27 using program, the menu options are different from co27.

Both GUI status are different, how to pass GUI status.

second query abt how to skip first screen.

regards,

Rahul

0 Kudos

hey ! Pablo ,

Thanks a lot its working.

only problem is - toolbar is different from co27.

regards,

Rahul

Former Member
0 Kudos

Hi,

Try passing Profile along with AUFNR.

Reward points if the answer is helpful.

Regards,

Mukul

former_member182371
Active Contributor
0 Kudos

Hi,

if you want to avoid the first screen just remove "VIA SELECTION.SCREEN"

from the sentence thus:

SUBMIT PPIOM000

AND RETURN

WITH P_PROFID EQ '000002' WITH S_AUFNR EQ '1000025'.

as for the PF-STATUS(LIST002) i haven´t been able to.

Best regards.