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: 

adding forwarding agent in xvbpa and yvbpa

Former Member
0 Kudos

Hi all,

I am trying to add a forwarding agent to my sales order in VA02 through user exit: USEREXIT_MOVE_FIELD_TO_VBAK

I am setting field xvbpa-updkz = I for adding a new forwarding agent, yet the issue is that I am still getting the error "express document update was terminated".

I think the issue might be related to the fact that I am not populating yvbpa correctly. Can someone tell me what the purpose of yvbpa is and the difference with xvbpa?

Thanks,

6 REPLIES 6

0 Kudos

Hello,

Generally the internal table whose name starts with an X contains the current data, including the last changes made by the user and the table with Y as the first letter of the name contains the database status before the change.

0 Kudos

hi

The X tables contain the current status of the document including

the changes that have been performed in the current transaction.

The Y tables play a role only for the change mode of document

processing. They contain the original status of those table entries

that have been changed during the current transaction. Therefore,

the entries in the Y table reflect the previous status of the

document in the database.

The update indicators of the individual table entries in the X and Y tables

(field name UPDKZ) control whether an entry is added (update indicator I),

changed (U) or deleted (D) or whether it is not influenced at all (update

indicator is initial).

In general, the following connection exists between the update indicator

and the Y tables:

o When you create a document, only the update indicator 'I' can exist

in the X tables (or sometimes the update indicator remains

initial). No records exist in the Y tables.

o When you change a document, the following cases may occur:

- You add a table entry. There is only one entry in the X table

that has the update indicator I. There is no entry in the Y table

- You change a table entry. The X table contains the changed

entry with the update indicator 'U'. The Y table contains the

original table entry and has the same status as before the

change; the update indicator usually is initial. The Y table

can only contain one entry with the same key in each case.

- You delete a table entry. In this case, the X table contains

this entry with the update indicator 'D'; the entry may also be

directly deleted from this table (for example, for table

XVBUP). The original entry (status before the deletion) is

contained in the Y table and has also the update indicator 'D'.

The X tables can contain any number of entries with the same key

and the update indicator 'D', but only one entry with the update

indicator 'I' or 'U'. If you want to access a specific table entry

in a user exit, the update indicator must be queried at the same

time so that only active entries are taken into account.

When you display documents, update indicators and Y tables are

irrelevant.

0 Kudos

copied from source not identified?

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

See SAP Note 178328 - Problems due to incorrect user exits in SD.

Regards

Eduardo

Former Member
0 Kudos

Thanks,

Just to clarify then: The Y table should be updated directly before a change. Then the changes are held in the X table. Is this correct? What are the issues without updating the Y table?

0 Kudos

Y rows shouldn't be touched.  If you have new data row in X, just need to be sure to set the UPDKZ to I.  In this case, there was no prior row, so there will be no entry in YVBPA.  However, the fact that you're getting the express document suggests a serious error in exit coding that is causing SAP to roll back the transaction during attempts to save data to the database.  This cannot be done through partner determination, instead of through exit?