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

Calling Program RKAEP000 with submit

Former Member
0 Likes
4,332

Hello all experts,

I am having a problem when calling the std program RKAEP000. When i use:

SUBMIT RKAEP000 with params AND RETURN.

it is giving me an error transaction code not defined. i cannot use call transaction KBS1 in this case (CALL TRANSACTION 'KSB1' and SKIP FIRST SCREEN.).

Any clues how i can resolve this issue please and anyone can tell me what is the difference between these 2 statements SUBMIT and CALL TRANSACTION and the impact it has when calling these 2 on a program.

Thank you all.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,565

Hi,

If u use submit statement with params ,then those params should be defined in the called program.

This is like calling a program from one program .

And return implies that after execution of calling program,it has to come to called program and resume the execution where it had left before.

Call transaction 'TCODE'.

This is calling a transaction.

And skip first screen means this will skip the first screen of transaction and proceeds with next screen.

11 REPLIES 11
Read only

GauthamV
Active Contributor
0 Likes
2,565

Hi,

Use EXPORT and IMPORT statements.

Export itab to memory id 'mid' in your calling program.

Import itab from memory id 'mid' ,free memory id 'mid' in the called program.

Read only

Former Member
0 Likes
2,566

Hi,

If u use submit statement with params ,then those params should be defined in the called program.

This is like calling a program from one program .

And return implies that after execution of calling program,it has to come to called program and resume the execution where it had left before.

Call transaction 'TCODE'.

This is calling a transaction.

And skip first screen means this will skip the first screen of transaction and proceeds with next screen.

Read only

Former Member
0 Likes
2,565

hi,

SUBMIT is about calling a type 1 program from the current program whereas

if a program has a TCODE, then there are two ways you can call that program

LEAVE TO TRANSACTION TCODE

CALL TRANSACTION TCODE

Incase of submit program, the values to be used as parameters/variables for

are exported/imported to ABAP memory

Incase of CALL TRANSACTION these values are transferred using

SET/GET Parameter IDs

Thanks

Sharath

Read only

Former Member
0 Likes
2,565

Hi Kevin,

Its not possible for you to call the program directly, because that program is associated with many transaction codes due to which it gets confused as to which transaction code to be executed....

In this case you will have to use call transaction and to pass on the parameters and skip the first screen... you can use using option and skip first screen option....

Regards,

Siddarth

Read only

0 Likes
2,565

Hi,

You were right. When i investigated through debug mode, i found that there were quite a few tcodes associated to the program.

all i had to do was to give the condition t_code eq 'KSB1' with the submit.

Thanks a lot for the tip.

Read only

0 Likes
2,565

I was searching the forum for finding a way to create a program that has all details from KSB1 and some details from CJ13 (WBS details) and found your post.

Can you specify the SUBMIT that you had written to call KSB1. If I can have all details from KSB1 in my memory, then I can read that in my program and add WBS details and give the output.

This is what I am doing but it gives the same error as you had - transaction code not defined.

DATA: FCODE TYPE SY-TCODE VALUE 'KSB1'.

SUBMIT RKAEP000 WITH SY-TCODE = FCODE.

Any help would be appreciated. Thanks.

Regards,

Shipra

Read only

0 Likes
2,565

Hi,

try this code it will work..

the data is stored in txtlines format the data by the field wise.


* Data Declaration
  DATA:lt_listobject TYPE TABLE OF abaplist,
    l_tab_lines TYPE i.

  DATA: txtlines(1024) TYPE c OCCURS 0 WITH HEADER LINE.


  SUBMIT rkaep000                      "the program name
     USING SELECTION-SET 'BPC TEST'          "Pass varint BPC Test
           EXPORTING LIST TO MEMORY AND RETURN.

* Read list from memory into table
  CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
      listobject = lt_listobject
    EXCEPTIONS
      not_found  = 1
      OTHERS     = 2.

  IF sy-subrc <> 0.
*   Error in function module &1
  ENDIF.

*Spool content in Ascii format
  CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
      listobject         = lt_listobject
      listasci           = txtlines
    EXCEPTIONS
      empty_list         = 1
      list_index_invalid = 2
      OTHERS             = 3.


  CALL FUNCTION 'WRITE_LIST'
  TABLES
    listobject = lt_listobject
  EXCEPTIONS
    empty_list = 1
    OTHERS     = 2.

CALL FUNCTION 'LIST_FREE_MEMORY'
  TABLES
    listobject = lt_listobject.



  LOOP AT txtlines.   "data will be stored in this..
endloop.

Prabhudas

Read only

0 Likes
2,565

hi can you explain a bit more abt your problem. sorry for the late reply.only today i notices your message

Read only

0 Likes
2,565

Thanks for your reply Kevin.

I was referring to your post:

Hi,

You were right. When i investigated through debug mode, i found that there were quite a few tcodes associated to the program.

all i had to do was to give the condition t_code eq 'KSB1' with the submit.

Thanks a lot for the tip.

Can you please detail on how you gave the condition to call KSB1. My scenario is that I need to create a transaction similar to KSB1 but also add WBS details in the output. Any help on this would be greatly appreciated.

Thanks.

Shipra

Read only

0 Likes
2,565

Hi Kevin /Shipra,

I have the same issue, can you guys please provide me the submit statement. i need to call the program of transaction 'KSB1'. i know the pgm name - RKAEP000.

I'm getting the same error - " - transaction code not defined."

I dont know how to pass the condition of transaction code in the SUBMIT statement.


ELSEIF repname = 'KSB1'.
    SUBMIT (repname) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                   SPOOL PARAMETERS lw_pripar
*                 VIA SELECTION-SCREEN
*                   t_code eq 'KSB1'
                     USING SELECTION-SCREEN 100
                   WITH SELECTION-TABLE rspar
*                      eq 'KSB1'
                   AND RETURN.

Guys waiting for your reply..

Help is appreciated.

Regards,

Abdur Rafique

Read only

Former Member
0 Likes
2,565

Hi Kiven,

In the FORM transaction_init, Set the Value for these parameters, & Check the given note also, That might help you

IF sy-batch IS INITIAL OR c_item_group IS INITIAL. "note 193499

"parameters must be filled in batch mode