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: 

screen exit and bapi

former_member223446
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.

kiran

2 REPLIES 2

Former Member
0 Kudos

Hi,

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.

http://sap.ittoolbox.com/groups/technical-functional/sap-r3-dev/menu-exits-72696#

http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction

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:

BDC:

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.

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).

Regards

Kiran Sure

Sm1tje
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:

PROCESS BEFORE OUTPUT.

...

CALL SUBSCREEN area INCLUDING prog dynp.

...

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.