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: 

A simple BADI implementation - very urgent

Former Member
0 Kudos


I am new to ABAP. I need a small piece of coding. I am implementing a BADI. There is a table which has 3 fields (MATID, LOCID, STATUS and PLANNING_DATE). For each MATID (material ID), there are many LOCID (Location ID) available. My BADI has to choose the suitable LOCID for the given MATID based on the following conditions :

The LOCID for that particular MATID, must satisfy STATUS = salesprice and PLANNING_DATE = current date.

<u>Code Logic :</u>

<b>Input :</b> BADI gets a series of MATID and corresponding LOCID as input.

<b>Logic :</b> For the MATID, choose one LOCID. Check whether the corresponding fields have STATUS = salesprice and PLANNING_DATE = current date


Active Contributor
0 Kudos

Hi Preetha,

Assume that the BADI's interface has an internal table which has the table for matid, locid, status and planning_date say itab(In the badi method, check the correct name for the table).

read table itab into wa with key matid = <Current Matid>

status = <sales priice>

planning_date = sy-datum.

if sy-subrc = 0.

  • You will have the chosen record.