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: 

Where did BSEG table modified after posting in migo ?

Former Member
0 Kudos
914

Where did BSEG table modified after posting at migo?

ENHANCEMENT-SECTION GOODS_MOVEMENT_FILL_04 SPOTS ES_SAPLMIGO.

IF l_tafkz = x.

COMMIT WORK AND WAIT.

CALL METHOD reset.

CALL TRANSACTION 'LT06'.

ELSE.

COMMIT WORK.

CALL METHOD reset.

ENDIF.

END-ENHANCEMENT-SECTION

It happens after COMMIT WORK. But as i understood all tables are modified after it and all changes should be predetermined before. So i need a variable or program name where it predetrmined for bseg.

11 REPLIES 11

Sandra_Rossi
Active Contributor
0 Kudos
795

There are lots of places where BSEG columns can be updated. I advise you to:

  1. Run SQL trace with ABAP call stack activated to see which Update Function Module runs the update of BSEG table, and to see at which place this Update Function Module is called. NB: in the SQL trace, "call function module ... in update task ..." is usually shown as "perform %_get_vb_key", or if the Local update task is activated as "Export to Memory %%..." - it may be a little bit difficult to locate - another solution is to add one statement breakpoint at statement "call function in update task").
  2. After locating the "call function in update task", you must reverse engineer to see how the arguments were initialized...

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
795

shiz0frenik

The BSEG table is used for accounting document segment. It contains the line items of accounting documents. The table is updated after the COMMIT WORK statement1. Unfortunately, I cannot provide you with a specific answer without more information about your system configuration. However, I can suggest that you check the following:

  • Check if there is any enhancement or user exit implemented in your system that modifies the BSEG table.
  • Check if there is any custom program that modifies the BSEG table.

I hope this helps! Let me know if you have any other questions.

Former Member
0 Kudos
795

sandra.rossi, i tried to find it with st05, but cannot find single record mentioning bseg

Former Member
0 Kudos
795

sandra.rossi, but i found some records mentioning BELNR (which was created ) afrer post. And there is simmilar table bsis. When i tried to set breakpoint and do post again it doesn't stops. How it should work? program name : LF005F03 INSERT bsis FROM TABLE ibsis.

Sandra_Rossi
Active Contributor
795

Here, RFBLG is the cluster table containing BSEG.

Debug works with Update Function Modules only if you activate the Update Debug.

But debugging the update task won't help you to find the place where the values of BSEG columns are initialized or calculated, because as I said earlier, it doesn't happen within the Update Task, it happens before CALL FUNCTION wwww IN UPDATE TASK ... The wwww call is only registered when this statement is executed, including parameter arguments, and the actual call happens later when COMMIT WORK is triggered (and it happens in the update task).

Former Member
0 Kudos
795

sandra.rossi, i found table-variable t_bseg in program LF005U01 In update debuging. But i cant understand where it initialized. how can i know initialization of it? Especially hkont field of it

Sandra_Rossi
Active Contributor
0 Kudos
795

I told you two times already that you should not debug in the update task, but before CALL FUNCTION ... IN UPDATE TASK ... (which is not running in the update task).

Former Member
0 Kudos
795

sandra.rossi, could u tell me how i can get function name or list of functions which will start in update task after posting?

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
795

shiz0frenik

You can use the ST05 transaction to trace the update task. Here are the steps:

  1. Go to transaction code ST05.
  2. Click on the SQL Trace button.
  3. Click on the Activate Trace button.
  4. Perform the action that triggers the update task.
  5. Go back to ST05 and click on the Display Trace button.
  6. Click on the Analysis button.
  7. In the Analysis screen, click on the Update Transactions tab.

You can also refer to this SAP Community post1 for more information.

I hope this helps. Let me know if you have any other questions.

matt
Active Contributor
0 Kudos
795

In the question editor, there is a button "CODE".

If you use it, your code will be formatted and easier to read.

ENHANCEMENT-SECTION GOODS_MOVEMENT_FILL_04 SPOTS ES_SAPLMIGO.
IF l_tafkz = x.
COMMIT WORK AND WAIT.
CALL METHOD reset.
CALL TRANSACTION 'LT06'.
ELSE.
COMMIT WORK.
CALL METHOD reset.
ENDIF.
END-ENHANCEMENT-SECTION

Sandra_Rossi
Active Contributor
0 Kudos
795

Where to "get function name or list of functions which will start in update task after posting": look at my previous answers.