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: 

calling standard transaction

Former Member
0 Kudos
162

hello all,

I have to call a standard transaction from Z* program. I want to use the output of the standard transaction into my program how can do this?

1 ACCEPTED SOLUTION

former_member223537
Active Contributor
0 Kudos
85

You can use FM "RSPO_RETURN_ABAP_SPOOLJOB".

6 REPLIES 6

Former Member
0 Kudos
85

hi,

FORM call_tcode USING r_ucomm ls_selfield LIKE ls_selfield.

CASE r_ucomm.

WHEN '&IC1'.

IF ls_selfield-fieldname = 'VBELN'.

SET PARAMETER ID 'VF' FIELD ls_selfield-value.

CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.

ENDIF.

IF ls_selfield-fieldname = 'AUBEL'.

SET PARAMETER ID 'BES' FIELD ls_selfield-value.

CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM.

regards,

Paras

0 Kudos
85

I dont think this will work. If i run the standard transaction it is giving me alv grid output. I want to use some of the entries from this table into my z program. how can i do that?

Former Member

former_member223537
Active Contributor
0 Kudos
85

Hi,

Use JOB_OPEN, call transaction or SUBMIT ..to SAP-SPOOL & JOB_CLOSE.

This will create a spool with the desired output of Standard transaction.

Retrieve the spool into an internal table using a FM.

Best regards,

Prashant

0 Kudos
85

you mean to say,

Job_open.

call trasaction

job_close.

this much i have to use or do i have to create a whole BDC for that. One more thing can you give me the program get the table from the spool.

former_member223537
Active Contributor
0 Kudos
86

You can use FM "RSPO_RETURN_ABAP_SPOOLJOB".