Skip to Content

Analysis for office - Work with BADI

Apr 10 at 12:42 PM


avatar image
Former Member

On there is an information about using BADI within macro code.

Main idea is:

1. Register Functional Area in Workbook_SAP_Initialize() Sub.

2. Get information from Badi, using expression like: result ="SAPListOf","CUSTOMAPPLCONTEXT")(3)

But how is it going to work if you want to get BADI result when openning workbook, and implement any logic there. For example, on the base of the BADI calculation I want either open or close workbook for editing (IP planning). If I try do do it in "AfterRedisplay Callback", I get nothing here: Application.Run("SAPListOf", "CUSTOMAPPLCONTEXT")(3). But after I open workbook and press refresh, the same method "AfterRedisplay Callback" starts, and now I get successfully the result of BADI.

How to make macro get BADI result just during openning the workbook?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers