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: 

program within a program

Former Member
0 Kudos

hello

i had a requirement where i need to call a BDC in a program

after displaying the report when i select a particular vendor

then i need to do a bdc as with anyother method we dont give the check box selected automatically and that has to be done by the user.

can anyone tell me how can i call a bdc which is their in other program.

can i call other program into any program whats the syntax for that

3 REPLIES 3

Former Member
0 Kudos

use key word SUBMIT

Former Member
0 Kudos

hi vamshi

you can do that via the submit option.

From within your program at the point where you want to call the BDC program,

you can code like

SUBMIT zbdc_prog via selection-screen and return.

Hopefully this should solve your problem

Reward points if useful.

cheers

Former Member
0 Kudos

Hi Vamshi,

first you create a BDC progrm.

create main progrm.

In main program you call the BDC program by using SUBMIT statement.

for ex,

in yusha program, i called the yusha1 program like as follows:

SUBMIT YUSHA1 VIA SELECTION-SCREEN WITH PONO EQ FVAL.

YOU CAN GET THE MORE INFO ABOUT SUBMIT FROM ABAP DOCUMENTATION.

more info:

SUBMIT {rep|(name)} [selscreen_options]

[ list_options ]

[ job_options]

[AND RETURN].

The SUBMIT statement accesses an executable program rep. The executable program is executed as described under Calling Executable Reports.

The program name rep can either be specified directly or as the content of a character-like data object name. The data object name must contain the name of the program to be accessed in block capitals. If the program specified in name is not found, an irretrievable exception is generated.

The selscreen_options additions can be used to determine the selection screen for the program accessed and to supply it with values.

The list_options additions allow you to influence the output medium and the page size in the basic list for the program accessed.

You can schedule the program for background processing by specifying job_options.

Addition

... AND RETURN

Effect

The AND RETURN addition determines the object accessed by the runtime environment after program access is completed:

Without the AND RETURN addition, the internal session of the program accessed replaces the internal session of the calling program in the same position in the call sequence. Once program access is completed, the system returns to before the position from which the calling program was started.

As of Release 6.10, the content of the system field sy-calld at SUBMIT is copied by the calling program without AND RETURN. Before 6.10, the system entered the value "X", which was incorrect when the program was accessed from the first program in a call sequence.

The addition AND RETURN starts the executable program in a new internal session. The session for the calling program is retained. Once program access is completed, program execution for the calling program continues after the SUBMIT statement.

Note

When the SUBMIT statement is executed, the system runs an authorization check for the authorization group specified in the program attributes.

reward points if useful.

thanks,

usha