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 one program from another program

Former Member
0 Likes
625

Hi,

I need to call RVKUSTA1 program into Function module & that FM to used in BDT. So I think I shouldn't use Select-options. So any of u could u please send me the sample code.

Thanks ,

Rani

6 REPLIES 6
Read only

Former Member
0 Likes
570

Hi Rani,

While calling another program which having selection-screen, you can supress that selection screen in the SUBMIT program by using variaants and range fields to pass corresponding fields in the selection screen

regards,

ram

Read only

Manohar2u
Active Contributor
0 Likes
570

You can use

SUBMIT <Program> ... WITH SELECTION-TABLE seltab

<b>Effect</b>

seltab is an internal table with the structure RSPARAMS.

This variant allows you to set the names and contents of the parameters and selection options dynamically at runtime.

You can use the function module <b>RS_REFRESH_FROM_SELECTOPTIONS</b> to read the contents of the parameters and selection options of the current program into an internal table seltab with the structure <b>RSPARAMS</b>. By using <b>SUBMIT ... WITH SELECTION-TABLE seltab</b>, you can then pass these values on directly.

Regds

Manohar

Read only

Former Member
0 Likes
570

Hi Rani,

Refer the following.

      SUBMIT Program_Name
        WITH p1  EQ value1
        WITH p2  EQ value2
        WIth p3  EQ vlaue3
      AND RETURN.

Here, p1, p2, p3 are the parameters and value1, value2, value3 are corresponding values of the selection screen parameter.

<b>Reward points if it helps.</b>

Message was edited by: Amit Mishra

Read only

0 Likes
570

Hi,

you can do this way..

SUBMIT rguslsep EXPORTING LIST TO MEMORY AND RETURN
                 WITH ledger  = p_rldnr
                 WITH satzart = p_rrcty
                 WITH version = p_rvers
                 WITH company = p_rcomp
                 WITH jahr    = p_ryear.

Regards

vijay

Read only

Former Member
0 Likes
570

hi

SUBMIT REPORT_name

VIA SELECTION-SCREEN

USING SELECTION-SET 'VARIANT1'

USING SELECTION-SETS OF PROGRAM 'REPORT'

AND RETURN.

It uses variants of the program REPORT when executing the program REPORT_name.

The programs REPORT_name and REPORT must have the same SELECT-OPTIONS and PARAMETERs.

Regards,

Richa

Read only

Former Member
0 Likes
570

Hi Rani,

Please look into the FM: CRM_CCKPT_EXPORTSUMMARY.

This FM is similar to what you are doing. It is internally calling the report RVKUSTA1.

And also, look into these includes (Std. SAP) where this same report is being called via SUBMIT functionality:

- MV45AF0F_FCODE_KUST

- MV43AF0F_FCODE_KUST

Hope this helps.

Regards,

Sumant.