‎2009 Dec 21 6:55 AM
Hi
I am using z1 program in the version of 00004.Now i want to activate the version of 00002.That can be done by only through the code not from sapGUI For this i got one code like below and i pasted in z1 program also...
DATA: lv_objname_l LIKE vrsd-objname,
ls_infoline_1_a LIKE vrsinfolna,
ls_infoline_1_b LIKE vrsinfolnb.
SUBMIT (dir_f9_report) AND RETURN
WITH objtype = ls_vers_1-objtype
WITH objname = lv_objname_l
WITH versno = ls_vers_1-versno
WITH infolna = ls_infoline1a
WITH infolnb = ls_infoline1b.
In this i gave the value like
dir_f9_report = z1
objname = z1
versno = 00002
But for objtype,infolna,infolnb what shall i give and also the given values are correct?????
‎2009 Dec 21 8:19 AM
Go to version management and select your 0002 version and click on retrieve.
This will overwrite the active version with the version selected and the it will create a temperory version of the active version which existed.
You dont need to manually copy the previous version.
Regards,
Lalit Mohan Gupta.
‎2009 Dec 21 8:46 AM
I think you are confused.
SUBMIT 'Program' WITH VERSNO = '00001', does not run version 00001 of 'Program'. It runs 'Program' setting "VERSNO" on 'Program''s selection screen to be '00001'.
matt
‎2009 Dec 21 9:22 AM
seems to be a follow up to
I don't think there is a completely "dark" way of doing this, at least not a straightforward one. The SAP standard determines the program for version retrieval per object type from table VERSOBJ by using function module SVRS_GET_OBJECT_REPORTS, then calls this program, e.g. RSEDTVE1 for object type REPS (report source). RSEDTVE1 however comes up with a pop up like "are you sure you want to do this?". It also contains lots of complex logic that does not seem to be encapsulated anywhere else (have not checked though).
Thomas
‎2009 Dec 23 11:32 AM
Hi Thomas,
Like this the same way what is the FM for Generate version.