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

VBKRED - VKM2

rodrigo_paisante3
Active Contributor
0 Likes
1,655

Hi all,

I need to create a report to show the same info in VKM2, but with the user that approved the each record. I try to find where the approval user was stored, but I not found any table.

Anybody knows what table store this field, or the only way is to enhace VBKRED?

Thanks in advance.

8 REPLIES 8
Read only

Former Member
0 Likes
1,229

Hi,

The best way to know the tables used by VKM2 transaction could be checking the SQL trace,

to check the SQL trace...

perform the following task.

click on menu system -> utilities -> performance trace

then click on activate trace.

then open transaction VKM2 and then perfom some task.

then again click on system -> utilities->performance trace.

then click on deactivate trace and then click on display trace and hit enter.

Now you will see all the tables which were used by VKM2 and then you can find out the table you want to.

Regards,

Siddarth

Read only

0 Likes
1,229

Thanks Chordia,

but I tried this before to open this thread... it not shows any table.

Regards

Read only

0 Likes
1,229

Its showin me lots of tables, otherwise i could have given you the table name, but some of them are

EKPO

EKKO

EKBZ

EKBE

EKBZ

EBAN

SRRELROLES

V_EXT_IMP

TUVID

SXC_IMPSWH

DDNTF

V_LTDX

LTDXT

VBUK

VBAK

LIKP

etc.... I just activated the trace

open the transaction VKM2 and pressed F8

and then deactivated the trace and displayed...

I got these many tables....

Hope the above tables are of some help to you

Regards,

Siddarth

Read only

0 Likes
1,229

Thanks, but the proccess is run VKM2, check one record and press CTRL+F10 to release... ST05 did not catch any tables. I hope that the system store the user who released the record, but where...

Regards

Read only

0 Likes
1,229

I am sure one among these should be your answer....

If you would have pressed save after pressing ctrl+F10. you would get the SQL trace...

Check with these tables...

VBMOD

VBDATA

TDGA1

BALDAT

BALHDR

Regards,

Siddarth

Edited by: Siddharth Chordia on Feb 5, 2009 8:24 PM

Read only

Former Member
0 Likes
1,229

Hi,

Try using the table CDHDR to get the user name.

DATA: l_user TYPE cdhdr-username.

  SELECT USERNAME into L_USER
               UP TO 1 rows
                FROM CDHDR
               WHERE objectclas = 'VERKBELEG'
               AND      objectID    = 'Sales order number'
               AND      tcode        = 'VKM3'        " If the credit is released using VKM3
  ENDSELECT.
  
  WRITE: / 'Username approved - ', l_user.

Thanks

Naren

Read only

Former Member
0 Likes
1,229

Hi,

You can also start from CDPOS also..

DATA: l_user TYPE cdhdr-username,
          l_changenr TYPE cdpos-changenr.
 
  SELECT changenr INTO l_changenr
               FROM CDPOS
               UP TO 1 rows
               WHERE objectclas = 'VERKBELEG'
               AND      objectID    = 'Sales order number'
               AND      tabname   = 'VBAK'
               AND      fname       = 'CMFRE'      " Date field on which credit was released.
               AND      value_new NE space.       " Make sure the date is populated.
  ENDSELECT.

  SELECT SINGLE username into L_USER
                FROM CDHDR
               WHERE objectclas = 'VERKBELEG'
               AND      objectID    = 'Sales order number'
               AND      changenr   = l_changenr.
  
  WRITE: / 'Username approved - ', l_user.

Thanks

Naren

Read only

rodrigo_paisante3
Active Contributor
0 Likes
1,229

Thanks all for your time to help me, the problem was solved!

Best regards