cancel
Showing results for 
Search instead for 
Did you mean: 

Transaction for Web Dynpro

Former Member
0 Kudos

Hello,

I created a Web Dynpro screen which allows to change purchase requisitions.

I also created for it a parameter transaction in SE93.

In ME52N/ME53N transactions it is possible to see changes in pr items (Environment -> Item Changes). When I'm change an item through standart transactions like ME52N/ME53N/SE38/etc, the proper transcation code is shown. Also in z dynpro transcations it works fine. But when I'm change a pr item through my Web Dynpro transaction, the transaction code field in the Item Changes screen is empty.

How can I solve this?

Thanks,

Ednri.

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Consider to show us more details. Probably you have a bug in your logic.

Former Member
0 Kudos

I have a z program which call to BAPI_PR_CHANGE. I also have a transaction for this program, 'tran_prog' for example. When I'm execute the program, it's change any purchase requisition, pr 12345 - item 10 for example. When I'm enter to ME52N, select 12345 purchase requisition, select the 10 item, and go to Environment -> Item Changes, I see the change which made by the BAPI_PR_CHANGE in my program, and I see that this change was made by 'tran_prog' transaction.

I also have Web Dynpro screen with the same logic like my program. I have transaction for it., 'tran_webdynpro' for example. I execute it, and it's change the same purchase requisition item. But when I'm enter to ME52N in order to see the changes of the item, I see the change, but the "transaction code" field is empty. My expectation was to see that this change was made by 'tran_webdynpro' transaction, and it's not happened.


I hope I was more clear now.

former_member211591
Contributor
0 Kudos

Hi Ednri,

you have to call BAPI 'BAPI_TRANSACTION_COMMIT' after you have called your 'BAPI_PR_CHANGE'. Otherwise your changes will not be written to the db.

Regards,

ismail

Former Member
0 Kudos

Ofcourse I call 'BAPI_TRANSACTION_COMMIT' in order to save the changes to the db.

My problem is that I need that in the Item History, it will be shown that the changes was made by my web dynpro application.

former_member211591
Contributor
0 Kudos

Ok, I think I got it now.

You have created a transaction code (lets say ZXXX), which starts your webdynpro application in a sap gui screen.

When running a webdynpro application system field SY-TCODE is empty, even though you are calling it within a sap gui window. Thus the transaction code field in the Item Changes screen is empty.

Try setting SY-TCODE = 'ZXXX' just before you call your BAPI. Maybe it works. I never tried that.. not sure if this works.

Regards

iSD

Former Member
0 Kudos

I did it. It works partly: When I'm adding a new item to exist purchase requisition via my web dynpro application and go to the Item Changes screen, there are many rows which their Action is 'Changed' and the transaction code is my ('ZXXX'). But there is one row with Action 'Entered', and in this row the transcation code is empty.

It is possible that the BAPI_PR_CHANGE, while saving the Item Changes to the db, use the SY-TCODE for rows of Action 'Changed', and don't use it for rows of Action 'Entered'?

Thank you.

former_member211591
Contributor
0 Kudos

Actually I don't know BAPI_PR_CHANGE.

It not best practise to change system fields, they can be overwritten anytime by the system. So, yes it is possible...

How about to enter an item and then change it? dirty...

Former Member
0 Kudos

How can I change it after the item was entered?

former_member211591
Contributor
0 Kudos

I don't know how to use your BAPI to enter and to change an item. Call your BAPI to enter an item, and then call it to change the item. See BAPI-documentation.

Former Member
0 Kudos

But the transaction code in the row with 'Entered' Action will be still empty.