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: 

Store data in data base

bartlomiej_lach
Participant
0 Kudos

Hello!

I want to printout notification during creation of it, but I have one problem. I found one user-exit where I can do it but in that moment data are not stored in DB yet. Maybe you know how to force system to save data in DB.

Please don't write about COMMIT WORK with or without AND WAIT, because I tired it and it din't work. I also tried to use:


    call function 'DB_COMMIT'
         exceptions
              others = 1.

but it doesn't work too. Maybe someone knows other solution?

7 REPLIES 7

Former Member
0 Kudos

hi,

ru doing it for customized Z transaction or standard SAP...

regards,

Vamshi

Former Member
0 Kudos

clearly specify ur problem.....

do u want to get some data into user exit?? or do u want to forcefully save data in DB....???

0 Kudos

I want to get some data into user-exit which are not avilable in user exit interface, but they are not stored in DB too.

So I want to save this data to DB and then select proper row by select statement.

Former Member
0 Kudos

Hi,

u can try this simple code.

1. u can access any table or variable from the main program in exits

2. u just have to find the point u need to apply this code.


FIELD-SYMBOLS: <komv>.
 
ASSIGN ('(SAPLMEPO)TKOMV[]') TO <komv>.

this is just an example... try to do this...

ASSIGN ('(SAPLMEPO)TKOMV[]') TO <komv>.

SAPLMEPO is the main program and TKOMV[]' is the table...

0 Kudos

What do you mean main program?

1. user-exit program

2. program which is triggered as a first in transaction

3. or some else

0 Kudos

>

>I want to printout notification during creation of it, but I have one problem. I found one user-exit where I can >do it but in that moment data are not stored in DB yet. Maybe you know how to force system to save data >in DB.

Why do you want to force the save into the database? What if the data isn't correct?

If it really is necessary to make a printout while the data has not been saved yet, write your own print-program. You'll need to understand how printing normally is taken care of in terms of print program, routine and such. And when you have written your own print program, pass the data to said print program instead of having the program read it from the database.

edit: i assume it is not possible at all to set the customizing to make a print (preview) while the data is nto yet saved.

Edited by: Maen Anachronos on Sep 29, 2008 3:02 PM

0 Kudos

but data is correct I know that, because all checks in SAP is done.

You have to understand that when I go in debugging mode on break-point system is saving data to database. That is why when try to check data in DB during debuggind they are there, so everything is ok.

But when I don't use debugg mode (only transaction) data is saved after my user-exit, so I want to save it manually to use select statement.