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.
Showing results for 
Search instead for 
Did you mean: 

screen exit and bapi

Active Participant
0 Kudos

how can we call a subscreen in screen exit.

how can we do error handling in bapi?differenece between bapi and bdc.

i will give the 10points to correct answers.



Former Member
0 Kudos


Call subscreen in screen exit:

Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

the tcode is cmod...

1.From the main screen of the Project management transaction, proceed as follows:

Select Enhancement components and choose Change.

2.Choose Edit component.

3.Choose the screen exit and double click on it

4.Create your subscreen using the Screen Painter.

5.Design your screen to be added to the standard screen and activate the particular screen and return back to the flow logic .

6.Choose the PAI and PBO to write down the logic.

7.Generate your screen and choose Back (the green arrow) to return to the Project management transaction.

8.Go to the transaction ME22 to view the customer defined screen exit.

9.Enter the purchase order number and press Enter.

10.Go to the menu header --> Details.

11.Purchase number is visible on the standard screen

Please check if the thread given below would be of any help.

error handling in bapi:

While creating BAPIs,include Return table (of structure BAPIRET2)as table parameter. This table is populated with error messages/Sucessful messages after BAPI was executed.

Diff b/w bdc and bapi:


Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system

or from a non-SAP system to SAP System.

Features :

BDC is an automatic procedure.

This method is used to transfer large amount of data that is available in electronic medium.

BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).

BDC uses normal transaction codes to transfer data.


BAPI stands for Business API(Application Program Interface).

A BAPI is remotely enabled function module

ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..

You can make your function module remotely enabled in attributes of Function module but

A BAPI are standard SAP function modules provided by SAP for remote access.

Also they are part of Businees Objest Repository(BOR).


Kiran Sure

Active Contributor
0 Kudos

1. Is that a custom subscreen?

you can not just call a standard subscreen from within your user exit. Might be possible though to access the data on the screen, but this depends on the exit you are working in. Normally you call a subscreen like this:

You include a subscreen screen using the CALL SUBSCREENstatement in the flow logic of the main screen.

To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:





As you can see, you can call a subscreen ONLY from the MAIN screen.

2. Error handling in BAPI is done by using the return parameter of type BAPIRET2. Every BAPI has this structure included. In here all messages will be transferred back to the calling application.

BDC is done by using the CALL TRANSACTION statement and process the SCREENS. where as BAPI's do not process the screen but they are 'just' processing the logic, so to say. The result will be the same, database will be updated.