Calling SAP Menu Areas From Program

At times, we need to call the SAP Menu Area due to specific business requirements, particularly from the CRM Web UI screen. Calling SAP Menu Areas From Program can provide easy access to various business areas in SAP. For instance, transaction VA00 is the Menu Area for Sales, VL00 is SAP Easy Access for Shipping, and VT00 is for Transportation, while VS00 is for Sales Master Data, and so on.

Instances of Menu Region:

Menu Region for VA00 is displayed underneath. The entire Deals Cycle subtleties are there in this Menu Region.

SAP Menu Area for VL00

Calling these Menu Regions straightforwardly from our program is digit interesting. One can wrongly expect that they can do an immediate Call Exchange to these T Codes. Be that as it may, we can’t do the Call Exchange straightforwardly to these exchanges.

Two methods for calling the SAP Menu Region from our program:

1) Use Capability Module ‘BMENU_START_BROWSER’.

2) Call Exchange ‘SE43’ and give your Menu Region.

You can utilize any of the over two techniques to call your Custom Menu Regions too, notwithstanding the standard SAP Menu Regions.

Code Snippet

Method 1: Using Function Module ‘BMENU_START_BROWSER’:

CALL FUNCTION ‘BMENU_START_BROWSER’
EXPORTING
mode = ‘D’
tree_id = ‘VA00’ “Any Menu Area
hide_inconsistent_nodes = ‘X’
EXCEPTIONS
tree_does_not_exist = 1
no_authority = 2
OTHERS = 3.

Method 2: Call Transaction ‘SE43’ and give the required Menu Area:

DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata,
k_bdcdata TYPE bdcdata,
k_opt TYPE ctu_params. “CTU Params

* Populate the screen and field details
PERFORM bdc_dynpro USING ‘SAPLBMEN’ ‘0200’.
PERFORM bdc_field USING ‘BDC_CURSOR’
‘BMENUNAME-ID’.
PERFORM bdc_field USING ‘BDC_OKCODE’
‘=SHOW’.
PERFORM bdc_field USING ‘BMENUNAME-ID’
‘VA00’.

* BDC mode
k_opt-defsize = ‘X’.
k_opt-dismode = ‘E’.
k_opt-updmode = ‘N’.

* Call Transaction SE43
CALL TRANSACTION ‘SE43’ USING i_bdcdata OPTIONS FROM k_opt.

*&———————————————————————*

*& Form bdc_dynpro
*&———————————————————————*
* Get the screen details
*———————————————————————-*
* –>PROGRAM Program Name
* –>DYNPRO Screen No
*———————————————————————-*
FORM bdc_dynpro USING program TYPE any
dynpro TYPE any.
CLEAR k_bdcdata.
k_bdcdata-program = program.
k_bdcdata-dynpro = dynpro.
k_bdcdata-dynbegin = ‘X’.
APPEND k_bdcdata TO i_bdcdata.

ENDFORM. ” BDC_DYNPRO

*&———————————————————————*
*& Form bdc_field
*&———————————————————————*
* Populate the field name and value
*———————————————————————-*
* –>FNAM Field Name
* –>FVAL Field Value
*———————————————————————-*
FORM bdc_field USING fnam TYPE any
fval TYPE any.
CLEAR k_bdcdata.
k_bdcdata-fnam = fnam.
k_bdcdata-fval = fval.
APPEND k_bdcdata TO i_bdcdata.

ENDFORM. ” BDC_FIELD

If you want to receive practical solutions and updates, including topics like calling SAP Menu Areas From Program, directly to your inbox, please subscribe. We respect your privacy and take protecting it seriously.

YOU MAY LIKE THIS

Just 3 Changes to Improve the SAP ABAP Performance by 95 Percent

Tips for Building Custom SAP Applications: A Comprehensive Guide

Applying Enterprise Integration Patterns in SAP ABAP

X
WhatsApp WhatsApp us