cancel
Showing results for 
Search instead for 
Did you mean: 

Can i put COMMIT WORK in standard SAP Webdynpro's post-exit?

former_member202077
Participant
0 Kudos

Hello

I wrote a custom function module, where in i am updating a standard SAP table (say, table_1) by using a standard SAP class and at the end i placed BAPI_COMMIT_WORK to write the data to data base, well.

I am calling this FM in a post-exit of standard SAP's CLICK_SAVE_BUTTON method of a standard SAP webdynrpo componenet.

Already standard SAP is updating this table_1 in CLICK_SAVE_BUTTON and COMMIT_WORK is also there in this method.

Then, my post-exit will trigger, where in am calling my FM, where in am updating the same table_1 and placed BAPI_COMMIT_WORK

(I tried calling my FM with addition of NEW TASK DESTINATION 'NONE', in NEW WORK UNIT, but they are not updating the table_1)

Pls. suggest me is it safe? is it OK? or do we have any better approach?

Thank you

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member202077
Participant
0 Kudos

Any help pls.

Thank you

Former Member
0 Kudos

Use Assistant Class.

add a method in Assistance class and call the method in you click action.

that is one of the better approach.

Thanks.

Uma

former_member202077
Participant
0 Kudos

Thank you, but as its a standard SAP webdynpro component, am not sure the enhancement framework allows me to create / assign a custom class as assiatnce class at component level.

Also, I tried that clicked webdynpro component and clciked the enhancement spiral icon, then selected a already existing custom enhancement implementation, but the assistance class field is greyed out!

Any other ideas pls.

Thank you

former_member202077
Participant
0 Kudos

Any help pls.?

Thank you

Former Member
0 Kudos

you may overwrite the standard SAP click method.

copy the all standard code and paste it into your method and do all modifications.

when click of button , your method will be called instead of standard method.

Thanks.

Uma

former_member202077
Participant
0 Kudos

Thank you,

I guess my lead is not OK for Overwrite approach, i guess i need to discuss with him