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: 

QM - Task to Create ProdOrder

former_member188973
Participant
0 Kudos

Dear all,

I have created a task in QM to create a production order from QM-Message. First function call creates the prodOrder with fb: "co_ko1_order_entry_ext" and is working. While saving the QM Message the second step to this task is run using FB "CO_ZV_ORDER_POST". Now I have the real ProdOrder Number. So my problem is how to update the task text "VIQMSM-MATXT"?

Anybody an idea?

Thanks for help

Regards

Roman

4 REPLIES 4

Former Member
0 Kudos

Roman,

If u have the Notification Number(QMNUM) and Sequential Task Number(MANUM), then u can READ the coresponding record from the Database Table and Update it with the new Task Text (MATXT).

Sample Program:

report zUpdateMatxt.

data: waQmsm type qmsm,

Notifi type qmsm-QMNUM,

Task type qmsm-MANUM.

  • if u have Notification Number and Task Number

Notifi = '000020000001'.

Task = '0010'.

SELECT SINGLE * FROM QMSM

INTO WAQMSM

WHERE

QMNUM = Notifi

AND MANUM = Task.

waQMSM-MATXT = 'NEW TEXT'.

  • Change the Database Entry

modify qmsm from waqmsm.

if sy-subrc = 0.

commit work.

endif.

Thanks

Kam

Note: Allot points for all worthful postings

0 Kudos

That´s not the way I think. While this happens in step SAVE of Q-Notification the data will not be database. I have to update the matxt field at runtime.

Any idea?

regards

Roman

0 Kudos

Roman,

Are you using two Said Fucntion Modules to create Message and saving???

The Field VIQMSM-MATXT belows to a View !!!!!

Thanks

Kam

0 Kudos

I know its a view...

Yes there have to be two modules... one for creation and the other one for saving. This is SAP Standard. The Question is, how to get fields returned while saving function.

regards

Roman