cancel
Showing results for 
Search instead for 
Did you mean: 

Me_Action Field in T51 (Server Driven)

Former Member
0 Kudos

Hi All,

It is said that It is required to indicated the middleware <b>precisely the

change</b> (whether it was created, changed or deleted) made in the backend per object. The value is expected to be filled in the GetList BAPI wrapper and returned to the middleware.

For that a field, ME_ACTION can be filled with value "A"(Add) or "M"(Modify) or

"D"elete.

Is this field defined as an Export parameter in the GetList BAPI wrapper or is one of the fields of the table that will be called as a header structure in the GetList.

And how will Me_Action field be populated with different values?

Will it be by the application which makes any data modification in the back end?

Or will these values get populated in the code of GetList BAPI wrapper?

Or some other way..?

Awaiting your responses..

Ankur

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ankur,

The values could be populated by the application itself or it could be populated by the BAPI if it has the intelligence of identifying the A M or D records from the parent table.

Lets look at the first option...

When we design an application it will contain header and item tables. During the design of the header table include the ME_ACTION as one of the fields along with other application related fields. So during creation of data we will populate A in me_action field from the application itself. If the it is only changes then we populate M. If the records needs to be deleted it should be populated as D. Remember delete in the application is only a soft delete. Now you have to just query this header table and populate the export parameters from this table.

OR

Construct another table containing 2 fields application key and me_action as table fields. Now whenever header table is touched then modify this table appropriately. If there is creation of data in header table then populate this new table with the generated key and me_action = A. If there are changes or deletion then populate me_action = M and me_action = D repectively. In the BAPI wrapper just populate the export parameters with data from this table.

In the second option...

The design of the BAPI must be intelligent enough of determining these values when populating the export parameters.

Hope this solves the query....

Reward points if useful...

Thanks...

Preetham S

Former Member
0 Kudos

Hi Preetham,

Thanks for the reply.

You almost told me everything that needs to be done. But just forgot to tell me 'How' am I supposed to do it? The technical side of it...

Lets assume We are talkin about the part where the BAPI is intelligent enough to identify the A M or D records from the parent table.

I just wanna know how to make it intelligent enough. Coz in my case I dont have any application playin with the data.

If the data changes... We populate Me_Action with 'M'. But how...? How will the backend know if the data is being changed.

Can you take an example and explain it to me... ?

Like suppose in the Header Table, I create this field Me_Action.

Now say during Initial creating the data, I fill in the Me_Action field with 'A'.

Now say, I use se16 to modify some data. Now tell me how will the Me_Action field will be populated with 'M'.

What coding is required and where is it to be done..

Exactly in the Option 2, How will the Me_Action field will be populated with 'M'.

in the other table which I have created when I change some data in the header table?

Thanks, Ankur

AjithC
Employee
Employee
0 Kudos

Hi Ankur,

If you use Se16 to modify the data, then you cannot identify the changes, unless the user who makes changes are forced to enter some other info also..

SE16 is a standard data editing tool, which cannot be used for your purpose.. Instead create your own editor (application specific logic), and in that you can identify whether its add/modify/ delete and then call merep_deltabo to inform the changes..

Regards

Ajith

Former Member
0 Kudos

Hi,

In the post by Preetham, He mentioned - <b>Remember delete in the application is only a soft delete</b>. Can somebody tell me what that means?

Can I add ME_ACTION field at the end of the header table or It has to be defined somewhere else?

And Ajith mentioned - <b>For identifying delete action will be easier.</b>

Can somebody put more light on it?

Ankur

Former Member
0 Kudos

Hi all,

With all the help Sdn offered me, I have been finally able to create a GetList Bapi which returns only the detla data and populates the field Me_Action accordingly.

Thanks a lot to everybody. I am marking this thread as answered.

Ankur

Answers (1)

Answers (1)

AjithC
Employee
Employee
0 Kudos

Hi Ankur,

There are two occasions (two ways) you can inform the MI server about the action. One when you are calling the MEREP_DELTABO function module or via Getlist.

Its not necessary to fill the action both times. Only one is required. If filled both times, the Getlist bapi has the highest precedence.

For identifying delete action will be easier. The only challenge will be to identify add or modify. For that you can always return as Modify and MI server will take care of whether its a add or modify.

Regards

Ajith