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: 

updation of databae .

Former Member
0 Kudos
106

Dear gurus ,

I am designing one module pool prog for purchase ( lc in sd vx11n ) as my client requirement .

I have lot of fields , here I cant use update command for updation of databse in change mode like vx12n , because of lot of field . Is there any way so that system wl identify by itself any changes in any field , then only it update the FD document no .else message come data already saved .

I need your healp gurus , I am waiting for your valuable reply .

Regards .

Joy .

1 ACCEPTED SOLUTION

Former Member
0 Kudos
58

HI,

You can compare the structures before updating to the database.

Take Structure ST_OLD & ST_NEW both contains the same data before PBO use the ST_NEW structure field on th screen and change by user in the values then ST_NEW contains new value then

IF ST_OLD NE ST_NEW.
" Update database
ELSE.
" No Change in the data record
ENDIF.

3 REPLIES 3

MarcinPciak
Active Contributor
0 Kudos
58

Why don't you just create a query to DB checking if your entry is already in? Simple select stamemtent should suffice. Then depending on the result you either update DB table or display appropriate message.

There is also another technique, but obsolete one. You can use ON CHANGE OF field statement which only goes inside the block when any changes are done to this field comparing to last dialog step. This however requires listing all the fields which you are interesed in.


"in PAI.
ON CHANGE OF dobj OR dobj1 OR dobj2...
  "statement_block reach only if one of the fields are changed
ENDON. 

Regards

Marcin

PS: Please don't use bold messages, this decreases readibility.

Edited by: Marcin Pciak on May 4, 2009 10:15 AM

Former Member
0 Kudos
58

Hi,

you can try change doument header i.e cdhdr and cdpos tables beacuse when there is any

change those will be reocrded in these tables. go to t-code scdo check find change doc object.

Thanks & Regards,

Sateesh.

Former Member
0 Kudos
59

HI,

You can compare the structures before updating to the database.

Take Structure ST_OLD & ST_NEW both contains the same data before PBO use the ST_NEW structure field on th screen and change by user in the values then ST_NEW contains new value then

IF ST_OLD NE ST_NEW.
" Update database
ELSE.
" No Change in the data record
ENDIF.