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.
cancel
Showing results for 
Search instead for 
Did you mean: 

Z table updation in a BADI

Former Member
0 Kudos

Hi All,

We are using a BADI to update a custom Z table. It records the date and time whenever a work order is created or changed. The Badi is triggered for any Order changes by the User. The updation of the custom Z table is for internal use for other BW reports.

What do we do when an updation to the table fails to happen. i.e how do we show that the table updation has failed to happen.??

This table is only for internal use as the data in the table is used by the BW reports.

Thanks in Advance,

Vidya

1 ACCEPTED SOLUTION

Sm1tje
Active Contributor
0 Kudos

To name but two:

1. You can issue a message to the user directly (pop-up screen), if possible in your case. This will, for instance, only work if all work orders are created in foreground.

2. Create application log (to be viewed with transaction SLG1) in which all failed updates are recorded. Have someone look at this log regularly, or read it while extracting data from source to BW.

4 REPLIES 4

Former Member
0 Kudos

hI,

I guess locking the table should be a good solution to yuor issue. following is teh way to achieve it...

We need to create a lock object using transaction SE11 for that particular table.

Once the lock is created, we can use this lock object in our program using the function call.

CALL FUNCTION 'ENQUEUE_<<Lock Object>>u2019

The naming convention followed for a lock object is u2018EZ_<<table name>>u2019

Dont forget to Unlock

Once we update the table, it is very important to release the lock so that other applications may access the table.

In order to unlock, we use the function module call as shown below.

CALL FUNCTION 'DEQUEUE_<<Lock Object>>u2019

N have a customized message after the FM , in case it fails...

Cheers,

Varna

aris_hidalgo
Contributor
0 Kudos

Hi Vidya,

Can you show us your code?

Sm1tje
Active Contributor
0 Kudos

To name but two:

1. You can issue a message to the user directly (pop-up screen), if possible in your case. This will, for instance, only work if all work orders are created in foreground.

2. Create application log (to be viewed with transaction SLG1) in which all failed updates are recorded. Have someone look at this log regularly, or read it while extracting data from source to BW.

Former Member
0 Kudos

Hi All,

Thanks a lot for all the valuable inputs.

Micky,

Since we are using 'Modify' statement to update the record in Ztable, we are assuming that there would not be any records left out without updation.

IF in case it happens then we would go with your suggestion. Thank you.

Cheers,

Vidya