Application Development and Automation 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: 
Read only

Update Task How to pass data

Former Member
0 Likes
2,828

Hi Expert,

I need to pass some data to update task via user exit. Please refer following comment.

1. Import export won't work in update task.

2. Writing the same to a custom table will also not be a solution because custom table update at end of update task because of commits statement.

3. SAP memory won't be good idea because of multiple users.

4. Write data in a file may be good but client not agree to this.

What is other possible option?

Regards

Swati

13 REPLIES 13
Read only

anversha_s
Active Contributor
0 Likes
2,286

Hi,

We can pass data to update task from the user exit.

Thanks.

Anversha

Read only

0 Likes
2,286

Thanks for your answer.

But as I written in my code. export/import won't work in update task. if its work let me know how?

Regards

Swati..

Read only

0 Likes
2,286

Hi

Probably u should indicate which fm you're calling in Update Task

3. SAP memory won't be good idea because of multiple users.3.

SAP Memory is user dependent

Max

Read only

0 Likes
2,286

This FM which I am using in update task, BANF_WRITE_DOCUMENT

The user exit which I am using to pass data is MV45AFZZ USER EXIT AT SAVE DOCUMENT.

I am passing the data of table XKOMV from here to BANF_WRITE_DOCUMENT.

The Scenario is:

We create sales order from the sales order purchase requisition created. Its work fine. Problem when user adds a new item in existing SO. Then the price not correctly updated in respective PR.

Regards

Swati

Edited by: Swati Namdev on Nov 23, 2010 7:53 PM

Read only

0 Likes
2,286

Hi

But BANF_WRITE_DOCUMENT is to write the change document not to update PR

Max

Read only

0 Likes
2,286

Then the price not correctly updated in respective PR.

The process does not make sense - calling the change document write function for PR's does not change the price in the PR...

Your other assertions in your original post don't make sense either.

Edited by: Brad Bohn on Nov 23, 2010 8:34 AM

Read only

0 Likes
2,286

Hi Expert,

You are write this FM used to change document. As I already define when new item added in SO the same need to be reflect in PR.

I check in debug mode when I correct the data in this FM BANF_WRITE_DOCUMENT or FM which used to call this FM ME_REQUISITION_EXT. I met my purpose.

So the question remain same is there any method to pass data to this FM via user exit,

This FM updates PR also. If you cross check inside this FM CHANGEDOCUMENT_MULTIPLE_CASE update PR with new item of SO.

The Scenario is:

We create sales order and from the sales order a new purchase requisition created with SO item. Its work fine. Problem when user change SO with VA02 and adds a new item in existing SO then this new item added in PR but with price of MBEW-STPRS. I need to update new item price with KOMV condition price some xyz condition. For this I cross check whole program in debug mode only I can apply correction here. (If anywhere else I can adopt my changes please suggest).

Regards

Swati

Edited by: Swati Namdev on Nov 24, 2010 6:23 PM

Read only

0 Likes
2,286

Hi

Those function modules update the change document only, that means table CDHDR and CDPOS

If you want to add a new item (linked to the new item of SO) to PR I don't believe u need to call them.

Probably you need to create a Z function (UPDATE TASK enable), in this fm u can call the BAPI BAPI_PR_CHANGE in order to update the pricing of the PR.

You can call your fm (in update task) in the user-exit userexit_save_document: so you fm will be triggered at the end and you should be sure all "Standard" modifications have just be done

Max

Read only

0 Likes
2,286

Hello Expert,

Thanks for respond. Sorry itu2019s my mistake I was checking at wrong place. The FM which used to update PR is ME_UPDATE_REQUISITION. From here the value updated to PR. But I did a little more analysis and found the exit with which i want to send value to this FM trigger later. I mean to say.

First program update PR with FM ME_UPDATE_REQUISITION. Then it triggers the user exit save document.

Kindly help me to do this.

Regards

Swati

Read only

0 Likes
2,286

Hi

If you need to update the PR as soon as the sales order is saved, the only exit available is userexit_save_document

Is not ok for you?

Max

Read only

0 Likes
2,286

Hi Max Thanks for you reply.

yes I know I am using this user exit only but problem is the new item which is added in SO will be reflect into PR before this user exit trigger via FM ME_UPDATE_REQUISITION.

My problem is if use to update PR with new item with this FM ME_UPDATE_REQUISITION in user exit

SAVE_DOCUMENT that won't work with correct value. So I need to search a way with the help of which I can update the price of newly item added in in SO price for PR wtih data of table KONV.

Regards

Swati..

Read only

0 Likes
2,286

Hi Expert,

This problem is resolve now. Silly mistake from your side. Sorry for that. The solution is simple.

FM Me_update_requestion when I called in my user exit At SAVE Document I am not passing the value to following fields.

Eban-kz = "U"

Following value can be passed as per requirement.

U Update

I Insert

E Delete (Single Field Documentation)

D Delete

J Insert (Single Field Documentation)

After passing the value to this FM issue solved. Thanks for your support.

Regards

Swati

Read only

Former Member
0 Likes
2,286

check previous update