Working with A BADI which does not contain proper import data

Working with A BADI which does not contain proper import data

How can you use a BADI which does not contain  desire import or export data ? Read this article to know how  to impress your Techlead with this cool Trick!!!!!!

Related Posts Plugin for WordPress, Blogger...

Author : Raj

Author's Website | Articles from Raj

Raj (Raju Borda) is an Application Developer focusing on Custom Development - particularly in the areas of ABAP ,WD4A , JAVA , APO , Enterprise services , Mobile applications and PI Developer/consultant . He is also certified in ABAP , PI and insurance domain. Facebook

Many time such condition occurs  when you find a perfect BADI for your requirement but As the BADI does not contains proper import data you cant use it.

Lets take an example for BADI Delivery_publish.

This BADI gets trigger when you do the POST Goods issue.

Now this BADI does not contain any input parameter.So ideally it is of no use if you want to perform a particular task on that delivery,

So what can be done!!!!!!!!!!!!

SAP has given a unique solution for this kind of problem.

See the below code:::






I can able to find the material Document No. Here..

Here we have use field symbols for reading a global variable EMKPF. Which is there in main program SAPMV50A.

(Note : It is not mandatory that you can access this program’s global variable only.You can access all the program’s global variable which are initialised in the current call sequence.

Note : if you don’t know the main program name you can find it from system table SYST and field CPROG.Now go to this program and check the top include where u will find the EMKPF table .So here is the guess that this variable might have the data initialize by Standard SAP before calling this BADI.u can see this variable in debugging mode by  (SAPMV50A)emkpf-MBLNR.

Note : Don’t ever change value As it may effect the standrad SAP codes.

Related Posts Plugin for WordPress, Blogger...

Related Posts:

Related Posts

Like this post? Share it!


User Comments

  1. bansari
    October 1, 2014

    Thanks for this post. I am happy as I learned something new today.
    I have one question that how to get values of tables with multiple lines ?
    I am trying the same scenario with exit: EXIT_SAPLEBND_002 to get value of EKPO.


Leave a Reply

:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!:
  Twitter Followers Email Updates