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: 

How to use Submit program of RAIMCOPY for a specific TCode - IM34

0 Kudos

Hi Experts,

I have to use submit program RAIMCOPY.  but the program intend used in differnt Tcodes (IM27,IM27_Close,IM27_REPEAT,IM34,IM44,IM54,IM64).

I used the following code but it is some other selection instead of IM34.

SUBMIT RAIMCOPY VIA SELECTION-SCREEN with PA_PRNAM = gv_improg
                                            
WITH PA_GJAHR = gv_appyear
                                            
with SO_VERSN-LOW = 'G00'
                                            
with P_XVOVR = 'X'
                                            
and RETURN.

Please help me to write a submit program RAIMCOPY for only IM34.

Regards,

Thulasiram.

1 ACCEPTED SOLUTION

0 Kudos

Thank you Naveen/Raymond,

I got the solution. As there is no recommended solution. So, I copied standard program and made ZRAIMCOPY. It is working fine.

7 REPLIES 7

naveenvishal
Contributor
0 Kudos

Hi Thulasiram,

Just add the condition of sy-tcode (of structure SYST) before submit.

if sy-tcode = 'IM34'.

submit

Endif.

Hope this helps.

Regards,

Naveen

0 Kudos


I am writing a program for z* tcode..

In my custom program, i am using submit RAIMCOPY. But the program is directing to some other selection screen instead of IM34.

0 Kudos

Try using "And skip first screen" code extension when submitting the program.

raymond_giuseppi
Active Contributor
0 Kudos

You have to pass parameter pa_tcode (not displayed) too, with the standard transaction you want to emulate, here IM34.

SUBMIT raimcopy VIA SELECTION-SCREEN
   WITH pa_tcode = 'IM34' " Else program will use sy-tcode.
   WITH pa_prnam = gv_improg
   WITH pa_gjahr = gv_appyear
   WITH so_versn-low = 'G00'
   WITH p_xvovr = 'X'
   AND RETURN.

Regards,

Raymond

0 Kudos

Thanks Raymond,

Your solution is absolutely correct. But Pa_tcode is cleared and taking sy-tcode when it enters in to the program.

0 Kudos

Yes at start of report (events LOAD-OF-PROGRAM and INITIALIZATION) the variant / parameters are not yet transfered to program, they are only passed just before the AT SELECTION-SCREEN OUTPUT, so that could have been nice ... before OSS note  927693 - Report variants used incorrectly in program RAIMCOPY which triggers now an error if sy-tcode <> pa_tcode in interactive mode ...

So either you look for an implicit enhancement option to force again pa_tcode to required value (e.g. stored in memory) and disable effect of the OSS note (*) /or/ you replace the SUBMIT statement with a CALL TRANSACTION with a small BDC data.

Regards,

Raymond

(*) SAP did that for transaction  IMCAOV, 1023920 - IMCAOV: Unberechtigter Abbruch 00368

0 Kudos

Thank you Naveen/Raymond,

I got the solution. As there is no recommended solution. So, I copied standard program and made ZRAIMCOPY. It is working fine.